|
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 /** |
|
17 @file |
|
18 @internalAll |
|
19 */ |
|
20 |
|
21 #ifndef __CSIMDISPATCHER_H_ |
|
22 #define __CSIMDISPATCHER_H_ |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32std.h> |
|
26 #include <e32base.h> |
|
27 #include <e32def.h> |
|
28 #include <etelmm.h> |
|
29 |
|
30 #include <ctsy/ltsy/mltsydispatchfactory.h> |
|
31 #include <ctsy/ltsy/mltsydispatchsiminterface.h> |
|
32 #include <ctsy/serviceapi/mmtsy_ipcdefs.h> |
|
33 #include <ctsy/rmmcustomapi.h> |
|
34 |
|
35 #include "requestqueueoneshot.h" |
|
36 #include <ctsy/ltsy/ltsylogger.h> |
|
37 #include "mdispatchercallback.h" |
|
38 |
|
39 // FORWARD DECLARATIONS |
|
40 class CMmDataPackage; |
|
41 class MmMessageManagerCallback; |
|
42 class TDispatcherHolder; |
|
43 |
|
44 class MLtsyDispatchSimGetApnControlListServiceStatus; |
|
45 class MLtsyDispatchSimDeleteApnName; |
|
46 class MLtsyDispatchSimEnumerateApnEntries; |
|
47 class MLtsyDispatchSimChangeSecurityCode; |
|
48 class MLtsyDispatchSimSetFdnSetting; |
|
49 class MLtsyDispatchSimGetCustomerServiceProfile; |
|
50 class MLtsyDispatchSimGetSubscriberId; |
|
51 class MLtsyDispatchSimAppendApnName; |
|
52 class MLtsyDispatchSimGetActiveIccApplicationType; |
|
53 class MLtsyDispatchSimSetIccMessageWaitingIndicators; |
|
54 class MLtsyDispatchSimSetApnControlListServiceStatus; |
|
55 class MLtsyDispatchSimGetApnName; |
|
56 class MLtsyDispatchSimSimRefreshDone; |
|
57 class MLtsyDispatchSimGetServiceTable; |
|
58 class MLtsyDispatchSimGetIccMessageWaitingIndicators; |
|
59 class MLtsyDispatchSimSimLockActivate; |
|
60 class MLtsyDispatchSimSimLockDeActivate; |
|
61 class MLtsyDispatchSimGetAnswerToReset; |
|
62 class MLtsyDispatchSimGetSimCardReaderStatus; |
|
63 class MLtsyDispatchSimGetSimAuthenticationEapSimData; |
|
64 class MLtsyDispatchSimGetSimAuthenticationEapAkaData; |
|
65 class MLtsyDispatchSimPowerSimOff; |
|
66 class MLtsyDispatchSimPowerSimOn; |
|
67 class MLtsyDispatchSimReadSimFile; |
|
68 class MLtsyDispatchSimSendApduRequest; |
|
69 class MLtsyDispatchSimSendApduRequestV2; |
|
70 class MLtsyDispatchSimSimWarmReset; |
|
71 class MLtsyDispatchSimSetSimMessageStatusRead; |
|
72 |
|
73 |
|
74 |
|
75 // CLASS DECLARATION |
|
76 |
|
77 /** |
|
78 * This class is responsible for packing and unpacking data belonging |
|
79 * to Sim related requests to the Licensee LTSY. |
|
80 */ |
|
81 class CSimDispatcher : public CBase, public MDispatcherCallback |
|
82 { |
|
83 public: |
|
84 |
|
85 virtual ~CSimDispatcher(); |
|
86 |
|
87 static CSimDispatcher* NewL( |
|
88 MLtsyDispatchFactoryV1& aLtsyFactory, |
|
89 MmMessageManagerCallback& aMessageManagerCallback, |
|
90 CRequestQueueOneShot& aRequestAsyncOneShot); |
|
91 |
|
92 static CSimDispatcher* NewLC( |
|
93 MLtsyDispatchFactoryV1& aLtsyFactory, |
|
94 MmMessageManagerCallback& aMessageManagerCallback, |
|
95 CRequestQueueOneShot& aRequestAsyncOneShot); |
|
96 |
|
97 // Dispatcher functions for dispatching requests DOWN to the Licensee LTSY |
|
98 |
|
99 TInt DispatchGetApnControlListServiceStatusL(); |
|
100 TInt DispatchDeleteApnNameL(const CMmDataPackage* aDataPackage); |
|
101 TInt DispatchEnumerateApnEntriesL(); |
|
102 TInt DispatchChangeSecurityCodeL(const CMmDataPackage* aDataPackage); |
|
103 TInt DispatchSetFdnSettingL(const CMmDataPackage* aDataPackage); |
|
104 TInt DispatchGetCustomerServiceProfileL(); |
|
105 TInt DispatchGetSubscriberIdL(); |
|
106 TInt DispatchAppendApnNameL(const CMmDataPackage* aDataPackage); |
|
107 TInt DispatchGetIccTypeL(); |
|
108 TInt DispatchSetIccMessageWaitingIndicatorsL(const CMmDataPackage* aDataPackage); |
|
109 TInt DispatchSetApnControlListServiceStatusL(const CMmDataPackage* aDataPackage); |
|
110 TInt DispatchGetApnNameL(const CMmDataPackage* aDataPackage); |
|
111 TInt DispatchSimRefreshDoneL(const CMmDataPackage* aDataPackage); |
|
112 TInt DispatchGetServiceTableL(const CMmDataPackage* aDataPackage); |
|
113 TInt DispatchGetIccMessageWaitingIndicatorsL(); |
|
114 TInt DispatchSimLockActivateL(const CMmDataPackage* aDataPackage); |
|
115 TInt DispatchSimLockDeActivateL(const CMmDataPackage* aDataPackage); |
|
116 TInt DispatchGetAnswerToResetL(const CMmDataPackage* aDataPackage); |
|
117 TInt DispatchGetSimCardReaderStatusL(); |
|
118 TInt DispatchGetSimAuthenticationDataL(const CMmDataPackage* aDataPackage); |
|
119 TInt DispatchPowerSimOffL(); |
|
120 TInt DispatchPowerSimOnL(); |
|
121 TInt DispatchReadSimFileL(const CMmDataPackage* aDataPackage); |
|
122 TInt DispatchSendApduRequestL(const CMmDataPackage* aDataPackage); |
|
123 TInt DispatchSendApduRequestV2L(const CMmDataPackage* aDataPackage); |
|
124 TInt DispatchSimWarmResetL(); |
|
125 TInt DispatchSetSimMessageStatusReadL(const CMmDataPackage* aDataPackage); |
|
126 |
|
127 // Complete functions for receiving completions UP from the Licensee LTSY |
|
128 // via the CCtsyDispatcherCallback object. |
|
129 |
|
130 void CallbackRefreshSimFiles(TInt aError, TUint16 aRefreshFileList); |
|
131 void CallbackNotifyIccMessageWaitingIndicatorsChange(TInt aError, const RMobilePhone::TMobilePhoneMessageWaitingV1& aIndicators); |
|
132 void CallbackNotifyApnListChange(TInt aError); |
|
133 void CallbackNotifyApnControlListServiceStatusChange(TInt aError, RMobilePhone::TAPNControlListServiceStatus aStatus); |
|
134 void CallbackGetApnControlListServiceStatus(TInt aError, RMobilePhone::TAPNControlListServiceStatus aStatus); |
|
135 void CallbackDeleteApnName(TInt aError); |
|
136 void CallbackEnumerateApnEntries(TInt aError, TUint32 aNumEntries); |
|
137 void CallbackChangeSecurityCode(TInt aError); |
|
138 void CallbackSetFdnSetting(TInt aError); |
|
139 void CallbackGetCustomerServiceProfile(TInt aError, const RMobilePhone::TMobilePhoneCspFileV1& aCsp); |
|
140 void CallbackGetSubscriberId(TInt aError, const TDesC8& aId); |
|
141 void CallbackAppendApnName(TInt aError); |
|
142 void CallbackGetActiveIccApplicationType(TInt aError, MLtsyDispatchSimGetActiveIccApplicationType::TIccType aIccType); |
|
143 void CallbackSetIccMessageWaitingIndicators(TInt aError); |
|
144 void CallbackSetApnControlListServiceStatus(TInt aError); |
|
145 void CallbackGetApnName(TInt aError, const RMobilePhone::TAPNEntryV3& aEntry); |
|
146 void CallbackGetServiceTable(TInt aError, const RMobilePhone::TMobilePhoneServiceTableV1& aServiceTable); |
|
147 void CallbackGetIccMessageWaitingIndicators(TInt aError, const RMobilePhone::TMobilePhoneMessageWaitingV1& aMessageWaitingIndicator); |
|
148 void CallbackNotifySimCardStatus(TInt aError, RMmCustomAPI::TSIMCardStatus aSimCardStatus); |
|
149 void CallbackSimLockActivate(TInt aError); |
|
150 void CallbackSimLockDeActivate(TInt aError); |
|
151 void CallbackGetAnswerToReset(TInt aError, const TDesC8& aAnswerToReset); |
|
152 void CallbackGetSimCardReaderStatus(TInt aError, TUint8 aSimCardReaderStatus); |
|
153 void CallbackGetSimAuthenticationData(TInt aError, const TDesC8& aSignedResponse, const TDesC8& aCipheringKey); |
|
154 void CallbackGetSimAuthenticationData(TInt aError, const TDesC8& aResponse, const TDesC8& aCipheringKey, const TDesC8& aIntegrityKey, const TDesC8& aAUTS); |
|
155 void CallbackPowerSimOff(TInt aError); |
|
156 void CallbackPowerSimOn(TInt aError); |
|
157 void CallbackReadSimFile(TInt aError, const TDesC8& aResponseBytes); |
|
158 void CallbackSendApduRequest(TInt aError, TUint8 aServiceType, TUint8 aCardReaderNumber, TUint8 aApplicationType, const TDesC8& aResponseData); |
|
159 void CallbackSendApduRequestV2(TInt aError, const TDesC8& aResponseData); |
|
160 void CallbackSimWarmReset(TInt aError); |
|
161 void CallbackSetSimMessageStatusRead(TInt aError); |
|
162 |
|
163 // From MDispatcherCallback |
|
164 void CallbackSync(CRequestQueueOneShot::TIpcDataPackage& aIpcDataPackage); |
|
165 |
|
166 // Other public functions |
|
167 void SetDispatcherHolder(TDispatcherHolder& aDispatcherHolder); |
|
168 |
|
169 private: |
|
170 |
|
171 CSimDispatcher(MLtsyDispatchFactoryV1& aLtsyFactory, |
|
172 MmMessageManagerCallback& aMessageManagerCallback, |
|
173 CRequestQueueOneShot& aRequestAsyncOneShot); |
|
174 |
|
175 void ConstructL(); |
|
176 |
|
177 private: // Not owned |
|
178 |
|
179 MLtsyDispatchFactoryV1& iLtsyFactoryV1; |
|
180 MmMessageManagerCallback& iMessageManagerCallback; |
|
181 CRequestQueueOneShot& iRequestAsyncOneShot; |
|
182 TDispatcherHolder* iDispatcherHolder; |
|
183 |
|
184 // Interfaces in the Licensee LTSY, not owned by this object |
|
185 |
|
186 MLtsyDispatchSimGetApnControlListServiceStatus* iLtsyDispatchSimGetApnControlListServiceStatus; |
|
187 MLtsyDispatchSimDeleteApnName* iLtsyDispatchSimDeleteApnName; |
|
188 MLtsyDispatchSimEnumerateApnEntries* iLtsyDispatchSimEnumerateApnEntries; |
|
189 MLtsyDispatchSimChangeSecurityCode* iLtsyDispatchSimChangeSecurityCode; |
|
190 MLtsyDispatchSimSetFdnSetting* iLtsyDispatchSimSetFdnSetting; |
|
191 MLtsyDispatchSimGetCustomerServiceProfile* iLtsyDispatchSimGetCustomerServiceProfile; |
|
192 MLtsyDispatchSimGetSubscriberId* iLtsyDispatchSimGetSubscriberId; |
|
193 MLtsyDispatchSimAppendApnName* iLtsyDispatchSimAppendApnName; |
|
194 MLtsyDispatchSimGetActiveIccApplicationType* iLtsyDispatchSimGetIccType; |
|
195 MLtsyDispatchSimSetIccMessageWaitingIndicators* iLtsyDispatchSimSetIccMessageWaitingIndicators; |
|
196 MLtsyDispatchSimSetApnControlListServiceStatus* iLtsyDispatchSimSetApnControlListServiceStatus; |
|
197 MLtsyDispatchSimGetApnName* iLtsyDispatchSimGetApnName; |
|
198 MLtsyDispatchSimSimRefreshDone* iLtsyDispatchSimSimRefreshDone; |
|
199 MLtsyDispatchSimGetServiceTable* iLtsyDispatchSimGetServiceTable; |
|
200 MLtsyDispatchSimGetIccMessageWaitingIndicators* iLtsyDispatchSimGetIccMessageWaitingIndicators; |
|
201 MLtsyDispatchSimSimLockActivate* iLtsyDispatchSimSimLockActivate; |
|
202 MLtsyDispatchSimSimLockDeActivate* iLtsyDispatchSimSimLockDeActivate; |
|
203 MLtsyDispatchSimGetAnswerToReset* iLtsyDispatchSimGetAnswerToReset; |
|
204 MLtsyDispatchSimGetSimCardReaderStatus* iLtsyDispatchSimGetSimCardReaderStatus; |
|
205 MLtsyDispatchSimGetSimAuthenticationEapSimData* iLtsyDispatchSimGetSimAuthenticationEapSimData; |
|
206 MLtsyDispatchSimGetSimAuthenticationEapAkaData* iLtsyDispatchSimGetSimAuthenticationEapAkaData; |
|
207 MLtsyDispatchSimPowerSimOff* iLtsyDispatchSimPowerSimOff; |
|
208 MLtsyDispatchSimPowerSimOn* iLtsyDispatchSimPowerSimOn; |
|
209 MLtsyDispatchSimReadSimFile* iLtsyDispatchSimReadSimFile; |
|
210 MLtsyDispatchSimSendApduRequest* iLtsyDispatchSimSendApduRequest; |
|
211 MLtsyDispatchSimSendApduRequestV2* iLtsyDispatchSimSendApduRequestV2; |
|
212 MLtsyDispatchSimSimWarmReset* iLtsyDispatchSimSimWarmReset; |
|
213 MLtsyDispatchSimSetSimMessageStatusRead* iLtsyDispatchSimSetSimMessageStatusRead; |
|
214 |
|
215 }; // class CSimDispatcher |
|
216 |
|
217 #endif // __CSIMDISPATCHER_H_ |
|
218 |