|
1 /* |
|
2 * Copyright (c) 2007 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: Handles collection Open operation related functionality* |
|
15 */ |
|
16 |
|
17 |
|
18 |
|
19 #ifndef VCXMYVIDEOSOPENHANDLER_H |
|
20 #define VCXMYVIDEOSOPENHANDLER_H |
|
21 |
|
22 class CVcxMyVideosCollectionPlugin; |
|
23 class MMPXCollectionPluginObserver; |
|
24 class CVcxMyVideosMdsDb; |
|
25 |
|
26 /** |
|
27 */ |
|
28 NONSHARABLE_CLASS( CVcxMyVideosOpenHandler ) : public CBase |
|
29 { |
|
30 friend class CVcxMyVideosVideoCache; |
|
31 |
|
32 public: |
|
33 /** |
|
34 * Two-phased constructor |
|
35 */ |
|
36 static CVcxMyVideosOpenHandler* NewL( CVcxMyVideosCollectionPlugin& aCollection, |
|
37 CVcxMyVideosVideoCache& aCache, |
|
38 CVcxMyVideosMdsDb& aMds ); |
|
39 |
|
40 /** |
|
41 * Destructor |
|
42 */ |
|
43 virtual ~CVcxMyVideosOpenHandler(); |
|
44 |
|
45 public: |
|
46 |
|
47 /** |
|
48 * Handle collection Open operation. |
|
49 * |
|
50 * @param aPath Path to open. |
|
51 */ |
|
52 void OpenL( const CMPXCollectionPath& aPath ); |
|
53 |
|
54 /** |
|
55 * Leaving version of HandleCreateVideoListResp. |
|
56 * Handler function for list fetching events. This callback is called as a response |
|
57 * to iCache.CreateVideoListL(). |
|
58 * |
|
59 * @param aVideoList List of videos fetched from MDS. |
|
60 * @param aNewItemsStartIndex Start position for the new items added. |
|
61 * @param aComplete ETrue if list is complete and no more items are expected, |
|
62 * EFalse if there are more to come. |
|
63 */ |
|
64 void DoHandleCreateVideoListRespL( |
|
65 CMPXMedia* aVideoList, TInt aNewItemsStartIndex, TBool aComplete ); |
|
66 |
|
67 private: |
|
68 /** |
|
69 * 2nd-phase Constructor |
|
70 */ |
|
71 void ConstructL(); |
|
72 |
|
73 /** |
|
74 * Default Constructor |
|
75 */ |
|
76 CVcxMyVideosOpenHandler( CVcxMyVideosCollectionPlugin& aCollection, |
|
77 CVcxMyVideosVideoCache& aCache, |
|
78 CVcxMyVideosMdsDb& aMds ); |
|
79 |
|
80 private: // data |
|
81 |
|
82 /** |
|
83 * Collection plugin main class. Owner of this object. |
|
84 */ |
|
85 CVcxMyVideosCollectionPlugin& iCollection; |
|
86 |
|
87 /** |
|
88 * Videos cache, owned by iCollection. Reference is stored here |
|
89 * just to avoid one pointer access. |
|
90 */ |
|
91 CVcxMyVideosVideoCache& iCache; |
|
92 |
|
93 /** |
|
94 * Object for accessing MDS database, owned by iCollection. Reference is stored here |
|
95 * just to avoid one pointer access. |
|
96 */ |
|
97 CVcxMyVideosMdsDb& iMds; |
|
98 |
|
99 /** |
|
100 * The category ids being opened are stored here. These values are used |
|
101 * to filter list when items arrive from MDS. KVcxMvcCategoryIdAll category is not listed here. |
|
102 * This is in sync with iVideoListsBeingOpened. |
|
103 */ |
|
104 RArray<TInt> iCategoryIdsBeingOpened; |
|
105 |
|
106 /** |
|
107 * Video lists for categories being opened are stored here. |
|
108 * This is in sync with iCategoryIdsBeingOpened. |
|
109 */ |
|
110 RArray<CMPXMedia*> iVideoListsBeingOpened; |
|
111 }; |
|
112 |
|
113 #endif // VCXMYVIDEOSACTIVETASK_H |