10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: |
14 * Description: |
15 * Class that does processing for Phone Engine messages that are common |
15 * Class that does processing for Phone Engine messages that are common |
16 * for all GSM states. Most of the GSM states are intressed of these |
16 * for all GSM states. Most of the GSM states are intressed of these |
17 * messages but due to the class architecture they don't have any single |
17 * messages but due to the class architecture they don't have any single |
18 * state class to be put into. This class exists to minimize duplicate |
18 * state class to be put into. This class exists to minimize duplicate |
19 * code so that not every GSM class need to implement these same handlings |
19 * code so that not every GSM class need to implement these same handlings |
20 * for the same messages. |
20 * for the same messages. |
21 * |
21 * |
22 */ |
22 */ |
23 |
23 |
24 |
24 |
25 #ifndef __CPHONEERRORMESSAGESHANDLER_H |
25 #ifndef __CPHONEERRORMESSAGESHANDLER_H |
40 * Class that does processing for Phone Engine error messages that are common |
40 * Class that does processing for Phone Engine error messages that are common |
41 * for all protocols. |
41 * for all protocols. |
42 * |
42 * |
43 */ |
43 */ |
44 class CPhoneErrorMessagesHandler : public CBase, |
44 class CPhoneErrorMessagesHandler : public CBase, |
45 public MPhoneErrorMessagesHandler |
45 public MPhoneErrorMessagesHandler |
46 { |
46 { |
47 public: |
47 public: |
48 /** |
48 /** |
49 * Creates the error handler instance |
49 * Creates the error handler instance |
50 * @return an instance of class CPhoneErrorMessagesHandler |
50 * @return an instance of class CPhoneErrorMessagesHandler |
51 */ |
51 */ |
52 static CPhoneErrorMessagesHandler* NewL( |
52 static CPhoneErrorMessagesHandler* NewL( |
53 MPhoneViewCommandHandle* aViewCommandHandle, |
53 MPhoneViewCommandHandle* aViewCommandHandle, |
54 MPhoneStateMachine* aStateMachine ); |
54 MPhoneStateMachine* aStateMachine ); |
55 |
55 |
56 public: //From MPhoneErrorMessagesHandler |
56 public: //From MPhoneErrorMessagesHandler |
57 /** |
57 /** |
58 * Destructor. |
58 * Destructor. |
59 */ |
59 */ |
64 * related to the given error. |
64 * related to the given error. |
65 * @param aErrorInfo - Error info from Phone Engine |
65 * @param aErrorInfo - Error info from Phone Engine |
66 */ |
66 */ |
67 IMPORT_C void ShowErrorSpecificNoteL( const TPEErrorInfo& aErrorInfo ); |
67 IMPORT_C void ShowErrorSpecificNoteL( const TPEErrorInfo& aErrorInfo ); |
68 |
68 |
69 protected: |
69 protected: |
70 /** |
70 /** |
71 * By default EPOC constructor is private. |
71 * By default EPOC constructor is private. |
72 */ |
72 */ |
73 IMPORT_C CPhoneErrorMessagesHandler( |
73 IMPORT_C CPhoneErrorMessagesHandler( |
74 MPhoneViewCommandHandle* aViewCommandHandle, |
74 MPhoneViewCommandHandle* aViewCommandHandle, |
75 MPhoneStateMachine* aStateMachine ); |
75 MPhoneStateMachine* aStateMachine ); |
76 |
76 |
77 /** |
77 /** |
78 * Two phase construction - Second phase. |
78 * Two phase construction - Second phase. |
79 * @return None |
79 * @return None |
80 */ |
80 */ |
81 void ConstructL(); |
81 void ConstructL(); |
82 |
82 |
83 /** |
83 /** |
84 * Show global InfoNote |
84 * Show global InfoNote |
85 * @param aResourceId resource id to be resolved |
85 * @param aResourceId resource id to be resolved |
86 */ |
86 */ |
87 IMPORT_C void SendGlobalInfoNoteL( TInt aResourceId ); |
87 IMPORT_C void SendGlobalInfoNoteL( TInt aResourceId, |
|
88 TBool aNotificationDialog = EFalse ); |
88 |
89 |
89 /** |
90 /** |
90 * Show global ErrorNote |
91 * Show global ErrorNote |
91 * @param aResourceId resource id to be resolved |
92 * @param aResourceId resource id to be resolved |
92 */ |
93 */ |
93 IMPORT_C void SendGlobalErrorNoteL( TInt aResourceId ); |
94 IMPORT_C void SendGlobalErrorNoteL( TInt aResourceId, |
|
95 TBool aNotificationDialog = EFalse ); |
94 |
96 |
95 /** |
97 /** |
96 * Show global WarningNote |
98 * Show global WarningNote |
97 * @param aResourceId resource id to be resolved |
99 * @param aResourceId resource id to be resolved |
98 */ |
100 */ |
99 IMPORT_C void SendGlobalWarningNoteL( TInt aResourceId ); |
101 IMPORT_C void SendGlobalWarningNoteL( |
|
102 TInt aResourceId, |
|
103 TBool aNotificationDialog = EFalse ); |
100 |
104 |
101 |
105 |
102 private: |
106 private: |
103 /** |
107 /** |
104 * Return SimState. |
108 * Return SimState. |
105 */ |
109 */ |
106 TPESimState SimState() const; |
110 TPESimState SimState() const; |
107 |
111 |
112 |
116 |
113 /** |
117 /** |
114 * Return ETrue if voice call. |
118 * Return ETrue if voice call. |
115 */ |
119 */ |
116 TBool IsVoiceCall( const TInt aCallId ) const; |
120 TBool IsVoiceCall( const TInt aCallId ) const; |
117 |
121 |
|
122 /** |
|
123 * Gets cause code and resource id. |
|
124 */ |
|
125 TBool GetCauseCode( TInt &aCauseCode, |
|
126 TInt &aResourceId, TBool &aNotification ) const; |
|
127 |
118 protected: |
128 protected: |
119 |
129 |
120 /** |
130 /** |
121 * Handle for sending view commands. |
131 * Handle for sending view commands. |
122 */ |
132 */ |
123 MPhoneViewCommandHandle* iViewCommandHandle; |
133 MPhoneViewCommandHandle* iViewCommandHandle; |
124 |
134 |
125 MPhoneStateMachine* iStateMachine; |
135 MPhoneStateMachine* iStateMachine; |
126 |
136 |
|
137 TBool iCauseCodeVariation; |
|
138 |
|
139 TInt iCallId; |
|
140 |
127 }; |
141 }; |
128 |
142 |
129 #endif // __CPHONEERRORMESSAGESHANDLER_H |
143 #endif // __CPHONEERRORMESSAGESHANDLER_H |
130 |
144 |
131 // End of File |
145 // End of File |