changeset 46 | bc5a64e5bc3c |
parent 45 | 6b911d05207e |
child 50 | 377c906a8701 |
child 56 | 5bcb308bd24d |
45:6b911d05207e | 46:bc5a64e5bc3c |
---|---|
32 #include "cphonepubsubproxy.h" |
32 #include "cphonepubsubproxy.h" |
33 #include "tphonecmdparamboolean.h" |
33 #include "tphonecmdparamboolean.h" |
34 #include "tphonecmdparamglobalnote.h" |
34 #include "tphonecmdparamglobalnote.h" |
35 #include "tphonecmdparamnote.h" |
35 #include "tphonecmdparamnote.h" |
36 #include "cphonemainresourceresolver.h" |
36 #include "cphonemainresourceresolver.h" |
37 #include "cphonecenrepproxy.h" |
|
38 |
|
39 // CONSTANTS |
|
40 const TUid KCRUidTelConfiguration = {0x102828B8}; |
|
41 |
|
42 const TUint32 KTelShowCauseCode = 0x00000002; |
|
37 |
43 |
38 |
44 |
39 // ================= MEMBER FUNCTIONS ======================= |
45 // ================= MEMBER FUNCTIONS ======================= |
40 |
46 |
41 // C++ default constructor can NOT contain any code, that |
47 // C++ default constructor can NOT contain any code, that |
43 // |
49 // |
44 EXPORT_C CPhoneErrorMessagesHandler::CPhoneErrorMessagesHandler( |
50 EXPORT_C CPhoneErrorMessagesHandler::CPhoneErrorMessagesHandler( |
45 MPhoneViewCommandHandle* aViewCommandHandle, |
51 MPhoneViewCommandHandle* aViewCommandHandle, |
46 MPhoneStateMachine* aStateMachine ) : |
52 MPhoneStateMachine* aStateMachine ) : |
47 iViewCommandHandle( aViewCommandHandle), |
53 iViewCommandHandle( aViewCommandHandle), |
48 iStateMachine (aStateMachine ) |
54 iStateMachine( aStateMachine ), |
55 iCauseCodeVariation( EFalse ) |
|
49 { |
56 { |
50 } |
57 if ( KErrNone != CPhoneCenRepProxy::Instance()->GetInt( |
58 KCRUidTelConfiguration, |
|
59 KTelShowCauseCode, |
|
60 iCauseCodeVariation ) ) |
|
61 { |
|
62 iCauseCodeVariation = EFalse; |
|
63 } |
|
64 } |
|
51 |
65 |
52 // ----------------------------------------------------------- |
66 // ----------------------------------------------------------- |
53 // CPhoneErrorMessagesHandler::~CPhoneErrorMessagesHandler() |
67 // CPhoneErrorMessagesHandler::~CPhoneErrorMessagesHandler() |
54 // Destructor |
68 // Destructor |
55 // (other items were commented in a header). |
69 // (other items were commented in a header). |
111 &globalNotifierParam ); |
125 &globalNotifierParam ); |
112 |
126 |
113 TPhoneCmdParamGlobalNote globalNoteParam; |
127 TPhoneCmdParamGlobalNote globalNoteParam; |
114 |
128 |
115 globalNoteParam.SetType( EAknGlobalInformationNote ); |
129 globalNoteParam.SetType( EAknGlobalInformationNote ); |
116 globalNoteParam.SetTextResourceId( |
130 |
117 CPhoneMainResourceResolver::Instance()-> |
|
118 ResolveResourceID( aResourceId ) ); |
|
119 globalNoteParam.SetTone( EAvkonSIDInformationTone ); |
131 globalNoteParam.SetTone( EAvkonSIDInformationTone ); |
120 globalNoteParam.SetNotificationDialog( aNotificationDialog ); |
132 globalNoteParam.SetNotificationDialog( aNotificationDialog ); |
121 |
133 |
134 TInt resourceID( KErrNotFound ); |
|
135 TInt causeCode( KErrNotFound ); |
|
136 TBool notification( ETrue ); |
|
137 if ( iCauseCodeVariation && GetCauseCode( causeCode, resourceID, notification ) ) |
|
138 { |
|
139 globalNoteParam.SetNotificationDialog( notification ); |
|
140 globalNoteParam.SetCauseCode(causeCode); |
|
141 globalNoteParam.SetTextResourceId( |
|
142 CPhoneMainResourceResolver::Instance()-> |
|
143 ResolveResourceID( resourceID ) ); |
|
144 } |
|
145 else |
|
146 { |
|
147 globalNoteParam.SetTextResourceId( |
|
148 CPhoneMainResourceResolver::Instance()-> |
|
149 ResolveResourceID( aResourceId ) ); |
|
150 } |
|
151 |
|
122 iViewCommandHandle->ExecuteCommandL( |
152 iViewCommandHandle->ExecuteCommandL( |
123 EPhoneViewShowGlobalNote, &globalNoteParam ); |
153 EPhoneViewShowGlobalNote, &globalNoteParam ); |
124 } |
154 } |
125 |
155 |
126 } |
156 } |
146 EPhoneViewSetGlobalNotifiersDisabled, |
176 EPhoneViewSetGlobalNotifiersDisabled, |
147 &globalNotifierParam ); |
177 &globalNotifierParam ); |
148 |
178 |
149 TPhoneCmdParamGlobalNote globalNoteParam; |
179 TPhoneCmdParamGlobalNote globalNoteParam; |
150 globalNoteParam.SetType( EAknGlobalErrorNote ); |
180 globalNoteParam.SetType( EAknGlobalErrorNote ); |
151 globalNoteParam.SetTextResourceId( |
181 |
152 CPhoneMainResourceResolver::Instance()-> |
|
153 ResolveResourceID( aResourceId ) ); |
|
154 globalNoteParam.SetTone( CAknNoteDialog::EErrorTone ); |
182 globalNoteParam.SetTone( CAknNoteDialog::EErrorTone ); |
155 globalNoteParam.SetNotificationDialog( aNotificationDialog ); |
183 globalNoteParam.SetNotificationDialog( aNotificationDialog ); |
184 |
|
185 TInt resourceID( KErrNotFound ); |
|
186 TInt causeCode( KErrNotFound ); |
|
187 TBool notification( ETrue ); |
|
188 if ( iCauseCodeVariation && GetCauseCode( causeCode, resourceID, notification ) ) |
|
189 { |
|
190 globalNoteParam.SetNotificationDialog( notification ); |
|
191 globalNoteParam.SetCauseCode(causeCode); |
|
192 globalNoteParam.SetTextResourceId( |
|
193 CPhoneMainResourceResolver::Instance()-> |
|
194 ResolveResourceID( resourceID ) ); |
|
195 } |
|
196 else |
|
197 { |
|
198 globalNoteParam.SetTextResourceId( |
|
199 CPhoneMainResourceResolver::Instance()-> |
|
200 ResolveResourceID( aResourceId ) ); |
|
201 } |
|
156 |
202 |
157 iViewCommandHandle->ExecuteCommandL( |
203 iViewCommandHandle->ExecuteCommandL( |
158 EPhoneViewShowGlobalNote, &globalNoteParam ); |
204 EPhoneViewShowGlobalNote, &globalNoteParam ); |
159 } |
205 } |
160 |
206 |
181 EPhoneViewSetGlobalNotifiersDisabled, |
227 EPhoneViewSetGlobalNotifiersDisabled, |
182 &globalNotifierParam ); |
228 &globalNotifierParam ); |
183 |
229 |
184 TPhoneCmdParamGlobalNote globalNoteParam; |
230 TPhoneCmdParamGlobalNote globalNoteParam; |
185 globalNoteParam.SetType( EAknGlobalWarningNote ); |
231 globalNoteParam.SetType( EAknGlobalWarningNote ); |
186 globalNoteParam.SetTextResourceId( |
232 |
187 CPhoneMainResourceResolver::Instance()-> |
|
188 ResolveResourceID( aResourceId ) ); |
|
189 globalNoteParam.SetTone( EAvkonSIDWarningTone ); |
233 globalNoteParam.SetTone( EAvkonSIDWarningTone ); |
190 globalNoteParam.SetNotificationDialog( aNotificationDialog ); |
234 globalNoteParam.SetNotificationDialog( aNotificationDialog ); |
191 |
235 |
236 TInt resourceID( KErrNotFound ); |
|
237 TInt causeCode( KErrNotFound ); |
|
238 TBool notification( ETrue ); |
|
239 if ( iCauseCodeVariation && GetCauseCode( causeCode, resourceID, notification) ) |
|
240 { |
|
241 globalNoteParam.SetNotificationDialog( notification ); |
|
242 globalNoteParam.SetCauseCode(causeCode); |
|
243 globalNoteParam.SetTextResourceId( |
|
244 CPhoneMainResourceResolver::Instance()-> |
|
245 ResolveResourceID( resourceID ) ); |
|
246 } |
|
247 else |
|
248 { |
|
249 globalNoteParam.SetTextResourceId( |
|
250 CPhoneMainResourceResolver::Instance()-> |
|
251 ResolveResourceID( aResourceId ) ); |
|
252 } |
|
253 |
|
192 iViewCommandHandle->ExecuteCommandL( |
254 iViewCommandHandle->ExecuteCommandL( |
193 EPhoneViewShowGlobalNote, &globalNoteParam ); |
255 EPhoneViewShowGlobalNote, &globalNoteParam ); |
194 } |
256 } |
195 } |
257 } |
196 |
258 |
215 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneErrorMessagesHandler::ShowErrorSpecificNoteL()"); |
277 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneErrorMessagesHandler::ShowErrorSpecificNoteL()"); |
216 |
278 |
217 __PHONELOG1( EBasic, EPhoneControl, |
279 __PHONELOG1( EBasic, EPhoneControl, |
218 "PhoneUIControl: CPhoneErrorMessagesHandler::ShowErrorSpecificNoteL - aErrorInfo.iErrorCode =%d ", |
280 "PhoneUIControl: CPhoneErrorMessagesHandler::ShowErrorSpecificNoteL - aErrorInfo.iErrorCode =%d ", |
219 aErrorInfo.iErrorCode); |
281 aErrorInfo.iErrorCode); |
220 |
282 iCallId = aErrorInfo.iCallId; |
283 |
|
221 switch( aErrorInfo.iErrorCode ) |
284 switch( aErrorInfo.iErrorCode ) |
222 { |
285 { |
223 case ECCPErrorRejected: |
286 case ECCPErrorRejected: |
224 case ECCPRequestFailure: |
287 case ECCPRequestFailure: |
225 SendGlobalErrorNoteL( EPhoneNoteTextRequestRejected, ETrue ); |
288 SendGlobalErrorNoteL( EPhoneNoteTextRequestRejected, ETrue ); |
284 } |
347 } |
285 |
348 |
286 break; |
349 break; |
287 |
350 |
288 case ECCPErrorUnacceptableChannel: |
351 case ECCPErrorUnacceptableChannel: |
289 case ECCPErrorCCDestinationOutOfOrder: |
352 case ECCPErrorCCDestinationOutOfOrder: |
290 case ECCPErrorAccessInformationDiscarded: |
|
291 case ECCPErrorQualityOfServiceNotAvailable: |
|
292 case ECCPErrorInvalidCallReferenceValue: |
353 case ECCPErrorInvalidCallReferenceValue: |
293 case ECCPErrorCCInvalidTransitNetworkSelection: |
354 case ECCPErrorCCInvalidTransitNetworkSelection: |
294 case ECCPErrorConnectionError: |
355 case ECCPErrorConnectionError: |
295 case ECCPErrorCCIncompatibleMessageInCallState: |
356 case ECCPErrorCCIncompatibleMessageInCallState: |
296 if( IsVideoCall( aErrorInfo.iCallId ) && |
357 if( IsVideoCall( aErrorInfo.iCallId ) ) |
297 iStateMachine->PhoneEngineInfo()->ProfileId() != EProfileOffLineId ) |
|
298 { |
358 { |
299 SendGlobalInfoNoteL( EPhoneNoteVideoCallNotPossible ); |
359 SendGlobalInfoNoteL( EPhoneNoteVideoCallNotPossible ); |
300 } |
360 } |
301 else |
361 else |
302 { |
362 { |
303 SendGlobalWarningNoteL( EPhoneErrorInConnection, ETrue ); |
363 SendGlobalWarningNoteL( EPhoneErrorInConnection, ETrue ); |
304 } |
364 } |
305 break; |
365 break; |
306 |
366 |
367 case ECCPErrorQualityOfServiceNotAvailable: |
|
368 case ECCPErrorAccessInformationDiscarded: |
|
307 case ECCPErrorCCResourceNotAvailable: |
369 case ECCPErrorCCResourceNotAvailable: |
308 SendGlobalWarningNoteL( EPhoneErrorInConnection, ETrue ); |
370 SendGlobalWarningNoteL( EPhoneErrorInConnection, ETrue ); |
309 break; |
371 break; |
310 |
372 |
311 case ECCPErrorNumberBarred: |
373 case ECCPErrorNumberBarred: |
353 case ECCPErrorUserNotInCug: |
415 case ECCPErrorUserNotInCug: |
354 if( IsVideoCall( aErrorInfo.iCallId ) ) |
416 if( IsVideoCall( aErrorInfo.iCallId ) ) |
355 { |
417 { |
356 SendGlobalInfoNoteL( EPhoneNumberNotInCUG, ETrue ); |
418 SendGlobalInfoNoteL( EPhoneNumberNotInCUG, ETrue ); |
357 } |
419 } |
420 else |
|
421 { |
|
422 SendGlobalWarningNoteL( EPhoneNumberNotInCUG, ETrue ); |
|
423 } |
|
424 break; |
|
425 |
|
426 case ECCPErrorCCNoRouteToDestination: |
|
427 if( IsVideoCall( aErrorInfo.iCallId ) ) |
|
428 { |
|
429 SendGlobalInfoNoteL( EPhoneErrorInConnection ); |
|
430 } |
|
358 else |
431 else |
359 { |
432 { |
360 SendGlobalWarningNoteL( EPhoneNumberNotInCUG, ETrue ); |
433 SendGlobalWarningNoteL( EPhoneErrorInConnection, ETrue ); |
361 } |
434 } |
362 break; |
|
363 |
|
364 case ECCPErrorCCNoRouteToDestination: |
|
365 if( IsVideoCall( aErrorInfo.iCallId ) ) |
|
366 { |
|
367 SendGlobalInfoNoteL( EPhoneNotePhoneOutOf3GCoverage ); |
|
368 } |
|
369 break; |
435 break; |
370 |
436 |
371 case ECCPErrorCCNormalCallClearing: |
437 case ECCPErrorCCNormalCallClearing: |
372 if( IsVideoCall( aErrorInfo.iCallId ) ) |
438 if( IsVideoCall( aErrorInfo.iCallId ) ) |
373 { |
439 { |
376 break; |
442 break; |
377 |
443 |
378 case ECCPErrorCCUserNotResponding: |
444 case ECCPErrorCCUserNotResponding: |
379 if( IsVideoCall( aErrorInfo.iCallId ) ) |
445 if( IsVideoCall( aErrorInfo.iCallId ) ) |
380 { |
446 { |
381 SendGlobalInfoNoteL( EPhoneNoteCallInfoCauseValue18 ); |
447 SendGlobalInfoNoteL( EPhoneNoAnswer ); |
382 } |
448 } |
383 else |
449 else |
384 { |
450 { |
385 SendGlobalWarningNoteL( EPhoneNoAnswer, ETrue ); |
451 SendGlobalWarningNoteL( EPhoneNoAnswer, ETrue ); |
386 } |
452 } |
387 break; |
453 break; |
388 |
454 |
389 case ECCPErrorCCCallRejected: |
455 case ECCPErrorCCCallRejected: |
390 if( IsVideoCall( aErrorInfo.iCallId ) ) |
456 if ( !iStateMachine->PhoneEngineInfo()->IsOutgoingCallBarringActivated() ) |
391 { |
457 { |
392 SendGlobalInfoNoteL( EPhoneNoteCalledNumberHasBarredIncomingCalls, ETrue ); |
458 if( IsVideoCall( aErrorInfo.iCallId ) ) |
459 { |
|
460 SendGlobalInfoNoteL( EPhoneNoteCalledNumberHasBarredIncomingCalls, ETrue ); |
|
461 } |
|
462 else if ( IsVoiceCall( aErrorInfo.iCallId )) |
|
463 { |
|
464 SendGlobalWarningNoteL( EPhoneNoteCallInfoCauseValue21 ); |
|
465 } |
|
393 } |
466 } |
394 break; |
467 break; |
395 |
468 |
396 case ECCPErrorMovedPermanently: |
469 case ECCPErrorMovedPermanently: |
397 if( IsVideoCall( aErrorInfo.iCallId ) ) |
470 if( IsVideoCall( aErrorInfo.iCallId ) ) |
398 { |
471 { |
399 SendGlobalInfoNoteL( EPhoneNoteCallInfoCauseValue22 ); |
472 SendGlobalInfoNoteL( EPhoneNumberNotInUse ); |
473 } |
|
474 else |
|
475 { |
|
476 SendGlobalWarningNoteL( EPhoneNumberNotInUse, ETrue ); |
|
400 } |
477 } |
401 break; |
478 break; |
402 |
479 |
403 case ECCPErrorNoAnswerForVideo: |
480 case ECCPErrorNoAnswerForVideo: |
404 if( IsVideoCall( aErrorInfo.iCallId ) ) |
481 if( IsVideoCall( aErrorInfo.iCallId ) ) |
412 break; |
489 break; |
413 |
490 |
414 case ECCPErrorCCNoChannelAvailable: |
491 case ECCPErrorCCNoChannelAvailable: |
415 if( IsVideoCall( aErrorInfo.iCallId ) ) |
492 if( IsVideoCall( aErrorInfo.iCallId ) ) |
416 { |
493 { |
417 SendGlobalInfoNoteL( EPhoneNoteCallInfoCauseValue34 ); |
494 SendGlobalInfoNoteL( EPhoneNetworkBusy ); |
418 } |
495 } |
419 else |
496 else |
420 { |
497 { |
421 SendGlobalWarningNoteL( EPhoneNetworkBusy, ETrue ); |
498 SendGlobalWarningNoteL( EPhoneNetworkBusy, ETrue ); |
422 } |
499 } |
423 break; |
500 break; |
424 |
501 |
425 case ECCPErrorNetworkOutOfOrder: |
502 case ECCPErrorNetworkOutOfOrder: |
426 if( IsVideoCall( aErrorInfo.iCallId ) ) |
503 if( IsVideoCall( aErrorInfo.iCallId ) ) |
427 { |
504 { |
428 SendGlobalInfoNoteL( EPhoneNoteCallInfoCauseValue38 ); |
505 SendGlobalInfoNoteL( EPhoneErrorInConnection ); |
506 } |
|
507 else |
|
508 { |
|
509 SendGlobalWarningNoteL( EPhoneErrorInConnection, ETrue ); |
|
429 } |
510 } |
430 break; |
511 break; |
431 |
512 |
432 case ECCPErrorCCRequestedFacilityNotSubscribed: |
513 case ECCPErrorCCRequestedFacilityNotSubscribed: |
433 if( IsVideoCall( aErrorInfo.iCallId ) ) |
514 if( IsVideoCall( aErrorInfo.iCallId ) ) |
441 break; |
522 break; |
442 |
523 |
443 case ECCPErrorCCIncomingCallsBarredInCug: |
524 case ECCPErrorCCIncomingCallsBarredInCug: |
444 if( IsVideoCall( aErrorInfo.iCallId ) ) |
525 if( IsVideoCall( aErrorInfo.iCallId ) ) |
445 { |
526 { |
446 SendGlobalInfoNoteL( EPhoneNoteCallInfoCauseValue55 ); |
527 SendGlobalInfoNoteL( EPhoneNumberBarred ); |
528 } |
|
529 else |
|
530 { |
|
531 SendGlobalWarningNoteL( EPhoneNumberBarred, ETrue ); |
|
447 } |
532 } |
448 break; |
533 break; |
449 |
534 |
450 case ECCPErrorCCIncompatibleDestination: |
535 case ECCPErrorCCIncompatibleDestination: |
451 case ECCPErrorCCBearerCapabilityNotAuthorised: |
536 case ECCPErrorCCBearerCapabilityNotAuthorised: |
452 if( IsVideoCall( aErrorInfo.iCallId ) ) |
537 if( IsVideoCall( aErrorInfo.iCallId ) ) |
453 { |
538 { |
454 SendGlobalInfoNoteL( EPhoneNoteUnableToMakeVideoCallNotSupportedByOtherPhone ); |
539 SendGlobalInfoNoteL( EPhoneNoteUnableToMakeVideoCallNotSupportedByOtherPhone ); |
455 } |
540 } |
541 else |
|
542 { |
|
543 SendGlobalWarningNoteL( EPhoneErrorInConnection, ETrue ); |
|
544 } |
|
456 break; |
545 break; |
457 |
546 |
458 case ECCPErrorCCBearerCapabilityNotCurrentlyAvailable: |
547 case ECCPErrorCCBearerCapabilityNotCurrentlyAvailable: |
459 if( IsVideoCall( aErrorInfo.iCallId ) ) |
548 case ECCPErrorCCInvalidMandatoryInformation: |
460 { |
549 case ECCPErrorCCUnspecifiedInterworkingError: |
461 SendGlobalInfoNoteL( EPhoneNoteCallInfoCauseValue58 ); |
550 if( IsVideoCall( aErrorInfo.iCallId ) ) |
551 { |
|
552 SendGlobalInfoNoteL( EPhoneNoteVideoCallNotPossible ); |
|
553 } |
|
554 else |
|
555 { |
|
556 SendGlobalWarningNoteL( EPhoneErrorInConnection, ETrue ); |
|
462 } |
557 } |
463 break; |
558 break; |
464 |
559 |
465 case ECCPErrorBadRequest: |
560 case ECCPErrorBadRequest: |
466 if( IsVideoCall( aErrorInfo.iCallId ) ) |
561 if( IsVideoCall( aErrorInfo.iCallId ) ) |
471 { |
566 { |
472 SendGlobalWarningNoteL( EPhoneErrorInConnection, ETrue ); |
567 SendGlobalWarningNoteL( EPhoneErrorInConnection, ETrue ); |
473 } |
568 } |
474 break; |
569 break; |
475 |
570 |
476 case ECCPErrorCCUnspecifiedInterworkingError: |
571 case ECCPErrorCCPreemption: |
477 if( IsVideoCall( aErrorInfo.iCallId ) ) |
|
478 { |
|
479 SendGlobalInfoNoteL( EPhoneNoteCallInfoCauseValue127 ); |
|
480 } |
|
481 break; |
|
482 |
|
483 case ECCPErrorCCPreemption: |
|
484 case ECCPErrorCCResponseToStatusEnquiry: |
|
485 case ECCPErrorCCInvalidMandatoryInformation: |
|
486 case ECCPErrorCCNonExistentMessageType: |
|
487 case ECCPErrorCCIncompatibleMessageInProtocolState: |
|
488 case ECCPErrorCCNonExistentInformationElement: |
|
489 if( IsVideoCall( aErrorInfo.iCallId ) ) |
572 if( IsVideoCall( aErrorInfo.iCallId ) ) |
490 { |
573 { |
491 SendGlobalInfoNoteL( EPhoneNoteCallInfoNotSupported ); |
574 SendGlobalInfoNoteL( EPhoneNoteCallInfoNotSupported ); |
492 } |
575 } |
493 else |
576 else |
494 { |
577 { |
495 SendGlobalWarningNoteL( EPhoneErrorInConnection, ETrue ); |
578 SendGlobalWarningNoteL( EPhoneErrorInConnection, ETrue ); |
496 } |
579 } |
497 break; |
580 break; |
498 |
581 case ECCPErrorCCResponseToStatusEnquiry: |
499 case ECCPErrorCCRecoveryOnTimerExpiry: |
582 if( IsVideoCall( aErrorInfo.iCallId ) ) |
500 if( IsVideoCall( aErrorInfo.iCallId ) ) |
583 { |
501 { |
584 SendGlobalInfoNoteL( EPhoneErrorInConnection ); |
502 SendGlobalInfoNoteL( EPhoneNoteCallInfoNotSupported ); |
585 } |
503 } |
586 else |
587 { |
|
588 SendGlobalWarningNoteL( EPhoneErrorInConnection, ETrue ); |
|
589 } |
|
504 break; |
590 break; |
505 |
591 |
506 case ECCPErrorCCFacilityRejected: |
592 case ECCPErrorCCFacilityRejected: |
507 if( IsVideoCall( aErrorInfo.iCallId ) ) |
593 if( IsVideoCall( aErrorInfo.iCallId ) ) |
508 { |
594 { |
509 SendGlobalInfoNoteL( EPhoneNoteCallInfoNotSupported ); |
595 SendGlobalInfoNoteL( EPhoneNoteTextRequestRejected ); |
510 } |
596 } |
511 else |
597 else |
512 { |
598 { |
513 SendGlobalErrorNoteL( EPhoneNoteTextRequestRejected, ETrue ); |
599 SendGlobalErrorNoteL( EPhoneNoteTextRequestRejected, ETrue ); |
514 } |
600 } |
516 |
602 |
517 case ECCPTransferFailed: |
603 case ECCPTransferFailed: |
518 SendGlobalErrorNoteL( EPhoneNoteTextRequestRejected, ETrue ); |
604 SendGlobalErrorNoteL( EPhoneNoteTextRequestRejected, ETrue ); |
519 break; |
605 break; |
520 |
606 |
521 case ECCPErrorCCServiceNotAvailable: |
|
522 case ECCPErrorCCBearerServiceNotImplemented: |
607 case ECCPErrorCCBearerServiceNotImplemented: |
523 case ECCPErrorCCOnlyRestrictedDigitalInformationBCAvailable: |
608 case ECCPErrorCCOnlyRestrictedDigitalInformationBCAvailable: |
609 case ECCPErrorCCNonExistentMessageType: |
|
610 case ECCPErrorCCIncompatibleMessageInProtocolState: |
|
611 case ECCPErrorCCNonExistentInformationElement: |
|
612 case ECCPErrorCCRecoveryOnTimerExpiry: |
|
613 if ( IsVideoCall( aErrorInfo.iCallId ) ) |
|
614 { |
|
615 SendGlobalInfoNoteL( EPhoneNoteVideoCallNotPossible ); //Video call didn't succeed to called end. |
|
616 } |
|
617 else |
|
618 { |
|
619 SendGlobalWarningNoteL( EPhoneErrorInConnection, ETrue ); |
|
620 } |
|
621 break; |
|
622 |
|
524 case ECCPErrorCCServiceNotImplemented: |
623 case ECCPErrorCCServiceNotImplemented: |
525 if( IsVideoCall( aErrorInfo.iCallId ) ) |
624 if( IsVideoCall( aErrorInfo.iCallId ) ) |
526 { |
625 { |
527 SendGlobalInfoNoteL( EPhoneNoteCallInfoServiceNotAvailable ); |
626 SendGlobalInfoNoteL( EPhoneNoteCallInfoServiceNotAvailable ); |
627 } |
|
628 break; |
|
629 |
|
630 case ECCPErrorCCServiceNotAvailable: |
|
631 if( IsVideoCall( aErrorInfo.iCallId ) ) |
|
632 { |
|
633 SendGlobalInfoNoteL( EPhoneErrorInConnection ); |
|
634 } |
|
635 else |
|
636 { |
|
637 SendGlobalWarningNoteL( EPhoneErrorInConnection, ETrue ); |
|
528 } |
638 } |
529 break; |
639 break; |
530 |
640 |
531 case ECCPErrorCUGOutgoingCallsBarred: |
641 case ECCPErrorCUGOutgoingCallsBarred: |
532 SendGlobalInfoNoteL( EPhoneOutgoingCallsBarredWithinCUG, ETrue ); |
642 SendGlobalInfoNoteL( EPhoneOutgoingCallsBarredWithinCUG, ETrue ); |
563 EPhoneControl, |
673 EPhoneControl, |
564 "PHONEUI_ERROR: CPhoneErrorMessagesHandler::HandleErrorL - Error received (err=%d)", |
674 "PHONEUI_ERROR: CPhoneErrorMessagesHandler::HandleErrorL - Error received (err=%d)", |
565 aErrorInfo.iErrorCode); |
675 aErrorInfo.iErrorCode); |
566 break; |
676 break; |
567 } |
677 } |
678 |
|
679 iCallId = KErrNotFound; |
|
568 } |
680 } |
569 |
681 |
570 // ----------------------------------------------------------- |
682 // ----------------------------------------------------------- |
571 // CPhoneErrorMessagesHandler::IsVideoCall |
683 // CPhoneErrorMessagesHandler::IsVideoCall |
572 // ----------------------------------------------------------- |
684 // ----------------------------------------------------------- |
583 } |
695 } |
584 |
696 |
585 return ( iStateMachine->PhoneEngineInfo() |
697 return ( iStateMachine->PhoneEngineInfo() |
586 ->CallType( aCallId )== EPECallTypeVideo ); |
698 ->CallType( aCallId )== EPECallTypeVideo ); |
587 } |
699 } |
700 |
|
701 // ----------------------------------------------------------- |
|
702 // CPhoneErrorMessagesHandler::IsVoiceCall |
|
703 // ----------------------------------------------------------- |
|
704 // |
|
705 TBool CPhoneErrorMessagesHandler::IsVoiceCall( const TInt aCallId ) const |
|
706 { |
|
707 __LOGMETHODSTARTEND( EPhoneControl, "CPhoneErrorMessagesHandler::IsVoiceCall() "); |
|
708 |
|
709 if( aCallId == KErrNotFound ) |
|
710 { |
|
711 // Illegal call id, check call type command |
|
712 return ( iStateMachine->PhoneEngineInfo()->CallTypeCommand() |
|
713 == EPECallTypeCSVoice ); |
|
714 } |
|
715 |
|
716 return ( iStateMachine->PhoneEngineInfo() |
|
717 ->CallType( aCallId )== EPECallTypeCSVoice ); |
|
718 } |
|
588 |
719 |
720 // ----------------------------------------------------------- |
|
721 // CPhoneErrorMessagesHandler::GetCauseCode |
|
722 // ----------------------------------------------------------- |
|
723 // |
|
724 TBool CPhoneErrorMessagesHandler::GetCauseCode( |
|
725 TInt &aCauseCode, TInt &aResourceId, TBool &aNotification ) const |
|
726 { |
|
727 __LOGMETHODSTARTEND( EPhoneControl, "CPhoneErrorMessagesHandler::CauseCode() "); |
|
728 |
|
729 aCauseCode = KErrNotFound; |
|
730 aNotification = ETrue; |
|
731 TInt callId = (KErrNotFound == iCallId) ? |
|
732 iStateMachine->PhoneEngineInfo()->CallId() : |
|
733 iCallId; |
|
734 |
|
735 |
|
736 //get exit code error from call data |
|
737 TInt callError = iStateMachine->PhoneEngineInfo()->ProtocolError( |
|
738 callId ); |
|
739 |
|
740 switch( callError ) |
|
741 { |
|
742 case KErrGsmCCUnassignedNumber: |
|
743 aResourceId = EPhoneNumberNotInUse; |
|
744 aCauseCode = 1; |
|
745 break; |
|
746 |
|
747 case KErrGsmCCNoRouteToDestination: |
|
748 aResourceId = EPhoneErrorInConnection; |
|
749 aCauseCode = 3; |
|
750 break; |
|
751 |
|
752 case KErrGsmCCChannelUnacceptable: |
|
753 if ( IsVideoCall( callId ) ) |
|
754 { |
|
755 aResourceId = EPhoneNoteVideoCallNotPossible; //Video call didn't succeed to called end. |
|
756 aNotification = EFalse; |
|
757 } |
|
758 else |
|
759 { |
|
760 aResourceId = EPhoneErrorInConnection; |
|
761 } |
|
762 aCauseCode = 6; |
|
763 break; |
|
764 |
|
765 case KErrGsmCCOperatorDeterminedBarring: |
|
766 aResourceId = EPhoneNumberBarred; |
|
767 aCauseCode = 8; |
|
768 break; |
|
769 |
|
770 case KErrGsmCCUserBusy: |
|
771 aResourceId = EPhoneNumberBusy; |
|
772 aCauseCode = 17; |
|
773 break; |
|
774 |
|
775 case KErrGsmCCUserNotResponding: |
|
776 aResourceId = EPhoneNoAnswer; |
|
777 aCauseCode = 18; |
|
778 break; |
|
779 |
|
780 case KErrGsmCCUserAlertingNoAnswer: |
|
781 aResourceId = EPhoneNoAnswer; |
|
782 aCauseCode = 19; |
|
783 break; |
|
784 |
|
785 case KErrGsmCCCallRejected: |
|
786 if ( !iStateMachine->PhoneEngineInfo()->IsOutgoingCallBarringActivated() ) |
|
787 { |
|
788 aResourceId = EPhoneNoteCalledNumberHasBarredIncomingCalls; |
|
789 aCauseCode = 21; |
|
790 } |
|
791 break; |
|
792 |
|
793 case KErrGsmCCNumberChanged: |
|
794 aResourceId = EPhoneNumberNotInUse; |
|
795 aCauseCode = 22; |
|
796 break; |
|
797 |
|
798 case KErrGsmCCNonSelectedUserClearing: |
|
799 if ( IsVideoCall( callId ) ) |
|
800 { |
|
801 aResourceId = EPhoneNotePhoneOutOf3GCoverage; |
|
802 aNotification = EFalse; |
|
803 } |
|
804 else |
|
805 { |
|
806 aResourceId = EPhoneNoAnswer; |
|
807 } |
|
808 aCauseCode = 26; |
|
809 break; |
|
810 |
|
811 case KErrGsmCCDestinationOutOfOrder: |
|
812 if ( IsVideoCall( callId ) ) |
|
813 { |
|
814 aResourceId = EPhoneNoteVideoCallNotPossible; //Video call didn't succeed to called end. |
|
815 aNotification = EFalse; |
|
816 } |
|
817 else |
|
818 { |
|
819 aResourceId = EPhoneErrorInConnection; |
|
820 } |
|
821 aCauseCode = 27; |
|
822 break; |
|
823 |
|
824 case KErrGsmCCInvalidNumberFormat: |
|
825 aResourceId = EPhoneInvalidPhoneNumber; |
|
826 aCauseCode = 28; |
|
827 break; |
|
828 |
|
829 case KErrGsmCCFacilityRejected: |
|
830 aResourceId = EPhoneNoteTextRequestRejected; |
|
831 aCauseCode = 29; |
|
832 break; |
|
833 |
|
834 case KErrGsmCCResponseToStatusEnquiry: |
|
835 aResourceId = EPhoneErrorInConnection; |
|
836 aCauseCode = 30; |
|
837 break; |
|
838 |
|
839 case KErrGsmCCNormalUnspecified: |
|
840 if ( IsVideoCall( callId ) ) |
|
841 { |
|
842 aResourceId = EPhoneNotePhoneOutOf3GCoverage; |
|
843 aNotification = EFalse; |
|
844 } |
|
845 else |
|
846 { |
|
847 aResourceId = EPhoneNoAnswer; |
|
848 } |
|
849 aCauseCode = 31; |
|
850 break; |
|
851 |
|
852 case KErrGsmCCNoChannelAvailable: |
|
853 aResourceId = EPhoneNetworkBusy; |
|
854 aCauseCode = 34; |
|
855 break; |
|
856 |
|
857 case KErrGsmCCNetworkOutOfOrder: |
|
858 aResourceId = EPhoneErrorInConnection; |
|
859 aCauseCode = 38; |
|
860 break; |
|
861 |
|
862 case KErrGsmCCTemporaryFailure: |
|
863 aResourceId = EPhoneNetworkBusy; |
|
864 aCauseCode = 41; |
|
865 break; |
|
866 |
|
867 case KErrGsmCCSwitchingEquipmentCongestion: |
|
868 aResourceId = EPhoneNetworkBusy; |
|
869 aCauseCode = 42; |
|
870 break; |
|
871 |
|
872 case KErrGsmCCAccessInformationDiscarded: |
|
873 aResourceId = EPhoneErrorInConnection; |
|
874 aCauseCode = 43; |
|
875 break; |
|
876 |
|
877 case KErrGsmCCRequestedChannelNotAvailable: |
|
878 aResourceId = EPhoneNetworkBusy; |
|
879 aCauseCode = 44; |
|
880 break; |
|
881 |
|
882 case KErrGsmCCResourceNotAvailable: |
|
883 aResourceId = EPhoneErrorInConnection; |
|
884 aCauseCode = 47; |
|
885 break; |
|
886 |
|
887 case KErrGsmCCQualityOfServiceNotAvailable: |
|
888 aResourceId = EPhoneErrorInConnection; |
|
889 aCauseCode = 49; |
|
890 break; |
|
891 |
|
892 case KErrGsmCCRequestedFacilityNotSubscribed: |
|
893 if ( IsVideoCall( callId ) ) |
|
894 { |
|
895 aResourceId = EPhoneNoteVideoCallOnlyPossibleUnder3GCoverage; |
|
896 aNotification = EFalse; |
|
897 } |
|
898 else |
|
899 { |
|
900 aResourceId = EPhoneNoteTextNotAllowed; |
|
901 } |
|
902 aCauseCode = 50; |
|
903 break; |
|
904 |
|
905 case KErrGsmCCIncomingCallsBarredInCug: |
|
906 aResourceId = EPhoneNumberBarred; |
|
907 aCauseCode = 55; |
|
908 break; |
|
909 |
|
910 case KErrGsmCCBearerCapabilityNotAuthorised: |
|
911 if ( IsVideoCall( callId ) ) |
|
912 { |
|
913 aResourceId = EPhoneNoteUnableToMakeVideoCallNotSupportedByOtherPhone; |
|
914 aNotification = EFalse; |
|
915 } |
|
916 else |
|
917 { |
|
918 aResourceId = EPhoneErrorInConnection; |
|
919 } |
|
920 aCauseCode = 57; |
|
921 break; |
|
922 |
|
923 case KErrGsmCCBearerCapabilityNotCurrentlyAvailable: |
|
924 if ( IsVideoCall( callId ) ) |
|
925 { |
|
926 aResourceId = EPhoneNoteVideoCallNotPossible; //Video call didn't succeed to called end. |
|
927 aNotification = EFalse; |
|
928 } |
|
929 else |
|
930 { |
|
931 aResourceId = EPhoneErrorInConnection; |
|
932 } |
|
933 aCauseCode = 58; |
|
934 break; |
|
935 |
|
936 case KErrGsmCCServiceNotAvailable: |
|
937 aResourceId = EPhoneErrorInConnection; |
|
938 aCauseCode = 63; |
|
939 break; |
|
940 |
|
941 case KErrGsmCCBearerServiceNotImplemented: |
|
942 if ( IsVideoCall( callId ) ) |
|
943 { |
|
944 aResourceId = EPhoneNoteVideoCallNotPossible; //Video call didn't succeed to called end. |
|
945 aNotification = EFalse; |
|
946 } |
|
947 else |
|
948 { |
|
949 aResourceId = EPhoneErrorInConnection; |
|
950 } |
|
951 aCauseCode = 65; |
|
952 break; |
|
953 |
|
954 case KErrGsmCCAcmGreaterThanAcmMax: |
|
955 aResourceId = EPhoneErrorInConnection; |
|
956 aCauseCode = 68; |
|
957 break; |
|
958 |
|
959 case KErrGsmCCRequestedFacilityNotImplemented: |
|
960 if ( IsVideoCall( callId ) ) |
|
961 { |
|
962 aResourceId = EPhoneNotePhoneOutOf3GCoverage; |
|
963 aNotification = EFalse; |
|
964 } |
|
965 else |
|
966 { |
|
967 aResourceId = EPhoneNoteTextCheckNetworkservices; |
|
968 } |
|
969 aCauseCode = 69; |
|
970 break; |
|
971 |
|
972 case KErrGsmCCOnlyRestrictedDigitalInformationBCAvailable: |
|
973 if ( IsVideoCall( callId ) ) |
|
974 { |
|
975 aResourceId = EPhoneNoteVideoCallNotPossible; |
|
976 aNotification = EFalse; |
|
977 } |
|
978 else |
|
979 { |
|
980 aResourceId = EPhoneNoteTextCheckNetworkservices; |
|
981 } |
|
982 aCauseCode = 70; |
|
983 break; |
|
984 |
|
985 case KErrGsmCCServiceNotImplemented: |
|
986 if ( IsVideoCall( callId ) ) |
|
987 { |
|
988 aResourceId = EPhoneNoteVideoCallNotPossible; |
|
989 aNotification = EFalse; |
|
990 } |
|
991 else |
|
992 { |
|
993 aResourceId = EPhoneErrorInConnection; |
|
994 } |
|
995 aCauseCode = 79; |
|
996 break; |
|
997 |
|
998 case KErrGsmCCInvalidCallReferenceValue: |
|
999 if ( IsVideoCall( callId ) ) |
|
1000 { |
|
1001 aResourceId = EPhoneNoteVideoCallNotPossible; |
|
1002 aNotification = EFalse; |
|
1003 } |
|
1004 else |
|
1005 { |
|
1006 aResourceId = EPhoneErrorInConnection; |
|
1007 } |
|
1008 aCauseCode = 81; |
|
1009 break; |
|
1010 |
|
1011 case KErrGsmCCUserNotInCug: |
|
1012 // Todo correct string missing |
|
1013 aResourceId = EPhoneNumberNotInCUG; |
|
1014 aCauseCode = 87; |
|
1015 break; |
|
1016 |
|
1017 case KErrGsmCCIncompatibleDestination: |
|
1018 if ( IsVideoCall( callId ) ) |
|
1019 { |
|
1020 aResourceId = EPhoneNoteUnableToMakeVideoCallNotSupportedByOtherPhone; |
|
1021 aNotification = EFalse; |
|
1022 } |
|
1023 else |
|
1024 { |
|
1025 aResourceId = EPhoneErrorInConnection; |
|
1026 } |
|
1027 aCauseCode = 88; |
|
1028 break; |
|
1029 |
|
1030 case KErrGsmCCInvalidTransitNetworkSelection: |
|
1031 if ( IsVideoCall( callId ) ) |
|
1032 { |
|
1033 aResourceId = EPhoneNoteVideoCallNotPossible; //Video call didn't succeed to called end. |
|
1034 aNotification = EFalse; |
|
1035 } |
|
1036 else |
|
1037 { |
|
1038 aResourceId = EPhoneErrorInConnection; |
|
1039 } |
|
1040 aCauseCode = 91; |
|
1041 break; |
|
1042 |
|
1043 case KErrGsmCCSemanticallyIncorrectMessage: |
|
1044 if ( IsVideoCall( callId ) ) |
|
1045 { |
|
1046 aResourceId = EPhoneNoteVideoCallNotPossible; //Video call didn't succeed to called end. |
|
1047 aNotification = EFalse; |
|
1048 } |
|
1049 else |
|
1050 { |
|
1051 aResourceId = EPhoneErrorInConnection; |
|
1052 } |
|
1053 aCauseCode = 95; |
|
1054 break; |
|
1055 |
|
1056 case KErrGsmCCInvalidMandatoryInformation: |
|
1057 if ( IsVideoCall( callId ) ) |
|
1058 { |
|
1059 aResourceId = EPhoneNoteVideoCallNotPossible; //Video call didn't succeed to called end. |
|
1060 aNotification = EFalse; |
|
1061 } |
|
1062 else |
|
1063 { |
|
1064 aResourceId = EPhoneErrorInConnection; |
|
1065 } |
|
1066 aCauseCode = 96; |
|
1067 break; |
|
1068 |
|
1069 case KErrGsmCCNonExistentMessageType: |
|
1070 if ( IsVideoCall( callId ) ) |
|
1071 { |
|
1072 aResourceId = EPhoneNoteVideoCallNotPossible; //Video call didn't succeed to called end. |
|
1073 aNotification = EFalse; |
|
1074 } |
|
1075 else |
|
1076 { |
|
1077 aResourceId = EPhoneErrorInConnection; |
|
1078 } |
|
1079 aCauseCode = 97; |
|
1080 break; |
|
1081 |
|
1082 case KErrGsmCCIncompatibleMessageInProtocolState: |
|
1083 if ( IsVideoCall( callId ) ) |
|
1084 { |
|
1085 aResourceId = EPhoneNoteVideoCallNotPossible; //Video call didn't succeed to called end. |
|
1086 aNotification = EFalse; |
|
1087 } |
|
1088 else |
|
1089 { |
|
1090 aResourceId = EPhoneErrorInConnection; |
|
1091 } |
|
1092 aCauseCode = 98; |
|
1093 break; |
|
1094 |
|
1095 case KErrGsmCCNonExistentInformationElement: |
|
1096 if ( IsVideoCall( callId ) ) |
|
1097 { |
|
1098 aResourceId = EPhoneNoteVideoCallNotPossible; //Video call didn't succeed to called end. |
|
1099 aNotification = EFalse; |
|
1100 } |
|
1101 else |
|
1102 { |
|
1103 aResourceId = EPhoneErrorInConnection; |
|
1104 } |
|
1105 aCauseCode = 99; |
|
1106 break; |
|
1107 |
|
1108 case KErrGsmCCConditionalIEError: |
|
1109 if ( IsVideoCall( callId ) ) |
|
1110 { |
|
1111 aResourceId = EPhoneNoteVideoCallNotPossible; //Video call didn't succeed to called end. |
|
1112 aNotification = EFalse; |
|
1113 } |
|
1114 else |
|
1115 { |
|
1116 aResourceId = EPhoneErrorInConnection; |
|
1117 } |
|
1118 aCauseCode = 100; |
|
1119 break; |
|
1120 |
|
1121 case KErrGsmCCIncompatibleMessageInCallState: |
|
1122 if ( IsVideoCall( callId ) ) |
|
1123 { |
|
1124 aResourceId = EPhoneNoteVideoCallNotPossible; //Video call didn't succeed to called end. |
|
1125 aNotification = EFalse; |
|
1126 } |
|
1127 else |
|
1128 { |
|
1129 aResourceId = EPhoneErrorInConnection; |
|
1130 } |
|
1131 aCauseCode = 101; |
|
1132 break; |
|
1133 |
|
1134 case KErrGsmCCRecoveryOnTimerExpiry: |
|
1135 if ( IsVideoCall( callId ) ) |
|
1136 { |
|
1137 aResourceId = EPhoneNoteVideoCallNotPossible; //Video call didn't succeed to called end. |
|
1138 aNotification = EFalse; |
|
1139 } |
|
1140 else |
|
1141 { |
|
1142 aResourceId = EPhoneErrorInConnection; |
|
1143 } |
|
1144 aCauseCode = 102; |
|
1145 break; |
|
1146 |
|
1147 case KErrGsmCCUnspecifiedProtocolError: |
|
1148 if ( IsVideoCall( callId ) ) |
|
1149 { |
|
1150 aResourceId = EPhoneNoteVideoCallNotPossible; //Video call didn't succeed to called end. |
|
1151 aNotification = EFalse; |
|
1152 } |
|
1153 else |
|
1154 { |
|
1155 aResourceId = EPhoneErrorInConnection; |
|
1156 } |
|
1157 aCauseCode = 111; |
|
1158 break; |
|
1159 |
|
1160 case KErrGsmCCUnspecifiedInterworkingError: |
|
1161 if ( IsVideoCall( callId ) ) |
|
1162 { |
|
1163 aResourceId = EPhoneNoteVideoCallNotPossible; //Video call didn't succeed to called end. |
|
1164 aNotification = EFalse; |
|
1165 } |
|
1166 else |
|
1167 { |
|
1168 aResourceId = EPhoneErrorInConnection; |
|
1169 } |
|
1170 aCauseCode = 127; |
|
1171 break; |
|
1172 default: |
|
1173 break; |
|
1174 } |
|
1175 |
|
1176 return (aCauseCode != KErrNotFound); |
|
1177 } |
|
1178 |
|
589 // End of File |
1179 // End of File |