cbsref/telephonyrefplugins/atltsy/atcommand/phone/inc/atgetnetworkinfo.h
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 // @file atgetnetworkinfo.h
       
    15  /**
       
    16  * @file
       
    17  * Network Header file.
       
    18  * AT command definition
       
    19  * This file defines the AT command for Getting GSM Networ info
       
    20  * Describes the GSM Network & Operator information.
       
    21  * Using a standard (ETSI GSM 07.07 April 1997) AT command : AT
       
    22  * 
       
    23  */
       
    24 #ifndef __CNETWORK_H__
       
    25 #define __CNETWORK_H__
       
    26 
       
    27 //system include
       
    28 #include <etelmm.h>
       
    29 //user include
       
    30 #include "atcommandbase.h"
       
    31 
       
    32 /**
       
    33  * Determines GSM Network and Operator Information.
       
    34  *
       
    35  * CATNetworkInfo inherits from the CAtCommandBase class. 
       
    36  * This class transmits the Set Network Operator Command (AT+COPS=x,x) in numeric, short 
       
    37  * alphanumeric and long alphanumeric formats. It also determines the current operator 
       
    38  * using the operator query command (AT+COPS?).
       
    39  */
       
    40 class CATNetworkInfo : public CAtCommandBase
       
    41 {
       
    42 public:
       
    43 	static CATNetworkInfo* NewL(CGlobalPhonemanager& aGloblePhone, 
       
    44 		                        CCtsyDispatcherCallback& aCtsyDispatcherCallback);
       
    45 	/**
       
    46 	 * Destructor
       
    47 	 *
       
    48 	 */
       
    49 	~CATNetworkInfo();
       
    50 
       
    51 	/**
       
    52 	 * Virtual function. Inherited from CAtCommandBase
       
    53 	 *  Start Execute AT Command
       
    54 	 */
       
    55 	virtual void ExecuteCommand();
       
    56 	/**
       
    57 	 * Get the return value executed AT Command
       
    58 	 */
       
    59 	RMobilePhone::TMobilePhoneNetworkInfoV5 GetNetWorkInfo();
       
    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 	 * Virtual function. Inherited from CAtCommandBase
       
    69 	 * @param aResponseBuf Line buf reading from baseband 
       
    70 	 */
       
    71 	virtual void ParseResponseL(const TDesC8& aResponseBuf);
       
    72 	/**
       
    73 	 * Get error value executed AT Command
       
    74 	 */
       
    75 	TInt GetErrorValue();
       
    76 	
       
    77 	void SetToGetHomeNwk();
       
    78 	/**
       
    79 	 * Start this request
       
    80 	 */
       
    81 	virtual void StartRequest();
       
    82 	
       
    83 	enum TPortAccess
       
    84 		{
       
    85 		EPortAccessAllowed,
       
    86 		EPortAccessDenied
       
    87 		};
       
    88 protected:	
       
    89 	/**
       
    90 	 * Constructor
       
    91 	 *
       
    92 	 * @param aGloblePhone
       
    93 	 * @param aCtsyDispatcherCallback
       
    94 	 */
       
    95 	CATNetworkInfo(CGlobalPhonemanager& aGloblePhone, 
       
    96 		           CCtsyDispatcherCallback& aCtsyDispatcherCallback);
       
    97 	/**
       
    98 	 * 2nd Constructor
       
    99 	 */
       
   100 	void ConstructL();
       
   101 private:
       
   102 	/**
       
   103 	 * The return phone infomation  of AT command executed 
       
   104 	 */
       
   105 	RMobilePhone::TMobilePhoneNetworkInfoV5 iNetworkInfo; 
       
   106 	/**
       
   107 	 * The return error value of AT command executed 
       
   108 	 */
       
   109 	TInt iError;
       
   110 	
       
   111 	TInt iNameFormat;
       
   112 	
       
   113 	TBool iGetHomeNwk;
       
   114 	
       
   115 };
       
   116 
       
   117 #endif