diff -r 8f0df5c82986 -r 67eb01668b0e videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/inc/vcxmyvideoscollectionutil.h --- a/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/inc/vcxmyvideoscollectionutil.h Tue May 25 12:44:54 2010 +0300 +++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/inc/vcxmyvideoscollectionutil.h Wed Jun 09 09:44:23 2010 +0300 @@ -22,11 +22,14 @@ #define VCXMYVIDEOSCOLLECTIONUTIL_H // INCLUDES +#include // FORWARD DECLARATIONS class CMPXMedia; class RFs; +#include "myvideostesttrap.h" + // CONSTANTS // CLASS DECLARATION @@ -83,6 +86,15 @@ RArray& aMdsIds ); /** + * Appends all items from aFromList to aToList. New items will point to + * same shared memory. + * + * @param aToList List in which items are appended to. + * @param aFromList List in which items are copied from. + */ + static void AppendToListL( CMPXMedia& aToList, CMPXMedia& aFromList ); + + /** * Converts drive letter to drive number. * * @param aDrive drive letter @@ -118,6 +130,14 @@ static TUint32 FlagsL( CMPXMedia& aVideo ); /** + * Gets KMPXMediaGeneralDate (creation date) of aVideo. + * + * @param aVideo Media object to fetch parameter from. + * @return Creation date, works with TTime. + */ + static TInt64 CreationDateL( CMPXMedia& aVideo ); + + /** * Gets KVcxMediaMyVideosDownloadId attribute of aVideo. * * @param aVideo Media object to fetch parameter from. @@ -139,7 +159,7 @@ * @param aVideo Media object to fetch parameter from. * @return ID. */ - static TMPXItemId IdL( CMPXMedia& aVideo ); + static TMPXItemId IdL( const CMPXMedia& aVideo ); /** * Gets KVcxMediaMyVideosDuration attribute of aVideo. @@ -155,7 +175,7 @@ * @return KMPXMediaGeneralTitle value. If attribute is not supported, * then KNullDesC is returned. */ - static const TDesC& Title( CMPXMedia& aVideo ); + static const TDesC& Title( const CMPXMedia& aVideo ); /** * Gets KVcxMediaMyVideosRating attribute of the video. @@ -207,6 +227,44 @@ */ static TInt Origin( TInt aCategoryId ); + /** + * Gets KMPXMediaArrayContents attribute from aMedia. Leaves + * with KErrArgument is attribute is not supported. + * + * @param aMedia Media where from the attribute is fetched. + * @return Pointer to media array. + */ + static CMPXMediaArray* MediaArrayL( const CMPXMedia& aMedia ); + + /** + * Gets KVcxMediaMyVideosInt32Value attribute from aMedia. Leaves + * with KErrArgument if attribute is not supported. + * + * @param aMedia Media where from the attribute is fetched. + * @return Value of KVcxMediaMyVideosInt32Value attribute. + */ + static TInt32 Int32ValueL( CMPXMedia& aMedia ); + + /** + * Gets KVcxMediaMyVideosUint32Value attribute from aMedia. Leaves + * with KErrArgument if attribute is not supported. + * + * @param aMedia Media where from the attribute is fetched. + * @return Value of KVcxMediaMyVideosUint32Value attribute. + */ + static TUint32 Uint32ValueL( CMPXMedia& aMedia ); + + /** + * Gets KMPXMediaGeneralId attributes from aMediaArray and + * puts them to aIdArray. aIdArray is reset before adding. + * + * @param aMediaArray Media array containing media items which + * have KMPXMediaGeneralId attribute set. + * @param aIdArray Array where to the IDs are written to. + */ + static void GetIdsFromMediaArrayL( CMPXMediaArray& aMediaArray, + RArray& aIdArray ); + #ifdef _DEBUG /** * Prints process names which have file handle open to aFileName