author | William Roberts <williamr@symbian.org> |
Thu, 22 Jul 2010 16:33:21 +0100 | |
branch | GCC_SURGE |
changeset 51 | f39ed5e045e0 |
parent 21 | 92ab7f8d0eab |
parent 46 | bc5a64e5bc3c |
permissions | -rw-r--r-- |
37 | 1 |
/* |
2 |
* Copyright (c) 2006 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: |
|
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 |
|
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 |
|
19 |
* code so that not every GSM class need to implement these same handlings |
|
20 |
* for the same messages. |
|
21 |
* |
|
22 |
*/ |
|
23 |
||
24 |
||
25 |
#ifndef __CPHONEERRORMESSAGESHANDLER_H |
|
26 |
#define __CPHONEERRORMESSAGESHANDLER_H |
|
27 |
||
28 |
// INCLUDES |
|
29 |
#include <w32std.h> |
|
30 |
#include "mphoneerrormessageshandler.h" |
|
31 |
||
32 |
// FORWARD DECLARATIONS |
|
33 |
class MPhoneErrorMessagesHandlerRegister; |
|
34 |
class MPhoneViewCommandHandle; |
|
35 |
class MPhoneStateMachine; |
|
36 |
||
37 |
// CLASS DECLARATION |
|
38 |
||
39 |
/** |
|
40 |
* Class that does processing for Phone Engine error messages that are common |
|
41 |
* for all protocols. |
|
42 |
* |
|
43 |
*/ |
|
44 |
class CPhoneErrorMessagesHandler : public CBase, |
|
45 |
public MPhoneErrorMessagesHandler |
|
46 |
{ |
|
47 |
public: |
|
48 |
/** |
|
49 |
* Creates the error handler instance |
|
50 |
* @return an instance of class CPhoneErrorMessagesHandler |
|
51 |
*/ |
|
52 |
static CPhoneErrorMessagesHandler* NewL( |
|
53 |
MPhoneViewCommandHandle* aViewCommandHandle, |
|
54 |
MPhoneStateMachine* aStateMachine ); |
|
55 |
||
56 |
public: //From MPhoneErrorMessagesHandler |
|
57 |
/** |
|
58 |
* Destructor. |
|
59 |
*/ |
|
60 |
IMPORT_C virtual ~CPhoneErrorMessagesHandler(); |
|
61 |
||
62 |
/** |
|
63 |
* Shows error specific notes, ie. error, warning and info notes |
|
64 |
* related to the given error. |
|
65 |
* @param aErrorInfo - Error info from Phone Engine |
|
66 |
*/ |
|
67 |
IMPORT_C void ShowErrorSpecificNoteL( const TPEErrorInfo& aErrorInfo ); |
|
68 |
||
69 |
protected: |
|
70 |
/** |
|
71 |
* By default EPOC constructor is private. |
|
72 |
*/ |
|
73 |
IMPORT_C CPhoneErrorMessagesHandler( |
|
74 |
MPhoneViewCommandHandle* aViewCommandHandle, |
|
75 |
MPhoneStateMachine* aStateMachine ); |
|
76 |
||
77 |
/** |
|
78 |
* Two phase construction - Second phase. |
|
79 |
* @return None |
|
80 |
*/ |
|
81 |
void ConstructL(); |
|
82 |
||
83 |
/** |
|
84 |
* Show global InfoNote |
|
85 |
* @param aResourceId resource id to be resolved |
|
86 |
*/ |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
87 |
IMPORT_C void SendGlobalInfoNoteL( TInt aResourceId, |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
88 |
TBool aNotificationDialog = EFalse ); |
37 | 89 |
|
90 |
/** |
|
91 |
* Show global ErrorNote |
|
92 |
* @param aResourceId resource id to be resolved |
|
93 |
*/ |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
94 |
IMPORT_C void SendGlobalErrorNoteL( TInt aResourceId, |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
95 |
TBool aNotificationDialog = EFalse ); |
37 | 96 |
|
97 |
/** |
|
98 |
* Show global WarningNote |
|
99 |
* @param aResourceId resource id to be resolved |
|
100 |
*/ |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
101 |
IMPORT_C void SendGlobalWarningNoteL( |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
102 |
TInt aResourceId, |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
103 |
TBool aNotificationDialog = EFalse ); |
37 | 104 |
|
105 |
||
106 |
private: |
|
107 |
/** |
|
108 |
* Return SimState. |
|
109 |
*/ |
|
110 |
TPESimState SimState() const; |
|
111 |
||
112 |
/** |
|
113 |
* Return ETrue if video call. |
|
114 |
*/ |
|
115 |
TBool IsVideoCall( const TInt aCallId ) const; |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
116 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
117 |
/** |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
118 |
* Return ETrue if voice call. |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
119 |
*/ |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
120 |
TBool IsVoiceCall( const TInt aCallId ) const; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
121 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
122 |
/** |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
123 |
* Gets cause code and resource id. |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
124 |
*/ |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
125 |
TBool GetCauseCode( TInt &aCauseCode, |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
126 |
TInt &aResourceId, TBool &aNotification ) const; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
127 |
|
37 | 128 |
protected: |
129 |
||
130 |
/** |
|
131 |
* Handle for sending view commands. |
|
132 |
*/ |
|
133 |
MPhoneViewCommandHandle* iViewCommandHandle; |
|
134 |
||
135 |
MPhoneStateMachine* iStateMachine; |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
136 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
137 |
TBool iCauseCodeVariation; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
138 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
139 |
TInt iCallId; |
37 | 140 |
|
141 |
}; |
|
142 |
||
143 |
#endif // __CPHONEERRORMESSAGESHANDLER_H |
|
144 |
||
145 |
// End of File |