|
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: Albums related collection functionality (except db operations). |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include "vcxmyvideosalbums.h" |
|
21 #include "vcxmyvideoscollectionplugin.h" |
|
22 |
|
23 const TInt KMPXIdNotFound = 998; |
|
24 |
|
25 // ============================ MEMBER FUNCTIONS ============================= |
|
26 |
|
27 // --------------------------------------------------------------------------- |
|
28 // Constructor |
|
29 // --------------------------------------------------------------------------- |
|
30 // |
|
31 CVcxMyVideosAlbums::CVcxMyVideosAlbums( CVcxMyVideosCollectionPlugin& aCollection ) |
|
32 : iCollection( aCollection ) |
|
33 { |
|
34 } |
|
35 |
|
36 // --------------------------------------------------------------------------- |
|
37 // 2nd-phase constructor |
|
38 // --------------------------------------------------------------------------- |
|
39 // |
|
40 void CVcxMyVideosAlbums::ConstructL() |
|
41 { |
|
42 iAlbums.Reset(); |
|
43 iChangedAlbums.Reset(); |
|
44 } |
|
45 |
|
46 // --------------------------------------------------------------------------- |
|
47 // Two-Phase Constructor |
|
48 // --------------------------------------------------------------------------- |
|
49 // |
|
50 CVcxMyVideosAlbums* CVcxMyVideosAlbums::NewL( CVcxMyVideosCollectionPlugin& aCollection ) |
|
51 { |
|
52 CVcxMyVideosAlbums* self = new(ELeave) CVcxMyVideosAlbums( aCollection ); |
|
53 CleanupStack::PushL( self ); |
|
54 self->ConstructL(); |
|
55 CleanupStack::Pop( self ); |
|
56 return self; |
|
57 } |
|
58 |
|
59 // --------------------------------------------------------------------------- |
|
60 // Destructor |
|
61 // --------------------------------------------------------------------------- |
|
62 // |
|
63 CVcxMyVideosAlbums::~CVcxMyVideosAlbums() |
|
64 { |
|
65 delete iAlbumList; |
|
66 TInt count = iAlbums.Count(); |
|
67 for ( TInt i = 0; i < count; i++ ) |
|
68 { |
|
69 delete iAlbums[i]; |
|
70 } |
|
71 iAlbums.Close(); |
|
72 iMdsOpTargetIds.Close(); |
|
73 iMdsOpResults.Close(); |
|
74 iMdsOpResultsUint32.Close(); |
|
75 iRemoveFromAlbumVideos.Close(); |
|
76 iChangedAlbums.Close(); |
|
77 } |
|
78 |
|
79 // ---------------------------------------------------------------------------- |
|
80 // CVcxMyVideosAlbums::CreateAlbumListL |
|
81 // ---------------------------------------------------------------------------- |
|
82 // |
|
83 void CVcxMyVideosAlbums::CreateAlbumListL() |
|
84 { |
|
85 } |
|
86 |
|
87 // ---------------------------------------------------------------------------- |
|
88 // CVcxMyVideosAlbums::CreateAlbumsL |
|
89 // Called when iAlbumList is ready, fills iAlbums. |
|
90 // Pointers to CVcxMyVideosVideoCache::iVideoList are not filled in yet. |
|
91 // ---------------------------------------------------------------------------- |
|
92 // |
|
93 void CVcxMyVideosAlbums::CreateAlbumsL() |
|
94 { |
|
95 } |
|
96 |
|
97 // ---------------------------------------------------------------------------- |
|
98 // CVcxMyVideosAlbums::GetAlbumContentIdsL |
|
99 // Fetches MDS IDs for all albums. |
|
100 // ---------------------------------------------------------------------------- |
|
101 // |
|
102 void CVcxMyVideosAlbums::GetAlbumContentIdsL() |
|
103 { |
|
104 } |
|
105 |
|
106 // ---------------------------------------------------------------------------- |
|
107 // CVcxMyVideosAlbums::Album |
|
108 // ---------------------------------------------------------------------------- |
|
109 // |
|
110 CVcxMyVideosAlbum* CVcxMyVideosAlbums::Album( TUint32 /*aMdsId*/, TInt* /*aPos*/ ) |
|
111 { |
|
112 return NULL; |
|
113 } |
|
114 |
|
115 // ---------------------------------------------------------------------------- |
|
116 // CVcxMyVideosAlbums::AddVideosToAlbumL |
|
117 // Command from MPX client. |
|
118 // ---------------------------------------------------------------------------- |
|
119 // |
|
120 void CVcxMyVideosAlbums::AddVideosToAlbumL( CMPXMedia* /*aCmd*/ ) |
|
121 { |
|
122 } |
|
123 |
|
124 // ---------------------------------------------------------------------------- |
|
125 // CVcxMyVideosAlbums::RemoveVideosFromAlbumL |
|
126 // Converts video mpx ids to relation ids and calls RemoveRelationsL. |
|
127 // ---------------------------------------------------------------------------- |
|
128 // |
|
129 void CVcxMyVideosAlbums::RemoveVideosFromAlbumL( CMPXMedia* /*aCmd*/ ) |
|
130 { |
|
131 } |
|
132 |
|
133 // ---------------------------------------------------------------------------- |
|
134 // CVcxMyVideosAlbums::AddAlbumL |
|
135 // ---------------------------------------------------------------------------- |
|
136 // |
|
137 void CVcxMyVideosAlbums::AddAlbumL( CMPXMedia& /*aCmd*/ ) |
|
138 { |
|
139 } |
|
140 |
|
141 // ---------------------------------------------------------------------------- |
|
142 // CVcxMyVideosAlbums::RemoveAlbumsFromMdsOnlyL |
|
143 // ---------------------------------------------------------------------------- |
|
144 // |
|
145 void CVcxMyVideosAlbums::RemoveAlbumsFromMdsOnlyL( CMPXMedia* /*aCmd*/ ) |
|
146 { |
|
147 } |
|
148 |
|
149 // ---------------------------------------------------------------------------- |
|
150 // CVcxMyVideosAlbums::RemoveAlbumsL |
|
151 // From MDS delete event. |
|
152 // ---------------------------------------------------------------------------- |
|
153 // |
|
154 void CVcxMyVideosAlbums::RemoveAlbumsL( RArray<TUint32>& /*aAlbumIds*/ ) |
|
155 { |
|
156 } |
|
157 |
|
158 // ---------------------------------------------------------------------------- |
|
159 // CVcxMyVideosAlbums::RemoveAlbumL |
|
160 // ---------------------------------------------------------------------------- |
|
161 // |
|
162 TBool CVcxMyVideosAlbums::RemoveAlbumL( TUint32 aMdsId, TBool /*aCompress*/ ) |
|
163 { |
|
164 return ( aMdsId == KMPXIdNotFound ) ? EFalse : ETrue; |
|
165 } |
|
166 |
|
167 // ---------------------------------------------------------------------------- |
|
168 // CVcxMyVideosAlbums::CalculateAttributesL |
|
169 // ---------------------------------------------------------------------------- |
|
170 // |
|
171 TBool CVcxMyVideosAlbums::CalculateAttributesL() |
|
172 { |
|
173 return EFalse; |
|
174 } |
|
175 |
|
176 // ---------------------------------------------------------------------------- |
|
177 // CVcxMyVideosAlbums::AddAlbumsFromMdsL |
|
178 // From MDS insert event, no need to fetch content since the album was just |
|
179 // created. |
|
180 // ---------------------------------------------------------------------------- |
|
181 // |
|
182 void CVcxMyVideosAlbums::AddAlbumsFromMdsL( RArray<TUint32>& /*aAlbumIds*/ ) |
|
183 { |
|
184 } |
|
185 |
|
186 // ---------------------------------------------------------------------------- |
|
187 // CVcxMyVideosAlbums::HandleGetAlbumsRespL |
|
188 // ---------------------------------------------------------------------------- |
|
189 // |
|
190 void CVcxMyVideosAlbums::HandleGetAlbumsRespL( CMPXMedia* /*aAlbumList*/ ) |
|
191 { |
|
192 } |
|
193 |
|
194 // ---------------------------------------------------------------------------- |
|
195 // CVcxMyVideosAlbums::HandleGetAlbumContentIdsRespL |
|
196 // ---------------------------------------------------------------------------- |
|
197 // |
|
198 void CVcxMyVideosAlbums::HandleGetAlbumContentIdsRespL( TUint32 /*aAlbumId*/, |
|
199 RArray<TVcxMyVideosAlbumVideo>& /*aAlbumContentIds*/ ) |
|
200 { |
|
201 } |
|
202 |
|
203 // ---------------------------------------------------------------------------- |
|
204 // CVcxMyVideosAlbums::HandleGetAlbumsResp |
|
205 // ---------------------------------------------------------------------------- |
|
206 // |
|
207 void CVcxMyVideosAlbums::HandleGetAlbumsResp( CMPXMedia* /*aAlbumList*/ ) |
|
208 { |
|
209 } |
|
210 |
|
211 // ---------------------------------------------------------------------------- |
|
212 // CVcxMyVideosAlbums::HandleGetAlbumContentIdsResp |
|
213 // ---------------------------------------------------------------------------- |
|
214 // |
|
215 void CVcxMyVideosAlbums::HandleGetAlbumContentIdsResp( TUint32 /*aAlbumId*/, |
|
216 RArray<TVcxMyVideosAlbumVideo>& /*aAlbumContent*/ ) |
|
217 { |
|
218 } |
|
219 |
|
220 // ---------------------------------------------------------------------------- |
|
221 // CVcxMyVideosAlbums::HandleAddVideosToAlbumResp |
|
222 // ---------------------------------------------------------------------------- |
|
223 // |
|
224 void CVcxMyVideosAlbums::HandleAddVideosToAlbumResp( CMPXMedia* /*aCmd*/, |
|
225 RPointerArray<CMdEInstanceItem>& /*aItemArray*/ ) |
|
226 { |
|
227 } |
|
228 |
|
229 // ---------------------------------------------------------------------------- |
|
230 // CVcxMyVideosAlbums::DoHandleAddVideosToAlbumResp |
|
231 // ---------------------------------------------------------------------------- |
|
232 // |
|
233 void CVcxMyVideosAlbums::DoHandleAddVideosToAlbumRespL( CMPXMedia* /*aCmd*/, |
|
234 RPointerArray<CMdEInstanceItem>& /*aItemArray*/ ) |
|
235 { |
|
236 } |
|
237 |
|
238 // ---------------------------------------------------------------------------- |
|
239 // CVcxMyVideosAlbums::HandleRemoveRelationsResp |
|
240 // ---------------------------------------------------------------------------- |
|
241 // |
|
242 void CVcxMyVideosAlbums::HandleRemoveRelationsResp( RArray<TUint32>& /*aRelationIds*/, |
|
243 RArray<TUint32>& /*aResults*/ ) |
|
244 { |
|
245 } |
|
246 |
|
247 // ---------------------------------------------------------------------------- |
|
248 // CVcxMyVideosAlbums::HandleRemoveAlbumsResp |
|
249 // ---------------------------------------------------------------------------- |
|
250 // |
|
251 void CVcxMyVideosAlbums::HandleRemoveAlbumsResp( CMPXMedia* /*aCmd*/, |
|
252 RArray<TUint32>& /*aResultIds*/ ) |
|
253 { |
|
254 } |
|
255 |
|
256 // ---------------------------------------------------------------------------- |
|
257 // CVcxMyVideosAlbums::HandleRelationEvent |
|
258 // Only relation removed events are received here. |
|
259 // ---------------------------------------------------------------------------- |
|
260 // |
|
261 void CVcxMyVideosAlbums::HandleRelationEvent( TObserverNotificationType /*aType*/, |
|
262 const RArray<TMdERelation>& /*aRelationArray*/ ) |
|
263 { |
|
264 } |
|
265 |
|
266 //HandleRelationIdEvent |
|
267 |
|
268 // ---------------------------------------------------------------------------- |
|
269 // CVcxMyVideosAlbums::UpdateAlbumL |
|
270 // Updates album attributes from aAlbum, if album is not found from memory, |
|
271 // nothing is done (no fetching from MDS). |
|
272 // This func is also called (by MDS modified event) when items are added or |
|
273 // removed from album. |
|
274 // ---------------------------------------------------------------------------- |
|
275 // |
|
276 TBool CVcxMyVideosAlbums::UpdateAlbumL( const CMPXMedia& /*aAlbum*/ ) |
|
277 { |
|
278 return ETrue; |
|
279 } |
|
280 |
|
281 // ---------------------------------------------------------------------------- |
|
282 // CVcxMyVideosAlbums::NewVideoFlagChangedL |
|
283 // ---------------------------------------------------------------------------- |
|
284 // |
|
285 void CVcxMyVideosAlbums::NewVideoFlagChangedL( TUint32 /*aMdsId*/ ) |
|
286 { |
|
287 } |
|
288 |
|
289 // ---------------------------------------------------------------------------- |
|
290 // CVcxMyVideosAlbums::VideoTitleChangedL |
|
291 // ---------------------------------------------------------------------------- |
|
292 // |
|
293 void CVcxMyVideosAlbums::VideoTitleChangedL( TUint32 /*aMdsId*/ ) |
|
294 { |
|
295 } |
|
296 |
|
297 // ---------------------------------------------------------------------------- |
|
298 // CVcxMyVideosAlbums::VideoAddedOrRemovedFromCacheL |
|
299 // ---------------------------------------------------------------------------- |
|
300 // |
|
301 void CVcxMyVideosAlbums::VideoAddedOrRemovedFromCacheL( CMPXMedia& /*aVideo*/ ) |
|
302 { |
|
303 } |
|
304 // ---------------------------------------------------------------------------- |
|
305 // CVcxMyVideosAlbums::UpdateChangedAlbumsL |
|
306 // ---------------------------------------------------------------------------- |
|
307 // |
|
308 void CVcxMyVideosAlbums::UpdateChangedAlbumsL() |
|
309 { |
|
310 } |
|
311 // END OF FILE |