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