|
33
|
1 |
/*
|
|
|
2 |
* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
|
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 |
* Nokia Corporation - initial contribution.
|
|
|
11 |
*
|
|
|
12 |
* Contributors:
|
|
|
13 |
*
|
|
|
14 |
* Description: Proactive SendSs command handler
|
|
|
15 |
*
|
|
|
16 |
*/
|
|
|
17 |
|
|
|
18 |
|
|
|
19 |
#ifndef CSENDSSHANDLER_H
|
|
|
20 |
#define CSENDSSHANDLER_H
|
|
|
21 |
|
|
|
22 |
#include <etelsat.h>
|
|
|
23 |
|
|
|
24 |
#include "CSatCommandHandler.h"
|
|
|
25 |
#include "SatSTypes.h"
|
|
|
26 |
|
|
|
27 |
class MSatUtils;
|
|
|
28 |
class CSatSendSsRequestCompleteHandler;
|
|
|
29 |
class CSatSendSsAdditionalInfoHandler;
|
|
|
30 |
class CPhoneGsmHandlerBase;
|
|
|
31 |
class CPhoneGsmParserBase;
|
|
|
32 |
class CPhoneGsmParserResult;
|
|
|
33 |
class CPhoneGsmOptionContainerBase;
|
|
|
34 |
|
|
|
35 |
/**
|
|
|
36 |
* Command handler for SendSS command.
|
|
|
37 |
*
|
|
|
38 |
* @lib SendSSCmd.lib
|
|
|
39 |
* @since S60 v3.0
|
|
|
40 |
*/
|
|
|
41 |
class CSendSSHandler : public CSatCommandHandler
|
|
|
42 |
{
|
|
|
43 |
|
|
|
44 |
public:
|
|
|
45 |
|
|
|
46 |
static CSendSSHandler* NewL( MSatUtils* aUtils );
|
|
|
47 |
|
|
|
48 |
virtual ~CSendSSHandler();
|
|
|
49 |
|
|
|
50 |
/**
|
|
|
51 |
* Processes the SS Request Complete.
|
|
|
52 |
*
|
|
|
53 |
* @param aErrCode Result of Ss sending
|
|
|
54 |
*/
|
|
|
55 |
void DispatchSsRequestComplete( const TInt aErrCode );
|
|
|
56 |
|
|
|
57 |
/**
|
|
|
58 |
* Processes the SS aditional info.
|
|
|
59 |
*
|
|
|
60 |
* @param Addtional info.
|
|
|
61 |
*/
|
|
|
62 |
void DispatchSsAdditionalInfo( const TDesC& aAdditionalInfo );
|
|
|
63 |
|
|
|
64 |
// from base class MSatCommand
|
|
|
65 |
|
|
|
66 |
/**
|
|
|
67 |
* From MSatCommand.
|
|
|
68 |
* Response from the client
|
|
|
69 |
*
|
|
|
70 |
*/
|
|
|
71 |
void ClientResponse();
|
|
|
72 |
|
|
|
73 |
// from base class CSatCommandHandler
|
|
|
74 |
|
|
|
75 |
/**
|
|
|
76 |
* From CSatCommandHandler
|
|
|
77 |
* Overrides the default implementation.
|
|
|
78 |
*
|
|
|
79 |
* @param aEvent Identifies the event.
|
|
|
80 |
*/
|
|
|
81 |
void Event( TInt aEvent );
|
|
|
82 |
|
|
|
83 |
protected:
|
|
|
84 |
|
|
|
85 |
// from base class CActive
|
|
|
86 |
|
|
|
87 |
/**
|
|
|
88 |
* From CActive
|
|
|
89 |
* Cancels the usat request.
|
|
|
90 |
*
|
|
|
91 |
*/
|
|
|
92 |
void DoCancel();
|
|
|
93 |
|
|
|
94 |
// from base class CSatCommandHandler
|
|
|
95 |
|
|
|
96 |
/**
|
|
|
97 |
* From CSatCommandHandler
|
|
|
98 |
* Requests the command notification.
|
|
|
99 |
*
|
|
|
100 |
* @param aStatus Request status
|
|
|
101 |
*/
|
|
|
102 |
void IssueUSATRequest( TRequestStatus& aStatus );
|
|
|
103 |
|
|
|
104 |
/**
|
|
|
105 |
* From CSatCommandHandler
|
|
|
106 |
* Precheck before executing the command.
|
|
|
107 |
*
|
|
|
108 |
* @return TBool indicating command is currently allowed.
|
|
|
109 |
*/
|
|
|
110 |
TBool CommandAllowed();
|
|
|
111 |
|
|
|
112 |
/**
|
|
|
113 |
* From CSatCommandHandler
|
|
|
114 |
* Need for ui session.
|
|
|
115 |
*
|
|
|
116 |
* @return TBool indicating need of ui session.
|
|
|
117 |
*/
|
|
|
118 |
TBool NeedUiSession();
|
|
|
119 |
|
|
|
120 |
/**
|
|
|
121 |
* From CSatCommandHandler
|
|
|
122 |
* Called when USAT API notifies that command.
|
|
|
123 |
*
|
|
|
124 |
*/
|
|
|
125 |
void HandleCommand();
|
|
|
126 |
|
|
|
127 |
/**
|
|
|
128 |
* From CSatCommandHandler.
|
|
|
129 |
* Indicates the failure of launching ui client
|
|
|
130 |
*
|
|
|
131 |
*/
|
|
|
132 |
void UiLaunchFailed();
|
|
|
133 |
|
|
|
134 |
private:
|
|
|
135 |
|
|
|
136 |
CSendSSHandler();
|
|
|
137 |
|
|
|
138 |
void ConstructL();
|
|
|
139 |
|
|
|
140 |
/**
|
|
|
141 |
* Handles the Ss string sending
|
|
|
142 |
*
|
|
|
143 |
*/
|
|
|
144 |
void SendSsStringL();
|
|
|
145 |
|
|
|
146 |
/**
|
|
|
147 |
* Handles the result of Ss sending
|
|
|
148 |
*
|
|
|
149 |
*/
|
|
|
150 |
void HandleSendSsResult();
|
|
|
151 |
|
|
|
152 |
/**
|
|
|
153 |
* Checks is the command transparent or not
|
|
|
154 |
*
|
|
|
155 |
* @return Boolean indicating is current command transparent to user
|
|
|
156 |
*/
|
|
|
157 |
TBool TransparentSsSending();
|
|
|
158 |
|
|
|
159 |
/**
|
|
|
160 |
* Sends terminal response, if not yet sent
|
|
|
161 |
*
|
|
|
162 |
*/
|
|
|
163 |
void SendTerminalResponse();
|
|
|
164 |
|
|
|
165 |
/**
|
|
|
166 |
* Delay callback function. Called when predefined time
|
|
|
167 |
* has passed. Used to wait SendSS AdditionalInfoNotification
|
|
|
168 |
*
|
|
|
169 |
* @param aPtr Pointer to creator
|
|
|
170 |
* @return whether to call function again after an interval
|
|
|
171 |
*/
|
|
|
172 |
static TInt SSRequestCallback( TAny* aPtr );
|
|
|
173 |
|
|
|
174 |
private: // data
|
|
|
175 |
|
|
|
176 |
/**
|
|
|
177 |
* SendSSCall command data.
|
|
|
178 |
*/
|
|
|
179 |
RSat::TSendSsV1 iSendSsData;
|
|
|
180 |
|
|
|
181 |
/**
|
|
|
182 |
* SendSSCall command package.
|
|
|
183 |
*/
|
|
|
184 |
RSat::TSendSsV1Pckg iSendSsPckg;
|
|
|
185 |
|
|
|
186 |
/**
|
|
|
187 |
* Response from client
|
|
|
188 |
*/
|
|
|
189 |
RSat::TSendSsRspV2 iSendSsRsp;
|
|
|
190 |
|
|
|
191 |
/**
|
|
|
192 |
* Response package.
|
|
|
193 |
*/
|
|
|
194 |
RSat::TSendSsRspV2Pckg iSendSsRspPckg;
|
|
|
195 |
|
|
|
196 |
/**
|
|
|
197 |
* UI Queries and notifications:
|
|
|
198 |
* Query command data.
|
|
|
199 |
*/
|
|
|
200 |
TSatQueryV1 iQueryData;
|
|
|
201 |
|
|
|
202 |
/**
|
|
|
203 |
* Query package.
|
|
|
204 |
*/
|
|
|
205 |
TSatQueryV1Pckg iQueryPckg;
|
|
|
206 |
|
|
|
207 |
/**
|
|
|
208 |
* Query response.
|
|
|
209 |
*/
|
|
|
210 |
TSatQueryRspV1 iQueryRsp;
|
|
|
211 |
|
|
|
212 |
/**
|
|
|
213 |
* Query rsp package.
|
|
|
214 |
*/
|
|
|
215 |
TSatQueryRspV1Pckg iQueryRspPckg;
|
|
|
216 |
|
|
|
217 |
/**
|
|
|
218 |
* Notification send data
|
|
|
219 |
*/
|
|
|
220 |
TSatNotificationV1 iNotificationData;
|
|
|
221 |
|
|
|
222 |
/**
|
|
|
223 |
* Notification package
|
|
|
224 |
*/
|
|
|
225 |
TSatNotificationV1Pckg iNotificationDataPckg;
|
|
|
226 |
|
|
|
227 |
/**
|
|
|
228 |
* Notification Response data
|
|
|
229 |
*/
|
|
|
230 |
TSatNotificationRspV1 iNotificationRsp;
|
|
|
231 |
|
|
|
232 |
/**
|
|
|
233 |
* Notification Response package
|
|
|
234 |
*/
|
|
|
235 |
TSatNotificationRspV1Pckg iNotificationRspPckg;
|
|
|
236 |
|
|
|
237 |
/**
|
|
|
238 |
* Indicates is notification sent
|
|
|
239 |
*/
|
|
|
240 |
TBool iNotificationSent;
|
|
|
241 |
|
|
|
242 |
/**
|
|
|
243 |
* Ss specific
|
|
|
244 |
*/
|
|
|
245 |
TInt iSsResult;
|
|
|
246 |
|
|
|
247 |
/**
|
|
|
248 |
* Indicates is the result arrived
|
|
|
249 |
*/
|
|
|
250 |
TBool iRequestCompleteArrived;
|
|
|
251 |
|
|
|
252 |
/**
|
|
|
253 |
* Indicates is additional info arrived
|
|
|
254 |
*/
|
|
|
255 |
TBool iAdditionalInfoArrived;
|
|
|
256 |
|
|
|
257 |
/**
|
|
|
258 |
* Additional info of SS message
|
|
|
259 |
*/
|
|
|
260 |
TBuf<RSat::KAlphaIdMaxSize> iAdditionalInfo;
|
|
|
261 |
|
|
|
262 |
/**
|
|
|
263 |
* Ss additional info handler
|
|
|
264 |
* Own.
|
|
|
265 |
*/
|
|
|
266 |
CSatSendSsAdditionalInfoHandler* iAdditionalInfoHandler;
|
|
|
267 |
|
|
|
268 |
/**
|
|
|
269 |
* Ss request complete handler
|
|
|
270 |
* Own.
|
|
|
271 |
*/
|
|
|
272 |
CSatSendSsRequestCompleteHandler* iRequestCompleteHandler;
|
|
|
273 |
|
|
|
274 |
/**
|
|
|
275 |
* SS Parser used to process parser result.
|
|
|
276 |
* Own.
|
|
|
277 |
*/
|
|
|
278 |
CPhoneGsmHandlerBase* iPhoneGsmHandlerBase;
|
|
|
279 |
|
|
|
280 |
/**
|
|
|
281 |
* Ss string parsers
|
|
|
282 |
* Own.
|
|
|
283 |
*/
|
|
|
284 |
CPhoneGsmParserBase* iParser;
|
|
|
285 |
|
|
|
286 |
/**
|
|
|
287 |
* Ss result
|
|
|
288 |
* Own.
|
|
|
289 |
*/
|
|
|
290 |
CPhoneGsmParserResult* iResult;
|
|
|
291 |
|
|
|
292 |
/**
|
|
|
293 |
* SS options used to update options.
|
|
|
294 |
* Own.
|
|
|
295 |
*/
|
|
|
296 |
CPhoneGsmOptionContainerBase* iPhoneGsmOptionContainerBase;
|
|
|
297 |
|
|
|
298 |
/**
|
|
|
299 |
* Indicates is terminal response sent
|
|
|
300 |
*/
|
|
|
301 |
TBool iTerminalRespSent;
|
|
|
302 |
|
|
|
303 |
/**
|
|
|
304 |
* Indicates is UI needed
|
|
|
305 |
*/
|
|
|
306 |
TBool iNeedUiSession;
|
|
|
307 |
|
|
|
308 |
/**
|
|
|
309 |
* Indicates is Confirm SAT Operations on
|
|
|
310 |
*/
|
|
|
311 |
TBool iQueryOn;
|
|
|
312 |
|
|
|
313 |
/**
|
|
|
314 |
* delay timer
|
|
|
315 |
* Own.
|
|
|
316 |
*/
|
|
|
317 |
CPeriodic* iTimer;
|
|
|
318 |
|
|
|
319 |
/**
|
|
|
320 |
* Indicates wether user accepted or rejected
|
|
|
321 |
*/
|
|
|
322 |
TBool iUserAccepted;
|
|
|
323 |
|
|
|
324 |
/**
|
|
|
325 |
* For delayed Ss sendinf
|
|
|
326 |
*/
|
|
|
327 |
CActiveSchedulerWait iSendWait;
|
|
|
328 |
|
|
|
329 |
/**
|
|
|
330 |
* Flag to signal that command has icon data
|
|
|
331 |
* To be removed when icons are allowed in this command
|
|
|
332 |
*/
|
|
|
333 |
TBool iIconCommand;
|
|
|
334 |
};
|
|
|
335 |
|
|
|
336 |
#endif // CSENDSSHANDLER_H
|
|
|
337 |
|