9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: |
14 * Description: |
15 * |
15 * |
16 */ |
16 */ |
17 |
|
18 |
17 |
19 |
18 |
20 |
19 |
21 #ifndef VCXMYVIDEOSCOLLECTIONUTIL_H |
20 #ifndef VCXMYVIDEOSCOLLECTIONUTIL_H |
22 #define VCXMYVIDEOSCOLLECTIONUTIL_H |
21 #define VCXMYVIDEOSCOLLECTIONUTIL_H |
23 |
22 |
24 // INCLUDES |
23 // INCLUDES |
|
24 #include <vcxmyvideosdefs.h> |
25 |
25 |
26 // FORWARD DECLARATIONS |
26 // FORWARD DECLARATIONS |
27 class CMPXMedia; |
27 class CMPXMedia; |
28 class RFs; |
28 class RFs; |
29 |
29 |
81 RArray<CMPXMedia*>& aFromArray, |
81 RArray<CMPXMedia*>& aFromArray, |
82 CMPXMedia& aToList, |
82 CMPXMedia& aToList, |
83 RArray<TUint32>& aMdsIds ); |
83 RArray<TUint32>& aMdsIds ); |
84 |
84 |
85 /** |
85 /** |
|
86 * Appends all items from aFromList to aToList. New items will point to |
|
87 * same shared memory. |
|
88 * |
|
89 * @param aToList List in which items are appended to. |
|
90 * @param aFromList List in which items are copied from. |
|
91 */ |
|
92 static void AppendToListL( CMPXMedia& aToList, CMPXMedia& aFromList ); |
|
93 |
|
94 /** |
86 * Converts drive letter to drive number. |
95 * Converts drive letter to drive number. |
87 * |
96 * |
88 * @param aDrive drive letter |
97 * @param aDrive drive letter |
89 * @return drive number |
98 * @return drive number |
90 */ |
99 */ |
116 * @return Flags, see values from TVcxMyVideosVideoFlags in vcxmyvideosdefs.h |
125 * @return Flags, see values from TVcxMyVideosVideoFlags in vcxmyvideosdefs.h |
117 */ |
126 */ |
118 static TUint32 FlagsL( CMPXMedia& aVideo ); |
127 static TUint32 FlagsL( CMPXMedia& aVideo ); |
119 |
128 |
120 /** |
129 /** |
|
130 * Gets KMPXMediaGeneralDate (creation date) of aVideo. |
|
131 * |
|
132 * @param aVideo Media object to fetch parameter from. |
|
133 * @return Creation date, works with TTime. |
|
134 */ |
|
135 static TInt64 CreationDateL( CMPXMedia& aVideo ); |
|
136 |
|
137 /** |
121 * Gets KVcxMediaMyVideosDownloadId attribute of aVideo. |
138 * Gets KVcxMediaMyVideosDownloadId attribute of aVideo. |
122 * |
139 * |
123 * @param aVideo Media object to fetch parameter from. |
140 * @param aVideo Media object to fetch parameter from. |
124 * @return Download ID in Download Manager. |
141 * @return Download ID in Download Manager. |
125 */ |
142 */ |
137 * Gets KMPXMediaGeneralId attribute of aVideo. |
154 * Gets KMPXMediaGeneralId attribute of aVideo. |
138 * |
155 * |
139 * @param aVideo Media object to fetch parameter from. |
156 * @param aVideo Media object to fetch parameter from. |
140 * @return ID. |
157 * @return ID. |
141 */ |
158 */ |
142 static TMPXItemId IdL( CMPXMedia& aVideo ); |
159 static TMPXItemId IdL( const CMPXMedia& aVideo ); |
143 |
160 |
144 /** |
161 /** |
145 * Gets KVcxMediaMyVideosDuration attribute of aVideo. |
162 * Gets KVcxMediaMyVideosDuration attribute of aVideo. |
146 * |
163 * |
147 * @param aVideo Media object to fetch parameter from. |
164 * @param aVideo Media object to fetch parameter from. |
153 * Gets KMPXMediaGeneralTitle attribute of the video. |
170 * Gets KMPXMediaGeneralTitle attribute of the video. |
154 * |
171 * |
155 * @return KMPXMediaGeneralTitle value. If attribute is not supported, |
172 * @return KMPXMediaGeneralTitle value. If attribute is not supported, |
156 * then KNullDesC is returned. |
173 * then KNullDesC is returned. |
157 */ |
174 */ |
158 static const TDesC& Title( CMPXMedia& aVideo ); |
175 static const TDesC& Title( const CMPXMedia& aVideo ); |
159 |
176 |
160 /** |
177 /** |
161 * Gets KVcxMediaMyVideosRating attribute of the video. |
178 * Gets KVcxMediaMyVideosRating attribute of the video. |
162 * |
179 * |
163 * @param aVideo Media object to fetch parameter from. |
180 * @param aVideo Media object to fetch parameter from. |
205 * @return Returns Origin or KErrNotFound if not found. KVcxMvcCategoryIdAll |
222 * @return Returns Origin or KErrNotFound if not found. KVcxMvcCategoryIdAll |
206 * returns also KErrNotFound. |
223 * returns also KErrNotFound. |
207 */ |
224 */ |
208 static TInt Origin( TInt aCategoryId ); |
225 static TInt Origin( TInt aCategoryId ); |
209 |
226 |
|
227 /** |
|
228 * Gets KMPXMediaArrayContents attribute from aMedia. Leaves |
|
229 * with KErrArgument is attribute is not supported. |
|
230 * |
|
231 * @param aMedia Media where from the attribute is fetched. |
|
232 * @return Pointer to media array. |
|
233 */ |
|
234 static CMPXMediaArray* MediaArrayL( const CMPXMedia& aMedia ); |
|
235 |
|
236 /** |
|
237 * Gets KVcxMediaMyVideosInt32Value attribute from aMedia. Leaves |
|
238 * with KErrArgument if attribute is not supported. |
|
239 * |
|
240 * @param aMedia Media where from the attribute is fetched. |
|
241 * @return Value of KVcxMediaMyVideosInt32Value attribute. |
|
242 */ |
|
243 static TInt32 Int32ValueL( CMPXMedia& aMedia ); |
|
244 |
|
245 /** |
|
246 * Gets KVcxMediaMyVideosUint32Value attribute from aMedia. Leaves |
|
247 * with KErrArgument if attribute is not supported. |
|
248 * |
|
249 * @param aMedia Media where from the attribute is fetched. |
|
250 * @return Value of KVcxMediaMyVideosUint32Value attribute. |
|
251 */ |
|
252 static TUint32 Uint32ValueL( CMPXMedia& aMedia ); |
|
253 |
|
254 /** |
|
255 * Gets KMPXMediaGeneralId attributes from aMediaArray and |
|
256 * puts them to aIdArray. aIdArray is reset before adding. |
|
257 * |
|
258 * @param aMediaArray Media array containing media items which |
|
259 * have KMPXMediaGeneralId attribute set. |
|
260 * @param aIdArray Array where to the IDs are written to. |
|
261 */ |
|
262 static void GetIdsFromMediaArrayL( CMPXMediaArray& aMediaArray, |
|
263 RArray<TUint32>& aIdArray ); |
|
264 |
210 #ifdef _DEBUG |
265 #ifdef _DEBUG |
211 /** |
266 /** |
212 * Prints process names which have file handle open to aFileName |
267 * Prints process names which have file handle open to aFileName |
213 * |
268 * |
214 * @param aFileName File to check for open file handles. |
269 * @param aFileName File to check for open file handles. |