|
1 /* |
|
2 * Copyright (c) 2002-2008 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: Wrapper for USAT api. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef TUSATAPI_H |
|
21 #define TUSATAPI_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <etelsat.h> |
|
25 #include "MSatApi.h" |
|
26 |
|
27 // FORWARD DECLARATION |
|
28 class MSatMultiModeApi; |
|
29 class CSatSActiveWrapper; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * Wrapper for USAT API. |
|
35 * |
|
36 * @lib SatEngine.lib |
|
37 * @since Series 60 3.0 |
|
38 */ |
|
39 class TUSatAPI : public MSatApi |
|
40 { |
|
41 public: // Constructors and destructor |
|
42 |
|
43 /** |
|
44 * C++ default constructor. |
|
45 */ |
|
46 TUSatAPI(); |
|
47 |
|
48 public: // New functions |
|
49 |
|
50 /** |
|
51 * Connects to USat API. |
|
52 * @param aPhone Reference to MSatMultiModeApi |
|
53 * @return Error code indicating connection status |
|
54 */ |
|
55 TInt Connect( MSatMultiModeApi& aPhone ); |
|
56 |
|
57 /** |
|
58 * Closes the connection to USAT API. |
|
59 */ |
|
60 void Close(); |
|
61 |
|
62 public: // From base classes |
|
63 |
|
64 /** |
|
65 * From MSatApi Issues notification for SetUpMenu command from USAT api. |
|
66 * @param aStatus Request status |
|
67 * @param aPCmd Command identifier |
|
68 */ |
|
69 void NotifySetUpMenu( |
|
70 TRequestStatus& aStatus, |
|
71 TDes8& aPCmd ); |
|
72 |
|
73 /** |
|
74 * From MSatApi Cancels SetUpMenu notification. |
|
75 */ |
|
76 void NotifySetUpMenuCancel(); |
|
77 |
|
78 /** |
|
79 * From MSatApi Issues notification for LanguageNotification command from USAT api. |
|
80 * @param aStatus Request status |
|
81 * @param aPCmd Command identifier |
|
82 */ |
|
83 void NotifyLanguageNotification( |
|
84 TRequestStatus& aStatus, |
|
85 TDes8& aPCmd ); |
|
86 |
|
87 /** |
|
88 * From MSatApi Cancels LanguageNotification notification. |
|
89 */ |
|
90 void NotifyLanguageNotificationCancel(); |
|
91 |
|
92 /** |
|
93 * From MSatApi Issues SetUpCall request |
|
94 * @param aStatus Request status |
|
95 * @param aPCmd Command identifier |
|
96 */ |
|
97 void NotifySetUpCall( |
|
98 TRequestStatus& aStatus, |
|
99 TDes8& aPCmd ); |
|
100 |
|
101 /** |
|
102 * From MSatApi Cancels the SetUpCall request |
|
103 */ |
|
104 void NotifySetUpCallCancel(); |
|
105 |
|
106 /** |
|
107 * From MSatApi Issues the SelectItem request. |
|
108 * @param aStatus Request status |
|
109 * @param aPCmd Command identifier |
|
110 */ |
|
111 void NotifySelectItem( |
|
112 TRequestStatus& aStatus, |
|
113 TDes8& aPCmd ); |
|
114 |
|
115 /** |
|
116 * From MSatApi Cancels the SelectItem request |
|
117 */ |
|
118 void NotifySelectItemCancel(); |
|
119 |
|
120 /** |
|
121 * From MSatApi. |
|
122 * @param aStatus Request status |
|
123 * @param aPCmd Command identifier |
|
124 */ |
|
125 void NotifySendSm( |
|
126 TRequestStatus& aStatus, |
|
127 TDes8& aPCmd ); |
|
128 |
|
129 /** |
|
130 * From MSatApi. |
|
131 */ |
|
132 void NotifySendSmCancel(); |
|
133 |
|
134 /** |
|
135 * From MSatApi |
|
136 * @param aStatus Request status |
|
137 * @param aData Data to be sent |
|
138 * @param aMsgReference Reference to message |
|
139 */ |
|
140 void SendMessageNoLogging( |
|
141 TRequestStatus& aStatus, |
|
142 TDes8& aData, |
|
143 TUint16& aMsgReference ) ; |
|
144 |
|
145 /** |
|
146 * From MSatApi |
|
147 */ |
|
148 void SendMessageNoLoggingCancel(); |
|
149 |
|
150 /** |
|
151 * From MSatApi |
|
152 * @param aStatus Request status |
|
153 * @param aData Command identifier |
|
154 */ |
|
155 void NotifyLaunchBrowser( |
|
156 TRequestStatus& aStatus, |
|
157 TDes8& aData ); |
|
158 |
|
159 /** |
|
160 * From MSatApi |
|
161 */ |
|
162 void NotifyLaunchBrowserCancel(); |
|
163 |
|
164 /** |
|
165 * From MSatApi |
|
166 * @param aStatus Request status |
|
167 * @param aData Command identifier |
|
168 */ |
|
169 void NotifyDisplayText( |
|
170 TRequestStatus& aStatus, |
|
171 TDes8& aData ); |
|
172 |
|
173 /** |
|
174 * From MSatApi |
|
175 */ |
|
176 void NotifyDisplayTextCancel(); |
|
177 |
|
178 /** |
|
179 * From MSatApi |
|
180 * @param aStatus Request status |
|
181 * @param aData Command identifier |
|
182 */ |
|
183 void NotifyGetInput( |
|
184 TRequestStatus& aStatus, |
|
185 TDes8& aData ); |
|
186 |
|
187 /** |
|
188 * From MSatApi |
|
189 */ |
|
190 void NotifyGetInputCancel(); |
|
191 |
|
192 /** |
|
193 * From MSatApi |
|
194 * @param aStatus Request status |
|
195 * @param aData Command identifier |
|
196 */ |
|
197 void NotifyGetInkey( |
|
198 TRequestStatus& aStatus, |
|
199 TDes8& aData ); |
|
200 |
|
201 /** |
|
202 * From MSatApi |
|
203 */ |
|
204 void NotifyGetInkeyCancel(); |
|
205 |
|
206 /** |
|
207 * From MSatApi |
|
208 * @param aStatus Request status |
|
209 * @param aData Command identifier |
|
210 */ |
|
211 void NotifyCallControl( |
|
212 TRequestStatus& aStatus, |
|
213 TDes8& aData ); |
|
214 |
|
215 /** |
|
216 * From MSatApi |
|
217 */ |
|
218 void NotifyCallControlCancel(); |
|
219 |
|
220 /** |
|
221 * From MSatApi |
|
222 * @param aStatus Request status |
|
223 * @param aData Command identifier |
|
224 */ |
|
225 void NotifyMoSmControl( |
|
226 TRequestStatus& aStatus, |
|
227 TDes8& aData ); |
|
228 |
|
229 /** |
|
230 * From MSatApi |
|
231 */ |
|
232 void NotifyMoSmControlCancel(); |
|
233 |
|
234 /** |
|
235 * From MSatApi |
|
236 * @param aStatus Request status |
|
237 * @param aData Command identifier |
|
238 */ |
|
239 void NotifySetUpEventList( |
|
240 TRequestStatus& aStatus, |
|
241 TDes8& aData ); |
|
242 |
|
243 /** |
|
244 * From MSatApi |
|
245 */ |
|
246 void NotifySetUpEventListCancel(); |
|
247 |
|
248 /** |
|
249 * From MSatApi |
|
250 * @param aStatus Request status |
|
251 * @param aData Command identifier |
|
252 */ |
|
253 void NotifySetUpIdleModeText( |
|
254 TRequestStatus& aStatus, |
|
255 TDes8& aData ); |
|
256 |
|
257 /** |
|
258 * From MSatApi |
|
259 */ |
|
260 void NotifySetUpIdleModeTextCancel(); |
|
261 |
|
262 /** |
|
263 * From MSatApi |
|
264 * @param aStatus Request status |
|
265 * @param aData Command identifier |
|
266 */ |
|
267 void NotifySendDtmf( |
|
268 TRequestStatus& aStatus, |
|
269 TDes8& aData ); |
|
270 |
|
271 /** |
|
272 * From MSatApi |
|
273 */ |
|
274 void NotifySendDtmfCancel(); |
|
275 |
|
276 /** |
|
277 * From MSatApi |
|
278 * @param aStatus Request status |
|
279 * @param aData Command identifier |
|
280 */ |
|
281 void NotifySendSs( |
|
282 TRequestStatus& aStatus, |
|
283 TDes8& aData ); |
|
284 |
|
285 /** |
|
286 * From MSatApi |
|
287 */ |
|
288 void NotifySendSsCancel(); |
|
289 |
|
290 /** |
|
291 * From MSatApi |
|
292 * @param aStatus Request status |
|
293 * @param aData Command identifier |
|
294 */ |
|
295 void NotifySendUssd( |
|
296 TRequestStatus& aStatus, |
|
297 TDes8& aData ); |
|
298 |
|
299 /** |
|
300 * From MSatApi |
|
301 */ |
|
302 void NotifySendUssdCancel(); |
|
303 |
|
304 /** |
|
305 * From MSatApi |
|
306 * @param aStatus Request status |
|
307 * @param aData Command identifier |
|
308 */ |
|
309 void NotifyPlayTone( |
|
310 TRequestStatus& aStatus, |
|
311 TDes8& aData ); |
|
312 |
|
313 /** |
|
314 * From MSatApi |
|
315 */ |
|
316 void NotifyPlayToneCancel(); |
|
317 |
|
318 /** |
|
319 * From MSatApi |
|
320 * @param aStatus Request status |
|
321 * @param aData Command identifier |
|
322 */ |
|
323 void NotifyRefreshRequired( |
|
324 TRequestStatus& aStatus, |
|
325 TDes8& aData ); |
|
326 |
|
327 /** |
|
328 * From MSatApi |
|
329 */ |
|
330 void NotifyRefreshRequiredCancel(); |
|
331 |
|
332 /** |
|
333 * From MSatApi |
|
334 * @param aPCkg Refresh required response package |
|
335 */ |
|
336 void RefreshAllowed( const TDesC8& aPCkg ); |
|
337 |
|
338 /** |
|
339 * From MSatApi |
|
340 * @param aStatus Request status |
|
341 * @param aData Command identifier |
|
342 */ |
|
343 void NotifyRefresh( |
|
344 TRequestStatus& aStatus, |
|
345 TDes8& aData ); |
|
346 |
|
347 /** |
|
348 * From MSatApi |
|
349 */ |
|
350 void NotifyRefreshCancel(); |
|
351 |
|
352 /** |
|
353 * From MSatApi Issues the SimSessionEnd request |
|
354 * @param aStatus Request status |
|
355 */ |
|
356 void NotifySimSessionEnd( TRequestStatus& aStatus ); |
|
357 |
|
358 /** |
|
359 * From MSatApi Cancels the SimSessionEnd request |
|
360 */ |
|
361 void NotifySimSessionEndCancel(); |
|
362 |
|
363 /** |
|
364 * From MSatApi |
|
365 * @param aStatus Request status |
|
366 * @param aData Command identifier |
|
367 */ |
|
368 void NotifyLocalInfo( |
|
369 TRequestStatus& aStatus, |
|
370 TDes8& aData ); |
|
371 |
|
372 /** |
|
373 * From MSatApi |
|
374 */ |
|
375 void NotifyLocalInfoCancel(); |
|
376 |
|
377 /** |
|
378 * Issues the request |
|
379 * @param aStatus Request status. |
|
380 * @param aPCmd Command identifier and other relevant information |
|
381 */ |
|
382 void NotifyOpenChannel( |
|
383 TRequestStatus& aStatus, |
|
384 TDes8& aPCmd ); |
|
385 |
|
386 /** |
|
387 * Cancels the request |
|
388 */ |
|
389 void NotifyOpenChannelCancel(); |
|
390 |
|
391 /** |
|
392 * Issues the request |
|
393 * @param aStatus Request status. |
|
394 * @param aPCmd Command identifier and other relevant information |
|
395 */ |
|
396 void NotifyCloseChannel( |
|
397 TRequestStatus& aStatus, |
|
398 TDes8& aPCmd ); |
|
399 |
|
400 /** |
|
401 * Cancels the request |
|
402 */ |
|
403 void NotifyCloseChannelCancel(); |
|
404 |
|
405 /** |
|
406 * Issues the request |
|
407 * @param aStatus Request status. |
|
408 * @param aPCmd Command identifier and other relevant information |
|
409 */ |
|
410 void NotifyGetChannelStatus( |
|
411 TRequestStatus& aStatus, |
|
412 TDes8& aPCmd ); |
|
413 |
|
414 /** |
|
415 * Cancels the request |
|
416 */ |
|
417 void NotifyGetChannelStatusCancel(); |
|
418 |
|
419 /** |
|
420 * Issues the request |
|
421 * @param aStatus Request status. |
|
422 * @param aPCmd Command identifier and other relevant information |
|
423 */ |
|
424 void NotifySendData( |
|
425 TRequestStatus& aStatus, |
|
426 TDes8& aPCmd ); |
|
427 |
|
428 /** |
|
429 * Cancels the request |
|
430 */ |
|
431 void NotifySendDataCancel(); |
|
432 |
|
433 /** |
|
434 * Issues the request |
|
435 * @param aStatus Request status. |
|
436 * @param aPCmd Command identifier and other relevant information |
|
437 */ |
|
438 void NotifyReceiveData( |
|
439 TRequestStatus& aStatus, |
|
440 TDes8& aPCmd ); |
|
441 |
|
442 /** |
|
443 * Cancels the request |
|
444 */ |
|
445 void NotifyReceiveDataCancel(); |
|
446 |
|
447 /** |
|
448 * From MSatApi Sends menu selection to SIM. |
|
449 * @param aMenuSelection Selected menu item |
|
450 */ |
|
451 void SendMenuSelection( const TDes8& aMenuSelection ); |
|
452 |
|
453 /** |
|
454 * From MSatApi Sends terminal rsp to SIM. |
|
455 * @param aPCmd Command identifier |
|
456 * @param aPCkg Terminal response package |
|
457 */ |
|
458 void TerminalRsp( |
|
459 RSat::TPCmd aPCmd, |
|
460 const TDesC8& aPCkg ); |
|
461 |
|
462 /** |
|
463 * From MSatApi. Gets the icon info from SIM. |
|
464 * @param aReqStatus Request status. |
|
465 * @param aRecordNumber Specifies the EF_IMG in SIM. |
|
466 * @param aIconEf Contains the icon informations from SIM in returning |
|
467 * of the method. |
|
468 */ |
|
469 void GetIcon( |
|
470 TRequestStatus& aReqStatus, |
|
471 TUint8 aRecordNumber, |
|
472 RSat::TIcon& aIconEf ); |
|
473 |
|
474 /** |
|
475 * From MSatApi. Gets the icon image. |
|
476 * @param aReqStatus Request status. |
|
477 * @param aInstanceInfo Informatio of the icon, which data is |
|
478 * fetched from SIM. |
|
479 * @param aInstance Contains the icon data from SIM in returning of the |
|
480 * method. |
|
481 */ |
|
482 void GetImageInstance( |
|
483 TRequestStatus& aReqStatus, |
|
484 const TDesC8& aInstanceInfo, |
|
485 TDes8& aInstance ); |
|
486 |
|
487 /** |
|
488 * From MSatApi. Gets color lookup table of the icon. |
|
489 * @param aReqStatus Request status. |
|
490 * @param aInstanceNumber Image instance number. |
|
491 * @param aOffset Offset of the clut. |
|
492 * @param aClut Contains the Clut of the icon in returning of the |
|
493 * method. |
|
494 */ |
|
495 void GetClut( |
|
496 TRequestStatus& aReqStatus, |
|
497 TUint aInstanceNumber, |
|
498 TUint aOffset, |
|
499 TDes8& aClut ); |
|
500 |
|
501 /** |
|
502 * From MSatApi Sends notify to SIM about some event using EventDownload. |
|
503 * @param aReqStatus Request status. |
|
504 * @param aSingleEvent Single event reported to SIM. |
|
505 * @param aEventInfo Contains information of an event. |
|
506 */ |
|
507 void EventDownload( |
|
508 TRequestStatus& aReqStatus, |
|
509 RSat::TEventList aSingleEvent, |
|
510 const TDesC8& aEventInfo ); |
|
511 |
|
512 /** |
|
513 * From MSatApi Indicates is RSat connected |
|
514 * @return ETrue if RSat is connected |
|
515 */ |
|
516 TBool IsRSatConnected() const; |
|
517 |
|
518 /** |
|
519 * From MSatApi Called when all supported notifies are sent |
|
520 * @return error code from RSat::UsatClientReadyIndication() |
|
521 */ |
|
522 TInt UsatClientReadyIndication(); |
|
523 |
|
524 /** |
|
525 * From CActive |
|
526 */ |
|
527 void RunL(); |
|
528 |
|
529 /** |
|
530 * From CActive |
|
531 */ |
|
532 void DoCancel(); |
|
533 |
|
534 private: |
|
535 |
|
536 // Prohibit copy constructor if not deriving from CBase. |
|
537 TUSatAPI( const TUSatAPI& ); |
|
538 |
|
539 // Prohibit assigment operator if not deriving from CBase. |
|
540 TUSatAPI& operator=( const TUSatAPI& ); |
|
541 |
|
542 private: // Data |
|
543 |
|
544 // (U)SAT interface handler |
|
545 RSat iSat; |
|
546 // Indicates is RSat connected or not |
|
547 TBool iRSatConnected; |
|
548 // Active object wrapper for wait loops and asynhcronous function calls |
|
549 CSatSActiveWrapper* iWrapper; |
|
550 |
|
551 }; |
|
552 |
|
553 #endif // TUSATAPI_H |
|
554 |
|
555 // End of File |