|
1 /* |
|
2 * Copyright (c) 2008 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 the License "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: MPX My Videos collection plugins' MDS database class* |
|
15 */ |
|
16 |
|
17 |
|
18 |
|
19 #ifndef VCXMYVIDEOSMDSDB_H |
|
20 #define VCXMYVIDEOSMDSDB_H |
|
21 |
|
22 |
|
23 #include <mdesession.h> |
|
24 #include <mdequery.h> |
|
25 #include <harvesterclient.h> |
|
26 #include <mpxcollectionmessagedefs.h> |
|
27 #include <vcxmyvideosdefs.h> |
|
28 #include <e32property.h> |
|
29 #include "vcxmyvideosalbum.h" |
|
30 #include <f32file.h> |
|
31 |
|
32 class CVcxMyVideosMdsAlbums; |
|
33 class CMPXMedia; |
|
34 class CVcxMyVideosMdsCmdQueue; |
|
35 |
|
36 const TUid KHarvesterPSShutdown = { 0x200009F5 } ; |
|
37 const TInt KMdSShutdown = 0x00000002; // values 1 = shutdown, 0 = restart, normal state |
|
38 |
|
39 static _LIT_SECURITY_POLICY_PASS(KAllowAllPolicy); |
|
40 static _LIT_SECURITY_POLICY_C1(KPowerMgmtPolicy,ECapabilityPowerMgmt); |
|
41 |
|
42 /** |
|
43 * MPX My Videos collection MDS database observer class. |
|
44 * Part of ECOM Plugin. |
|
45 */ |
|
46 NONSHARABLE_CLASS(MVcxMyVideosMdsDbObserver) |
|
47 { |
|
48 public: |
|
49 |
|
50 /* |
|
51 |
|
52 Defined in mpxcollectionmessagedefs.h: |
|
53 |
|
54 enum TMPXChangeEventType |
|
55 { |
|
56 EMPXItemDeleted, // item/playlist deleted |
|
57 EMPXItemInserted, // item/playlist added |
|
58 EMPXItemModified // item/playlist/artist/album/genre/composer modified |
|
59 }; |
|
60 */ |
|
61 |
|
62 /** |
|
63 * Handler function for database events. |
|
64 * |
|
65 * @param aEvent Event type. |
|
66 * @param aId Array of IDs in database. |
|
67 * @param aEventsLeft How many events are still coming. |
|
68 */ |
|
69 virtual void HandleMyVideosDbEvent( TMPXChangeEventType aEvent, RArray<TUint32>& aId, TInt aEventsLeft ) = 0; |
|
70 |
|
71 /** |
|
72 * Handler function for video list fetching events. This callback is called as a response |
|
73 * to CreateVideoList( aSync = EFalse ). |
|
74 * |
|
75 * @param aVideoList List of videos fetched from MDS. |
|
76 * @param aNewItemsStartIndex Start position for the new items added. If -1, then no new |
|
77 * items were added. |
|
78 * @param aComplete ETrue if list is complete and no more items are expected, |
|
79 * EFalse if there are more to come. |
|
80 */ |
|
81 virtual void HandleCreateVideoListResp( CMPXMedia* aVideoList, |
|
82 TInt aNewItemsStartIndex, TBool aComplete ) = 0; |
|
83 |
|
84 /** |
|
85 * Handler function for media remove/insert events. This is called every time |
|
86 * media is removed or inserted (objects become present or non present). |
|
87 */ |
|
88 virtual void HandleObjectPresentNotification() = 0; |
|
89 }; |
|
90 |
|
91 |
|
92 /** |
|
93 * MPX My Videos collection MDS albums related functionality observer class. |
|
94 * Part of ECOM Plugin. |
|
95 */ |
|
96 NONSHARABLE_CLASS(MVcxMyVideosMdsAlbumsObserver) |
|
97 { |
|
98 public: |
|
99 |
|
100 /** |
|
101 * This callback is called as a response to GetAlbumsL. |
|
102 * |
|
103 * @param aAlbumList List of albums fetched from MDS. |
|
104 */ |
|
105 virtual void HandleGetAlbumsResp( CMPXMedia* aAlbumList ) = 0; |
|
106 |
|
107 /** |
|
108 * This callback is called as a response to GetAlbumContentIdsL. |
|
109 * |
|
110 * @param aAlbumId Album ID which was fetched. |
|
111 * @param aContentArray Array containing MDS object IDs. This array is the same which |
|
112 * was given in GetAlbumContentIdsL call. |
|
113 */ |
|
114 virtual void HandleGetAlbumContentIdsResp( TUint32 aAlbumId, |
|
115 RArray<TVcxMyVideosAlbumVideo>& aContentArray ) = 0; |
|
116 |
|
117 /** |
|
118 * Called as a response to GetAlbumContentVideosL. |
|
119 * |
|
120 * @param aAlbumId ID of the album containing the result videos. |
|
121 * @param aVideoList Media containing array of videos. |
|
122 * @param aError Error code in case of failure. |
|
123 * @param aFirstNewItemIndex Index of the first new item. |
|
124 * @param aNewItemCount How many new items in the query since the last results. |
|
125 * @param aComplete ETrue if query is complete, EFalse if there is more to come. |
|
126 */ |
|
127 virtual void HandleGetAlbumContentVideosResp( TUint32 aAlbumId, CMPXMedia& aVideoList, |
|
128 TInt aError, TInt aFirstNewItemIndex, TInt aNewItemCount, TBool aComplete ) = 0; |
|
129 |
|
130 /** |
|
131 * Called as a response to AddVideosToAlbumL. Results are written from aItemArray |
|
132 * to aCmd (KVcxMediaMyVideosInt32Value attribute). KErrNone if operation was successful, |
|
133 * KErrGeneral otherwise. |
|
134 * |
|
135 * @param aCmd Pointer to same object which was given in AddVideosToAlbumL function call. |
|
136 * @param aItemArray Array of relation items that were added to MDS. |
|
137 */ |
|
138 virtual void HandleAddVideosToAlbumResp( CMPXMedia* aCmd, |
|
139 RPointerArray<CMdEInstanceItem>& aItemArray ) = 0; |
|
140 |
|
141 /** |
|
142 * Called as a response to RemoveRelationsL. |
|
143 * |
|
144 * @param aRelationIds Relations which were tried to be removed. |
|
145 * @param aResults Result codes, in sync with aRelationIds. KErrNone if successful, |
|
146 * KErrGeneral if failed. |
|
147 */ |
|
148 virtual void HandleRemoveRelationsResp( RArray<TUint32>& aRelationIds, |
|
149 RArray<TUint32>& aResults ) = 0; |
|
150 |
|
151 /** |
|
152 * Called as a response to RemoveAlbumsL. |
|
153 * |
|
154 * @param aCmd Cmd which was given in RemoveAlbumsL call. |
|
155 * @param aResults Result IDs. |
|
156 */ |
|
157 virtual void HandleRemoveAlbumsResp( CMPXMedia* aCmd, |
|
158 RArray<TUint32>& aResultIds ) = 0; |
|
159 |
|
160 /** |
|
161 * Event handler function for relation delete events. |
|
162 * |
|
163 * @param aType Event type |
|
164 * @param aRelationArray Array containing relations. |
|
165 */ |
|
166 virtual void HandleRelationEvent( TObserverNotificationType aType, |
|
167 const RArray<TMdERelation>& aRelationArray ) = 0; |
|
168 |
|
169 #if 0 |
|
170 /** |
|
171 * Event handler function for relation add events. |
|
172 * |
|
173 * @param aType Event type |
|
174 * @param aRelationArray Array containing relations. |
|
175 */ |
|
176 virtual void HandleRelationIdEvent( TObserverNotificationType aType, |
|
177 const RArray<TUint32>& aRelationIdArray ) = 0; |
|
178 #endif |
|
179 |
|
180 }; |
|
181 |
|
182 /** |
|
183 * PSCW Listener Observer interface for signaling that MDS has Shutdown/restarted |
|
184 */ |
|
185 class MVcxMdsShutdownMonitorObserver |
|
186 { |
|
187 public: |
|
188 |
|
189 virtual void ShutdownNotification( TInt aShutdownState ) = 0; |
|
190 }; |
|
191 |
|
192 /** |
|
193 * Active object for observing P&S keys |
|
194 */ |
|
195 class CVcxMdsShutdownMonitor: public CActive |
|
196 { |
|
197 public: |
|
198 |
|
199 /** |
|
200 * Two-phased constructor. |
|
201 * |
|
202 * @return Instance of CVcxMdsShutdownMonitor. |
|
203 */ |
|
204 static CVcxMdsShutdownMonitor* NewL( MVcxMdsShutdownMonitorObserver& aObserver, |
|
205 const TUid& aKeyCategory, const TInt aPropertyKey, TBool aDefineKey); |
|
206 |
|
207 /** |
|
208 * Destructor |
|
209 */ |
|
210 virtual ~CVcxMdsShutdownMonitor(); |
|
211 |
|
212 protected: |
|
213 |
|
214 /** |
|
215 * Handles an active object's request completion event. |
|
216 */ |
|
217 void RunL(); |
|
218 |
|
219 /** |
|
220 * Implements cancellation of an outstanding request. |
|
221 */ |
|
222 void DoCancel(); |
|
223 |
|
224 private: |
|
225 |
|
226 /** |
|
227 * C++ default constructor |
|
228 * |
|
229 * @return Instance of CVcxMdsShutdownMonitor. |
|
230 */ |
|
231 CVcxMdsShutdownMonitor( MVcxMdsShutdownMonitorObserver& aObserver, |
|
232 const TUid& aKeyCategory, const TInt iPropertyKey, TBool aDefineKey ); |
|
233 |
|
234 /** |
|
235 * Symbian 2nd phase constructor can leave. |
|
236 */ |
|
237 void ConstructL(); |
|
238 |
|
239 private: |
|
240 |
|
241 // not own |
|
242 MVcxMdsShutdownMonitorObserver& iObserver; |
|
243 |
|
244 const TUid& iKeyCategory; |
|
245 RProperty iProperty; |
|
246 TInt iPropertyKey; |
|
247 |
|
248 TBool iDefineKey; |
|
249 }; |
|
250 |
|
251 /** |
|
252 * MPX My Videos collection ECOM plugin's MDS database class. |
|
253 */ |
|
254 NONSHARABLE_CLASS(CVcxMyVideosMdsDb) : |
|
255 public CBase, |
|
256 public MMdESessionObserver, |
|
257 public MMdEQueryObserver, |
|
258 public MMdEObjectObserver, |
|
259 public MMdEObjectPresentObserver, |
|
260 public MVcxMdsShutdownMonitorObserver |
|
261 { |
|
262 |
|
263 public: |
|
264 |
|
265 friend class CVcxMyVideosMdsAlbums; |
|
266 friend class CVcxMyVideosMdsCmdQueue; |
|
267 |
|
268 enum TRequestType |
|
269 { |
|
270 EAll, |
|
271 EGetVideoList, |
|
272 EGetAlbums, |
|
273 EGetAlbumContentIds, |
|
274 EGetAlbumContentVideos, |
|
275 EAddVideosToAlbum, |
|
276 ERemoveRelations, |
|
277 ERemoveAlbums |
|
278 }; |
|
279 |
|
280 class TEvent |
|
281 { |
|
282 public: |
|
283 |
|
284 TUint32 iMdsId; |
|
285 TInt iEventType; |
|
286 }; |
|
287 |
|
288 /** |
|
289 * Two-phased constructor. |
|
290 * @param aObserver The db change observer. |
|
291 */ |
|
292 static CVcxMyVideosMdsDb* NewL( MVcxMyVideosMdsDbObserver* aObserver, |
|
293 RFs& aFs, MVcxMyVideosMdsAlbumsObserver* aAlbumsObserver = NULL ); |
|
294 |
|
295 /** |
|
296 * Two-phased constructor. |
|
297 * @param aObserver The db change observer. |
|
298 */ |
|
299 static CVcxMyVideosMdsDb* NewLC( MVcxMyVideosMdsDbObserver* aObserver, |
|
300 RFs& aFs, MVcxMyVideosMdsAlbumsObserver* aAlbumsObserver = NULL ); |
|
301 |
|
302 |
|
303 /** |
|
304 * Destructor. |
|
305 */ |
|
306 virtual ~CVcxMyVideosMdsDb(); |
|
307 |
|
308 /** |
|
309 * Cancels possible ongoing asynchronous operations. |
|
310 * |
|
311 * @param aType What kind of requests are cancelled. |
|
312 */ |
|
313 void Cancel( TRequestType aType = EAll ); |
|
314 |
|
315 /** |
|
316 * Creates list of videos from MDS. This function utilizes CVcxMyVideosMdsQueue, ie |
|
317 * commands are put in queue if there are other commands pending. |
|
318 * |
|
319 * @param aSortingOrder Sorting order, see values from TSortingOrder. |
|
320 * @param aAscending Sort direction, if ETrue then ascending, else descending. |
|
321 * @param aFullDetails If ETrue, then all details will be filled to media objects, |
|
322 * if EFalse, then only subset. |
|
323 * @param aVideoList Reference to pointer variable. Container type CMPXMedia class, contains |
|
324 * CMPXMediaArray filled with CMPXMedia objects. If aVideoList |
|
325 * pointer variable is NULL, then new medialist is created. |
|
326 * If pointer variable already contains value, then the given medialist |
|
327 * should have empty media array. New items are appended to it. |
|
328 * Caller naturally owns the data. |
|
329 * |
|
330 */ |
|
331 void CreateVideoListL( TVcxMyVideosSortingOrder aSortingOrder, |
|
332 TBool aAscending, TBool aFullDetails, CMPXMedia*& aVideoList ); |
|
333 |
|
334 /** |
|
335 * Add new video. |
|
336 * |
|
337 * @param aVideo Reference to CMPXMedia object. |
|
338 * @param aMdsId New mds id is inserted to aMdsId |
|
339 */ |
|
340 void AddVideoL( CMPXMedia& aVideo, TUint32& aMdsId ); |
|
341 |
|
342 /** |
|
343 * Remove video. |
|
344 * |
|
345 * @param aMdsId ID of the item to be removed. |
|
346 * @return KErrNotFound if video was not found, KErrNone if found and deleted. |
|
347 * If failed, system-wide error code. |
|
348 */ |
|
349 TInt RemoveVideo( TUint32 aMdsId ); |
|
350 |
|
351 /** |
|
352 * Update video. |
|
353 * |
|
354 * @param aVideo Video to update in MDS database. |
|
355 */ |
|
356 void UpdateVideoL( CMPXMedia& aVideo ); |
|
357 |
|
358 /** |
|
359 * Get one video item from MDS and create a new media |
|
360 * object from it. |
|
361 * |
|
362 * @param aId Video identifier in MDS database. |
|
363 * @param aFullDetails If ETrue, then all details are fetched, othewise only subset. |
|
364 * @return Pointer to media object, ownership moves. NULL if |
|
365 * not found. |
|
366 */ |
|
367 CMPXMedia* CreateVideoL( TUint32 aId, TBool aFullDetails = ETrue ); |
|
368 |
|
369 /** |
|
370 * Called by iEventProcessor. |
|
371 */ |
|
372 static TInt ProcessEvents( TAny* aPtr ); |
|
373 |
|
374 protected: |
|
375 |
|
376 // from MMdESessionObserver |
|
377 |
|
378 /** |
|
379 * Called to notify the observer that opening the session has been |
|
380 * completed and, if the opening succeeded, the session is ready for use. |
|
381 * |
|
382 * @param aSession session |
|
383 * @param aError <code>KErrNone</code>, if opening the session succeeded |
|
384 * or one of the system-wide error codes, if opening the session failed |
|
385 */ |
|
386 void HandleSessionOpened(CMdESession& aSession, TInt aError); |
|
387 |
|
388 /** |
|
389 * Called to notify the observer about errors, which are not a direct |
|
390 * consequence of the operations initiated by the client but caused by some |
|
391 * external source (e.g., other clients). The error cannot be recovered and |
|
392 * all on-going operations initiated by the client have been aborted. |
|
393 * Any attempts to continue using the session will cause a panic. The |
|
394 * client should close the session immediately and try to open a new |
|
395 * session if it needs to continue using the metadata engine. |
|
396 * |
|
397 * @param aSession session |
|
398 * @param aError one of the system-wide error codes |
|
399 */ |
|
400 void HandleSessionError(CMdESession& aSession, TInt aError); |
|
401 |
|
402 |
|
403 // from MMdEQueryObserver |
|
404 |
|
405 /** |
|
406 * Called to notify the observer that new results have been received |
|
407 * in the query. |
|
408 * |
|
409 * @param aQuery Query instance that received new results. |
|
410 * @param aFirstNewItemIndex Index of the first new item that was added |
|
411 * to the result item array. |
|
412 * @param aNewItemCount Number of items added to the result item |
|
413 * array. |
|
414 */ |
|
415 void HandleQueryNewResults(CMdEQuery& aQuery, |
|
416 TInt aFirstNewItemIndex, |
|
417 TInt aNewItemCount); |
|
418 |
|
419 /** |
|
420 * Called to notify the observer that the query has been completed, |
|
421 * or that an error has occured. |
|
422 * |
|
423 * @param aQuery Query instance. |
|
424 * @param aError <code>KErrNone</code>, if the query was completed |
|
425 * successfully. Otherwise one of the system-wide error |
|
426 * codes. |
|
427 */ |
|
428 void HandleQueryCompleted(CMdEQuery& aQuery, TInt aError); |
|
429 |
|
430 |
|
431 // from MMdEObjectObserver |
|
432 |
|
433 void HandleObjectNotification( CMdESession& aSession, |
|
434 TObserverNotificationType aType, |
|
435 const RArray<TItemId>& aObjectIdArray); |
|
436 |
|
437 // from MMdEObjectPresentObserver |
|
438 void HandleObjectPresentNotification(CMdESession& aSession, |
|
439 TBool aPresent, const RArray<TItemId>& aObjectIdArray); |
|
440 |
|
441 // from MVcxMdsShutdownMonitorObserver |
|
442 void ShutdownNotification( TInt aShutdownState ); |
|
443 |
|
444 private: |
|
445 |
|
446 /** |
|
447 * Constructor. |
|
448 * @param aObserver The db change observer. |
|
449 * @param aFs Session to file server. |
|
450 */ |
|
451 CVcxMyVideosMdsDb( MVcxMyVideosMdsDbObserver* aObserver, |
|
452 RFs& aFs, MVcxMyVideosMdsAlbumsObserver* aAlbumsObserver = NULL ); |
|
453 |
|
454 void ConstructL(); |
|
455 |
|
456 /** |
|
457 * Gets object from MDS. |
|
458 * |
|
459 * @param aId The ID of the object to get. |
|
460 * @param aIsVideo Set to ETrue if the object to be fetched is video. If set to |
|
461 * EFalse, then the object is assumed to be album. |
|
462 * @return The object if found, NULL otherwise. |
|
463 */ |
|
464 CMdEObject* ObjectL( const TItemId aId, TBool aIsVideo = ETrue ); |
|
465 |
|
466 /** |
|
467 * Read the video details from the given object to the media class. |
|
468 * |
|
469 * @param aObject The object to read from. |
|
470 * @param aVideo The media object to write to. |
|
471 * @param aFullDetails If ETrue, then all parameters are copied, if |
|
472 * EFalse, then only subset which is (usually) needed when |
|
473 * showing videolist on UI. |
|
474 */ |
|
475 void Object2MediaL( |
|
476 CMdEObject& aObject, |
|
477 CMPXMedia& aVideo, |
|
478 TBool aFullDetails = EFalse ); |
|
479 |
|
480 /** |
|
481 * Fill the object from media. |
|
482 * |
|
483 * @param aMedia The media class to read from. |
|
484 * @param aObject The object to modify. |
|
485 */ |
|
486 void Media2ObjectL( CMPXMedia& aVideo, CMdEObject& aObject ); |
|
487 |
|
488 /* |
|
489 * Get the schema definitions needed. |
|
490 */ |
|
491 void GetSchemaDefinitionsL(); |
|
492 |
|
493 /** |
|
494 * Handles MDS object changes. |
|
495 * |
|
496 * @param aType Type of the event. |
|
497 * @param aObjectIdArray MDS IDs. |
|
498 */ |
|
499 void DoHandleObjectNotificationL( |
|
500 TObserverNotificationType aType, |
|
501 const RArray<TItemId>& aObjectIdArray ); |
|
502 |
|
503 /** |
|
504 * Leaving version of HandleQueryNewResults. |
|
505 * Called to notify the observer that new results have been received |
|
506 * in the query. |
|
507 * |
|
508 * @param aQuery Query instance that received new results. |
|
509 * @param aFirstNewItemIndex Index of the first new item that was added |
|
510 * to the result item array. |
|
511 * @param aNewItemCount Number of items added to the result item |
|
512 * array. |
|
513 */ |
|
514 void DoHandleQueryNewResultsL(CMdEQuery& aQuery, |
|
515 TInt aFirstNewItemIndex, TInt aNewItemCount); |
|
516 |
|
517 /** |
|
518 * Creates list of videos from MDS. |
|
519 * |
|
520 * @param aSortingOrder Sorting order, see values from TSortingOrder. |
|
521 * @param aAscending Sort direction, if ETrue then ascending, else descending. |
|
522 * @param aFullDetails If ETrue, then all details will be filled to media objects, |
|
523 * if EFalse, then only subset. |
|
524 * @param aVideoList Reference to pointer variable. Container type CMPXMedia class, contains |
|
525 * CMPXMediaArray filled with CMPXMedia objects. If aVideoList |
|
526 * pointer variable is NULL, then new medialist is created. |
|
527 * If pointer variable already contains value, then the given medialist |
|
528 * should have empty media array. New items are appended to it. |
|
529 * Caller naturally owns the data. |
|
530 * |
|
531 */ |
|
532 void DoCreateVideoListL( TVcxMyVideosSortingOrder aSortingOrder, |
|
533 TBool aAscending, TBool aFullDetails, CMPXMedia*& aVideoList ); |
|
534 |
|
535 /** |
|
536 * Handles query complete events asynchronously. |
|
537 */ |
|
538 static TInt AsyncHandleQueryCompleted( TAny* aPtr ); |
|
539 |
|
540 /** |
|
541 * Sets Creation Date and Modified properties to object. Uses current date |
|
542 * value. |
|
543 * |
|
544 * @param aObject Object to modify. |
|
545 */ |
|
546 void SetCreationAndModifiedDatesL( CMdEObject& aObject ); |
|
547 |
|
548 /** |
|
549 * Sets creation date to aObject from aVideo. |
|
550 * |
|
551 * @param aVideo Creation date is copied from here. |
|
552 * @param aObject Creation date is written here. |
|
553 */ |
|
554 void SetCreationDateToObjectL( const CMPXMedia& aVideo, CMdEObject& aObject ); |
|
555 |
|
556 /** |
|
557 * Opens MDS session. |
|
558 */ |
|
559 void OpenMdsSessionL(); |
|
560 |
|
561 /** |
|
562 * @return MDS session. |
|
563 */ |
|
564 CMdESession& MdsSessionL(); |
|
565 |
|
566 /** |
|
567 * Called by ProcessEvents. |
|
568 */ |
|
569 TInt DoProcessEvents(); |
|
570 |
|
571 public: |
|
572 |
|
573 /** |
|
574 * Set to ETrue when starting to fetch media list from MDS. |
|
575 * Set to EFalse when fetching is finished. |
|
576 */ |
|
577 TBool iVideoListFetchingIsOngoing; |
|
578 |
|
579 /** |
|
580 * Album related functionality. |
|
581 */ |
|
582 CVcxMyVideosMdsAlbums* iAlbums; |
|
583 |
|
584 private: // data |
|
585 |
|
586 /** |
|
587 * Command queue. Own. |
|
588 */ |
|
589 CVcxMyVideosMdsCmdQueue* iCmdQueue; |
|
590 |
|
591 /** |
|
592 * The MDS session object. Own. |
|
593 */ |
|
594 CMdESession* iMdsSession; |
|
595 |
|
596 /** |
|
597 * The sessions error state. |
|
598 */ |
|
599 TInt iMdsSessionError; |
|
600 |
|
601 /** |
|
602 * Asynchronous video list fetching query is stored here. |
|
603 */ |
|
604 CMdEObjectQuery* iVideoQuery; |
|
605 |
|
606 /** |
|
607 * Pointer to video list which is being fetched from the MDS. |
|
608 * Not own. |
|
609 */ |
|
610 CMPXMedia* iVideoList; |
|
611 |
|
612 /** |
|
613 * Requested detail level is stored here during the asynchronous video list fetching. |
|
614 */ |
|
615 TBool iFullDetails; |
|
616 |
|
617 /** |
|
618 * The default namespace definition. Not own. |
|
619 */ |
|
620 CMdENamespaceDef* iNamespaceDef; |
|
621 |
|
622 /** |
|
623 * The Video object definition. Not own. |
|
624 */ |
|
625 CMdEObjectDef* iVideoObjectDef; |
|
626 |
|
627 /** |
|
628 * 2. |
|
629 * The Title property definition. Not own. |
|
630 */ |
|
631 CMdEPropertyDef* iTitlePropertyDef; |
|
632 |
|
633 /** |
|
634 * 3. |
|
635 * The Description property definition. Not own. |
|
636 */ |
|
637 CMdEPropertyDef* iDescriptionPropertyDef; |
|
638 |
|
639 // 4. URI ( = file path ), set with SetUriL method |
|
640 |
|
641 /** |
|
642 * 5. |
|
643 * The Size property definition. Not own. |
|
644 */ |
|
645 CMdEPropertyDef* iSizePropertyDef; |
|
646 |
|
647 /** |
|
648 * 6. |
|
649 * The Creation Date property definition. Not own. |
|
650 */ |
|
651 CMdEPropertyDef* iCreationDatePropertyDef; |
|
652 |
|
653 /** |
|
654 * Time offset from the universal time. Not own. |
|
655 */ |
|
656 CMdEPropertyDef* iTimeOffsetPropertyDef; |
|
657 |
|
658 /** |
|
659 * 7. |
|
660 * The Flags property definition. Not own. |
|
661 */ |
|
662 CMdEPropertyDef* iFlagsPropertyDef; |
|
663 |
|
664 /** |
|
665 * 8. |
|
666 * The Copyright property definition. Not own. |
|
667 */ |
|
668 CMdEPropertyDef* iCopyrightPropertyDef; |
|
669 |
|
670 /** |
|
671 * 9. |
|
672 * The Item Type property definition. Not own. |
|
673 */ |
|
674 CMdEPropertyDef* iItemTypePropertyDef; |
|
675 |
|
676 /** |
|
677 * 10. |
|
678 * The Modified Date property definition. Not own. |
|
679 */ |
|
680 CMdEPropertyDef* iLastModifiedDatePropertyDef; |
|
681 |
|
682 /** |
|
683 * 11. |
|
684 * The Age Profile property definition. Not own. |
|
685 */ |
|
686 CMdEPropertyDef* iAgeProfilePropertyDef; |
|
687 |
|
688 /** |
|
689 * 12. |
|
690 * The Audio Language property definition. Not own. |
|
691 */ |
|
692 CMdEPropertyDef* iAudioLanguagePropertyDef; |
|
693 |
|
694 /** |
|
695 * 13. |
|
696 * The Author property definition. Not own. |
|
697 */ |
|
698 CMdEPropertyDef* iAuthorPropertyDef; |
|
699 |
|
700 /** |
|
701 * 14. |
|
702 * The Origin property definition. Not own. |
|
703 */ |
|
704 CMdEPropertyDef* iOriginPropertyDef; |
|
705 |
|
706 /** |
|
707 * 15. |
|
708 * The Duration property definition. Not own. |
|
709 */ |
|
710 CMdEPropertyDef* iDurationPropertyDef; |
|
711 |
|
712 /** |
|
713 * 16. |
|
714 * The Last Play Point property definition. Not own. |
|
715 */ |
|
716 CMdEPropertyDef* iLastPlayPositionPropertyDef; |
|
717 |
|
718 /** |
|
719 * 18. |
|
720 * Rating property definition, not own. |
|
721 */ |
|
722 CMdEPropertyDef* iRatingPropertyDef; |
|
723 |
|
724 /** |
|
725 * 19. |
|
726 * Bitrate property definition, not own. |
|
727 */ |
|
728 CMdEPropertyDef* iBitratePropertyDef; |
|
729 |
|
730 /** |
|
731 * DRM protection flag, not own. |
|
732 */ |
|
733 CMdEPropertyDef* iDrmPropertyDef; |
|
734 |
|
735 /** |
|
736 * Not own. |
|
737 */ |
|
738 CMdEPropertyDef* iAudioFourCcPropertyDef; |
|
739 |
|
740 /** |
|
741 * 22. |
|
742 * Resolution Y-axis unit. Not own. |
|
743 */ |
|
744 CMdEPropertyDef* iWidthPropertyDef; |
|
745 |
|
746 /** |
|
747 * 23. |
|
748 * Resolution X-axis unit. Not own. |
|
749 */ |
|
750 CMdEPropertyDef* iHeightPropertyDef; |
|
751 |
|
752 /** |
|
753 * 24. |
|
754 * The artist property definition. Not own. |
|
755 */ |
|
756 CMdEPropertyDef* iArtistPropertyDef; |
|
757 |
|
758 /** |
|
759 * Active scheduled waiter Own.. |
|
760 */ |
|
761 CActiveSchedulerWait* iActiveSchedulerWait; |
|
762 |
|
763 /** |
|
764 * The file server session. |
|
765 */ |
|
766 RFs& iFs; |
|
767 |
|
768 /** |
|
769 * The observer for db changes. Not own. |
|
770 */ |
|
771 MVcxMyVideosMdsDbObserver* iMdsDbObserver; |
|
772 |
|
773 /** |
|
774 * The observer for albums related database events. Not own. |
|
775 */ |
|
776 MVcxMyVideosMdsAlbumsObserver* iAlbumsObserver; |
|
777 |
|
778 /** |
|
779 * Used to handle complete events asynchronously. |
|
780 * This avoids problems like deleting query objects in the |
|
781 * handler or starting new query from the handler. |
|
782 */ |
|
783 CAsyncCallBack* iAsyncHandleQueryCompleteCaller; |
|
784 |
|
785 /** |
|
786 * Monitors Mds server shutdown states. |
|
787 */ |
|
788 CVcxMdsShutdownMonitor* iMdsShutdownMonitor; |
|
789 |
|
790 /** |
|
791 * Used for handling events on background. |
|
792 */ |
|
793 CIdle* iEventProcessor; |
|
794 |
|
795 /** |
|
796 * Incoming events are stored here and "slowly" fed to observer. |
|
797 */ |
|
798 RArray<TEvent> iEvents; |
|
799 |
|
800 public: // Friend classes |
|
801 |
|
802 friend class CCollectionPluginTest; |
|
803 |
|
804 }; |
|
805 |
|
806 #endif // VCXMYVIDEOSMDSDB_H |
|
807 |