|
1 /* |
|
2 * Copyright (c) 2010 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: Receives UI commands from SAT server and converts to QT |
|
15 * |
|
16 */ |
|
17 |
|
18 // qt |
|
19 #include <QStringList> |
|
20 #include <qglobal.h> |
|
21 #include <QCoreApplication> |
|
22 // symbian |
|
23 #include <centralrepository.h> |
|
24 #include <ProfileEngineSDKCRKeys.h> |
|
25 |
|
26 // sat |
|
27 #include <msatuiadapter.h> |
|
28 #include "satappserverdispatcher.h" |
|
29 #include "satappaction.h" |
|
30 #include "satappconstant.h" |
|
31 |
|
32 |
|
33 // ---------------------------------------------------------------------------- |
|
34 // SatAppServerDispatcher::SatAppServerDispatcher |
|
35 // ---------------------------------------------------------------------------- |
|
36 // |
|
37 SatAppServerDispatcher::SatAppServerDispatcher(QObject *parent) : |
|
38 QObject(parent) |
|
39 { |
|
40 qDebug("SATAPP: SatAppServerDispatcher::SatAppServerDispatcher"); |
|
41 QT_TRAP_THROWING(ConnectSatSessionL()); |
|
42 } |
|
43 |
|
44 // ---------------------------------------------------------------------------- |
|
45 // SatAppServerDispatcher::~SatAppServerDispatcher |
|
46 // ---------------------------------------------------------------------------- |
|
47 // |
|
48 SatAppServerDispatcher::~SatAppServerDispatcher() |
|
49 { |
|
50 qDebug("SATAPP: SatAppServerDispatcher::~SatAppServerDispatcher"); |
|
51 DisconnectSatSession(); |
|
52 } |
|
53 |
|
54 // ---------------------------------------------------------------------------- |
|
55 // SatAppServerDispatcher::menuSelection |
|
56 // ---------------------------------------------------------------------------- |
|
57 // |
|
58 void SatAppServerDispatcher::menuSelection(SatAppAction* action) |
|
59 { |
|
60 qDebug("SATAPP: SatAppServerDispatcher::menuSelection >"); |
|
61 if ( ESatSuccess == action->response() ) { |
|
62 // user selected item from menu |
|
63 int menuItem = action->value(KeySelection).toInt(); |
|
64 int helpRequested = action->value(KeyHelpRequested).toBool(); |
|
65 qDebug("SATAPP: SatAppServerDispatcher::MenuSelection item=%d", |
|
66 menuItem); |
|
67 iSat.Adapter()->MenuSelection(menuItem, helpRequested); |
|
68 } else if (ESatSessionTerminatedByUser == action->response()) { |
|
69 // session terminated while executing the menu action |
|
70 qDebug("SATAPP: SatAppServerDispatcher::SessionTerminated"); |
|
71 iSat.Adapter()->SessionTerminated(EEndKeyUsed); |
|
72 } |
|
73 delete action; |
|
74 qDebug("SATAPP: SatAppServerDispatcher::menuSelection <"); |
|
75 } |
|
76 |
|
77 // ---------------------------------------------------------------------------- |
|
78 // SatAppServerDispatcher::userCancelResponse |
|
79 // ---------------------------------------------------------------------------- |
|
80 // |
|
81 void SatAppServerDispatcher::userCancelSession(SatAppAction* action) |
|
82 { |
|
83 qDebug("SATAPP: SatAppServerDispatcher::userCancelSession"); |
|
84 if (action && ESatBackwardModeRequestedByUser == action->response()){ |
|
85 iSat.Adapter()->SessionTerminated(ESessionCancel); |
|
86 } |
|
87 delete action; |
|
88 action = 0; |
|
89 } |
|
90 |
|
91 |
|
92 // **************************************************************************** |
|
93 // * ************************************************************************ * |
|
94 // * * SYMBIAN PART * * |
|
95 // * ************************************************************************ * |
|
96 // **************************************************************************** |
|
97 |
|
98 // ---------------------------------------------------------------------------- |
|
99 // SatAppServerDispatcher::ConnectSatSessionL |
|
100 // ---------------------------------------------------------------------------- |
|
101 // |
|
102 void SatAppServerDispatcher::ConnectSatSessionL() |
|
103 { |
|
104 qDebug("SATAPP: SatAppServerDispatcher::ConnectSatSessionL>"); |
|
105 //Register to Server as subsession |
|
106 //If Server is not up, this function call may take time |
|
107 iSatSession.ConnectL(); |
|
108 iSat.RegisterL(iSatSession, this); |
|
109 if (!iSat.Adapter()) |
|
110 User::Leave(KErrNotFound); |
|
111 qDebug("SATAPP: SatAppServerDispatcher::ConnectSatSessionL<"); |
|
112 } |
|
113 |
|
114 // ---------------------------------------------------------------------------- |
|
115 // SatAppServerDispatcher::DisconnectSatSession |
|
116 // ---------------------------------------------------------------------------- |
|
117 // |
|
118 void SatAppServerDispatcher::DisconnectSatSession() |
|
119 { |
|
120 qDebug("SATAPP: SatAppServerDispatcher::DisconnectSatSession>"); |
|
121 iSat.Close(); |
|
122 iSatSession.Close(); |
|
123 qDebug("SATAPP: SatAppServerDispatcher::DisconnectSatSession<"); |
|
124 } |
|
125 |
|
126 // ---------------------------------------------------------------------------- |
|
127 // My own quick string -> descriptor conversion function :-) |
|
128 // ---------------------------------------------------------------------------- |
|
129 // |
|
130 void s2d(const QString str, TDes& desc) |
|
131 { |
|
132 desc.Copy(reinterpret_cast<const TUint16*>(str.utf16()), str.length()); |
|
133 } |
|
134 |
|
135 // ---------------------------------------------------------------------------- |
|
136 // SatAppServerDispatcher::DisplayTextL |
|
137 // ---------------------------------------------------------------------------- |
|
138 // |
|
139 TSatUiResponse SatAppServerDispatcher::DisplayTextL( const TDesC& aText, |
|
140 const TDesC& aSimApplicationName, |
|
141 const TSatIconId& aIconId, |
|
142 TBool& aRequestedIconDisplayed, |
|
143 const TBool aSustainedText, |
|
144 const TTimeIntervalSeconds aDuration, |
|
145 const TBool aWaitUserToClear ) |
|
146 { |
|
147 qDebug("SATAPP: SatAppServerDispatcher::DisplayTextL >"); |
|
148 Q_UNUSED(aIconId); |
|
149 SatAppAction action(ESatDisplayTextAction); |
|
150 // validate |
|
151 if (aText.Length()== 0 || aText.Length()>RSat::KTextToDisplayMaxSize){ |
|
152 qDebug("SATAPP: SatAppServerDispatcher::DisplayText no text"); |
|
153 aRequestedIconDisplayed = EFalse; |
|
154 return ESatFailure; |
|
155 } |
|
156 |
|
157 QT_TRYCATCH_LEAVING( |
|
158 // ensure state |
|
159 emit stopShowWaitNote(); |
|
160 |
|
161 // call |
|
162 action.set(KeyText,aText); |
|
163 action.set(KeyApplicationName, aSimApplicationName); |
|
164 action.set(KeySustainedText, aSustainedText); |
|
165 action.set(KeyDuration, const_cast<TTimeIntervalSeconds &>(aDuration)); |
|
166 action.set(KeyWaitUserToClear, aWaitUserToClear); |
|
167 |
|
168 emit displayText(action); |
|
169 action.waitUntilCompleted(); |
|
170 ); |
|
171 |
|
172 // return |
|
173 qDebug("SATAPP: SatAppServerDispatcher::DisplayTextL action.response() %x<", |
|
174 action.response()); |
|
175 return action.response(); |
|
176 } |
|
177 |
|
178 // ---------------------------------------------------------------------------- |
|
179 // SatAppServerDispatcher::GetInkeyL |
|
180 // ---------------------------------------------------------------------------- |
|
181 // |
|
182 TSatUiResponse SatAppServerDispatcher::GetInkeyL( |
|
183 const TDesC& aText, |
|
184 const TSatCharacterSet aCharacterSet, |
|
185 TChar& aInput, |
|
186 const TBool aHelpIsAvailable, |
|
187 const TSatIconId& aIconId, |
|
188 TBool& aRequestedIconDisplayed, |
|
189 TUint& aDuration, |
|
190 const TBool aImmediateDigitResponse ) |
|
191 { |
|
192 Q_UNUSED(aHelpIsAvailable); |
|
193 Q_UNUSED(aIconId); |
|
194 |
|
195 qDebug("SATAPP: SatAppServerDispatcher::GetInkeyL >"); |
|
196 |
|
197 // validate |
|
198 aRequestedIconDisplayed = EFalse; |
|
199 if (ESatYesNo == aCharacterSet && aText.Length() == 0) { |
|
200 qDebug("SATAPP: CSatUiObserver::GetInkey return ESatFailure"); |
|
201 return ESatFailure; |
|
202 } |
|
203 |
|
204 SatAppAction action(ESatGetInkeyAction); |
|
205 QT_TRYCATCH_LEAVING( |
|
206 // ensure state |
|
207 emit stopShowWaitNote(); |
|
208 |
|
209 // call |
|
210 action.set(KeyText,aText); |
|
211 action.set(KeyCharacterSet,(int)aCharacterSet); |
|
212 action.set(KeyInKey,(int)aInput); |
|
213 // convert from SAT time units(?) to milliseconds |
|
214 action.set(KeyDuration,(int)aDuration*KSymbianTimeConvertQtTime); |
|
215 action.set(KeyImmediate,(bool)aImmediateDigitResponse); |
|
216 emit getInkey(action); |
|
217 action.waitUntilCompleted(); |
|
218 // convert from milliseconds to SAT time units(?) |
|
219 aDuration = |
|
220 action.value(KeyDuration).toInt()/KSymbianTimeConvertQtTime; |
|
221 aInput = action.value(KeyInKey).toInt(); |
|
222 ); |
|
223 |
|
224 // return |
|
225 qDebug("SATAPP: SatAppServerDispatcher::GetInkeyL <"); |
|
226 return action.response(); |
|
227 } |
|
228 |
|
229 // ---------------------------------------------------------------------------- |
|
230 // SatAppServerDispatcher::GetInputL |
|
231 // ---------------------------------------------------------------------------- |
|
232 // |
|
233 TSatUiResponse SatAppServerDispatcher::GetInputL( |
|
234 const TDesC& aText, |
|
235 const TSatCharacterSet aCharacterSet, |
|
236 TDes& aInput, |
|
237 const TInt aMinLength, |
|
238 const TInt aMaxLength, |
|
239 const TBool aHideInput, |
|
240 const TBool aHelpIsAvailable, |
|
241 const TSatIconId& aIconId, |
|
242 TBool& aRequestedIconDisplayed ) |
|
243 { |
|
244 Q_UNUSED(aHelpIsAvailable); |
|
245 Q_UNUSED(aIconId); |
|
246 qDebug("SATAPP: SatAppServerDispatcher::GetInputL >"); |
|
247 |
|
248 // validate |
|
249 aRequestedIconDisplayed = EFalse; |
|
250 if ((aCharacterSet == ESatCharSmsDefaultAlphabet || |
|
251 aCharacterSet == ESatCharUcs2Alphabet) && |
|
252 aHideInput) { |
|
253 qDebug("SATAPP: SatAppServerDispatcher::GetInput return ESatFailure"); |
|
254 return ESatFailure; |
|
255 } |
|
256 |
|
257 SatAppAction action(ESatGetInputAction); |
|
258 QT_TRYCATCH_LEAVING( |
|
259 // ensure state |
|
260 emit stopShowWaitNote(); |
|
261 |
|
262 // call |
|
263 action.set(KeyText,aText); |
|
264 action.set(KeyCharacterSet,(int)aCharacterSet); |
|
265 action.set(KeyInputString,aInput); |
|
266 action.set(KeyMinLength,aMinLength); |
|
267 action.set(KeyMaxLength,aMaxLength); |
|
268 action.set(KeyHideInput,(bool)aHideInput); |
|
269 emit getInput(action); |
|
270 action.waitUntilCompleted(); |
|
271 s2d(action.value(KeyInputString).toString(), aInput); |
|
272 ) |
|
273 |
|
274 // return |
|
275 qDebug("SATAPP: SatAppServerDispatcher::GetInputL <"); |
|
276 return action.response(); |
|
277 } |
|
278 |
|
279 // ---------------------------------------------------------------------------- |
|
280 // SatAppServerDispatcher::SetUpMenuL |
|
281 // ---------------------------------------------------------------------------- |
|
282 // |
|
283 TSatUiResponse SatAppServerDispatcher::SetUpMenuL( |
|
284 const TDesC& aText, |
|
285 const MDesCArray& aMenuItems, |
|
286 const CArrayFixFlat<TSatAction>* aMenuItemNextActions, |
|
287 const TBool aHelpIsAvailable, |
|
288 const TSatIconId& aIconId, |
|
289 const CArrayFixFlat<TInt>* aMenuIcons, |
|
290 const enum TSatIconQualifier aIconListQualifier, |
|
291 const enum TSatSelectionPreference aSelectionPreference ) |
|
292 { |
|
293 Q_UNUSED(aMenuItemNextActions); |
|
294 Q_UNUSED(aHelpIsAvailable); |
|
295 Q_UNUSED(aIconId); |
|
296 Q_UNUSED(aMenuIcons); |
|
297 Q_UNUSED(aIconListQualifier); |
|
298 Q_UNUSED(aSelectionPreference); |
|
299 qDebug("SATAPP: SatAppServerDispatcher::SetUpMenuL >"); |
|
300 |
|
301 QT_TRYCATCH_LEAVING( |
|
302 |
|
303 // validate |
|
304 if (!aMenuItems.MdcaCount()) { |
|
305 emit clearScreen(); |
|
306 QCoreApplication::instance()->quit(); |
|
307 return ESatSuccess; |
|
308 } |
|
309 |
|
310 // ensure state |
|
311 emit stopShowWaitNote(); |
|
312 |
|
313 // call |
|
314 SatAppAction* action = new SatAppAction(ESatSetUpMenuAction, this); |
|
315 action->set(KeyText,aText); |
|
316 action->set(KeyMenu,aMenuItems); |
|
317 // connect for asynchronous menu selection |
|
318 connect( |
|
319 action,SIGNAL(actionCompleted(SatAppAction*)), |
|
320 this,SLOT(menuSelection(SatAppAction*))); |
|
321 |
|
322 emit setUpMenu(*action); |
|
323 ) |
|
324 |
|
325 // return |
|
326 qDebug("SATAPP: SatAppServerDispatcher::SetUpMenuL <"); |
|
327 return ESatSuccess; |
|
328 } |
|
329 |
|
330 // ---------------------------------------------------------------------------- |
|
331 // SatAppServerDispatcher::SelectItemL |
|
332 // ---------------------------------------------------------------------------- |
|
333 // |
|
334 TSatUiResponse SatAppServerDispatcher::SelectItemL( |
|
335 const TDesC& aText, |
|
336 const MDesCArray& aMenuItems, |
|
337 const CArrayFixFlat<TSatAction>* aMenuItemNextActions, |
|
338 const TInt aDefaultItem, |
|
339 TUint8& aSelection, |
|
340 const TBool aHelpIsAvailable, |
|
341 const TSatIconId& aIconId, |
|
342 const CArrayFixFlat<TInt>* aMenuIcons, |
|
343 const enum TSatIconQualifier aIconListQualifier, |
|
344 TBool& aRequestedIconDisplayed, |
|
345 const enum TSatSelectionPreference aSelectionPreference ) |
|
346 { |
|
347 Q_UNUSED(aMenuItemNextActions); |
|
348 Q_UNUSED(aHelpIsAvailable); |
|
349 Q_UNUSED(aIconId); |
|
350 Q_UNUSED(aMenuIcons); |
|
351 Q_UNUSED(aIconListQualifier); |
|
352 Q_UNUSED(aRequestedIconDisplayed); |
|
353 Q_UNUSED(aSelectionPreference); |
|
354 TSatUiResponse resp(ESatFailure); |
|
355 SatAppAction action(ESatSelectItemAction); |
|
356 qDebug("SATAPP: SatAppServerDispatcher::SelectItemL >"); |
|
357 |
|
358 QT_TRYCATCH_LEAVING( |
|
359 // ensure state |
|
360 emit stopShowWaitNote(); |
|
361 |
|
362 // call |
|
363 action.set(KeyText,aText); |
|
364 action.set(KeyMenu,aMenuItems); |
|
365 action.set(KeyDefault,aDefaultItem); |
|
366 emit selectItem(action); |
|
367 action.waitUntilCompleted(); |
|
368 resp = action.response(); |
|
369 if ( ESatSuccess == resp ) { |
|
370 aSelection = static_cast<TUint8>( |
|
371 action.value(KeySelection).toInt()); |
|
372 } |
|
373 ) |
|
374 |
|
375 // return |
|
376 qDebug("SATAPP: SatAppServerDispatcher::SelectItemL <"); |
|
377 return resp; |
|
378 } |
|
379 |
|
380 // ---------------------------------------------------------------------------- |
|
381 // SatAppServerDispatcher::PlayTone |
|
382 // ---------------------------------------------------------------------------- |
|
383 // |
|
384 TSatUiResponse SatAppServerDispatcher::PlayTone( |
|
385 const TDesC& aText, |
|
386 const TSatTone aTone, |
|
387 const TTimeIntervalMicroSeconds aDuration, |
|
388 const TSatIconId& aIconId, |
|
389 TBool& aRequestedIconDisplayed ) |
|
390 { |
|
391 Q_UNUSED(aIconId); |
|
392 aRequestedIconDisplayed = EFalse; |
|
393 TSatUiResponse resp(ESatSuccess); |
|
394 qDebug("SATAPP: SatAppServerDispatcher::PlayTone >"); |
|
395 SatAppAction action(ESatPlayToneAction); |
|
396 int err(KErrNone); |
|
397 QT_TRYCATCH_ERROR( |
|
398 err, |
|
399 // ensure state |
|
400 emit stopShowWaitNote(); |
|
401 |
|
402 // call |
|
403 action.set(KeyText,aText); |
|
404 action.set(KeyToneId,aTone); |
|
405 action.set(KeyDuration, const_cast<TTimeIntervalMicroSeconds &>(aDuration)); |
|
406 emit playTone(action); |
|
407 action.waitUntilCompleted(); |
|
408 resp = action.response(); |
|
409 ) |
|
410 |
|
411 // return |
|
412 qDebug("SATAPP: SatAppServerDispatcher::PlayTone err = %d<", err); |
|
413 return resp; |
|
414 } |
|
415 |
|
416 |
|
417 // ---------------------------------------------------------------------------- |
|
418 // SatAppServerDispatcher::ConfirmCommand |
|
419 // ---------------------------------------------------------------------------- |
|
420 // |
|
421 void SatAppServerDispatcher::ConfirmCommand( |
|
422 const TSatSQueryCommand aCommandId, |
|
423 const TSatAlphaIdStatus aAlphaIdStatus, |
|
424 const TDesC& aText, |
|
425 const TDesC& aAdditionalText, |
|
426 TBool& aActionAccepted, |
|
427 const TSatIconId& aIconId, |
|
428 TBool& aRequestedIconDisplayed, |
|
429 TBool& aTerminatedByUser ) |
|
430 { |
|
431 qDebug("SATAPP: SatAppServerDispatcher::ConfirmCommand >"); |
|
432 Q_UNUSED(aIconId); |
|
433 aRequestedIconDisplayed = EFalse; |
|
434 aTerminatedByUser = EFalse; |
|
435 //ConfirmAction |
|
436 SatAppAction action(ESatConfirmAction); |
|
437 qDebug("SATAPP: SatAppServerDispatcher::ConfirmCommand"); |
|
438 int err(KErrNone); |
|
439 QT_TRYCATCH_ERROR( |
|
440 err, |
|
441 emit stopShowWaitNote(); |
|
442 |
|
443 action.set(KeyQueryCommandId, aCommandId); |
|
444 action.set(KeyAlphaIdStatus, aAlphaIdStatus); |
|
445 action.set(KeyText, aText); |
|
446 action.set(KeyAdditionalText, aAdditionalText); |
|
447 action.set(KeyActionAccepted, aActionAccepted); |
|
448 |
|
449 emit confirmCommand(action); |
|
450 action.waitUntilCompleted(); |
|
451 if (ESatSuccess == action.response() ) { |
|
452 aActionAccepted = ETrue; |
|
453 } |
|
454 ) |
|
455 qDebug("SATAPP: SatAppServerDispatcher::ConfirmCommand err = %d <", err); |
|
456 } |
|
457 |
|
458 // ---------------------------------------------------------------------------- |
|
459 // SatAppServerDispatcher::Notification |
|
460 // ---------------------------------------------------------------------------- |
|
461 // |
|
462 TSatUiResponse SatAppServerDispatcher::Notification( |
|
463 const TSatSNotifyCommand aCommandId, |
|
464 const TSatAlphaIdStatus aAlphaIdStatus, |
|
465 const TDesC& aText, |
|
466 const TSatIconId& aIconId, |
|
467 TBool& aRequestedIconDisplayed, |
|
468 const TSatControlResult aControlResult ) |
|
469 { |
|
470 Q_UNUSED(aIconId); |
|
471 Q_UNUSED(aRequestedIconDisplayed); |
|
472 qDebug("SATAPP: SatAppServerDispatcher::Notification command id=%d", |
|
473 aCommandId); |
|
474 |
|
475 TSatUiResponse res(ESatFailure); |
|
476 int err(KErrNone); |
|
477 switch (aCommandId) |
|
478 { |
|
479 // With cancel |
|
480 case ESatSSendDataNotify: // fall through |
|
481 case ESatSReceiveDataNotify: // fall through |
|
482 case ESatSSendDtmfNotify: // fall through |
|
483 { |
|
484 QT_TRYCATCH_ERROR( |
|
485 err, |
|
486 emit stopShowWaitNote(); |
|
487 SatAppAction *action = new SatAppAction(ESatNotifyAction, this); |
|
488 action->set(KeyText, aText); |
|
489 action->set(KeyCommandId, aCommandId); |
|
490 action->set(KeyAlphaIdStatus, aAlphaIdStatus); |
|
491 action->set(KeyControlResult, aControlResult); |
|
492 // connect for asynchronous menu selection |
|
493 connect( |
|
494 action,SIGNAL(actionCompleted(SatAppAction*)), |
|
495 this,SLOT(userCancelSession(SatAppAction*))); |
|
496 emit notification(*action); |
|
497 res = ESatSuccess; |
|
498 ) |
|
499 break; |
|
500 } |
|
501 // Without cancel |
|
502 case ESatSMoSmControlNotify: // fall through |
|
503 case ESatSCallControlNotify: // fall through |
|
504 case ESatSSendUssdNotify: // fall through |
|
505 case ESatSSendSsNotify: // fall through |
|
506 case ESatSSendSmsNotify: // fall through |
|
507 case ESatSCloseChannelNotify: // fall through |
|
508 { |
|
509 QT_TRYCATCH_ERROR( |
|
510 err, |
|
511 emit stopShowWaitNote(); |
|
512 SatAppAction a(ESatNotifyAction); |
|
513 a.set(KeyText, aText); |
|
514 a.set(KeyCommandId, aCommandId); |
|
515 a.set(KeyAlphaIdStatus, aAlphaIdStatus); |
|
516 a.set(KeyControlResult, aControlResult); |
|
517 emit notification(a); |
|
518 res = ESatSuccess; |
|
519 ) |
|
520 break; |
|
521 } |
|
522 default: |
|
523 { |
|
524 break; |
|
525 } |
|
526 } |
|
527 qDebug("SATAPP: SatAppServerDispatcher::Notification < ret=%d", err); |
|
528 return res; |
|
529 } |
|
530 |
|
531 // ---------------------------------------------------------------------------- |
|
532 // SatAppServerDispatcher::EventNotification |
|
533 // ---------------------------------------------------------------------------- |
|
534 // |
|
535 void SatAppServerDispatcher::EventNotification( |
|
536 const TSatSEvent aEventId, |
|
537 const TSatSEventStatus aEventStatus, |
|
538 const TInt aError ) |
|
539 { |
|
540 qDebug( "SATAPP: SatAppServerDispatcher::EventNotification aEventId %d", |
|
541 aEventId ); |
|
542 Q_UNUSED(aEventStatus); |
|
543 Q_UNUSED(aError); |
|
544 int err(KErrNone); |
|
545 |
|
546 QT_TRYCATCH_ERROR( err, |
|
547 switch ( aEventId ) |
|
548 { |
|
549 case ESatSSmEndEvent: |
|
550 case ESatSsEndEvent: |
|
551 case ESatSDtmfEndEvent: |
|
552 { |
|
553 emit stopShowWaitNote(); |
|
554 break; |
|
555 } |
|
556 case ESatSClearScreenEvent: |
|
557 { |
|
558 qDebug("SATAPP: ClearScreen event"); |
|
559 emit clearScreen(); |
|
560 break; |
|
561 } |
|
562 case ESatSsErrorEvent: |
|
563 { |
|
564 qDebug("SATAPP: Notifying Ss error" ); |
|
565 // If error occurred (and Alpha ID provided), notify user |
|
566 emit showSsErrorNote(); |
|
567 break; |
|
568 } |
|
569 case ESatSCloseSatUiAppEvent: |
|
570 { |
|
571 qDebug(" Close UI event" ); |
|
572 emit clearScreen(); |
|
573 QCoreApplication::instance()->quit(); |
|
574 break; |
|
575 } |
|
576 default: |
|
577 { |
|
578 qDebug("SATAPP: Unknown event occured: %i", aEventId); |
|
579 break; |
|
580 } |
|
581 } |
|
582 ) // end QT_TRYCATCH_ERROR |
|
583 qDebug("SATAPP: SatAppServerDispatcher::EventNotification err = %d<", err); |
|
584 } |
|
585 |
|
586 //End of file |