|
1 /* |
|
2 * Copyright (c) 2005 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: PhoneUI Note Controller |
|
15 * |
|
16 */ |
|
17 |
|
18 /* |
|
19 */ |
|
20 #ifndef CPHONENOTECONTROLLER_H |
|
21 #define CPHONENOTECONTROLLER_H |
|
22 |
|
23 |
|
24 // INCLUDES |
|
25 #include "cphoneprogressnote.h" |
|
26 #include "mphonetimer.h" |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class TPhoneCommandParam; |
|
30 class CPhoneTimer; |
|
31 class CEikonEnv; |
|
32 class CPhoneNote; |
|
33 class CPhoneUIDisabledNote; |
|
34 |
|
35 class CPhoneNoteController : public CBase, public MPhoneTimer |
|
36 { |
|
37 public: |
|
38 |
|
39 /** |
|
40 * Two-phased constructor. |
|
41 */ |
|
42 static CPhoneNoteController* NewL( CEikonEnv& aEikEnv ); |
|
43 |
|
44 /** |
|
45 * Destructor. |
|
46 */ |
|
47 virtual ~CPhoneNoteController(); |
|
48 |
|
49 void CreateNoteL( TPhoneCommandParam* aCommandParam ); |
|
50 |
|
51 void DestroyNote(); |
|
52 |
|
53 void DestroyDTMFNote(); |
|
54 |
|
55 void DestroyGlobalNoteL(); |
|
56 |
|
57 void CreateGlobalNoteL( TPhoneCommandParam* aCommandParam ); |
|
58 |
|
59 void CreateProgressNoteL( TPhoneCommandParam* aCommandParam ); |
|
60 |
|
61 void DestroyProgressNote(); |
|
62 |
|
63 /** |
|
64 * This function is called after on timeout. |
|
65 */ |
|
66 void HandleTimeOutL(); |
|
67 |
|
68 /** |
|
69 * Writes information is note visible or not |
|
70 * to the given command parameter. |
|
71 * @param aCommandParam - boolean param |
|
72 */ |
|
73 void IsNoteVisible( TPhoneCommandParam* aCommandParam ); |
|
74 |
|
75 /** |
|
76 * Writes information is progress note visible or not |
|
77 * to the given command parameter. |
|
78 * @param aCommandParam - boolean param |
|
79 */ |
|
80 void IsProgressNoteVisible( TPhoneCommandParam* aCommandParam ); |
|
81 |
|
82 /** |
|
83 * Writes information is note or not |
|
84 * to the given command parameter. |
|
85 * @param aCommandParam - boolean param |
|
86 */ |
|
87 void IsNoteActive( TPhoneCommandParam* aCommandParam ); |
|
88 |
|
89 /** |
|
90 * Returns true if active note is dismissable by key event, else false. |
|
91 * @param aCommandParam - boolean param |
|
92 */ |
|
93 void IsActiveNoteDissmissableByKeyEvent( TPhoneCommandParam* aCommandParam ); |
|
94 |
|
95 /** |
|
96 * Updates softkeys to note |
|
97 * @param aCommandParam - integer param for resolved resource id |
|
98 */ |
|
99 void UpdateNoteSoftkeysL( TPhoneCommandParam* aCommandParam ); |
|
100 |
|
101 private: |
|
102 |
|
103 /** |
|
104 * C++ default constructor. |
|
105 */ |
|
106 CPhoneNoteController( CEikonEnv& aEikEnv ); |
|
107 |
|
108 /** |
|
109 * Updates information text to ongoing note |
|
110 * @param aCommandParam - note param |
|
111 */ |
|
112 void UpdateNoteTextL( TPhoneCommandParam* aCommandParam ); |
|
113 |
|
114 private: // Data |
|
115 |
|
116 // Actual note |
|
117 CPhoneNote* iNote; |
|
118 |
|
119 CPhoneProgressNote* iProgressNote; |
|
120 |
|
121 // Owned timer instance. |
|
122 CPhoneTimer* iProgressUpdateTimer; |
|
123 |
|
124 // Interval of progress updates. |
|
125 TInt iInterval; |
|
126 |
|
127 // Current progress. |
|
128 TInt iProgressBarCount; |
|
129 |
|
130 // Time to wait until next attempt. |
|
131 TInt iWaitTime; |
|
132 |
|
133 TTime iStartTime; |
|
134 |
|
135 /** |
|
136 * ID of global note. |
|
137 */ |
|
138 TInt iGlobalNoteId; |
|
139 |
|
140 // Eikon environment delivered from CPhoneViewController |
|
141 CEikonEnv& iEikEnv; |
|
142 |
|
143 // Note's text |
|
144 TDesC* iNoteText; |
|
145 |
|
146 }; |
|
147 |
|
148 #endif // CPHONENOTECONTROLLER_H |
|
149 |
|
150 // End of File |