author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 15 Sep 2010 12:29:17 +0300 | |
branch | RCL_3 |
changeset 64 | 85902f042028 |
parent 56 | d48ab3b357f1 |
child 72 | a5e7a4f63858 |
permissions | -rw-r--r-- |
56 | 1 |
/* |
2 |
* Copyright (c) 2005-2007 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: Provides Psln Application Screensaver view. |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
||
20 |
#ifndef CPSLNSCREENSAVERVIEW_H |
|
21 |
#define CPSLNSCREENSAVERVIEW_H |
|
22 |
||
23 |
// INCLUDES |
|
24 |
#include "PslnPropertySubscriber.h" |
|
25 |
||
26 |
// Base classes |
|
27 |
#include "PslnBaseView.h" |
|
28 |
#include "mpslnscreensaverecomobserver.h" |
|
29 |
#include <mpslnfwmsklabelobserver.h> |
|
30 |
#include <cenrepnotifyhandler.h> |
|
31 |
||
32 |
#include <psmclient.h> |
|
33 |
#include <psmclientobserver.h> |
|
34 |
||
35 |
class CAknWaitDialog; |
|
36 |
||
37 |
/** |
|
38 |
* CPslnBaseView view class. |
|
39 |
* Provides Psln Application Screensaver view. |
|
40 |
* |
|
41 |
* @since S60 v3.1 |
|
42 |
*/ |
|
43 |
class CPslnScreenSaverView : public CPslnBaseView, |
|
44 |
public MPslnScreenSaverECOMObserver, |
|
45 |
public MPslnFWMSKObserver, |
|
46 |
public MCenRepNotifyHandlerCallback, |
|
47 |
public MPsmClientObserver |
|
48 |
{ |
|
49 |
public: |
|
50 |
||
51 |
/** |
|
52 |
* Two-phased constructor. |
|
53 |
*/ |
|
54 |
static CPslnScreenSaverView* NewLC(); |
|
55 |
||
56 |
/** |
|
57 |
* Destructor. |
|
58 |
*/ |
|
59 |
virtual ~CPslnScreenSaverView(); |
|
60 |
||
61 |
/** |
|
62 |
* From CAknView. |
|
63 |
* Returns view id. |
|
64 |
* @return An unsigned integer (view id). |
|
65 |
*/ |
|
66 |
TUid Id() const; |
|
67 |
||
68 |
/** |
|
69 |
* From MEikCommandObserver . |
|
70 |
* Handles commands. |
|
71 |
* @param aCommand Command to be handled. |
|
72 |
*/ |
|
73 |
void HandleCommandL( TInt aCommand ); |
|
74 |
||
75 |
/** |
|
76 |
* From MPslnScreenSaverECOMObserver. |
|
77 |
* Called when there is a change in ECOM plugins. |
|
78 |
*/ |
|
79 |
void HandlePluginListChangeL(); |
|
80 |
||
81 |
/** |
|
82 |
* From MPslnFWMSKObserver. |
|
83 |
* Checks if the MSK label needs to be adjusted. |
|
84 |
*/ |
|
85 |
void CheckMiddleSoftkeyLabelL(); |
|
86 |
||
87 |
/** |
|
88 |
* From MPsmClientObserver. |
|
89 |
* Notify when the power save mode is changed. |
|
90 |
*/ |
|
91 |
void PowerSaveModeChanged( const TPsmsrvMode aMode ); |
|
92 |
||
93 |
/** |
|
94 |
* From MPsmClientObserver. |
|
95 |
* Notify when some wrong with the power save mode change. |
|
96 |
*/ |
|
97 |
void PowerSaveModeChangeError( const TInt aError ); |
|
98 |
||
99 |
private: |
|
100 |
||
101 |
/** |
|
102 |
* Callback for exiting Screensaver preview mode. |
|
103 |
* @param aPtr pointer to get reference to self. |
|
104 |
* @return error code. |
|
105 |
*/ |
|
106 |
static TInt HandlePreviewModeChanged( TAny* aPtr ); |
|
107 |
||
108 |
/** |
|
109 |
* Callback for changes in Screensaver preview state. |
|
110 |
* @param aPtr pointer to get reference to self. |
|
111 |
* @return error code. |
|
112 |
*/ |
|
113 |
static TInt HandlePreviewStateChanged( TAny* aPtr ); |
|
114 |
||
115 |
/** |
|
116 |
* From CAknView. |
|
117 |
* Called when view is about to activate. |
|
118 |
*/ |
|
119 |
void DoActivateL( |
|
120 |
const TVwsViewId& aPrevViewId, |
|
121 |
TUid aCustomMessageId, |
|
122 |
const TDesC8& aCustomMessage ); |
|
123 |
||
124 |
/** |
|
125 |
* From CAknView. |
|
126 |
* Called when view is deactivated. |
|
127 |
*/ |
|
128 |
void DoDeactivate(); |
|
129 |
||
130 |
/** |
|
131 |
* From MEikMenuObserver. |
|
132 |
* Changes MenuPane dynamically. |
|
133 |
*/ |
|
134 |
void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
135 |
||
136 |
/** |
|
137 |
* From MProgressDialogCallback. |
|
138 |
* Called when wait note is removed. |
|
139 |
*/ |
|
140 |
void DialogDismissedL( TInt aButtonId ); |
|
141 |
||
142 |
/** |
|
143 |
* From CPslnBaseView. |
|
144 |
* Handles listbox selection. |
|
145 |
*/ |
|
146 |
void HandleListBoxSelectionL(); |
|
147 |
||
148 |
/** |
|
149 |
* From CPslnBaseView. |
|
150 |
* Creates new container. |
|
151 |
*/ |
|
152 |
void NewContainerL(); |
|
153 |
||
154 |
/** |
|
155 |
* From CPslnBaseView. |
|
156 |
*/ |
|
157 |
void SetTitlePaneL( TInt& aResourceId ); |
|
158 |
||
159 |
/* From MCenRepNotifyHandlerCallback. */ |
|
160 |
void HandleNotifyInt( TUint32 aId, TInt /*aNewValue*/ ); |
|
161 |
||
162 |
/* From MCenRepNotifyHandlerCallback. */ |
|
163 |
void HandleNotifyGeneric( TUint32 aId ); |
|
164 |
||
165 |
/* From MCenRepNotifyHandlerCallback. */ |
|
166 |
void HandleNotifyError( |
|
167 |
TUint32 aId, |
|
168 |
TInt aError, |
|
169 |
CCenRepNotifyHandler* aHandler ); |
|
170 |
||
171 |
/** |
|
172 |
* Handles screensaver activation command. |
|
173 |
*/ |
|
174 |
void HandleScreenSaverActivationL( TInt aCurrentItem ); |
|
175 |
||
176 |
/** |
|
177 |
* Handles screensaver preview command. |
|
178 |
*/ |
|
179 |
void HandleScreenSaverPreviewL( TInt aCurrentItem ); |
|
180 |
||
181 |
/** |
|
182 |
* Handles screensaver settings command. |
|
183 |
*/ |
|
184 |
void HandleScreenSaverSettingsL( TInt aCurrentItem ); |
|
185 |
||
186 |
/** |
|
187 |
* Launches opening note. |
|
188 |
*/ |
|
189 |
void LaunchNote(); |
|
190 |
||
191 |
/** |
|
192 |
* Same as above, but might leave. |
|
193 |
*/ |
|
194 |
void LaunchNoteL(); |
|
195 |
||
196 |
/** |
|
197 |
* Removes opening note and stops listening for screensaver preview |
|
198 |
* state changes. |
|
199 |
*/ |
|
200 |
void RemoveNote(); |
|
201 |
||
202 |
/** |
|
203 |
* Same as above, but might leave. |
|
204 |
*/ |
|
205 |
void RemoveNoteL(); |
|
206 |
||
207 |
/** |
|
208 |
* Checks if screensaver function can be called, and if so makes |
|
209 |
* the call through PslnEngine. |
|
210 |
*/ |
|
211 |
void DoInvokeScreenSaverFunctionL( |
|
212 |
const TInt aCurrentItem, |
|
213 |
const TScPluginCaps aType ); |
|
214 |
||
215 |
/** |
|
216 |
* Creates preview mode subscriber. |
|
217 |
*/ |
|
218 |
void CreatePreviewModeSubscriberL(); |
|
219 |
||
220 |
/** |
|
221 |
* Creates preview state subscriber. |
|
222 |
*/ |
|
223 |
void CreatePreviewStateSubscriberL(); |
|
224 |
||
225 |
/** |
|
226 |
* Remove command and label from MSK. |
|
227 |
*/ |
|
228 |
void RemoveCommandFromMSK(); |
|
229 |
||
230 |
/** |
|
231 |
* Is 'Change' command visible. |
|
232 |
*/ |
|
233 |
TBool IsChangeCommandVisibleL() const; |
|
234 |
||
235 |
/** |
|
236 |
* Is 'Apply' command visible. |
|
237 |
*/ |
|
238 |
TBool IsApplyCommandVisibleL() const; |
|
239 |
||
240 |
/** |
|
241 |
* C++ default constructor. |
|
242 |
*/ |
|
243 |
CPslnScreenSaverView(); |
|
244 |
||
245 |
/** |
|
246 |
* By default Symbian 2nd phase constructor is private. |
|
247 |
*/ |
|
248 |
void ConstructL(); |
|
249 |
||
250 |
private: |
|
251 |
||
252 |
/** |
|
253 |
* Publish & Subscribe item for setting Preview mode. |
|
254 |
*/ |
|
255 |
RProperty iPreviewModeProperty; |
|
256 |
||
257 |
/** |
|
258 |
* Publish & Subscribe item for setting Preview state. |
|
259 |
*/ |
|
260 |
RProperty iPreviewStateProperty; |
|
261 |
||
262 |
/** |
|
263 |
* Publish & Subscribe listener for Preview mode. |
|
264 |
* Own. |
|
265 |
*/ |
|
266 |
CPslnPropertySubscriber* iPreviewModeSubscriber; |
|
267 |
||
268 |
/** |
|
269 |
* Publish & Subscribe listener for Preview state. |
|
270 |
* Own. |
|
271 |
*/ |
|
272 |
CPslnPropertySubscriber* iPreviewStateSubscriber; |
|
273 |
||
274 |
/** |
|
275 |
* Wait note wrapper. |
|
276 |
* Own. |
|
277 |
*/ |
|
278 |
CAknWaitDialog* iWaitDlg; |
|
279 |
||
280 |
/** |
|
281 |
* Index of plugin screensaver that is previewed. |
|
282 |
*/ |
|
283 |
TInt iScreenSaverPreviewIndex; |
|
284 |
||
285 |
/** |
|
286 |
* Repository for active screensaver. |
|
287 |
* Own. |
|
288 |
*/ |
|
289 |
CRepository* iScreenSaverRepository; |
|
290 |
||
291 |
/** |
|
292 |
* Notifier for changes in the screensaver repository. |
|
293 |
* Own. |
|
294 |
*/ |
|
295 |
CCenRepNotifyHandler* iScreenSaverNotifier; |
|
296 |
CPsmClient *iPsmClient; |
|
64
85902f042028
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
297 |
|
85902f042028
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
298 |
/** |
85902f042028
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
299 |
* Ture if screensaver is being previewed. |
85902f042028
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
300 |
*/ |
85902f042028
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
301 |
TBool iScreenSaverPreviewing; |
56 | 302 |
|
303 |
}; |
|
304 |
||
305 |
#endif // CPSLNSCREENSAVERVIEW_H |
|
306 |
||
307 |
// End of File |