162 * Defautlt C++ Constructor. |
162 * Defautlt C++ Constructor. |
163 * |
163 * |
164 * @param aCmnPtrs Common pointers. |
164 * @param aCmnPtrs Common pointers. |
165 * @since S60 v5.0 |
165 * @since S60 v5.0 |
166 */ |
166 */ |
167 CHnRepositoryWidgetTypeObserver( THnMdCommonPointers* aCmnPtrs ); |
167 CHnRepositoryWidgetTypeObserver( THnMdCommonPointers* aCmnPtrs ); |
168 |
168 |
169 private: |
169 private: |
170 |
170 |
171 /** |
171 /** |
172 * Second stage constructor. |
172 * Second stage constructor. |
173 * |
173 * |
174 * @since S60 v5.0 |
174 * @since S60 v5.0 |
175 */ |
175 */ |
176 void ConstructL( const TUid aRepositoryUid ); |
176 void ConstructL( const TUid aRepositoryUid ); |
177 |
177 |
178 private: |
178 private: |
179 |
179 |
180 /** |
180 /** |
181 * Array holding ids of widgets being switched. |
181 * Array holding ids of widgets being switched. |
182 * It is used to eliminate double refresh for such suites. |
182 * It is used to eliminate double refresh for such suites. |
183 */ |
183 */ |
184 RArray<TUint32> iWidgetSwitches; |
184 RArray<TUint32> iWidgetSwitches; |
185 |
185 |
186 }; |
186 }; |
187 |
187 |
188 |
188 |
189 |
189 |
190 NONSHARABLE_CLASS( CHnRepositoryShowFolderObserver ): public CHnRepositoryObserver, |
190 NONSHARABLE_CLASS( CHnRepositoryShowFolderObserver ): public CHnRepositoryObserver, |
191 public MLiwNotifyCallback |
191 public MLiwNotifyCallback, |
192 { |
192 public MHnSuiteObserver |
|
193 { |
193 public: |
194 public: |
194 |
195 |
195 /** |
196 /** |
196 * Default C++ Destructor. |
197 * Default C++ Destructor. |
197 * |
198 * |
198 * @since S60 v5.0 |
199 * @since S60 v5.0 |
199 */ |
200 */ |
200 virtual ~CHnRepositoryShowFolderObserver(); |
201 virtual ~CHnRepositoryShowFolderObserver(); |
201 |
202 |
202 /** |
203 /** |
203 * Factory function. |
204 * Factory function. |
204 * |
205 * |
205 * @param aCmnPtrs Common pointers. |
206 * @param aCmnPtrs Common pointers. |
206 * @return Repository Observer. |
207 * @return Repository Observer. |
207 * @since S60 v5.0 |
208 * @since S60 v5.0 |
208 */ |
209 */ |
209 static CHnRepositoryShowFolderObserver* NewL( |
210 static CHnRepositoryShowFolderObserver* NewL( |
210 THnMdCommonPointers* aCmnPtrs, const TUid aRepositoryUid, |
211 THnMdCommonPointers* aCmnPtrs, const TUid aRepositoryUid, |
211 const TUint32 aId); |
212 const TUint32 aId); |
212 |
213 |
213 /** |
214 /** |
214 * Factory function. |
215 * Factory function. |
215 * |
216 * |
216 * @param aCmnPtrs Common pointers. |
217 * @param aCmnPtrs Common pointers. |
217 * @return Repository Observer. |
218 * @return Repository Observer. |
218 * @since S60 v5.0 |
219 * @since S60 v5.0 |
219 */ |
220 */ |
220 static CHnRepositoryShowFolderObserver* NewLC( |
221 static CHnRepositoryShowFolderObserver* NewLC( |
221 THnMdCommonPointers* aCmnPtrs, const TUid aRepositoryUid, |
222 THnMdCommonPointers* aCmnPtrs, const TUid aRepositoryUid, |
222 const TUint32 aId); |
223 const TUint32 aId); |
223 |
224 |
224 /** |
225 /** |
225 * Change handler method. |
226 * Change handler method. |
226 * It is invoked whenever notifier detects a change in the CR. |
227 * It is invoked whenever notifier detects a change in the CR. |
227 * |
228 * |
247 TInt aCmdId, |
248 TInt aCmdId, |
248 TInt aEventId, |
249 TInt aEventId, |
249 CLiwGenericParamList& aEventParamList, |
250 CLiwGenericParamList& aEventParamList, |
250 const CLiwGenericParamList& aInParamList); |
251 const CLiwGenericParamList& aInParamList); |
251 |
252 |
|
253 /** |
|
254 * From MHnSuiteObserver |
|
255 */ |
|
256 virtual void HandleSuiteEventL ( THnCustomSuiteEvent aCustomSuiteEvent, |
|
257 CHnSuiteModel *aModel ); |
|
258 |
|
259 |
|
260 |
252 private: |
261 private: |
253 |
262 |
254 /** |
263 /** |
255 * Defautlt C++ Constructor. |
264 * Defautlt C++ Constructor. |
256 * |
265 * |
257 * @param aCmnPtrs Common pointers. |
266 * @param aCmnPtrs Common pointers. |
258 * @since S60 v5.0 |
267 * @since S60 v5.0 |
259 */ |
268 */ |
260 CHnRepositoryShowFolderObserver( THnMdCommonPointers* aCmnPtrs, TUint32 iId ); |
269 CHnRepositoryShowFolderObserver( THnMdCommonPointers* aCmnPtrs, TUint32 iId ); |
261 |
270 |
262 /** |
271 /** |
263 * Extracts the folder name from the CR key. |
272 * Extracts the folder name from the CR key. |
264 * |
273 * |
265 * @param aNewValue The CR key. |
274 * @param aNewValue The CR key. |
266 * @since S60 v5.0 |
275 * @since S60 v5.0 |
267 */ |
276 */ |
268 void ExtractCRKeyShowFolderName( const TDesC& aNewValue ); |
277 void ExtractCRKeyShowFolderName( const TDesC& aNewValue ); |
269 |
278 |
270 /** |
279 /** |
271 * Request get list for parent folder of an application. |
280 * Request get list for parent folder of an application. |
272 * |
281 * |
273 * @param aFolderId A parent folder id |
282 * @param aFolderId A parent folder id |
274 * @since S60 v5.0 |
283 * @since S60 v5.0 |
275 */ |
284 */ |
276 void GetShowFolderL( TUint32 aFolderId ); |
285 void GetShowFolderL( TUint32 aFolderId ); |
277 |
286 |
278 /** |
287 /** |
279 * Request get list for a folder with given application group name |
288 * Request get list for a folder with given application group name |
280 * contained in iCRKeyFolderName. |
289 * contained in iCRKeyFolderName. |
297 /** |
306 /** |
298 * Second stage constructor. |
307 * Second stage constructor. |
299 * |
308 * |
300 * @since S60 v5.0 |
309 * @since S60 v5.0 |
301 */ |
310 */ |
302 void ConstructL( const TUid aRepositoryUid ); |
311 void ConstructL( const TUid aRepositoryUid ); |
303 |
312 |
304 private: |
313 private: |
305 |
314 |
306 /** |
315 /** |
307 * Folder application group name. |
316 * Folder application group name. |
308 */ |
317 */ |
309 TBuf8< KApaMaxAppGroupName > iCRKeyFolderName; |
318 TBuf8<KApaMaxAppGroupName> iCRKeyFolderName; |
310 |
319 |
311 /** |
320 /** |
312 * Mcs id for an application item in a folder with a given app group name. |
321 * Mcs id for an application item in a folder with a given app group name. |
313 */ |
322 */ |
314 TBuf8<KUidStringLength> iCRKeyFolderItemUid; |
323 TBuf8<KUidStringLength> iCRKeyFolderItemUid; |
315 |
324 |
316 /** |
325 /** |
317 * Own. |
326 * Own. |
318 * Intance of the service handler. |
327 * Intance of the service handler. |
319 */ |
328 */ |
320 CHnServiceHandler* iServiceHandler; |
329 CHnServiceHandler* iServiceHandler; |
321 |
330 |
322 /** |
331 /** |
323 * Flag describing the type of notification. |
332 * Flag describing the type of notification. |
324 */ |
333 */ |
325 TInt iNotifyType; |
334 TInt iNotifyType; |
326 }; |
335 }; |
327 |
|
328 /** |
|
329 * Open item Repository Observer. |
|
330 * |
|
331 * It is used to inform hierarchy navigator of changes in the suites repository. |
|
332 * |
|
333 * @lib hnmetadatamodel |
|
334 * @since S60 5.0 |
|
335 * @ingroup group_hnmetadatamodel |
|
336 */ |
|
337 NONSHARABLE_CLASS( CHnRepositoryOpenItemObserver ): |
|
338 public CHnRepositoryObserver, |
|
339 public MLiwNotifyCallback |
|
340 { |
|
341 public: |
|
342 |
|
343 /** |
|
344 * Default C++ Destructor. |
|
345 * |
|
346 * @since S60 v5.0 |
|
347 */ |
|
348 virtual ~CHnRepositoryOpenItemObserver(); |
|
349 |
|
350 /** |
|
351 * Factory function. |
|
352 * |
|
353 * @param aCmnPtrs Common pointers. |
|
354 * @return Repository Observer. |
|
355 * @since S60 v5.0 |
|
356 */ |
|
357 static CHnRepositoryOpenItemObserver* NewL( |
|
358 THnMdCommonPointers* aCmnPtrs, const TUid aRepositoryUid, |
|
359 const TUint32 aId ); |
|
360 |
|
361 /** |
|
362 * Factory function. |
|
363 * |
|
364 * @param aCmnPtrs Common pointers. |
|
365 * @return Repository Observer. |
|
366 * @since S60 v5.0 |
|
367 */ |
|
368 static CHnRepositoryOpenItemObserver* NewLC( |
|
369 THnMdCommonPointers* aCmnPtrs, const TUid aRepositoryUid, |
|
370 const TUint32 aId ); |
|
371 |
|
372 /** |
|
373 * Change handler method. |
|
374 * It is invoked whenever notifier detects a change in the CR. |
|
375 * |
|
376 * @param aId Id of the entry in CR. |
|
377 * @since S60 v5.0 |
|
378 */ |
|
379 void HandleNotifyString( TUint32 aId, const TDesC16& aNewValue ); |
|
380 |
|
381 /** |
|
382 * Change handler method. |
|
383 * It is invoked whenever notifier detects a change in the CR. |
|
384 * |
|
385 * @param aId Id of the entry in CR. |
|
386 * @since S60 v5.0 |
|
387 */ |
|
388 void HandleNotifyStringL( TUint32 aId, const TDesC16& aNewValue ); |
|
389 |
|
390 /** |
|
391 * Handles notifications caused by an asynchronous Execute*CmdL call |
|
392 * or an event. |
|
393 * |
|
394 * @param aCmdId The service command associated to the event. |
|
395 * @param aEventId Occured event, see LiwCommon.hrh. |
|
396 * @param aEventParamList Event parameters, if any, as defined per |
|
397 * each event. |
|
398 * @param aInParamList Input parameters, if any, given in the |
|
399 * related HandleCommmandL. |
|
400 * @return Error code for the callback. |
|
401 */ |
|
402 virtual TInt HandleNotifyL( |
|
403 TInt aCmdId, |
|
404 TInt aEventId, |
|
405 CLiwGenericParamList& aEventParamList, |
|
406 const CLiwGenericParamList& aInParamList); |
|
407 |
|
408 private: |
|
409 |
|
410 /** |
|
411 * Defautlt C++ Constructor. |
|
412 * |
|
413 * @param aCmnPtrs Common pointers. |
|
414 * @since S60 v5.0 |
|
415 */ |
|
416 CHnRepositoryOpenItemObserver( THnMdCommonPointers* aCmnPtrs, TUint32 iId ); |
|
417 |
|
418 /** |
|
419 * Second stage constructor. |
|
420 * |
|
421 * @since S60 v5.0 |
|
422 */ |
|
423 void ConstructL( const TUid aRepositoryUid ); |
|
424 |
|
425 private: |
|
426 |
|
427 /** |
|
428 * Request get list for an folder. |
|
429 * |
|
430 * @param aFolderId A parent folder id |
|
431 * @since S60 v5.0 |
|
432 */ |
|
433 void ShowFolderL( const TDesC16& aFolderId ); |
|
434 |
|
435 private: |
|
436 |
|
437 /** |
|
438 * Own. |
|
439 * Intance of the service handler. |
|
440 */ |
|
441 CHnServiceHandler* iServiceHandler; |
|
442 |
|
443 }; |
|
444 |
336 |
445 #endif /*HNREPOSITORYOBSERVER_H_*/ |
337 #endif /*HNREPOSITORYOBSERVER_H_*/ |
446 |
338 |
447 //End of file |
339 //End of file |
448 |
340 |