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