equal
deleted
inserted
replaced
59 */ |
59 */ |
60 |
60 |
61 /** |
61 /** |
62 * Handler function for database events. |
62 * Handler function for database events. |
63 * |
63 * |
64 * @param aEvent Event type. |
64 * @param aEvent Event type. |
65 * @param aId Array of IDs in database. |
65 * @param aId Array of IDs in database. |
|
66 * @param aEventsLeft How many events are still coming. |
66 */ |
67 */ |
67 virtual void HandleMyVideosDbEvent( TMPXChangeEventType aEvent, RArray<TUint32>& aId ) = 0; |
68 virtual void HandleMyVideosDbEvent( TMPXChangeEventType aEvent, RArray<TUint32>& aId, TInt aEventsLeft ) = 0; |
68 |
69 |
69 /** |
70 /** |
70 * Handler function for video list fetching events. This callback is called as a response |
71 * Handler function for video list fetching events. This callback is called as a response |
71 * to CreateVideoList( aSync = EFalse ). |
72 * to CreateVideoList( aSync = EFalse ). |
72 * |
73 * |
273 EAddVideosToAlbum, |
274 EAddVideosToAlbum, |
274 ERemoveRelations, |
275 ERemoveRelations, |
275 ERemoveAlbums |
276 ERemoveAlbums |
276 }; |
277 }; |
277 |
278 |
|
279 class TEvent |
|
280 { |
|
281 public: |
|
282 |
|
283 TUint32 iMdsId; |
|
284 TInt iEventType; |
|
285 }; |
|
286 |
278 /** |
287 /** |
279 * Two-phased constructor. |
288 * Two-phased constructor. |
280 * @param aObserver The db change observer. |
289 * @param aObserver The db change observer. |
281 */ |
290 */ |
282 static CVcxMyVideosMdsDb* NewL( MVcxMyVideosMdsDbObserver* aObserver, |
291 static CVcxMyVideosMdsDb* NewL( MVcxMyVideosMdsDbObserver* aObserver, |
354 * @return Pointer to media object, ownership moves. NULL if |
363 * @return Pointer to media object, ownership moves. NULL if |
355 * not found. |
364 * not found. |
356 */ |
365 */ |
357 CMPXMedia* CreateVideoL( TUint32 aId, TBool aFullDetails = ETrue ); |
366 CMPXMedia* CreateVideoL( TUint32 aId, TBool aFullDetails = ETrue ); |
358 |
367 |
|
368 /** |
|
369 * Called by iEventProcessor. |
|
370 */ |
|
371 static TInt ProcessEvents( TAny* aPtr ); |
|
372 |
359 protected: |
373 protected: |
360 |
374 |
361 // from MMdESessionObserver |
375 // from MMdESessionObserver |
362 |
376 |
363 /** |
377 /** |
546 /** |
560 /** |
547 * @return MDS session. |
561 * @return MDS session. |
548 */ |
562 */ |
549 CMdESession& MdsSessionL(); |
563 CMdESession& MdsSessionL(); |
550 |
564 |
|
565 /** |
|
566 * Called by ProcessEvents. |
|
567 */ |
|
568 TInt DoProcessEvents(); |
|
569 |
551 public: |
570 public: |
552 |
571 |
553 /** |
572 /** |
554 * Set to ETrue when starting to fetch media list from MDS. |
573 * Set to ETrue when starting to fetch media list from MDS. |
555 * Set to EFalse when fetching is finished. |
574 * Set to EFalse when fetching is finished. |
765 /** |
784 /** |
766 * Monitors Mds server shutdown states. |
785 * Monitors Mds server shutdown states. |
767 */ |
786 */ |
768 CVcxMdsShutdownMonitor* iMdsShutdownMonitor; |
787 CVcxMdsShutdownMonitor* iMdsShutdownMonitor; |
769 |
788 |
|
789 /** |
|
790 * Used for handling events on background. |
|
791 */ |
|
792 CIdle* iEventProcessor; |
|
793 |
|
794 /** |
|
795 * Incoming events are stored here and "slowly" fed to observer. |
|
796 */ |
|
797 RArray<TEvent> iEvents; |
770 }; |
798 }; |
771 |
799 |
772 #endif // VCXMYVIDEOSMDSDB_H |
800 #endif // VCXMYVIDEOSMDSDB_H |
773 |
801 |