|
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 */ |
|
87 IMPORT_C void SendGlobalInfoNoteL( TInt aResourceId ); |
|
88 |
|
89 /** |
|
90 * Show global ErrorNote |
|
91 * @param aResourceId resource id to be resolved |
|
92 */ |
|
93 IMPORT_C void SendGlobalErrorNoteL( TInt aResourceId ); |
|
94 |
|
95 /** |
|
96 * Show global WarningNote |
|
97 * @param aResourceId resource id to be resolved |
|
98 */ |
|
99 IMPORT_C void SendGlobalWarningNoteL( TInt aResourceId ); |
|
100 |
|
101 |
|
102 private: |
|
103 /** |
|
104 * Return SimState. |
|
105 */ |
|
106 TPESimState SimState() const; |
|
107 |
|
108 /** |
|
109 * Return ETrue if video call. |
|
110 */ |
|
111 TBool IsVideoCall( const TInt aCallId ) const; |
|
112 |
|
113 protected: |
|
114 |
|
115 /** |
|
116 * Handle for sending view commands. |
|
117 */ |
|
118 MPhoneViewCommandHandle* iViewCommandHandle; |
|
119 |
|
120 MPhoneStateMachine* iStateMachine; |
|
121 |
|
122 }; |
|
123 |
|
124 #endif // __CPHONEERRORMESSAGESHANDLER_H |
|
125 |
|
126 // End of File |