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