cbsref/telephonyrefplugins/atltsy/atcommand/generic/src/athelpercommand.cpp
changeset 49 f50f4094acd7
equal deleted inserted replaced
48:14460bf2a402 49:f50f4094acd7
       
     1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // This contains CATHelperCommand which is composite class of a number classes
       
    15 // 
       
    16 
       
    17 #include "athelpercommand.h"
       
    18 #include "mslogger.h"
       
    19 
       
    20 // Class CATHelperCommand
       
    21 // ---------------------------------------------------------------------------
       
    22 // CATHelperCommand::NewL
       
    23 // other items were commented in a header
       
    24 // ---------------------------------------------------------------------------
       
    25 CATHelperCommand* CATHelperCommand::NewL(CGlobalPhonemanager& aGloblePhone, 
       
    26 	                                       CCtsyDispatcherCallback& aCtsyDispatcherCallback)
       
    27 	{
       
    28 	CATHelperCommand* self = new(ELeave) CATHelperCommand(aGloblePhone,
       
    29 			                                                aCtsyDispatcherCallback);
       
    30 	CleanupStack::PushL(self );
       
    31 	self->ConstructL();
       
    32 	CleanupStack::Pop(self );
       
    33 	return self ;
       
    34 	}
       
    35 // ---------------------------------------------------------------------------
       
    36 // CATHelperCommand::CATHelperCommand
       
    37 // other items were commented in a header
       
    38 // ---------------------------------------------------------------------------
       
    39 CATHelperCommand::CATHelperCommand(CGlobalPhonemanager& aGloblePhone, 
       
    40 	                                 CCtsyDispatcherCallback& aCtsyDispatcherCallback)
       
    41 		:CAtCommandBase(aGloblePhone,aCtsyDispatcherCallback)
       
    42 	{
       
    43 	}
       
    44 // ---------------------------------------------------------------------------
       
    45 // CATHelperCommand::ConstructL
       
    46 // other items were commented in a header
       
    47 // ---------------------------------------------------------------------------
       
    48 void CATHelperCommand::ConstructL()
       
    49 	{
       
    50 	CAtCommandBase::ConstructL();
       
    51 	}
       
    52 // ---------------------------------------------------------------------------
       
    53 // CATHelperCommand::~CATHelperCommand
       
    54 // other items were commented in a header
       
    55 // ---------------------------------------------------------------------------
       
    56 CATHelperCommand::~CATHelperCommand()
       
    57 	{
       
    58 	}
       
    59 // ---------------------------------------------------------------------------
       
    60 // CATHelperCommand::StartRequestL
       
    61 // other items were commented in a header
       
    62 // ---------------------------------------------------------------------------
       
    63 void CATHelperCommand::StartRequest()
       
    64 	{
       
    65 	ExecuteCommand();
       
    66 	}
       
    67 // ---------------------------------------------------------------------------
       
    68 // CATHelperCommand::ExecuteCommand
       
    69 // other items were commented in a header
       
    70 // ---------------------------------------------------------------------------
       
    71 void CATHelperCommand::ExecuteCommand()
       
    72 	{
       
    73 	iTxBuffer.Copy(iATBuffer);
       
    74 	Write();
       
    75 	}
       
    76 // ---------------------------------------------------------------------------
       
    77 // CATHelperCommand::CancelCommand
       
    78 // other items were commented in a header
       
    79 // ---------------------------------------------------------------------------
       
    80 void CATHelperCommand::CancelCommand()
       
    81 	{	
       
    82 	}
       
    83 // ---------------------------------------------------------------------------
       
    84 // CATHelperCommand::ParseResponseL
       
    85 // other items were commented in a header
       
    86 // ---------------------------------------------------------------------------
       
    87 void CATHelperCommand::ParseResponseL(const TDesC8& /*aResponseBuf*/)
       
    88 	{
       
    89 	if (CurrentLine().Match(KLtsyOkString) == 0)
       
    90 		{
       
    91 		iError = KErrNone;
       
    92 		}
       
    93 	else
       
    94 		{
       
    95 		iError = KErrGeneral;
       
    96 		}
       
    97 	}
       
    98 // ---------------------------------------------------------------------------
       
    99 // CATHelperCommand::GetErrorValue
       
   100 // other items were commented in a header
       
   101 // ---------------------------------------------------------------------------
       
   102 TInt CATHelperCommand::GetErrorValue()
       
   103 	{
       
   104 	return iError;
       
   105 	}
       
   106 // ---------------------------------------------------------------------------
       
   107 // CATHelperCommand::SetAtCommandString
       
   108 // other items were commented in a header
       
   109 // ---------------------------------------------------------------------------
       
   110 void CATHelperCommand::SetAtCommandString(const TDesC8& aATString)
       
   111 	{
       
   112 	iATBuffer.Copy(aATString);
       
   113 	}
       
   114 // ---------------------------------------------------------------------------
       
   115 // CATHelperCommand::StartATType
       
   116 // other items were commented in a header
       
   117 // ---------------------------------------------------------------------------
       
   118 void CATHelperCommand::SetATType(TLtsyATCommandType aATType)
       
   119 	{
       
   120 	iAtType = aATType;
       
   121 	}
       
   122 //
       
   123 // End of file