19 // INCLUDES |
19 // INCLUDES |
20 #include <mpeengineinfo.h> |
20 #include <mpeengineinfo.h> |
21 #include <telephonydomainpskeys.h> |
21 #include <telephonydomainpskeys.h> |
22 #include <UikonInternalPSKeys.h> |
22 #include <UikonInternalPSKeys.h> |
23 #include <ccpdefs.h> |
23 #include <ccpdefs.h> |
|
24 #include <phoneui.rsg> |
|
25 #include <telephonyvariant.hrh> |
24 |
26 |
25 #include "phoneui.pan" |
27 #include "phoneui.pan" |
26 #include "phonerssbase.h" |
28 #include "phonerssbase.h" |
27 #include "cphoneerrormessageshandler.h" |
29 #include "cphoneerrormessageshandler.h" |
28 #include "cphonemainerrormessageshandler.h" |
30 #include "cphonemainerrormessageshandler.h" |
32 #include "cphonepubsubproxy.h" |
34 #include "cphonepubsubproxy.h" |
33 #include "tphonecmdparamboolean.h" |
35 #include "tphonecmdparamboolean.h" |
34 #include "tphonecmdparamglobalnote.h" |
36 #include "tphonecmdparamglobalnote.h" |
35 #include "tphonecmdparamnote.h" |
37 #include "tphonecmdparamnote.h" |
36 #include "cphonemainresourceresolver.h" |
38 #include "cphonemainresourceresolver.h" |
|
39 #include "cphonecenrepproxy.h" |
37 |
40 |
38 |
41 |
39 // ================= MEMBER FUNCTIONS ======================= |
42 // ================= MEMBER FUNCTIONS ======================= |
40 |
43 |
41 // C++ default constructor can NOT contain any code, that |
44 // C++ default constructor can NOT contain any code, that |
108 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled, &globalNotifierParam ); |
111 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled, &globalNotifierParam ); |
109 |
112 |
110 TPhoneCmdParamGlobalNote globalNoteParam; |
113 TPhoneCmdParamGlobalNote globalNoteParam; |
111 |
114 |
112 globalNoteParam.SetType( EAknGlobalInformationNote ); |
115 globalNoteParam.SetType( EAknGlobalInformationNote ); |
113 globalNoteParam.SetTextResourceId( |
116 |
114 CPhoneMainResourceResolver::Instance()-> |
117 if ( CPhoneCenRepProxy::Instance()-> |
115 ResolveResourceID( aResourceId ) ); |
118 IsTelephonyFeatureSupported( KTelephonyLVFlagClearCodeCustomization ) ) |
|
119 { |
|
120 // Show varied note if clear code customization is enabled |
|
121 TInt variedNote( KErrNotFound ); |
|
122 //Get varied resource |
|
123 variedNote = ResourceVariation(); |
|
124 if ( variedNote != KErrNotFound ) |
|
125 { |
|
126 globalNoteParam.SetTextResourceId( variedNote ); |
|
127 } |
|
128 else |
|
129 { |
|
130 // If varied resource is not found, show original note. |
|
131 globalNoteParam.SetTextResourceId( |
|
132 CPhoneMainResourceResolver::Instance()-> |
|
133 ResolveResourceID( aResourceId ) ); |
|
134 } |
|
135 } |
|
136 else |
|
137 { |
|
138 globalNoteParam.SetTextResourceId( |
|
139 CPhoneMainResourceResolver::Instance()-> |
|
140 ResolveResourceID( aResourceId ) ); |
|
141 } |
116 globalNoteParam.SetTone( EAvkonSIDInformationTone ); |
142 globalNoteParam.SetTone( EAvkonSIDInformationTone ); |
117 |
143 |
118 iViewCommandHandle->ExecuteCommandL( |
144 iViewCommandHandle->ExecuteCommandL( |
119 EPhoneViewShowGlobalNote, &globalNoteParam ); |
145 EPhoneViewShowGlobalNote, &globalNoteParam ); |
120 } |
146 } |
141 EPhoneViewSetGlobalNotifiersDisabled, |
167 EPhoneViewSetGlobalNotifiersDisabled, |
142 &globalNotifierParam ); |
168 &globalNotifierParam ); |
143 |
169 |
144 TPhoneCmdParamGlobalNote globalNoteParam; |
170 TPhoneCmdParamGlobalNote globalNoteParam; |
145 globalNoteParam.SetType( EAknGlobalErrorNote ); |
171 globalNoteParam.SetType( EAknGlobalErrorNote ); |
146 globalNoteParam.SetTextResourceId( |
172 |
147 CPhoneMainResourceResolver::Instance()-> |
173 if ( CPhoneCenRepProxy::Instance()-> |
148 ResolveResourceID( aResourceId ) ); |
174 IsTelephonyFeatureSupported( KTelephonyLVFlagClearCodeCustomization ) ) |
|
175 { |
|
176 // Show varied note if clear code customization is enabled |
|
177 TInt variedNote( KErrNotFound ); |
|
178 //Get varied resource |
|
179 variedNote = ResourceVariation(); |
|
180 if ( variedNote != KErrNotFound ) |
|
181 { |
|
182 globalNoteParam.SetTextResourceId( variedNote ); |
|
183 } |
|
184 else |
|
185 { |
|
186 // If varied resource is not found, show original note. |
|
187 globalNoteParam.SetTextResourceId( |
|
188 CPhoneMainResourceResolver::Instance()-> |
|
189 ResolveResourceID( aResourceId ) ); |
|
190 } |
|
191 } |
|
192 else |
|
193 { |
|
194 globalNoteParam.SetTextResourceId( |
|
195 CPhoneMainResourceResolver::Instance()-> |
|
196 ResolveResourceID( aResourceId ) ); |
|
197 } |
149 globalNoteParam.SetTone( CAknNoteDialog::EErrorTone ); |
198 globalNoteParam.SetTone( CAknNoteDialog::EErrorTone ); |
150 |
199 |
151 iViewCommandHandle->ExecuteCommandL( |
200 iViewCommandHandle->ExecuteCommandL( |
152 EPhoneViewShowGlobalNote, &globalNoteParam ); |
201 EPhoneViewShowGlobalNote, &globalNoteParam ); |
153 } |
202 } |
174 EPhoneViewSetGlobalNotifiersDisabled, |
223 EPhoneViewSetGlobalNotifiersDisabled, |
175 &globalNotifierParam ); |
224 &globalNotifierParam ); |
176 |
225 |
177 TPhoneCmdParamGlobalNote globalNoteParam; |
226 TPhoneCmdParamGlobalNote globalNoteParam; |
178 globalNoteParam.SetType( EAknGlobalWarningNote ); |
227 globalNoteParam.SetType( EAknGlobalWarningNote ); |
179 globalNoteParam.SetTextResourceId( |
228 |
180 CPhoneMainResourceResolver::Instance()-> |
229 if ( CPhoneCenRepProxy::Instance()-> |
181 ResolveResourceID( aResourceId ) ); |
230 IsTelephonyFeatureSupported( KTelephonyLVFlagClearCodeCustomization ) ) |
|
231 { |
|
232 // Show varied note if clear code customization is enabled |
|
233 TInt variedNote( KErrNotFound ); |
|
234 //Get varied resource |
|
235 variedNote = ResourceVariation(); |
|
236 if ( variedNote != KErrNotFound ) |
|
237 { |
|
238 globalNoteParam.SetTextResourceId( variedNote ); |
|
239 } |
|
240 else |
|
241 { |
|
242 // If varied resource is not found, show original note. |
|
243 globalNoteParam.SetTextResourceId( |
|
244 CPhoneMainResourceResolver::Instance()-> |
|
245 ResolveResourceID( aResourceId ) ); |
|
246 } |
|
247 } |
|
248 else |
|
249 { |
|
250 globalNoteParam.SetTextResourceId( |
|
251 CPhoneMainResourceResolver::Instance()-> |
|
252 ResolveResourceID( aResourceId ) ); |
|
253 } |
182 globalNoteParam.SetTone( EAvkonSIDWarningTone ); |
254 globalNoteParam.SetTone( EAvkonSIDWarningTone ); |
183 |
255 |
184 iViewCommandHandle->ExecuteCommandL( |
256 iViewCommandHandle->ExecuteCommandL( |
185 EPhoneViewShowGlobalNote, &globalNoteParam ); |
257 EPhoneViewShowGlobalNote, &globalNoteParam ); |
186 } |
258 } |
207 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneErrorMessagesHandler::ShowErrorSpecificNoteL()"); |
279 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneErrorMessagesHandler::ShowErrorSpecificNoteL()"); |
208 |
280 |
209 __PHONELOG1( EBasic, EPhoneControl, |
281 __PHONELOG1( EBasic, EPhoneControl, |
210 "PhoneUIControl: CPhoneErrorMessagesHandler::ShowErrorSpecificNoteL - aErrorInfo.iErrorCode =%d ", |
282 "PhoneUIControl: CPhoneErrorMessagesHandler::ShowErrorSpecificNoteL - aErrorInfo.iErrorCode =%d ", |
211 aErrorInfo.iErrorCode); |
283 aErrorInfo.iErrorCode); |
|
284 iCallId = aErrorInfo.iCallId; |
212 |
285 |
213 switch( aErrorInfo.iErrorCode ) |
286 switch( aErrorInfo.iErrorCode ) |
214 { |
287 { |
215 case ECCPErrorRejected: |
288 case ECCPErrorRejected: |
216 case ECCPRequestFailure: |
289 case ECCPRequestFailure: |
565 EPhoneControl, |
638 EPhoneControl, |
566 "PHONEUI_ERROR: CPhoneErrorMessagesHandler::HandleErrorL - Error received (err=%d)", |
639 "PHONEUI_ERROR: CPhoneErrorMessagesHandler::HandleErrorL - Error received (err=%d)", |
567 aErrorInfo.iErrorCode); |
640 aErrorInfo.iErrorCode); |
568 break; |
641 break; |
569 } |
642 } |
|
643 iCallId = KErrNotFound; |
570 } |
644 } |
571 |
645 |
572 // ----------------------------------------------------------- |
646 // ----------------------------------------------------------- |
573 // CPhoneErrorMessagesHandler::IsVideoCall |
647 // CPhoneErrorMessagesHandler::IsVideoCall |
574 // ----------------------------------------------------------- |
648 // ----------------------------------------------------------- |
605 |
679 |
606 return ( iStateMachine->PhoneEngineInfo() |
680 return ( iStateMachine->PhoneEngineInfo() |
607 ->CallType( aCallId )== EPECallTypeCSVoice ); |
681 ->CallType( aCallId )== EPECallTypeCSVoice ); |
608 } |
682 } |
609 |
683 |
|
684 // ----------------------------------------------------------------------------- |
|
685 // CPhoneErrorMessagesHandler::ResourceVariation |
|
686 // ----------------------------------------------------------------------------- |
|
687 TInt CPhoneErrorMessagesHandler::ResourceVariation() const |
|
688 { |
|
689 TInt resource( KErrNotFound ); |
|
690 |
|
691 TInt callId = (KErrNotFound == iCallId) ? |
|
692 iStateMachine->PhoneEngineInfo()->CallId() : |
|
693 iCallId; |
|
694 |
|
695 //get exit code error from EngineInfo |
|
696 TInt callError = iStateMachine->PhoneEngineInfo()->ProtocolError( callId ); |
|
697 |
|
698 switch( callError ) |
|
699 { |
|
700 case KErrGsmCCUnassignedNumber: |
|
701 resource = R_NOTE_VAR_CAUSE_1; |
|
702 break; |
|
703 |
|
704 case KErrGsmCCNoRouteToDestination: |
|
705 resource = R_NOTE_VAR_CAUSE_3; |
|
706 break; |
|
707 |
|
708 case KErrGsmCCOperatorDeterminedBarring: |
|
709 resource = R_NOTE_VAR_CAUSE_8; |
|
710 break; |
|
711 |
|
712 case KErrGsmCCUserBusy: |
|
713 resource = R_NOTE_VAR_CAUSE_17; |
|
714 break; |
|
715 |
|
716 case KErrGsmCCUserNotResponding: |
|
717 resource = R_NOTE_VAR_CAUSE_18; |
|
718 break; |
|
719 |
|
720 case KErrGsmCCCallRejected: |
|
721 resource = R_NOTE_VAR_CAUSE_21; |
|
722 break; |
|
723 |
|
724 case KErrGsmCCNumberChanged: |
|
725 resource = R_NOTE_VAR_CAUSE_22; |
|
726 break; |
|
727 |
|
728 case KErrGsmCCDestinationOutOfOrder: |
|
729 resource = R_NOTE_VAR_CAUSE_27; |
|
730 break; |
|
731 |
|
732 case KErrGsmCCFacilityRejected: |
|
733 resource = R_NOTE_VAR_CAUSE_29; |
|
734 break; |
|
735 |
|
736 case KErrGsmCCNetworkOutOfOrder: |
|
737 resource = R_NOTE_VAR_CAUSE_38; |
|
738 break; |
|
739 |
|
740 case KErrGsmCCTemporaryFailure: |
|
741 resource = R_NOTE_VAR_CAUSE_41; |
|
742 break; |
|
743 |
|
744 case KErrGsmCCSwitchingEquipmentCongestion: |
|
745 resource = R_NOTE_VAR_CAUSE_42; |
|
746 break; |
|
747 |
|
748 case KErrGsmCCAccessInformationDiscarded: |
|
749 resource = R_NOTE_VAR_CAUSE_43; |
|
750 break; |
|
751 |
|
752 case KErrGsmCCRequestedChannelNotAvailable: |
|
753 resource = R_NOTE_VAR_CAUSE_44; |
|
754 break; |
|
755 |
|
756 case KErrGsmCCResourceNotAvailable: |
|
757 resource = R_NOTE_VAR_CAUSE_47; |
|
758 break; |
|
759 |
|
760 case KErrGsmCCIncomingCallsBarredInCug: |
|
761 resource = R_NOTE_VAR_CAUSE_55; |
|
762 break; |
|
763 |
|
764 case KErrGsmCCBearerCapabilityNotAuthorised: |
|
765 resource = R_NOTE_VAR_CAUSE_57; |
|
766 break; |
|
767 |
|
768 case KErrGsmCCServiceNotAvailable: |
|
769 resource = R_NOTE_VAR_CAUSE_63; |
|
770 break; |
|
771 |
|
772 case KErrGsmCCBearerServiceNotImplemented: |
|
773 resource = R_NOTE_VAR_CAUSE_65; |
|
774 break; |
|
775 |
|
776 case KErrGsmCCRequestedFacilityNotImplemented: |
|
777 resource = R_NOTE_VAR_CAUSE_69; |
|
778 break; |
|
779 |
|
780 case KErrGsmCCUserNotInCug: |
|
781 resource = R_NOTE_VAR_CAUSE_87; |
|
782 break; |
|
783 |
|
784 case KErrGsmCCIncompatibleDestination: |
|
785 resource = R_NOTE_VAR_CAUSE_88; |
|
786 break; |
|
787 |
|
788 case KErrGsmCCSemanticallyIncorrectMessage: |
|
789 resource = R_NOTE_VAR_CAUSE_95; |
|
790 break; |
|
791 |
|
792 case KErrGsmCCUnspecifiedProtocolError: |
|
793 resource = R_NOTE_VAR_CAUSE_111; |
|
794 break; |
|
795 |
|
796 case KErrGsmCCUnspecifiedInterworkingError: |
|
797 resource = R_NOTE_VAR_CAUSE_127; |
|
798 break; |
|
799 default: |
|
800 break; |
|
801 } |
|
802 return resource; |
|
803 } |
610 // End of File |
804 // End of File |