|
1 /* |
|
2 * Copyright (c) 2004-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: Model class for Psln application. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_PSLNMODEL_H |
|
20 #define C_PSLNMODEL_H |
|
21 |
|
22 #include <downloadedcontenthandler.h> |
|
23 #include <AknServerApp.h> |
|
24 #include <ScreensaverPluginIntDef.h> |
|
25 #include <aknssrvclient.h> |
|
26 #include <Babitflags.h> |
|
27 |
|
28 // Determines the type of skin list. |
|
29 enum TPslnSkinNameType |
|
30 { |
|
31 // list name |
|
32 EPslnSkinNameTypeList = 0, |
|
33 // title name |
|
34 EPslnSkinNameTypeTitle |
|
35 }; |
|
36 |
|
37 // What kind of scren saver activation it is. |
|
38 enum TPslnScreenSaverActivation |
|
39 { |
|
40 // Preview is activated. |
|
41 EPslnScreenSaverPreviewActivation = 0, |
|
42 // Preview is deactivated, and "real" screen saver is activated, |
|
43 EPslnScreenSaverPreviewDeactivation, |
|
44 // Real screen saver is activated straight away. |
|
45 EPslnScreenSaverActivation |
|
46 }; |
|
47 |
|
48 // Defines actions for a transtion effects |
|
49 enum TPslnTransitionEffectAction |
|
50 { |
|
51 // Used only for enum range validation |
|
52 EPslnTransitionEffectDummyFirst = -1, |
|
53 |
|
54 // -- begin of real values -- |
|
55 |
|
56 // Start theme preview transtion effect |
|
57 EPslnTransitionEffectStartPreview, |
|
58 // Start theme activation transtion effect |
|
59 EPslnTransitionEffectStartThemeActivation, |
|
60 // Stop the current transition effect |
|
61 EPslnTransitionEffectStop, |
|
62 |
|
63 // -- end of real values -- |
|
64 |
|
65 // Used only for enum range validation |
|
66 EPslnTransitionEffectDummyLast |
|
67 }; |
|
68 |
|
69 class MAknsSkinChangeObserver; |
|
70 class MPslnScreenSaverECOMObserver; |
|
71 class CEikonEnv; |
|
72 class CPslnSkinStore; |
|
73 class CRepository; |
|
74 class CPslnSkinEntry; |
|
75 class CPslnSkinNameEntry; |
|
76 class TAknsPkgID; |
|
77 class CPslnWallpaperUtilsLoader; |
|
78 class CPslnEcomListener; |
|
79 class CPslnBrowserLaunchLoader; |
|
80 |
|
81 // Maximum number of characters in Screen saver txt. |
|
82 const TInt KPslnMaxLengthOfScreenSaverText = 15; |
|
83 |
|
84 // CLASS DEFINITIONS |
|
85 |
|
86 // Inner class for skin name entry. |
|
87 class TPslnSkinNameEntry |
|
88 { |
|
89 public: |
|
90 // Package ID. |
|
91 TAknsPkgID iPid; |
|
92 // Skin list name. |
|
93 HBufC* iListName; |
|
94 // Skin title name. |
|
95 HBufC* iTitleName; |
|
96 }; |
|
97 |
|
98 // Auxiliary class for screen saver info. |
|
99 class CPslnScreenSaverInfo : public CBase |
|
100 { |
|
101 public: |
|
102 |
|
103 // Symbian OS two-phased constructor. |
|
104 static CPslnScreenSaverInfo* NewL() |
|
105 { |
|
106 CPslnScreenSaverInfo* self = new (ELeave) CPslnScreenSaverInfo; |
|
107 CleanupStack::PushL( self ); |
|
108 self->ConstructL(); |
|
109 CleanupStack::Pop( self ); |
|
110 return self; |
|
111 }; |
|
112 |
|
113 // Destructor. |
|
114 ~CPslnScreenSaverInfo() |
|
115 { |
|
116 delete iScreenSaverTxt; |
|
117 iScreenSaverTxt = NULL; |
|
118 delete iFileName; |
|
119 iFileName = NULL; |
|
120 } |
|
121 private: |
|
122 |
|
123 // Symbian OS second phase constructor. |
|
124 void ConstructL() |
|
125 { |
|
126 iScreenSaverTxt = HBufC::NewL( KPslnMaxLengthOfScreenSaverText ); |
|
127 iFileName = HBufC::NewL( KMaxFileName ); |
|
128 }; |
|
129 |
|
130 // C++ default constructor. |
|
131 CPslnScreenSaverInfo() |
|
132 { |
|
133 iScreenSaverType = 1; // magic, default value |
|
134 }; |
|
135 |
|
136 public: |
|
137 // Filename for screensaver, if applicable. |
|
138 HBufC* iFileName; |
|
139 // Text, if any, shown in the screensaver. |
|
140 HBufC* iScreenSaverTxt; |
|
141 // Type of screen saver. |
|
142 TInt iScreenSaverType; |
|
143 }; |
|
144 |
|
145 /** |
|
146 * CPslnModel is the model class of Psln app. |
|
147 * It provides functions to get and set setting values. |
|
148 */ |
|
149 NONSHARABLE_CLASS( CPslnModel ): |
|
150 public CBase, |
|
151 public MDownloadedContentHandler, |
|
152 public MAknServerAppExitObserver |
|
153 { |
|
154 public: |
|
155 |
|
156 /** |
|
157 * Two-phased constructor. |
|
158 * @param aObserver observer for skin changes. |
|
159 * @return new instance of CPslnModel. |
|
160 */ |
|
161 IMPORT_C static CPslnModel* NewL( MAknsSkinChangeObserver* aObserver ); |
|
162 |
|
163 /** |
|
164 * Deprecated. |
|
165 * @return NULL. |
|
166 */ |
|
167 IMPORT_C static CPslnModel* NewL(); |
|
168 |
|
169 /** |
|
170 * Destructor |
|
171 */ |
|
172 IMPORT_C ~CPslnModel(); |
|
173 |
|
174 /** |
|
175 * Deprecated. |
|
176 */ |
|
177 IMPORT_C TBool ActivateSkinL( const TDesC8& aPreviewType, |
|
178 const TInt aActiveSkinIndex ); |
|
179 |
|
180 /** |
|
181 * Activates screen saver as set by user. |
|
182 * @param aItemIndex screensaver to activate. |
|
183 * @param aActivationType screensaver activation type |
|
184 * (activation/deactivation/preview). |
|
185 * @return error code, or KErrNone on success. |
|
186 */ |
|
187 IMPORT_C TInt ActivateScreenSaver( |
|
188 const TInt aItemIndex, |
|
189 TPslnScreenSaverActivation aActivationType ); |
|
190 |
|
191 /** |
|
192 * Disables skin notify changes. |
|
193 * |
|
194 * Creates and pushes internal class CPslnActivationGuard to the |
|
195 * stack. When CPslnActivationGuard is constructed, SkinSrvSession's |
|
196 * DisableSkinChangeNotify is called, and thus skin notify changes are |
|
197 * disabled. When CPslnActivationGuard is popped from stack, |
|
198 * SkinSrvSession's EnableSkinChangeNotify is called automatically and thus, |
|
199 * skin notify changes are again active. |
|
200 */ |
|
201 IMPORT_C void GuardActivationLC(); |
|
202 |
|
203 /** |
|
204 * Starts skin download. |
|
205 */ |
|
206 IMPORT_C void DownloadSkinL(); |
|
207 |
|
208 /** |
|
209 * Sets Idle Wallpaper. |
|
210 * @param aImagePath Path and filename of new wallpaper. |
|
211 * @return error code, or KErrNone on success. |
|
212 */ |
|
213 IMPORT_C TInt SetBackgroundImagePath( const TDesC& aImagePath ); |
|
214 |
|
215 /** |
|
216 * Invokes screensaver plugins PluginFunction for e.g. configuring |
|
217 * the screensaver. |
|
218 * @param aIndex screensaver index to use. |
|
219 * @param aFunction screensaver function to call. |
|
220 */ |
|
221 IMPORT_C void InvokeSSPluginFunctionL( |
|
222 TInt aIndex, |
|
223 TScPluginCaps aFunction ); |
|
224 |
|
225 /** |
|
226 * Updates skins from server, UI skins list, and screensaver array. |
|
227 */ |
|
228 IMPORT_C void PerformCompleteUpdateL(); |
|
229 |
|
230 /** |
|
231 * Creates screen saver array. |
|
232 */ |
|
233 IMPORT_C void LoadScreensaverArrayL(); |
|
234 |
|
235 /** |
|
236 * Gets the visible skin by its UI index. |
|
237 * Ownership is not transferred. |
|
238 * @param aIndex skin index. |
|
239 * @return pointer to skin entry. |
|
240 */ |
|
241 IMPORT_C CPslnSkinEntry* VisibleSkin( const TInt aIndex ); |
|
242 |
|
243 /** |
|
244 * Gets the name of the skin. |
|
245 * @param aIndex skin index to use. |
|
246 * @param aSkinName localized skin name. |
|
247 * @param aType which skin name to fetch (list/title name). |
|
248 */ |
|
249 IMPORT_C void GetSkinNameByIndex( const TInt aIndex, TDes& aSkinName, |
|
250 const TPslnSkinNameType aType ) const; |
|
251 |
|
252 /** |
|
253 * Checks whether the current (or given) skin is active. |
|
254 * @param aSkinIndex skin index to use. |
|
255 * @return ETrue is given skin index is currently active skin. |
|
256 */ |
|
257 IMPORT_C TBool IsActiveSkinSelected ( |
|
258 TInt aSkinIndex = KErrNotFound ) const; |
|
259 |
|
260 /** |
|
261 * Deprecated since 5.0. |
|
262 */ |
|
263 IMPORT_C TAknSkinSrvSkinPackageLocation LocationOfSkin( const TInt aIndex ); |
|
264 |
|
265 /** |
|
266 * Returns skin index of active skin. |
|
267 * @return skin index of active skin. |
|
268 */ |
|
269 IMPORT_C TInt ActiveSkinIndex() const; |
|
270 |
|
271 /** |
|
272 * Returns skin index of currently highlighted skin. |
|
273 * @return skin index of highlighted skin. |
|
274 */ |
|
275 IMPORT_C TInt CurrentSelectedSkinIndex() const; |
|
276 |
|
277 /** |
|
278 * Returns number of found skins. |
|
279 * @return number of found skins. |
|
280 */ |
|
281 IMPORT_C TInt NumberOfSkins() const; |
|
282 |
|
283 /** |
|
284 * Returns screensaver name array. |
|
285 * @return screensaver name array. |
|
286 */ |
|
287 IMPORT_C const MDesC16Array& ScreensaverNames() const; |
|
288 |
|
289 /** |
|
290 * Checks if selected screensaver has the requested capability |
|
291 * @param aIndex index of screensaver in screensaver array. |
|
292 * @param aCapability requested capability. |
|
293 * @return ETrue if screensaver has the capability, EFalse otherwise. |
|
294 */ |
|
295 IMPORT_C TBool ScreensaverHasCapability( |
|
296 const TInt aIndex, |
|
297 const TScPluginCaps aCapability ) const; |
|
298 |
|
299 /** |
|
300 * Returns protection type of skin. |
|
301 * @param aIndex skin index to use. |
|
302 * @return protection type of skin. |
|
303 */ |
|
304 IMPORT_C TAknsSkinSrvSkinProtectionType ProtectionOfSkin( |
|
305 const TInt aIndex ); |
|
306 |
|
307 /** |
|
308 * Checks if the skin can be activated. |
|
309 * @param aItemIndex skin index to use. |
|
310 * @return ETrue, if skin can be activated. |
|
311 */ |
|
312 IMPORT_C TBool IsValidForActivation( const TInt aItemIndex ); |
|
313 |
|
314 /** |
|
315 * Checks if the skin can be previewed. |
|
316 * @param aItemIndex skin index to use. |
|
317 * @return ETrue, if skin can be previewed. |
|
318 */ |
|
319 IMPORT_C TBool IsValidForPreview( const TInt aItemIndex ); |
|
320 |
|
321 /** |
|
322 * Sets the given skin index as currently highlighted one. |
|
323 * @param aCurrentSkinIndex skin index. |
|
324 */ |
|
325 IMPORT_C void SetCurrentSelectedSkinIndex( |
|
326 const TInt aCurrentSkinIndex ); |
|
327 |
|
328 /** |
|
329 * Deprecated. |
|
330 */ |
|
331 IMPORT_C TInt SetCurrentPropertyType( const TInt aProperty, |
|
332 const TInt aCurItemIndex ); |
|
333 |
|
334 /** |
|
335 * Gets currently active index of given property. |
|
336 * @param aProperty property type - either wallpaper or screensaver. |
|
337 * @return index of currently active property, or error code. |
|
338 */ |
|
339 IMPORT_C TInt CurrentPropertyIndex( const TInt aProperty ); |
|
340 |
|
341 /** |
|
342 * Enables (or disables) notifications from ECOM framework. |
|
343 * When ECOM state is changed, PslnModel will check that it's |
|
344 * screensaver list is up to date. Changes in the list are |
|
345 * indicated to observer class. |
|
346 * @param aActive if ETrue, notifications are subscribed, otherwise |
|
347 * subscription is terminated. |
|
348 * @param aObserver observer for notifications. |
|
349 */ |
|
350 IMPORT_C void EnableScreenSaverNotifications( |
|
351 const TBool& aActive, |
|
352 MPslnScreenSaverECOMObserver& aObserver ); |
|
353 |
|
354 /** |
|
355 * Deprecated. |
|
356 */ |
|
357 IMPORT_C TBool ActivateSkinL( |
|
358 const TDesC8& aPreviewType, |
|
359 const TInt aActiveSkinIndex, |
|
360 const TBool& aActivateFromPreview ); |
|
361 |
|
362 /** |
|
363 * Activates the entire skin. |
|
364 * @since 3.2 |
|
365 * @param aActiveSkinIndex skin index of active skin. |
|
366 * @return ETrue, if skin activation is successful. |
|
367 */ |
|
368 IMPORT_C TBool ActivateSkinL( const TInt aActiveSkinIndex ); |
|
369 |
|
370 /** |
|
371 * Gets currently active index of given property. |
|
372 * This is leaving version of CurrentPropertyIndex (see above). |
|
373 * @param aProperty property type - either wallpaper or screensaver. |
|
374 * @return index of currently active property, or error code. |
|
375 */ |
|
376 IMPORT_C TInt CurrentPropertyIndexL( const TInt aProperty ); |
|
377 |
|
378 /** |
|
379 * Sets transition effects enabled/disabled as given in the parameter. |
|
380 * @param aEffectValue used as bitmask. Value of zero enables all effects, |
|
381 * and value of KMaxTInt disables all effects. |
|
382 * All other values are considered as invalid. |
|
383 * @return KErrArgument if aEffectValue is not zero or KMaxTInt. |
|
384 * Otherwise return value is what is given out by CRepository::Set(). |
|
385 * |
|
386 * @since 3.2 |
|
387 */ |
|
388 IMPORT_C TInt SetTransitionEffectsL( const TInt aEffectValue ); |
|
389 |
|
390 /** |
|
391 * Gets current transition effect value. |
|
392 * @return in error cases returns KErrNotFound, |
|
393 * otherwise returns current repository value. |
|
394 * |
|
395 * @since 3.2 |
|
396 */ |
|
397 IMPORT_C TInt GetTransitionEffectStateL(); |
|
398 |
|
399 /** |
|
400 * Checks if the screensaver is installed on memory card. |
|
401 * @param aScreensaverIndex screensaver index |
|
402 * @return ETrue, if screensaver is installed to the memory card. |
|
403 * |
|
404 * @since 3.2 |
|
405 */ |
|
406 IMPORT_C TBool IsScreenSaverOnMemoryCard( const TInt aIndex ) const; |
|
407 |
|
408 /** |
|
409 * Sets a given property (wallpaper or screensaver) as active. |
|
410 * @param aProperty property type - either wallpaper or screensaver. |
|
411 * @param aCurItemIndex item index that is currently active. |
|
412 * @return KErrNone always. |
|
413 * |
|
414 * @since 3.2 |
|
415 */ |
|
416 IMPORT_C void SetCurrentPropertyTypeL( const TInt aProperty, |
|
417 const TInt aCurItemIndex ); |
|
418 |
|
419 /** |
|
420 * Checks if a skin with given index is on memory card, |
|
421 * @param aIndex skin index from application. |
|
422 * @return ETrue if skin is on memory card, EFalse otherwise. |
|
423 * |
|
424 * @since 5.0 |
|
425 */ |
|
426 IMPORT_C TBool IsThemeOnMemoryCard( const TInt& aIndex ); |
|
427 |
|
428 /** |
|
429 * Checks if a skin with given index is on mass drive, |
|
430 * @param aIndex skin index from application. |
|
431 * @return ETrue if skin is on memory card, EFalse otherwise. |
|
432 * |
|
433 * @since 5.0 |
|
434 */ |
|
435 IMPORT_C TBool IsThemeOnMassDrive( const TInt& aIndex ); |
|
436 |
|
437 /** |
|
438 * Checks if the screensaver is installed on mass drive. |
|
439 * @param aScreensaverIndex screensaver index |
|
440 * @return ETrue, if screensaver is installed to the mass drive. |
|
441 * |
|
442 * @since 5.0 |
|
443 */ |
|
444 IMPORT_C TBool IsScreenSaverOnMassDrive( const TInt& aIndex ) const; |
|
445 |
|
446 /** |
|
447 * Returns skin server session. |
|
448 * @return skin server session. |
|
449 * |
|
450 * @since 3.2 |
|
451 */ |
|
452 IMPORT_C RAknsSrvSession SkinSrvSession() const; |
|
453 |
|
454 /** |
|
455 * Starts or stops transition effects. |
|
456 * |
|
457 * @param aAction specifies actions for transition effects. |
|
458 * The value can be one of the values defined in TPslnTransitionEffectAction. |
|
459 * @since 3.2 |
|
460 */ |
|
461 IMPORT_C void TransEffect(TInt aAction) const; |
|
462 |
|
463 private: |
|
464 |
|
465 /** |
|
466 * Gets the separately localized name of the skin, if any. |
|
467 * @param aPID package ID to use. |
|
468 * @param aSkinName localized skin name. |
|
469 * @param aType which skin name to fetch (list/title name). |
|
470 * @return ETrue, if localized skin name was found. |
|
471 */ |
|
472 TBool GetSeparatelyLocalizedSkinName( |
|
473 const TAknsPkgID aPID, TDes& aSkinName, |
|
474 const TPslnSkinNameType aType ) const; |
|
475 |
|
476 /** |
|
477 * From MDownloadedContentHandler. |
|
478 * |
|
479 * Handle downloaded content that has been saved to a file, |
|
480 * and return ETrue if it was handled successfully. |
|
481 * @param aFileName File name with path. |
|
482 * @param aParamList Generic parameter list. |
|
483 * @param aContinue Output parameter: It must be ETrue if the caller wants |
|
484 * Browser not to terminate after the content is handled. |
|
485 * @return ETrue if the implementer has processed the content. If it is |
|
486 * EFalse, BrowserLauncher opens that content in an |
|
487 * appropriate viewer application. |
|
488 */ |
|
489 TBool HandleContentL( |
|
490 const TDesC& aFilename, |
|
491 const CAiwGenericParamList& aParamList, |
|
492 TBool& aContinue ); |
|
493 |
|
494 /** |
|
495 * From MDownloadedContentHandler. |
|
496 * Reserved for future use. |
|
497 * @param aAnyParam reserved for future use. |
|
498 * @return reserved for future use. |
|
499 */ |
|
500 virtual TAny* DownloadedContentHandlerReserved1( TAny* aAnyParam ); |
|
501 |
|
502 /** |
|
503 * Default C++ contructor |
|
504 */ |
|
505 CPslnModel(); |
|
506 |
|
507 /** |
|
508 * Symbian default constructor |
|
509 */ |
|
510 void ConstructL( MAknsSkinChangeObserver* aObserver ); |
|
511 |
|
512 /** |
|
513 * Loads the separately localized skin names resource. |
|
514 */ |
|
515 void LoadSkinNamesResourceL(); |
|
516 |
|
517 /** |
|
518 * Finds screensavers from the given path and appends them to the |
|
519 * screensaver list. |
|
520 * @return ETrue if screensavers were found, EFalse otherwise. |
|
521 */ |
|
522 TBool FindAndAppendScreensaversL(); |
|
523 |
|
524 /** |
|
525 * Updates the skin information from the server and |
|
526 * the list of visible skins. |
|
527 */ |
|
528 void UpdateFromServerL(); |
|
529 |
|
530 /** |
|
531 * Updates the list of visible skins. |
|
532 */ |
|
533 void UpdateVisibleSkinListL(); |
|
534 |
|
535 /** |
|
536 * Activates skin that is currently selected. |
|
537 */ |
|
538 void SetActiveSkinL(); |
|
539 |
|
540 /** |
|
541 * Launches query dialog for screensaver name. |
|
542 * @return EFalse, if user cancelled the query. |
|
543 */ |
|
544 TBool QueryAndSetScreensaverTextL(); |
|
545 |
|
546 /** |
|
547 * From MAknServerAppExitObserver. |
|
548 */ |
|
549 void HandleServerAppExit( TInt aReason ); |
|
550 |
|
551 /* Gets full name of skin. */ |
|
552 const TDesC& GetSkinFullName( const TInt aItemIndex ); |
|
553 |
|
554 /* Gets the name of the skin. */ |
|
555 void GetSkinNameByPID( const TAknsPkgID aPID, TDes& aSkinName, |
|
556 const TPslnSkinNameType aType ) const; |
|
557 |
|
558 /* Activates default skin. */ |
|
559 void ActivateDefaultSkinL(); |
|
560 |
|
561 /* Gets default text for text screensaver. */ |
|
562 void GetDefaultTextToScreensaverL( TDes& aDisplayText ); |
|
563 |
|
564 /* Gets wallpaper item index. */ |
|
565 TInt GetWallPaperItemIndex(); |
|
566 |
|
567 /* Gets wallpaper item index. */ |
|
568 TInt GetScreenSaverItemIndexL(); |
|
569 |
|
570 /* Loads AknsWallpaperUtils to memory. */ |
|
571 void LoadWallpaperUtilsL(); |
|
572 |
|
573 /* Strips file path information from screensaver UID. */ |
|
574 TPtrC GetRealScreenSaverUid( const TInt aIndex ); |
|
575 |
|
576 /* Leaving version of ActivateScreenSaver. */ |
|
577 void ActivateScreenSaverL( |
|
578 const TInt aItemIndex, |
|
579 TPslnScreenSaverActivation aActivationType ); |
|
580 |
|
581 /* Loads browser launcher dll to memory. */ |
|
582 void LoadBrowserLaunchL(); |
|
583 |
|
584 private: // Data |
|
585 |
|
586 /* |
|
587 * Skin store. |
|
588 * Own. |
|
589 */ |
|
590 CPslnSkinStore* iSkinStore; |
|
591 |
|
592 /* |
|
593 * Array of visible skins. |
|
594 * Own. |
|
595 */ |
|
596 RPointerArray<CPslnSkinNameEntry>* iVisibleSkinArr; |
|
597 |
|
598 /* |
|
599 * Skin server session. |
|
600 */ |
|
601 RAknsSrvSession iSkinSrvSession; |
|
602 |
|
603 /* |
|
604 * CenRep object for skin keys. |
|
605 * Own. |
|
606 */ |
|
607 CRepository* iSkinsRepository; |
|
608 |
|
609 /* |
|
610 * CenRep object for screen saver keys. |
|
611 * Own. |
|
612 */ |
|
613 CRepository* iScreenSaverRepository; |
|
614 |
|
615 /* |
|
616 * CenRep object for themes application keys. |
|
617 * Own. |
|
618 */ |
|
619 CRepository* iThemesAppRepository; |
|
620 |
|
621 /* |
|
622 * Pointer to eikon environment. Stored to avoid repeated fetches. |
|
623 * Not own. |
|
624 */ |
|
625 CEikonEnv* iEikEnv; |
|
626 |
|
627 /* |
|
628 * Currently highlighted skin index. |
|
629 */ |
|
630 TInt iCurrentSkinIndex; |
|
631 |
|
632 /* |
|
633 * Active skin index. |
|
634 */ |
|
635 TInt iActiveSkinIndex; |
|
636 |
|
637 /* |
|
638 * Array of skin names. |
|
639 */ |
|
640 RArray<TPslnSkinNameEntry> iSkinNames; |
|
641 |
|
642 /* |
|
643 * Array of screensaver filenames. |
|
644 * Own. |
|
645 */ |
|
646 CDesC16ArrayFlat* iScreensaverFilenameArr; |
|
647 |
|
648 /* |
|
649 * Array of screensaver names. |
|
650 * Own. |
|
651 */ |
|
652 CDesC16ArrayFlat* iScreensaverNameArr; |
|
653 |
|
654 /* |
|
655 * Array of screensaver capabilities. |
|
656 */ |
|
657 RArray<TInt> iScreensaverCapsArr; |
|
658 |
|
659 /* |
|
660 * Active screensaver information. |
|
661 * Own. |
|
662 */ |
|
663 CPslnScreenSaverInfo* iScreenSaverInfo; |
|
664 |
|
665 /* |
|
666 * A handle to a dynamically loadable DLL. |
|
667 */ |
|
668 RLibrary iWallpaperDll; |
|
669 |
|
670 /* |
|
671 * Loads Wallpaper Utils DLL dynamically to memory. |
|
672 * Allows use of the DLL through this pointer, but only for |
|
673 * methods implemented within the wrapper. |
|
674 * Own. |
|
675 */ |
|
676 CPslnWallpaperUtilsLoader* iWallpaperSetter; |
|
677 |
|
678 /** |
|
679 * Listens to ECOM for screensaver plugin changes. |
|
680 * Own. |
|
681 */ |
|
682 CPslnEcomListener* iScreenSaverListener; |
|
683 |
|
684 /* |
|
685 * A handle to a dynamically loadable DLL. |
|
686 */ |
|
687 RLibrary iBrowserLaunchDll; |
|
688 |
|
689 /* |
|
690 * Loads Wallpaper Utils DLL dynamically to memory. |
|
691 * Allows use of the DLL through this pointer, but only for |
|
692 * methods implemented within the wrapper. |
|
693 * Own. |
|
694 */ |
|
695 CPslnBrowserLaunchLoader* iBrowserLauncher; |
|
696 |
|
697 /* |
|
698 * Internal state of the class. |
|
699 */ |
|
700 enum TPslnModelState |
|
701 { |
|
702 // initial state |
|
703 EPslnModelStateInitial = 0x00000000, |
|
704 // wallpaper dll has been loaded |
|
705 EPslnModelStateWallpaperDllLoaded = 0x00000001, |
|
706 // has the default enable CR key for transition effects been read |
|
707 EPslnModelStateTransitionEnableCRKeyRead = 0x00000002, |
|
708 // is skin being previewed |
|
709 EPslnModelStateSkinPreviewed = 0x00000004, |
|
710 // browser launch dll has been loaded |
|
711 EPslnModelStateBrowserLaunchDllLoaded = 0x00000008, |
|
712 // localized skin names have been loaded |
|
713 EPslnModelStateSkinNamesLoaded = 0x00000010 |
|
714 }; |
|
715 TBitFlags iInternalState; |
|
716 |
|
717 /** |
|
718 * Default mask for enable transition effects. |
|
719 */ |
|
720 TInt iEffectsDefaultEnableMask; |
|
721 }; |
|
722 |
|
723 #endif // C_PSLNMODEL_H |
|
724 |
|
725 // End of File |