|
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: This file declares all helper classes |
|
15 * for ScreenSaverAnimPlugin |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef C_SCREENSAVERANIMPLUGINHELPER_H |
|
22 #define C_SCREENSAVERANIMPLUGINHELPER_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include <MMGFetchVerifier.h> |
|
27 #include <cenrepnotifyhandler.h> |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class CDRMHelper; |
|
31 class CCoeEnv; |
|
32 class CScreenSaverAnimPlugin; |
|
33 class CRepository; |
|
34 |
|
35 // CLASS DECLARATION |
|
36 |
|
37 /** |
|
38 * Implementation for File Validity Check. |
|
39 * @since 3.1 |
|
40 * @internal |
|
41 */ |
|
42 class CScreenSaverAnimPluginVerifier : public CBase, public MMGFetchVerifier |
|
43 { |
|
44 public: // Constructors and destructor |
|
45 |
|
46 /** |
|
47 * Two-phased constructor. |
|
48 */ |
|
49 static CScreenSaverAnimPluginVerifier* NewL( |
|
50 CScreenSaverAnimPlugin* aFileVerify ); |
|
51 |
|
52 /** |
|
53 * Destructor. |
|
54 */ |
|
55 ~CScreenSaverAnimPluginVerifier(); |
|
56 |
|
57 public: // Functions from base classes |
|
58 |
|
59 /** |
|
60 * From MFLDFileObserver. |
|
61 */ |
|
62 TBool VerifySelectionL( const MDesCArray* aSelectedFiles ); |
|
63 |
|
64 private: |
|
65 |
|
66 /** |
|
67 * C++ default constructor. |
|
68 */ |
|
69 CScreenSaverAnimPluginVerifier( CScreenSaverAnimPlugin* aFileVerify ); |
|
70 |
|
71 /** |
|
72 * By default Symbian 2nd phase constructor is private. |
|
73 */ |
|
74 void ConstructL(); |
|
75 void ShowErrorNoteL( TInt aResourceId ) const; |
|
76 |
|
77 private: // Data |
|
78 // Own: DRM helper |
|
79 CDRMHelper* iDRMHelper; |
|
80 |
|
81 // Environment pointer |
|
82 CCoeEnv* iCoeEnv; |
|
83 |
|
84 CScreenSaverAnimPlugin* iFileVerify; |
|
85 |
|
86 }; |
|
87 |
|
88 |
|
89 // CLASS DECLARATION |
|
90 |
|
91 /** |
|
92 * Helper Class to watch Central Repository Changes. |
|
93 * @since 3.1 |
|
94 * @internal |
|
95 */ |
|
96 class CScreensaverRepositoryWatcher : public CBase, public MCenRepNotifyHandlerCallback |
|
97 { |
|
98 public: |
|
99 static CScreensaverRepositoryWatcher* NewL( |
|
100 const TUid aUid, |
|
101 const TUint32 aKey, |
|
102 CCenRepNotifyHandler::TCenRepKeyType aKeyType, |
|
103 TCallBack aCallBack, |
|
104 CRepository* aRepository ); |
|
105 |
|
106 static CScreensaverRepositoryWatcher* NewL( |
|
107 const TUid aUid, |
|
108 TCallBack aCallBack, |
|
109 CRepository* aRepository ); |
|
110 |
|
111 ~CScreensaverRepositoryWatcher(); |
|
112 |
|
113 TUint32 ChangedKey(); |
|
114 |
|
115 public: // from MCenRepNotifyHandlerCallback |
|
116 void HandleNotifyInt ( TUint32 aKey, TInt aNewValue ); |
|
117 void HandleNotifyString ( TUint32 aKey, const TDesC16& aNewValue ); |
|
118 void HandleNotifyGeneric( TUint32 aKey ); |
|
119 void HandleNotifyError ( TUint32 aKey, TInt aError, CCenRepNotifyHandler* aHandler ); |
|
120 |
|
121 private: |
|
122 CScreensaverRepositoryWatcher( |
|
123 const TUid aUid, |
|
124 const TUint32 aKey, |
|
125 TCallBack aCallBack, |
|
126 CRepository* aRepository ); |
|
127 |
|
128 void ConstructL( CCenRepNotifyHandler::TCenRepKeyType aKeyType ); |
|
129 |
|
130 void ConstructL(); |
|
131 |
|
132 private: |
|
133 TUid iUid; |
|
134 TUint32 iKey; |
|
135 TUint32 iChangedKey; |
|
136 TCallBack iCallBack; |
|
137 CRepository* iRepository; |
|
138 CCenRepNotifyHandler* iNotifyHandler; |
|
139 |
|
140 }; |
|
141 |
|
142 #endif // C_SCREENSAVERANIMPLUGINHELPER_H |
|
143 |
|
144 // End of File |