24
|
1 |
// Copyright (c) 2008-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 |
//
|
|
15 |
|
|
16 |
#ifndef __CPHONEDISPATCHER_H_
|
|
17 |
#define __CPHONEDISPATCHER_H_
|
|
18 |
|
|
19 |
// INCLUDES
|
|
20 |
#include <e32std.h>
|
|
21 |
#include <e32base.h>
|
|
22 |
#include <e32def.h>
|
|
23 |
#include <etelmm.h>
|
|
24 |
|
|
25 |
#include <ctsy/ltsy/mltsydispatchfactory.h>
|
|
26 |
|
|
27 |
|
|
28 |
#include "requestqueueoneshot.h"
|
|
29 |
#include <ctsy/ltsy/ltsylogger.h>
|
|
30 |
#include "mdispatchercallback.h"
|
|
31 |
#include <ctsy/serviceapi/cmmutility.h>
|
|
32 |
#include <ctsy/rmmcustomapi.h>
|
|
33 |
|
|
34 |
// FORWARD DECLARATIONS
|
|
35 |
class CMmDataPackage;
|
|
36 |
class MmMessageManagerCallback;
|
|
37 |
class CMobilePhoneNetworkListV2;
|
|
38 |
class TDispatcherHolder;
|
|
39 |
|
|
40 |
class MLtsyDispatchPhoneGetFdnStatus;
|
|
41 |
class MLtsyDispatchPhoneGetNetworkRegistrationStatus;
|
|
42 |
class MLtsyDispatchPhoneGetHomeNetwork;
|
|
43 |
class MLtsyDispatchPhoneBootNotifyModemStatusReady;
|
|
44 |
class MLtsyDispatchPhoneBootNotifySimStatusReady;
|
|
45 |
class MLtsyDispatchPhoneSimRefreshRegister;
|
|
46 |
|
|
47 |
class MLtsyDispatchPhoneGetServiceProviderName;
|
|
48 |
class MLtsyDispatchPhoneGetPhoneId;
|
|
49 |
class MLtsyDispatchPhoneGetDetectedNetworks;
|
|
50 |
class MLtsyDispatchPhoneGetDetectedNetworksCancel;
|
|
51 |
class MLtsyDispatchPhoneSelectNetwork;
|
|
52 |
class MLtsyDispatchPhoneSelectNetworkCancel;
|
|
53 |
class MLtsyDispatchPhoneSetNetworkSelectionSetting;
|
|
54 |
class MBootSequenceCallbacks;
|
|
55 |
class MLtsyDispatchPhoneGetCurrentNetworkInfo;
|
|
56 |
class MLtsyDispatchPhoneGetNetworkMode;
|
|
57 |
class MLtsyDispatchPhoneGetNitzInfo;
|
|
58 |
class MLtsyDispatchPhoneGetSignalStrength;
|
|
59 |
class MLtsyDispatchPhoneGetBatteryInfo;
|
|
60 |
class MLtsyDispatchPhoneNspsWakeup;
|
|
61 |
class MLtsyDispatchPhoneSetSystemNetworkMode;
|
|
62 |
class MLtsyDispatchPhoneGetCurrentSystemNetworkModes;
|
|
63 |
class MLtsyDispatchPhoneResetNetServer;
|
|
64 |
class MLtsyDispatchPhoneSetAlwaysOnMode;
|
|
65 |
class MLtsyDispatchPhoneSetDriveMode;
|
|
66 |
class MLtsyDispatchPhoneGetHspaStatus;
|
|
67 |
class MLtsyDispatchPhoneSetHspaStatus;
|
|
68 |
class MLtsyDispatchPhoneGetNetworkProviderName;
|
|
69 |
class MLtsyDispatchPhoneGetOperatorName;
|
|
70 |
class MLtsyDispatchPhoneGetCellInfo;
|
|
71 |
class MLtsyDispatchPhoneRegisterCellInfoChangeNotification;
|
|
72 |
class MLtsyDispatchPhoneGetPhoneCellInfo;
|
|
73 |
class MLtsyDispatchPhoneGetUsimServiceSupport;
|
|
74 |
class MLtsyDispatchPhoneGetCurrentActiveUsimApplication;
|
|
75 |
class MLtsyDispatchPhoneTerminateAllCalls;
|
|
76 |
class MLtsyDispatchPhoneGetSystemNetworkBand;
|
|
77 |
class MLtsyDispatchPhoneSetSystemNetworkBand;
|
|
78 |
|
|
79 |
const TUint KPhoneIdReqOriginPhoneFu = 0x1;
|
|
80 |
const TUint KPhoneIdReqOriginSatFu = 0x2;
|
|
81 |
|
|
82 |
|
|
83 |
// CLASS DECLARATION
|
|
84 |
|
|
85 |
/**
|
|
86 |
* This class is responsible for packing and unpacking data belonging
|
|
87 |
* to Phone related requests to the Licensee LTSY.
|
|
88 |
*/
|
|
89 |
class CPhoneDispatcher : public CBase, public MDispatcherCallback
|
|
90 |
{
|
|
91 |
public:
|
|
92 |
|
|
93 |
virtual ~CPhoneDispatcher();
|
|
94 |
|
|
95 |
static CPhoneDispatcher* NewL(
|
|
96 |
MLtsyDispatchFactoryV1& aLtsyFactory,
|
|
97 |
MmMessageManagerCallback& aMessageManagerCallback,
|
|
98 |
MmMessageManagerCallback& aSatMessageManagerCallback,
|
|
99 |
CRequestQueueOneShot& aRequestAsyncOneShot,
|
|
100 |
MBootSequenceCallbacks& aBootSequenceObserver);
|
|
101 |
|
|
102 |
static CPhoneDispatcher* NewLC(
|
|
103 |
MLtsyDispatchFactoryV1& aLtsyFactory,
|
|
104 |
MmMessageManagerCallback& aMessageManagerCallback,
|
|
105 |
MmMessageManagerCallback& aSatMessageManagerCallback,
|
|
106 |
CRequestQueueOneShot& aRequestAsyncOneShot,
|
|
107 |
MBootSequenceCallbacks& aBootSequenceObserver);
|
|
108 |
|
|
109 |
// Dispatcher functions for dispatching requests DOWN to the Licensee LTSY
|
|
110 |
|
|
111 |
TInt DispatchGetFdnStatusL();
|
|
112 |
TInt DispatchGetNetworkRegistrationStatusL();
|
|
113 |
TInt DispatchGetHomeNetworkL();
|
|
114 |
TInt DispatchBootNotifyModemStatusReadyL();
|
|
115 |
TInt DispatchBootNotifySimStatusReadyL();
|
|
116 |
TInt DispatchSimRefreshRegisterL(const CMmDataPackage* aDataPackage);
|
|
117 |
TInt DispatchGetServiceProviderNameL();
|
|
118 |
TInt DispatchGetPhoneIdL(TUint aRequestOrigin);
|
|
119 |
TInt DispatchGetDetectedNetworksL();
|
|
120 |
TInt DispatchGetDetectedNetworksCancelL();
|
|
121 |
TInt DispatchSelectNetworkL(const CMmDataPackage* aDataPackage);
|
|
122 |
TInt DispatchSelectNetworkCancelL();
|
|
123 |
TInt DispatchSetNetworkSelectionSettingL(const CMmDataPackage* aDataPackage);
|
|
124 |
TInt DispatchNspsWakeupL();
|
|
125 |
TInt DispatchSetSystemNetworkModeL(const CMmDataPackage* aDataPackage);
|
|
126 |
TInt DispatchGetCurrentSystemNetworkModesL();
|
|
127 |
TInt DispatchResetNetServerL();
|
|
128 |
TInt DispatchSetAlwaysOnModeL(const CMmDataPackage* aDataPackage);
|
|
129 |
TInt DispatchSetDriveModeL(const CMmDataPackage* aDataPackage);
|
|
130 |
TInt DispatchGetHspaStatusL();
|
|
131 |
TInt DispatchSetHspaStatusL(const CMmDataPackage* aDataPackage);
|
|
132 |
TInt DispatchGetNetworkProviderNameL();
|
|
133 |
TInt DispatchGetOperatorNameL();
|
|
134 |
TInt DispatchGetCellInfoL();
|
|
135 |
TInt DispatchRegisterCellInfoChangeNotificationL();
|
|
136 |
TInt DispatchGetPhoneCellInfoL();
|
|
137 |
TInt DispatchGetUsimServiceSupportL(const CMmDataPackage* aDataPackage);
|
|
138 |
TInt DispatchGetCurrentActiveUsimApplicationL();
|
|
139 |
TInt DispatchTerminateAllCallsL(const CMmDataPackage* aDataPackage);
|
|
140 |
TInt DispatchGetSystemNetworkBandL();
|
|
141 |
TInt DispatchSetSystemNetworkBandL(const CMmDataPackage* aDataPackage);
|
|
142 |
|
|
143 |
|
|
144 |
// These getters are internal to CtsyDispatcher
|
|
145 |
TInt DispatchGetCurrentNetworkInfoL();
|
|
146 |
TInt DispatchGetNetworkModeL();
|
|
147 |
TInt DispatchGetNitzInfoL();
|
|
148 |
TInt DispatchGetSignalStrengthL();
|
|
149 |
TInt DispatchGetBatteryInfoL();
|
|
150 |
|
|
151 |
|
|
152 |
// Complete functions for receiving completions UP from the Licensee LTSY
|
|
153 |
// via the CCtsyDispatcherCallback object.
|
|
154 |
|
|
155 |
void CallbackBootNotifyModemStatusReady(TInt aError, TRfStateInfo aRfStatus);
|
|
156 |
void CallbackBootNotifySimStatusReady(TInt aError);
|
|
157 |
void CallbackSimRefreshRegister(TInt aError);
|
|
158 |
void CallbackGetFdnStatus(TInt aError, RMobilePhone::TMobilePhoneFdnStatus aFdnStatus);
|
|
159 |
void CallbackGetNetworkRegistrationStatus(TInt aError, RMobilePhone::TMobilePhoneRegistrationStatus aRegStatus);
|
|
160 |
void CallbackGetHomeNetwork(TInt aError,const RMobilePhone::TMobilePhoneNetworkInfoV5& aNetworkInfo);
|
|
161 |
void CallbackNotifyNetworkRegistrationStatusChange(TInt aError, RMobilePhone::TMobilePhoneRegistrationStatus aRegStatus);
|
|
162 |
|
|
163 |
void CallbackNotifyNetworkModeChange(TInt aError, RMobilePhone::TMobilePhoneNetworkMode aNetworkMode);
|
|
164 |
void CallbackNotifyEgprsInfoChange(TInt aError, TBool aEdgeSupported);
|
|
165 |
void CallbackNotifySignalStrengthChange(TInt aError, TInt32 aSignalStrength, TInt8 aBar);
|
|
166 |
void CallbackNotifyNitzInfoChange(TInt aError, const RMobilePhone::TMobilePhoneNITZ& aNitzInfo);
|
|
167 |
void CallbackNotifyBatteryInfoChange(TInt aError, const RMobilePhone::TMobilePhoneBatteryInfoV1& aBatteryInfo);
|
|
168 |
void CallbackNotifyCurrentNetworkChange(TInt aError, const RMobilePhone::TMobilePhoneNetworkInfoV5& aNetworkInfo, const RMobilePhone::TMobilePhoneLocationAreaV1& aLocationArea);
|
|
169 |
void CallbackNotifyRfStatusChange(TInt aError, TRfStateInfo aRfStatus);
|
|
170 |
void CallbackGetServiceProviderName(TInt aError, const RMobilePhone::TMobilePhoneServiceProviderNameV2& aServiceProvider);
|
|
171 |
void CallbackGetPhoneId(TInt aError, const RMobilePhone::TMobilePhoneIdentityV1& aPhoneId);
|
|
172 |
void CallbackGetDetectedNetworks(TInt aError, const CMobilePhoneNetworkListV2& aPhoneNetworkList);
|
|
173 |
void CallbackGetDetectedNetworksCancel(TInt aError);
|
|
174 |
void CallbackSelectNetwork(TInt aError);
|
|
175 |
void CallbackSelectNetworkCancel(TInt aError);
|
|
176 |
void CallbackSetNetworkSelectionSetting(TInt aError, RMobilePhone::TMobilePhoneSelectionMethod aSelectionMethod);
|
|
177 |
void CallbackGetCurrentNetworkInfo(TInt aError, const RMobilePhone::TMobilePhoneNetworkInfoV5& aNetworkInfo, const RMobilePhone::TMobilePhoneLocationAreaV1& aLocationArea);
|
|
178 |
void CallbackGetNetworkMode(TInt aError, RMobilePhone::TMobilePhoneNetworkMode aNetworkMode);
|
|
179 |
void CallbackGetNitzInfo(TInt aError, const RMobilePhone::TMobilePhoneNITZ& aNitzInfo);
|
|
180 |
void CallbackGetSignalStrength(TInt aError, TInt32 aSignalStrength, TInt8 aBar);
|
|
181 |
void CallbackGetBatteryInfo(TInt aError, const RMobilePhone::TMobilePhoneBatteryInfoV1& aBatteryInfo);
|
|
182 |
void CallbackNotifyNetworkSelectionSettingChange(TInt aError, RMobilePhone::TMobilePhoneSelectionMethod aSelectionMethod);
|
|
183 |
void CallbackNotifyNspsStatusChange(TInt aError, TBool aEnabled);
|
|
184 |
void CallbackNspsWakeup(TInt aError);
|
|
185 |
void CallbackSetSystemNetworkMode(TInt aError);
|
|
186 |
void CallbackGetCurrentSystemNetworkModes(TInt aError, TUint32 aCurrentSystemNetworkModes);
|
|
187 |
void CallbackNotifyRauEvent(TInt aError, RMmCustomAPI::TRauEventStatus aRauEvent);
|
|
188 |
void CallbackNotifyNetworkConnectionFailure(TInt aError);
|
|
189 |
void CallbackNotifyCellInfoChanged(TInt aError);
|
|
190 |
void CallbackNotifyDtmfEvent(TInt aError, RMmCustomAPI::TDtmfEventType aType,
|
|
191 |
RMmCustomAPI::TDtmfEvent aEvent, TChar aTone);
|
|
192 |
void CallbackNotifyDtmfEvent(TInt aError, RMobilePhone::TMobilePhoneDTMFEvent aEventType);
|
|
193 |
void CallbackNotifyCellInfoChanged(TInt aError, const RMmCustomAPI::TMmCellInfo::TGSMCellInfo& aInfo);
|
|
194 |
void CallbackNotifyCellInfoChanged(TInt aError, const RMmCustomAPI::TMmCellInfo::TWCDMACellInfo& aInfo);
|
|
195 |
void CallbackResetNetServer(TInt aError);
|
|
196 |
void CallbackSetAlwaysOnMode(TInt aError);
|
|
197 |
void CallbackSetDriveMode(TInt aError);
|
|
198 |
void CallbackGetHspaStatus(TInt aError, RMmCustomAPI::THSxPAStatus aStatus);
|
|
199 |
void CallbackSetHspaStatus(TInt aError);
|
|
200 |
void CallbackNotifyHspaStatusChanged(TInt aError, RMmCustomAPI::THSxPAStatus aStatus);
|
|
201 |
void CallbackGetNetworkProviderName(TInt aError, const TDesC& aName);
|
|
202 |
void CallbackGetOperatorName(TInt aError, RMmCustomAPI::TOperatorNameType aType, const TDesC& aName);
|
|
203 |
void CallbackGetCellInfo(TInt aError);
|
|
204 |
void CallbackGetCellInfo(TInt aError,const RMmCustomAPI::TMmCellInfo::TGSMCellInfo &aInfo);
|
|
205 |
void CallbackGetCellInfo(TInt aError,const RMmCustomAPI::TMmCellInfo::TWCDMACellInfo &aInfo);
|
|
206 |
void CallbackRegisterCellInfoChangeNotification(TInt aError);
|
|
207 |
void CallbackGetPhoneCellInfo(TInt aError, const RMobilePhone::TMobilePhoneCellInfoV9& aCellInfo);
|
|
208 |
void CallbackGetUsimServiceSupport(TInt aError, TInt aApplicationNumber, TBool aSupported);
|
|
209 |
void CallbackGetCurrentActiveUsimApplication(TInt aError, const TDesC8& aAid);
|
|
210 |
void CallbackTerminateAllCalls(TInt aError);
|
|
211 |
void CallbackGetSystemNetworkBand(TInt aError, RMmCustomAPI::TBandSelection aBand, RMmCustomAPI::TNetworkModeCaps aMode);
|
|
212 |
void CallbackSetSystemNetworkBand(TInt aError);
|
|
213 |
|
|
214 |
// From MDispatcherCallback
|
|
215 |
void CallbackSync(CRequestQueueOneShot::TIpcDataPackage& aIpcDataPackage);
|
|
216 |
|
|
217 |
// Other public functions
|
|
218 |
void SetDispatcherHolder(TDispatcherHolder& aDispatcherHolder);
|
|
219 |
|
|
220 |
private:
|
|
221 |
|
|
222 |
CPhoneDispatcher(MLtsyDispatchFactoryV1& aLtsyFactory,
|
|
223 |
MmMessageManagerCallback& aMessageManagerCallback,
|
|
224 |
MmMessageManagerCallback& aSatMessageManagerCallback,
|
|
225 |
CRequestQueueOneShot& aRequestAsyncOneShot,
|
|
226 |
MBootSequenceCallbacks& aBootSequenceObserver);
|
|
227 |
|
|
228 |
void ConstructL();
|
|
229 |
private: // Not owned
|
|
230 |
|
|
231 |
MLtsyDispatchFactoryV1& iLtsyFactoryV1;
|
|
232 |
MmMessageManagerCallback& iMessageManagerCallback;
|
|
233 |
MmMessageManagerCallback& iSatMessageManagerCallback;
|
|
234 |
CRequestQueueOneShot& iRequestAsyncOneShot;
|
|
235 |
MBootSequenceCallbacks& iBootSequenceObserver;
|
|
236 |
TDispatcherHolder* iDispatcherHolder;
|
|
237 |
|
|
238 |
// Interfaces in the Licensee LTSY, not owned by this object
|
|
239 |
|
|
240 |
MLtsyDispatchPhoneGetFdnStatus* iLtsyDispatchPhoneGetFdnStatus;
|
|
241 |
MLtsyDispatchPhoneGetNetworkRegistrationStatus* iLtsyDispatchPhoneGetNetworkRegistrationStatus;
|
|
242 |
MLtsyDispatchPhoneGetHomeNetwork* iLtsyDispatchPhoneGetHomeNetwork;
|
|
243 |
MLtsyDispatchPhoneBootNotifyModemStatusReady* iLtsyDispatchPhoneBootNotifyModemStatusReady;
|
|
244 |
MLtsyDispatchPhoneBootNotifySimStatusReady* iLtsyDispatchPhoneBootNotifySimStatusReady;
|
|
245 |
MLtsyDispatchPhoneSimRefreshRegister* iLtsyDispatchPhoneSimRefreshRegister;
|
|
246 |
|
|
247 |
MLtsyDispatchPhoneGetServiceProviderName* iLtsyDispatchPhoneGetServiceProviderName;
|
|
248 |
MLtsyDispatchPhoneGetPhoneId* iLtsyDispatchPhoneGetPhoneId;
|
|
249 |
MLtsyDispatchPhoneGetDetectedNetworks* iLtsyDispatchPhoneGetDetectedNetworks;
|
|
250 |
MLtsyDispatchPhoneGetDetectedNetworksCancel* iLtsyDispatchPhoneGetDetectedNetworksCancel;
|
|
251 |
MLtsyDispatchPhoneSelectNetwork* iLtsyDispatchPhoneSelectNetwork;
|
|
252 |
MLtsyDispatchPhoneSelectNetworkCancel* iLtsyDispatchPhoneSelectNetworkCancel;
|
|
253 |
MLtsyDispatchPhoneSetNetworkSelectionSetting* iLtsyDispatchPhoneSetNetworkSelectionSetting;
|
|
254 |
MLtsyDispatchPhoneGetCurrentNetworkInfo* iLtsyDispatchPhoneGetCurrentNetworkInfo;
|
|
255 |
MLtsyDispatchPhoneGetNetworkMode* iLtsyDispatchPhoneGetNetworkMode;
|
|
256 |
MLtsyDispatchPhoneGetNitzInfo* iLtsyDispatchPhoneGetNitzInfo;
|
|
257 |
MLtsyDispatchPhoneGetSignalStrength* iLtsyDispatchPhoneGetSignalStrength;
|
|
258 |
MLtsyDispatchPhoneGetBatteryInfo* iLtsyDispatchPhoneGetBatteryInfo;
|
|
259 |
MLtsyDispatchPhoneNspsWakeup* iLtsyDispatchPhoneNspsWakeup;
|
|
260 |
MLtsyDispatchPhoneSetSystemNetworkMode* iLtsyDispatchPhoneSetSystemNetworkMode;
|
|
261 |
MLtsyDispatchPhoneGetCurrentSystemNetworkModes* iLtsyDispatchPhoneGetCurrentSystemNetworkModes;
|
|
262 |
MLtsyDispatchPhoneResetNetServer* iLtsyDispatchPhoneResetNetServer;
|
|
263 |
MLtsyDispatchPhoneSetAlwaysOnMode* iLtsyDispatchPhoneSetAlwaysOnMode;
|
|
264 |
MLtsyDispatchPhoneSetDriveMode* iLtsyDispatchPhoneSetDriveMode;
|
|
265 |
MLtsyDispatchPhoneGetHspaStatus* iLtsyDispatchPhoneGetHspaStatus;
|
|
266 |
MLtsyDispatchPhoneSetHspaStatus* iLtsyDispatchPhoneSetHspaStatus;
|
|
267 |
MLtsyDispatchPhoneGetNetworkProviderName* iLtsyDispatchPhoneGetNetworkProviderName;
|
|
268 |
MLtsyDispatchPhoneGetOperatorName* iLtsyDispatchPhoneGetOperatorName;
|
|
269 |
MLtsyDispatchPhoneGetCellInfo* iLtsyDispatchPhoneGetCellInfo;
|
|
270 |
MLtsyDispatchPhoneRegisterCellInfoChangeNotification* iLtsyDispatchPhoneRegisterCellInfoChangeNotification;
|
|
271 |
MLtsyDispatchPhoneGetPhoneCellInfo* iLtsyDispatchPhoneGetPhoneCellInfo;
|
|
272 |
MLtsyDispatchPhoneGetUsimServiceSupport* iLtsyDispatchPhoneGetUsimServiceSupport;
|
|
273 |
MLtsyDispatchPhoneGetCurrentActiveUsimApplication* iLtsyDispatchPhoneGetCurrentActiveUsimApplication;
|
|
274 |
MLtsyDispatchPhoneTerminateAllCalls* iLtsyDispatchPhoneTerminateAllCalls;
|
|
275 |
MLtsyDispatchPhoneGetSystemNetworkBand* iLtsyDispatchPhoneGetSystemNetworkBand;
|
|
276 |
MLtsyDispatchPhoneSetSystemNetworkBand* iLtsyDispatchPhoneSetSystemNetworkBand;
|
|
277 |
|
|
278 |
private:
|
|
279 |
TUint iPhoneIdReqOrigin; //to prevent two requests being fired off if sat and phone both
|
|
280 |
//request id while the other is in progress. Also to only complete
|
|
281 |
//the appropriate request.
|
|
282 |
|
|
283 |
RMmCustomAPI::TMmCellInfo *iCellInfo; // Since this object is very big we will create it once in the heap.
|
|
284 |
|
|
285 |
}; // class CPhoneDispatcher
|
|
286 |
|
|
287 |
#endif // __CPHONEDISPATCHER_H_
|
|
288 |
|