cbsref/telephonyrefplugins/atltsy/atcommand/phone/src/atsetnotifycell.cpp
branchRCL_3
changeset 65 630d2f34d719
equal deleted inserted replaced
61:17af172ffa5f 65:630d2f34d719
       
     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 // CATGetModemStatus
       
    15 // Description:
       
    16 // CATSetNotifyCellInfo
       
    17 
       
    18 #include "atsetnotifycell.h"
       
    19 #include "mslogger.h"
       
    20 #include "atgetphonecellinfo.h"
       
    21 #include "atnotifycellinfo.h"
       
    22 
       
    23 
       
    24 _LIT8(KATSetCellCommand, "AT+CCED=0,1\r");
       
    25 // Class CATSetNotifyCellInfo
       
    26 // ---------------------------------------------------------------------------
       
    27 // CATSetNotifyCellInfo::NewL
       
    28 // other items were commented in a header
       
    29 // ---------------------------------------------------------------------------
       
    30 CATSetNotifyCellInfo* CATSetNotifyCellInfo::NewL(CGlobalPhonemanager& aGloblePhone, 
       
    31 	                                             CCtsyDispatcherCallback& aCtsyDispatcherCallback)
       
    32 	{
       
    33 	CATSetNotifyCellInfo* self = new(ELeave) CATSetNotifyCellInfo(aGloblePhone,
       
    34 			                                                      aCtsyDispatcherCallback);
       
    35 	CleanupStack::PushL(self );
       
    36 	self->ConstructL();
       
    37 	CleanupStack::Pop(self );
       
    38 	return self ;
       
    39 	}
       
    40 // ---------------------------------------------------------------------------
       
    41 // CATSetNotifyCellInfo::CATSetNotifyCellInfo
       
    42 // other items were commented in a header
       
    43 // ---------------------------------------------------------------------------
       
    44 CATSetNotifyCellInfo::CATSetNotifyCellInfo(CGlobalPhonemanager& aGloblePhone, 
       
    45 	                                      CCtsyDispatcherCallback& aCtsyDispatcherCallback)
       
    46 		:CAtCommandBase(aGloblePhone,aCtsyDispatcherCallback)
       
    47 	{
       
    48 	}
       
    49 // ---------------------------------------------------------------------------
       
    50 // CATSetNotifyCellInfo::ConstructL
       
    51 // other items were commented in a header
       
    52 // ---------------------------------------------------------------------------
       
    53 void CATSetNotifyCellInfo::ConstructL()
       
    54 	{
       
    55 	CAtCommandBase::ConstructL();
       
    56 	}
       
    57 // ---------------------------------------------------------------------------
       
    58 // CATSetNotifyCellInfo::~CATSetNotifyCellInfo
       
    59 // other items were commented in a header
       
    60 // ---------------------------------------------------------------------------
       
    61 CATSetNotifyCellInfo::~CATSetNotifyCellInfo()
       
    62 	{
       
    63 	}
       
    64 // ---------------------------------------------------------------------------
       
    65 // CATSetNotifyCellInfo::StartRequestL
       
    66 // other items were commented in a header
       
    67 // ---------------------------------------------------------------------------
       
    68 void CATSetNotifyCellInfo::StartRequest()
       
    69 	{
       
    70 	ExecuteCommand();
       
    71 	}
       
    72 // ---------------------------------------------------------------------------
       
    73 // CATSetNotifyCellInfo::ExecuteCommand
       
    74 // other items were commented in a header
       
    75 // ---------------------------------------------------------------------------
       
    76 void CATSetNotifyCellInfo::ExecuteCommand()
       
    77 	{
       
    78 	iTxBuffer.Copy(KATSetCellCommand);
       
    79 	Write();
       
    80 	}
       
    81 // ---------------------------------------------------------------------------
       
    82 // CATSetNotifyCellInfo::ParseResponseL
       
    83 // other items were commented in a header
       
    84 // ---------------------------------------------------------------------------
       
    85 void CATSetNotifyCellInfo::ParseResponseL(const TDesC8& /*aResponseBuf*/)
       
    86 	{
       
    87 	if (CurrentLine().Match(KLtsyOkString) == 0)
       
    88 		{
       
    89 		iError = KErrNone;
       
    90 		}
       
    91 	else
       
    92 		{
       
    93 		iError = KErrGeneral;
       
    94 		}
       
    95 	}
       
    96 //// ---------------------------------------------------------------------------
       
    97 //// CATSetNotifyCellInfo::GetErrorValue
       
    98 //// other items were commented in a header
       
    99 //// ---------------------------------------------------------------------------
       
   100 TInt CATSetNotifyCellInfo::GetErrorValue()
       
   101 	{
       
   102 	return iError;
       
   103 	}
       
   104 // ---------------------------------------------------------------------------
       
   105 // CATSetNotifyCellInfo::EventSignal
       
   106 // other items were commented in a header
       
   107 // ---------------------------------------------------------------------------
       
   108 void CATSetNotifyCellInfo::EventSignal(TAtEventSource aEventSource, TInt aStatus)
       
   109 	{
       
   110 	if(KErrNone == aStatus)
       
   111 		{
       
   112 		if(aEventSource == EReadCompletion)
       
   113 			{
       
   114 			aStatus = iError;
       
   115 			}
       
   116 		else
       
   117 		    {
       
   118 		    return;
       
   119 		    }
       
   120 		}
       
   121 	
       
   122 	CAtCommandBase::Complete();
       
   123 	iCtsyDispatcherCallback.CallbackPhoneRegisterCellInfoChangeNotificationComp(aStatus);
       
   124 	if(iIpcCompleteObserver)
       
   125 	    {
       
   126 	    iIpcCompleteObserver->NotifyIpcRequestComplete(iIpcId);
       
   127 	    }
       
   128 	}
       
   129 //
       
   130 // End of file