telephonyutils/etel3rdpartyapi/inc/TelephonyActNetwork.h
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 /*
       
     2 * Copyright (c) 2009 Sony Ericsson Mobile Communications AB
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Sony Ericsson Mobile Communications AB - initial contribution.
       
    11 * Nokia Corporation - additional changes.
       
    12 * 
       
    13 * Contributors:
       
    14 * 
       
    15 * Description:
       
    16 * TelephonyActNetwork Active Object class, used by CTelephonyFunctions class.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 /**
       
    22  @file
       
    23 */
       
    24 
       
    25 
       
    26 #include <etel.h>
       
    27 #include <etelmm.h>
       
    28 #include "Etel3rdParty.h"
       
    29 
       
    30 class CTelephony;
       
    31 class CTelephonyFunctions;	// forward reference
       
    32 class CAsyncRequestBaseAct;
       
    33 
       
    34 class CGetNetworkRegistrationStatusAct : public CAsyncRequestBaseAct
       
    35 /**
       
    36 This is an active object responsible for interacting with Multimode ETel
       
    37 */
       
    38 	{
       
    39 	
       
    40 public:		
       
    41 	static CGetNetworkRegistrationStatusAct* NewL(CTelephonyFunctions* aTelephonyFunctions);
       
    42 	~CGetNetworkRegistrationStatusAct();
       
    43 	void GetNetworkRegistrationStatus(TDes8& aId);
       
    44 	static void GetRegistrationStatus(const RMobilePhone::TMobilePhoneRegistrationStatus aMMRegStatus, CTelephony::TRegistrationStatus& aTelRegStatus);
       
    45 protected:	
       
    46 	void Complete();
       
    47 	TInt RunError(TInt aLeaveCode);
       
    48 	void DoCancel();
       
    49 	
       
    50 private:	
       
    51 	CGetNetworkRegistrationStatusAct(CTelephonyFunctions* aTelephonyFunctions);
       
    52 	CTelephonyFunctions* iTelephonyFunctions;
       
    53 	CTelephony::TNetworkRegistrationV1* iISVNetworkRegistration;
       
    54 	RMobilePhone::TMobilePhoneRegistrationStatus iMMNetworkRegistration;
       
    55 	};
       
    56 
       
    57 /**
       
    58 This is an active object responsible for interacting with Multimode
       
    59 ETel.  CGetCurrentNetworkNameAct is used to request current network
       
    60 information.
       
    61 */
       
    62 class CGetCurrentNetworkInfoAct : public CAsyncRequestBaseAct
       
    63 	{
       
    64 	
       
    65 public:		
       
    66 	static CGetCurrentNetworkInfoAct* NewL(CTelephonyFunctions* aTelephonyFunctions);
       
    67 	~CGetCurrentNetworkInfoAct();
       
    68 	void GetCurrentNetworkInfo(TDes8& aPckg);
       
    69 
       
    70 	static void MapNetworkInfo(CTelephony::TEtelISVType* aISVNetworkInfo, RMobilePhone::TMobilePhoneNetworkInfoV2* aMobileNetworkInfo, RMobilePhone::TMobilePhoneLocationAreaV1* aMMArea);
       
    71 			
       
    72 protected:	
       
    73 	void Complete();
       
    74 	TInt RunError(TInt aLeaveCode);
       
    75 	void DoCancel();
       
    76 	
       
    77 private:	
       
    78 	CGetCurrentNetworkInfoAct(CTelephonyFunctions* aTelephonyFunctions);
       
    79 	CTelephonyFunctions* iTelephonyFunctions;
       
    80 	CTelephony::TEtelISVType* iISVNetworkInfo;
       
    81 	RMobilePhone::TMobilePhoneLocationAreaV1 iMMArea;
       
    82 	TInt iPostedIPC;
       
    83 	RMobilePhone::TMobilePhoneNetworkInfoV2 iMMNetworkInfo;
       
    84 	RMobilePhone::TMobilePhoneNetworkInfoV2Pckg iMMNetworkInfoPckg;
       
    85 	};
       
    86 
       
    87 /**
       
    88 This is an active object responsible for interacting with Multimode
       
    89 ETel.  CGetCurrentNetworkNameAct is used to request current network
       
    90 name.
       
    91 */
       
    92 class CGetCurrentNetworkNameAct : public CAsyncRequestBaseAct
       
    93 	{
       
    94 	
       
    95 public:		
       
    96 	static CGetCurrentNetworkNameAct* NewL(CTelephonyFunctions* aTelephonyFunctions);
       
    97 	~CGetCurrentNetworkNameAct();
       
    98 	void GetCurrentNetworkName(TDes8& aPckg);
       
    99 			
       
   100 protected:	
       
   101 	void Complete();
       
   102 	TInt RunError(TInt aLeaveCode);
       
   103 	void DoCancel();
       
   104 	
       
   105 private:	
       
   106 	CGetCurrentNetworkNameAct(CTelephonyFunctions* aTelephonyFunctions);
       
   107 	CTelephonyFunctions* iTelephonyFunctions;
       
   108 	CTelephony::TEtelISVType* iISVCurrentNetworkName;
       
   109 	RMobilePhone::TMobilePhoneNetworkNameV3  iMMNetworkNameV3;
       
   110 	RMobilePhone::TMobilePhoneNetworkNameV3Pckg iMMNetworkNameV3Pckg;
       
   111 	RMobilePhone::TMobilePhoneOPlmnV3 iLocInfo;
       
   112 	RMobilePhone::TMobilePhoneOPlmnV3Pckg iLocInfoPckg;
       
   113 	};
       
   114 	
       
   115 class CGetOperatorNameAct : public CAsyncRequestBaseAct
       
   116 /**
       
   117 This is an active object responsible for interacting with Multimode ETel
       
   118 */
       
   119 	{
       
   120 	
       
   121 public:		
       
   122 	static CGetOperatorNameAct* NewL(CTelephonyFunctions* aTelephonyFunctions);
       
   123 	~CGetOperatorNameAct();
       
   124 	void GetOperatorName(TDes8& aId);
       
   125 			
       
   126 protected:	
       
   127 	void Complete();
       
   128 	TInt RunError(TInt aLeaveCode);
       
   129 	void DoCancel();
       
   130 	
       
   131 private:	
       
   132 	CGetOperatorNameAct(CTelephonyFunctions* aTelephonyFunctions);
       
   133 	CTelephonyFunctions* iTelephonyFunctions;
       
   134 	CTelephony::TOperatorNameV1* iISVOperatorName;
       
   135 	RMobilePhone::TMobilePhoneServiceProviderNameV2 iMMServiceProviderName;
       
   136 	RMobilePhone::TMobilePhoneServiceProviderNameV2Pckg iMMServiceProviderNamePckg;
       
   137 	};
       
   138 
       
   139 class CNotifyNetworkRegistrationStatusAct : public CAsyncRequestBaseAct
       
   140 /**
       
   141 This is an active object responsible for interacting with Multimode ETel
       
   142 */
       
   143 	{
       
   144 	
       
   145 public:		
       
   146 	static CNotifyNetworkRegistrationStatusAct* NewL(CTelephonyFunctions* aTelephonyFunctions);
       
   147 	~CNotifyNetworkRegistrationStatusAct();
       
   148 	void NotifyNetworkRegistrationStatus(TDes8& aId);
       
   149 			
       
   150 protected:	
       
   151 	void Complete();
       
   152 	TInt RunError(TInt aLeaveCode);
       
   153 	void DoCancel();
       
   154 	
       
   155 private:	
       
   156 	CNotifyNetworkRegistrationStatusAct(CTelephonyFunctions* aTelephonyFunctions);
       
   157 	CTelephonyFunctions* iTelephonyFunctions;
       
   158 	CTelephony::TNetworkRegistrationV1* iISVNetworkRegistration;
       
   159 	RMobilePhone::TMobilePhoneRegistrationStatus iMMNetworkRegistration;
       
   160 	};
       
   161 
       
   162 /**
       
   163 This is an active object responsible for interacting with Multimode
       
   164 ETel.  Its use is for posting notification requests on current network
       
   165 information changes.
       
   166 */
       
   167 class CNotifyCurrentNetworkInfoAct : public CAsyncRequestBaseAct
       
   168 	{
       
   169 	
       
   170 public:		
       
   171 	static CNotifyCurrentNetworkInfoAct* NewL(CTelephonyFunctions* aTelephonyFunctions);
       
   172 	~CNotifyCurrentNetworkInfoAct();
       
   173 	void NotifyCurrentNetworkInfo(TDes8& aPckg);
       
   174 			
       
   175 protected:	
       
   176 	void Complete();
       
   177 	TInt RunError(TInt aLeaveCode);
       
   178 	void DoCancel();
       
   179 	
       
   180 private:	
       
   181 	CNotifyCurrentNetworkInfoAct(CTelephonyFunctions* aTelephonyFunctions);
       
   182 	CTelephonyFunctions* iTelephonyFunctions;
       
   183 	CTelephony::TEtelISVType* iISVNetworkInfo;
       
   184 	RMobilePhone::TMobilePhoneLocationAreaV1 iMMArea;
       
   185 	TInt iPostedIPC;
       
   186 	RMobilePhone::TMobilePhoneNetworkInfoV2 iMMNetworkInfo;
       
   187 	RMobilePhone::TMobilePhoneNetworkInfoV2Pckg iMMNetworkInfoPckg;
       
   188 	};