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