cbsref/telephonyrefplugins/atltsy/atcommand/pktservice/inc/atgprsntwkregstatuschange.h
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 // @file atgprsntwkregstatus.h
       
    15 // AT command definition
       
    16 // This file defines the AT command used to Notify the phones current network
       
    17 //registration status..
       
    18 //
       
    19 
       
    20 #ifndef __ATGPRSNTWKREGSTATUSCHANGE_H
       
    21 #define __ATGPRSNTWKREGSTATUSCHANGE_H
       
    22 
       
    23 //system include
       
    24 
       
    25 //user include
       
    26 #include "atcommandbase.h"
       
    27 /**
       
    28  * CATGprsNtwkRegStatusChange inherits from the CAtCommandBase class. 
       
    29  * AT command to Notify the phones current network
       
    30  * registration status.
       
    31  * This class transmits the following commands: +CGREG:
       
    32  */
       
    33 class CATGprsNtwkRegStatusChange : public CAtCommandBase
       
    34 	{
       
    35 public:
       
    36 	static CATGprsNtwkRegStatusChange* NewL(CGlobalPhonemanager& aGloblePhone,
       
    37 			                                CCtsyDispatcherCallback& aCtsyDispatcherCallback);
       
    38 	
       
    39 	static CATGprsNtwkRegStatusChange* NewLC(CGlobalPhonemanager& aGloblePhone,
       
    40 			                                 CCtsyDispatcherCallback& aCtsyDispatcherCallback);			                     	
       
    41 	/**
       
    42 	 * Destructor
       
    43 	 *
       
    44 	 */
       
    45 	virtual ~CATGprsNtwkRegStatusChange();
       
    46 	/**
       
    47 	 * Virtual function. Inherited from CAtCommandBase
       
    48 	 * Start Execute AT Command
       
    49 	 */
       
    50 	virtual void ExecuteCommand(){};
       
    51 	/**
       
    52 	 * Parses the +CGREG unsolicited string from the modem.
       
    53 	 * An example response would be '+CGREG: 2' where the value denotes the
       
    54 	 * current registration status.
       
    55 	 * If parsing succeeds then aRegStatus is updated.
       
    56 	 * 
       
    57 	 * Virtual function. Inherited from CAtCommandBase
       
    58 	 * @param aResponseBuf Line buf reading from baseband 
       
    59 	 */
       
    60 	virtual void ParseResponseL(const TDesC8& aResponseBuf);
       
    61 	/**
       
    62 	 * Will be called by AT Manager whenever a event was triggered
       
    63 	 * 
       
    64 	 * @param aEventSource
       
    65 	 * @param aStatus
       
    66 	 */
       
    67 	virtual void EventSignal(TAtEventSource aEventSource, TInt aStatus);
       
    68 	/**
       
    69 	 * 
       
    70 	 * 
       
    71 	 */
       
    72 	void Enable();
       
    73 	/**
       
    74 	 * 
       
    75 	 * 
       
    76 	 */
       
    77 	void Disable();
       
    78 	
       
    79 	
       
    80 protected:
       
    81 	/**
       
    82 	 * Constructor
       
    83 	 *
       
    84 	 * @param aGloblePhone
       
    85 	 * @param aCtsyDispatcherCallback
       
    86 	 */
       
    87 	CATGprsNtwkRegStatusChange(CGlobalPhonemanager& aGloblePhone,
       
    88 				               CCtsyDispatcherCallback& aCtsyDispatcherCallback);	
       
    89 	/**
       
    90 	 * 2nd Constructor
       
    91 	 * This function must be called in his subtype class for 
       
    92 	 * creating instance of class CRespondBufParser
       
    93 	 */
       
    94 	void ConstructL();
       
    95 	
       
    96 private:
       
    97 	/**
       
    98 	 * 
       
    99 	 * 
       
   100 	 */
       
   101 	RPacketService::TRegistrationStatus iRegistrationStatus;
       
   102 	/*
       
   103 	 * The return value of AT command executed 
       
   104 	 */
       
   105 	TInt iError;
       
   106 	};
       
   107 
       
   108 #endif