44 * CWmWidgetData is a representation of a widget in CWmListBox. it |
43 * CWmWidgetData is a representation of a widget in CWmListBox. it |
45 * stores all data required for drawing the item in a list box, and |
44 * stores all data required for drawing the item in a list box, and |
46 * handling the list item. |
45 * handling the list item. |
47 */ |
46 */ |
48 NONSHARABLE_CLASS( CWmWidgetData ) |
47 NONSHARABLE_CLASS( CWmWidgetData ) |
49 : public CActive |
48 : public CBase |
50 , public MConverterObserver |
49 , public MConverterObserver |
51 { |
50 { |
52 |
51 |
53 public: // types |
52 public: // types |
54 |
53 |
86 RWidgetRegistryClientSession* aRegistryClientSession ); |
85 RWidgetRegistryClientSession* aRegistryClientSession ); |
87 |
86 |
88 /** Destructor. */ |
87 /** Destructor. */ |
89 ~CWmWidgetData(); |
88 ~CWmWidgetData(); |
90 |
89 |
91 protected: // implementation of CActive |
|
92 /** |
|
93 * Implements cancellation of an outstanding request. |
|
94 * |
|
95 * @see CActive::DoCancel |
|
96 */ |
|
97 void DoCancel(); |
|
98 |
|
99 /** |
|
100 * Handles an active object's request completion event. |
|
101 * |
|
102 * @see CActive::RunL |
|
103 */ |
|
104 void RunL(); |
|
105 |
|
106 /** |
|
107 * RunError |
|
108 * |
|
109 * @see CActive::RunError |
|
110 */ |
|
111 TInt RunError(TInt aError); |
|
112 |
|
113 private: // private construction |
90 private: // private construction |
114 /** Constructor for performing 1st stage construction */ |
91 /** Constructor for performing 1st stage construction */ |
115 CWmWidgetData( const TSize& aLogoSize, |
92 CWmWidgetData( const TSize& aLogoSize, |
116 CWmResourceLoader& aWmResourceLoader ); |
93 CWmResourceLoader& aWmResourceLoader ); |
117 |
94 |
127 void InitL( |
104 void InitL( |
128 CHsContentInfo* aHsContentInfo, |
105 CHsContentInfo* aHsContentInfo, |
129 RWidgetRegistryClientSession* aRegistryClientSession ); |
106 RWidgetRegistryClientSession* aRegistryClientSession ); |
130 |
107 |
131 public: // external handles |
108 public: // external handles |
132 |
|
133 /** |
|
134 * Init uninstallation of widget. |
|
135 */ |
|
136 void UnInstallL(); |
|
137 |
109 |
138 /** current uninstall animation bitmap */ |
110 /** current uninstall animation bitmap */ |
139 const CFbsBitmap* AnimationBitmap( const TSize& aSize ); |
111 const CFbsBitmap* AnimationBitmap( const TSize& aSize ); |
140 |
112 |
141 /** current uninstall animation mask */ |
113 /** current uninstall animation mask */ |
237 inline TBool IsValid(); |
209 inline TBool IsValid(); |
238 |
210 |
239 /** sets the widget data validity */ |
211 /** sets the widget data validity */ |
240 inline void SetValid( TBool aValid ); |
212 inline void SetValid( TBool aValid ); |
241 |
213 |
|
214 /** start animation for uninstallation*/ |
|
215 void VisualizeUninstallL(); |
|
216 |
242 protected: // from MConverterObserver |
217 protected: // from MConverterObserver |
243 |
218 |
244 /** image conversin completed */ |
219 /** image conversin completed */ |
245 void NotifyCompletion( TInt aError ); |
220 void NotifyCompletion( TInt aError ); |
246 |
221 |
247 private: // new functions |
222 private: // new functions |
248 |
223 |
249 /** uninstall animation related*/ |
224 /** uninstall animation related*/ |
250 void VisualizeUninstall(); |
|
251 void PrepairAnimL(); |
225 void PrepairAnimL(); |
252 void DestroyAnimData(); |
226 void DestroyAnimData(); |
253 static TInt Tick( TAny* aPtr ); |
227 static TInt Tick( TAny* aPtr ); |
254 static TInt CloseSwiSession( TAny* aPtr ); |
|
255 |
228 |
256 /** fetches publisher uid from widget registry*/ |
229 /** fetches publisher uid from widget registry*/ |
257 void FetchPublisherUidL( |
230 void FetchPublisherUidL( |
258 RWidgetRegistryClientSession* aRegistryClientSession ); |
231 RWidgetRegistryClientSession* aRegistryClientSession ); |
259 |
232 |
267 private: // data members |
240 private: // data members |
268 |
241 |
269 /* reference to resource loader */ |
242 /* reference to resource loader */ |
270 CWmResourceLoader& iWmResourceLoader; |
243 CWmResourceLoader& iWmResourceLoader; |
271 |
244 |
272 /* instance of the CIdle class for async iconStr handling*/ |
|
273 CIdle* iIdle; |
|
274 |
|
275 /* the image converter utility */ |
245 /* the image converter utility */ |
276 CWmImageConverter* iImageConverter; |
246 CWmImageConverter* iImageConverter; |
277 |
247 |
278 /* observes this widget representation (NOT OWNED) */ |
248 /* observes this widget representation (NOT OWNED) */ |
279 MWmWidgetDataObserver* iObserver; |
249 MWmWidgetDataObserver* iObserver; |
314 /** uninstallation switch */ |
284 /** uninstallation switch */ |
315 TBool iAsyncUninstalling; |
285 TBool iAsyncUninstalling; |
316 |
286 |
317 /** logo changed switch */ |
287 /** logo changed switch */ |
318 TBool iFireLogoChanged; |
288 TBool iFireLogoChanged; |
319 |
|
320 /** |
|
321 * silent install launcher. |
|
322 */ |
|
323 SwiUI::RSWInstSilentLauncher iInstaller; |
|
324 |
289 |
325 /** |
290 /** |
326 * ActiveSchedulerWait used to wait while logo image |
291 * ActiveSchedulerWait used to wait while logo image |
327 * is being prepaired. |
292 * is being prepaired. |
328 */ |
293 */ |
342 /** returns number of items in the pointer array */ |
307 /** returns number of items in the pointer array */ |
343 inline TInt MdcaCount() const; |
308 inline TInt MdcaCount() const; |
344 |
309 |
345 /** returns the pointed widget name */ |
310 /** returns the pointed widget name */ |
346 inline TPtrC16 MdcaPoint(TInt aIndex) const; |
311 inline TPtrC16 MdcaPoint(TInt aIndex) const; |
347 |
|
348 }; |
312 }; |
349 |
313 |
350 #include "wmwidgetdata.inl" |
314 #include "wmwidgetdata.inl" |
351 #endif // WMWIDGETDATA_H |
315 #endif // WMWIDGETDATA_H |