# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1270063569 -10800 # Node ID 780c925249c1d391336957b8cdc564e24da684f1 # Parent d240f0a772803d6c49817ec075a1f2009c9b46be Revision: 201011 Kit: 201013 diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/collectionhelper/group/mpxcollectionhelper.mmp --- a/mmappcomponents/collectionhelper/group/mpxcollectionhelper.mmp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/collectionhelper/group/mpxcollectionhelper.mmp Wed Mar 31 22:26:09 2010 +0300 @@ -29,6 +29,8 @@ MACRO RD_MPX_TNM_INTEGRATION #define RD_MPX_TNM_INTEGRATION +MACRO ABSTRACTAUDIOALBUM_INCLUDED +#define ABSTRACTAUDIOALBUM_INCLUDED //MACRO RD_MPX_COLLECTION_CACHE SOURCEPATH ../src SOURCE mpxcollectionhelperfactory.cpp diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/collectionhelper/src/mpxcollectioncachedhelper.cpp --- a/mmappcomponents/collectionhelper/src/mpxcollectioncachedhelper.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/collectionhelper/src/mpxcollectioncachedhelper.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -12,7 +12,7 @@ * Contributors: * * Description: Extended collection helper with an internal caching array -* Version : %version: da1mmcf#27.1.12 % +* Version : %version: da1mmcf#27.1.12.1.1 % * */ @@ -157,9 +157,24 @@ { Commit(); } +#ifdef ABSTRACTAUDIOALBUM_INCLUDED + TBool extract = ETrue; + if( aMedia->IsSupported( KMPXMediaMTPSampleDataFlag ) ) + { + + extract = aMedia->ValueTObjectL( KMPXMediaMTPSampleDataFlag ); + MPX_DEBUG2("CMPXCollectionCachedHelper::AddL KMPXMediaMTPSampleDataFlag is set. extract=%d", extract ); + } + if( extract ) + { + // Extract album art from the file + iMetadataExtractor->ExtractAlbumArtL( aMedia ); + } +#else // Extract album art from the file iMetadataExtractor->ExtractAlbumArtL( aMedia ); +#endif CMPXMedia* copy = CMPXMedia::NewL( *aMedia ); CleanupStack::PushL( copy ); @@ -332,7 +347,20 @@ void CMPXCollectionCachedHelper::SetL( CMPXMedia*& aMedia ) { MPX_DEBUG1("CMPXCollectionCachedHelper::::SetL <--"); - + +#ifdef ABSTRACTAUDIOALBUM_INCLUDED + if( aMedia->IsSupported( KMPXMediaMTPSampleDataFlag ) ) + { + TBool flag = aMedia->ValueTObjectL( KMPXMediaMTPSampleDataFlag ); + MPX_DEBUG2("CMPXCollectionCachedHelper::SetL KMPXMediaMTPSampleDataFlag is set. flag=%d", flag ); + if( flag ) + { + iMetadataExtractor->ExtractAlbumArtL( aMedia ); + } + return; + } +#endif + const TDesC& newUri = aMedia->ValueText( KMPXMediaGeneralUri ); TInt count( iCache->Count() ); @@ -719,7 +747,11 @@ MPX_DEBUG1("CMPXCollectionCachedHelper::GetL <--"); +#ifdef ABSTRACTAUDIOALBUM_INCLUDED + if (aItemCat != EMPXSong && aItemCat != EMPXPlaylist && aItemCat != EMPXAbstractAlbum) +#else if (aItemCat != EMPXSong && aItemCat != EMPXPlaylist) +#endif { User::Leave(KErrArgument); } @@ -751,11 +783,20 @@ EMPXMediaGeneralTitle | EMPXMediaGeneralDate | EMPXMediaGeneralDuration | EMPXMediaGeneralComment | EMPXMediaGeneralUri )); +#ifdef ABSTRACTAUDIOALBUM_INCLUDED attributes.AppendL( TMPXAttribute(KMPXMediaIdMusic, EMPXMediaMusicArtist | EMPXMediaMusicAlbum | EMPXMediaMusicAlbumTrack | EMPXMediaMusicComposer | - EMPXMediaMusicYear | EMPXMediaMusicGenre)); + EMPXMediaMusicYear | EMPXMediaMusicGenre | + EMPXMediaMusicAlbumArtist)); +#else + attributes.AppendL( + TMPXAttribute(KMPXMediaIdMusic, + EMPXMediaMusicArtist | EMPXMediaMusicAlbum | + EMPXMediaMusicAlbumTrack | EMPXMediaMusicComposer | + EMPXMediaMusicYear | EMPXMediaMusicGenre)); +#endif attributes.AppendL(KMPXMediaAudioAudioAll); attributes.AppendL(KMPXMediaMTPAll); @@ -997,6 +1038,14 @@ aSrc.ValueTObjectL( KMPXMediaMusicRating ) ); } +#ifdef ABSTRACTAUDIOALBUM_INCLUDED + if( atts&EMPXMediaMusicAlbumArtist ) // Text + { + aDestination.SetTextValueL( KMPXMediaMusicAlbumArtist, + aSrc.ValueText(KMPXMediaMusicAlbumArtist ) + ); + } +#endif MPX_DEBUG1("CMPXCollectionCachedHelper::DoAppendMusicL -->"); } diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/collectionhelper/src/mpxcollectionhelperimp.cpp --- a/mmappcomponents/collectionhelper/src/mpxcollectionhelperimp.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/collectionhelper/src/mpxcollectionhelperimp.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -168,8 +168,14 @@ // generic way of resolving collections aside from using file extension // or UID. // +#ifdef ABSTRACTAUDIOALBUM_INCLUDED + if ( aMedia->ValueTObjectL(KMPXMediaGeneralType) == EMPXItem && + (aMedia->ValueTObjectL(KMPXMediaGeneralCategory) == EMPXPlaylist || + aMedia->ValueTObjectL(KMPXMediaGeneralCategory) == EMPXAbstractAlbum)) +#else if ( aMedia->ValueTObjectL(KMPXMediaGeneralType) == EMPXItem && aMedia->ValueTObjectL(KMPXMediaGeneralCategory) == EMPXPlaylist ) +#endif { aMedia->SetTObjectValueL( KMPXMediaGeneralCollectionId, iMusicCollectionId ); @@ -348,9 +354,13 @@ // TMPXGeneralCategory category = aMedia->ValueTObjectL(KMPXMediaGeneralCategory); - +#ifdef ABSTRACTAUDIOALBUM_INCLUDED + if ((aMedia->ValueTObjectL(KMPXMediaGeneralType) != EMPXItem) || + (category != EMPXSong && category != EMPXPlaylist && category != EMPXAbstractAlbum)) +#else if ((aMedia->ValueTObjectL(KMPXMediaGeneralType) != EMPXItem) || (category != EMPXSong && category != EMPXPlaylist)) +#endif { User::Leave( KErrArgument ); } @@ -466,8 +476,11 @@ { MPX_FUNC("CMPXCollectionHelperImp::GetL"); MPX_DEBUG2("aFile %S", &aFile); - +#ifdef ABSTRACTAUDIOALBUM_INCLUDED + if (aItemCat != EMPXSong && aItemCat != EMPXPlaylist && aItemCat != EMPXAbstractAlbum) +#else if (aItemCat != EMPXSong && aItemCat != EMPXPlaylist) +#endif { User::Leave(KErrArgument); } diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/harvester/filehandler/group/mpxfilehandler.mmp --- a/mmappcomponents/harvester/filehandler/group/mpxfilehandler.mmp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/harvester/filehandler/group/mpxfilehandler.mmp Wed Mar 31 22:26:09 2010 +0300 @@ -31,6 +31,8 @@ MACRO __RAMDISK_PERF_ENABLE #define __RAMDISK_PERF_ENABLE +MACRO ABSTRACTAUDIOALBUM_INCLUDED +#define ABSTRACTAUDIOALBUM_INCLUDED SOURCEPATH ../src SOURCE mpxharvesterfilehandler.cpp SOURCE mpxharvesterfilehandlerimp.cpp diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/harvester/filehandler/inc/mpxdbcommon.h --- a/mmappcomponents/harvester/filehandler/inc/mpxdbcommon.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/harvester/filehandler/inc/mpxdbcommon.h Wed Mar 31 22:26:09 2010 +0300 @@ -23,7 +23,11 @@ // Harvester db increment 9 v1 // Please update the increment number for each increment // Please update the version number for each schema change +#ifdef ABSTRACTAUDIOALBUM_INCLUDED +_LIT( KHarvesterDBName, "harvesterdbv9_6.dat" ); +#else _LIT( KHarvesterDBName, "harvesterdbv9_5.dat" ); +#endif _LIT( KHarvesterDBPattern, "harvesterdbv*.dat" ); const TInt KDbMaxTableCreationSQLLength = 1024; diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/harvester/filehandler/src/mpxharvesterdbmanager.cpp --- a/mmappcomponents/harvester/filehandler/src/mpxharvesterdbmanager.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/harvester/filehandler/src/mpxharvesterdbmanager.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -24,7 +24,7 @@ #ifdef __RAMDISK_PERF_ENABLE #include -#include +#include #include #include "mpxdbcommon.h" #endif //__RAMDISK_PERF_ENABLE diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/harvester/metadataextractor/group/mpxmetadataextractor.mmp --- a/mmappcomponents/harvester/metadataextractor/group/mpxmetadataextractor.mmp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/harvester/metadataextractor/group/mpxmetadataextractor.mmp Wed Mar 31 22:26:09 2010 +0300 @@ -30,6 +30,8 @@ MACRO RD_MPX_TNM_INTEGRATION #define RD_MPX_TNM_INTEGRATION +MACRO ABSTRACTAUDIOALBUM_INCLUDED +#define ABSTRACTAUDIOALBUM_INCLUDED SOURCEPATH ../src SOURCE mpxmetadataextractor.cpp SOURCE mpxfileinfoutility.cpp diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/harvester/metadataextractor/src/mpxmetadataextractor.cpp --- a/mmappcomponents/harvester/metadataextractor/src/mpxmetadataextractor.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/harvester/metadataextractor/src/mpxmetadataextractor.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -12,7 +12,7 @@ * Contributors: * * Description: Extracts metadata from a file -* Version : %version: da1mmcf#38.1.4.2.6.1.5 % << Don't touch! Updated by Synergy at check-out. +* Version : %version: da1mmcf#38.1.4.2.6.1.7 % << Don't touch! Updated by Synergy at check-out. * */ @@ -51,6 +51,9 @@ const TInt KMPXMaxThumbnailRequest = 5; #endif //RD_MPX_TNM_INTEGRATION +#ifdef ABSTRACTAUDIOALBUM_INCLUDED +_LIT( KNonEmbeddedArtExt, ".alb" ); +#endif //Helper functions static void FindAndReplaceForbiddenChars(TDes& aString, TInt aLen) { @@ -734,7 +737,31 @@ // Get full file name. const TDesC& path = aMedia->ValueText(KMPXMediaGeneralUri); MPX_DEBUG2("CMPXMetadataExtractor::ExtractAlbumArtL Filename:%S ", &path ); - +#ifdef ABSTRACTAUDIOALBUM_INCLUDED + TParsePtrC parse( path ); + TPtrC ext( parse.Ext() ); + if (ext.CompareF(KNonEmbeddedArtExt)== 0) + { + #ifdef RD_MPX_TNM_INTEGRATION + + //check if can send TN request, If thumbnail creation is ongoing, wait til it is done + CheckBeforeSendRequest(); + + CThumbnailObjectSource* source = CThumbnailObjectSource::NewLC( + path, KImageFileType ); + + + + iTNManager->CreateThumbnails( *source ); + + iOutstandingThumbnailRequest++; + CleanupStack::PopAndDestroy( source ); + + #endif + } + else + { +#endif // create wanted fields array RArray wantedFields; CleanupClosePushL( wantedFields ); @@ -763,7 +790,9 @@ // Reset the utility iMetadataUtility->ResetL(); - +#ifdef ABSTRACTAUDIOALBUM_INCLUDED + } +#endif return err; } @@ -817,26 +846,9 @@ MPX_FUNC("CMPXMetadataExtractor::AddMediaAlbumArtL()"); #ifdef RD_MPX_TNM_INTEGRATION - // If thumbnail creation is ongoing, wait til it is done - if ( iOutstandingThumbnailRequest > KMPXMaxThumbnailRequest ) - { - MPX_DEBUG1("CMPXMetadataExtractor::AddMediaAlbumArtL(): Thumbnail creation ongoing!"); - iTNMBlockCount++; - // Cancel timer. - CancelTimeoutTimer(); - // Start timer in case there is no callback from ThumbNail Manager. - iTimer->Start( - KMPXTimeoutTimer, - KMPXTimeoutTimer, - TCallBack(TimeoutTimerCallback, this )); - - // Start wait loop until we get a callback from ThumbNail Manager. - if ( !iTNSyncWait->IsStarted() ) - { - iTNSyncWait->Start(); - } - } - + //check if can send TN request, If thumbnail creation is ongoing, wait til it is done + CheckBeforeSendRequest(); + aMedia.SetTextValueL( KMPXMediaMusicAlbumArtFileName, aFile ); TBuf<256> mimeType; @@ -850,3 +862,29 @@ #endif // RD_MPX_TNM_INTEGRATION } + +void CMPXMetadataExtractor::CheckBeforeSendRequest() + { + MPX_FUNC("CMPXMetadataExtractor::CheckBeforeSendRequest()"); +#ifdef RD_MPX_TNM_INTEGRATION + // If thumbnail creation is ongoing, wait til it is done + if ( iOutstandingThumbnailRequest > KMPXMaxThumbnailRequest ) + { + MPX_DEBUG1("CMPXMetadataExtractor::CheckBeforeSendRequest(): Thumbnail creation ongoing!"); + iTNMBlockCount++; + // Cancel timer. + CancelTimeoutTimer(); + // Start timer in case there is no callback from ThumbNail Manager. + iTimer->Start( + KMPXTimeoutTimer, + KMPXTimeoutTimer, + TCallBack(TimeoutTimerCallback, this )); + + // Start wait loop until we get a callback from ThumbNail Manager. + if ( !iTNSyncWait->IsStarted() ) + { + iTNSyncWait->Start(); + } + } +#endif // RD_MPX_TNM_INTEGRATION + } diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpaccesssingleton.h --- a/mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpaccesssingleton.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpaccesssingleton.h Wed Mar 31 22:26:09 2010 +0300 @@ -19,11 +19,6 @@ #ifndef CMMMTPDPACCESSSINGLETON_H #define CMMMTPDPACCESSSINGLETON_H -/** -* Implements the MM MTP Data Priovider access singletons reference manager. -*/ - -class RFs; class CMmMtpDpMetadataAccessWrapper; class MMTPDataProviderFramework; @@ -36,8 +31,7 @@ * @param aRFs RFs reference * @param aFramework framework reference */ - IMPORT_C static void CreateL( RFs& aRfs, - MMTPDataProviderFramework& aFramework ); + IMPORT_C static void CreateL( MMTPDataProviderFramework& aFramework ); /** * release singleton instance @@ -68,14 +62,12 @@ /* * 2-phase construction */ - static CMmMtpDpAccessSingleton* NewL( RFs& aRfs, - MMTPDataProviderFramework& aFramework ); + static CMmMtpDpAccessSingleton* NewL( MMTPDataProviderFramework& aFramework ); /* * 2-phase construction */ - void ConstructL( RFs& aRfs, - MMTPDataProviderFramework& aFramework ); + void ConstructL( MMTPDataProviderFramework& aFramework ); /* * destruction */ diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpmetadataaccesswrapper.h --- a/mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpmetadataaccesswrapper.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpmetadataaccesswrapper.h Wed Mar 31 22:26:09 2010 +0300 @@ -19,10 +19,8 @@ #ifndef CMMMTPDPMETADATAACCESSWRAPPER_H #define CMMMTPDPMETADATAACCESSWRAPPER_H -#include -#include #include -#include +#include // forward declacration class CMmMtpDpMetadataMpxAccess; @@ -30,16 +28,15 @@ class RFs; class MMTPType; -class CMTPTypeObjectPropList; class CMPXMediaArray; class CMPXMedia; class MMTPDataProviderFramework; +class CMTPObjectMetaData; class CMmMtpDpMetadataAccessWrapper : public CBase { public: - static CMmMtpDpMetadataAccessWrapper* NewL( RFs& aRfs, - MMTPDataProviderFramework& aFramework ); + static CMmMtpDpMetadataAccessWrapper* NewL( MMTPDataProviderFramework& aFramework ); /** * Destructor @@ -78,18 +75,16 @@ * @param aFullFileName, full file name of file * @return void */ - void AddObjectL( const TDesC& aFullFileName, TUint aFormatCode, TUint aSubFormatCode ); + void AddObjectL( const CMTPObjectMetaData& aObject ); /** * Set abstract media to DB - * @param aAbstractMediaFileName, full file name of abstract media file + * @param aObject, * @param aRefFileArray, a array to store the full file name of media files - * @param aCategory, the category of abstract media * @return void */ - IMPORT_C void SetAbstractMediaL( const TDesC& aAbstractMediaFileName, - CDesCArray& aRefFileArray, - TMPXGeneralCategory aCategory ); + IMPORT_C void SetReferenceL( const CMTPObjectMetaData& aObject, + CDesCArray& aRefFileArray ); /** * Gets a piece of metadata from the collection @@ -119,18 +114,17 @@ /** * Renames the file part of a record in the collection database - * @param aFile, old full file name of Media file + * @param aOldObject, object need to be renamed * @param aNewFileName, new file name need update * @return void */ - IMPORT_C void RenameObjectL( const TDesC& aOldFileName, const TDesC& aNewFileName ); + IMPORT_C void RenameObjectL( const CMTPObjectMetaData& aOldObject, const TDesC& aNewFileName ); /** * Deletes metadata information associated with the object - * @param aFullFileName, full file name of Media file - * @param aFormatCode, format code + * @param aObject, the object need to be deleted */ - void DeleteObjectL( const TDesC& aFullFileName, const TUint aFormatCode ); + void DeleteObjectL( const CMTPObjectMetaData& aObject ); /** * Set current drive info @@ -144,7 +138,7 @@ * @param aWidth, the width of an object in pixels to set * @parem aHeight, the height of an object in pixels to set */ - void SetImageObjPropL( const TDesC& aFullFileName, + void SetImageObjPropL( const CMTPObjectMetaData& aObject, const TUint32 aWidth, const TUint32 aHeight ); @@ -154,7 +148,7 @@ * @param aWidth, the width of an object in pixels to get * @parem aHeight, the height of an object in pixels to get */ - void GetImageObjPropL( const TDesC& aFullFileName, + void GetImageObjPropL( const CMTPObjectMetaData& aObject, TUint32& aWidth, TUint32& aHeight ); @@ -213,13 +207,15 @@ */ IMPORT_C void CreateDummyFile( const TDesC& aPlaylistName ); + TMPXGeneralCategory Category( const CMTPObjectMetaData& aObject ); + private: - CMmMtpDpMetadataAccessWrapper( RFs& aRfs, MMTPDataProviderFramework& aFramework ); + CMmMtpDpMetadataAccessWrapper( MMTPDataProviderFramework& aFramework ); void ConstructL(); - TMPXGeneralCategory Category( const TUint aFormatCode ); + TMPXGeneralCategory ContainerCategory( const TDesC& aFullFileName ); /** * Remove all dummy file of which format is "pla", and leave the "m3u" @@ -227,13 +223,12 @@ void RemoveDummyFiles(); private: - // Data - RFs& iRfs; CMmMtpDpMetadataMpxAccess* iMmMtpDpMetadataMpxAccess; CMmMtpDpMetadataVideoAccess* iMmMtpDpMetadataVideoAccess; TBool iOpenSession; MMTPDataProviderFramework& iFramework; + RFs& iFs; // should not remove this member data!!! CDesCArray* iAbstractMediaArray; diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpmetadatampxaccess.h --- a/mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpmetadatampxaccess.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpmetadatampxaccess.h Wed Mar 31 22:26:09 2010 +0300 @@ -47,8 +47,7 @@ { public: - static CMmMtpDpMetadataMpxAccess* NewL( RFs& aRfs, - MMTPDataProviderFramework& aFramework ); + static CMmMtpDpMetadataMpxAccess* NewL( RFs& aRfs ); /** * Destructor @@ -99,17 +98,18 @@ /** * Set abstract media to DB - * @param aAbstractMediaFileName, full file name of abstract media file + * @param aRefOwnerName, full file name of abstract media file * @param aRefFileArray, a array to store the full file name of media files * @param aCategory, indicate the category of abstract media */ - void SetAbstractMediaL( const TDesC& aAbstractMediaFileName, + void SetReferenceL( const TDesC& aRefOwnerName, CDesCArray& aRefFileArray, TMPXGeneralCategory aCategory ); void GetObjectMetadataValueL( const TUint16 aPropCode, MMTPType& aNewData, - const CMTPObjectMetaData& aObjectMetaData ); + const TDesC& aFullFileName, + TMPXGeneralCategory aCategory ); /** * Set object property and updated object in DB according property code, @@ -122,19 +122,8 @@ */ void SetObjectMetadataValueL( const TUint16 aPropCode, const MMTPType& aNewData, - const CMTPObjectMetaData& aObjectMetaData ); - - /** - * Set object property and updated object in DB according property code, - * only for update, not for creation - * @param aPropCode, property code of aObjectMetaData - * @param aNewData, object property value which will be set into - * aObjectMetaData - * @param aSuid, full file name of object of which properties need to set - */ - void SetObjectMetadataValueL( const TUint16 aPropCode, - const MMTPType& aNewData, - const TDesC& aSuid ); + const TDesC& aFullFileName, + TMPXGeneralCategory aCategory ); CMPXMedia* FindWMPMediaLC( TMPXAttributeData aWMPMediaID, TBool aFlag ); @@ -158,11 +147,11 @@ * Rename the filename onto MPX DB * @param aOldFileName, the old file to rename * @param aNewFileName, the new file name - * @param aFormatCode, the format of object + * @param aCategory, the category of object */ void RenameObjectL( const TDesC& aOldFileName, const TDesC& aNewFileName, - TUint aFormatCode ); + TMPXGeneralCategory aCategory ); /** * Set current drive info @@ -185,8 +174,7 @@ TBool IsExistL( const TDesC& aSuid ); private: - CMmMtpDpMetadataMpxAccess( RFs& aFs, - MMTPDataProviderFramework& aFramework ); + CMmMtpDpMetadataMpxAccess( RFs& aFs ); void ConstructL(); @@ -210,15 +198,12 @@ MMPXCollectionHelper* CollectionHelperL(); private: - // File server to allow file access RFs& iRfs; TBuf iStoreRoot; MMPXCollectionHelper* iCollectionHelper; - MMTPDataProviderFramework& iFramework; - #if defined(_DEBUG) || defined(MMMTPDP_PERFLOG) CMmMtpDpPerfLog* iPerfLog; #endif diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpperflog.inl --- a/mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpperflog.inl Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpperflog.inl Wed Mar 31 22:26:09 2010 +0300 @@ -71,10 +71,13 @@ VA_LIST list; VA_START( list, aFmt ); - TBuf buf; - - buf.AppendFormatList( aFmt, list, &iOverflowHandler ); - Write( buf ); + HBufC* buf = HBufC::New( KMtpLogBufferSize ); + if ( buf ) + { + buf->Des().AppendFormatList( aFmt, list, &iOverflowHandler ); + Write( *buf ); + delete buf; + } } void CMmMtpDpPerfLog::Start( const TDesC& aDescription ) diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/inc/mmmtpdp_variant.hrh --- a/mmappcomponents/mmmtpdataprovider/inc/mmmtpdp_variant.hrh Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/inc/mmmtpdp_variant.hrh Wed Mar 31 22:26:09 2010 +0300 @@ -25,4 +25,7 @@ // flag to enable replace the exist object #undef MMMTPDP_REPLACE_EXIST_FILE +// flag to enable support for non embedded album art, should be ON by default +#define MMMTPDP_ABSTRACTAUDIOALBUM_SUPPORT + #endif // MMMTPDP_VARIANT_HRH diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/inc/mmmtpdpfiledefs.h --- a/mmappcomponents/mmmtpdataprovider/inc/mmmtpdpfiledefs.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/inc/mmmtpdpfiledefs.h Wed Mar 31 22:26:09 2010 +0300 @@ -42,6 +42,7 @@ _LIT( KTxtExtensionO4V, ".o4v" ); _LIT( KTxtExtensionODF, ".odf" ); +_LIT( KTxtExtensionALB, ".alb" ); _LIT( KTxtExtensionM3U, ".m3u" ); _LIT( KTxtExtensionPLA, ".pla" ); _LIT( KTxtExtensionVIR, ".vir" ); // virtual playlist from MPX @@ -66,6 +67,9 @@ _LIT(KFormatExtensionO4A, "0xB984:o4a"); _LIT(KFormatExtensionO4V, "0xB984:o4v"); +//Abstract Album +_LIT(KFormatExtensionALB, "0xBA03:alb"); + //Playlists _LIT(KFormatExtensionM3U, "0xba11:m3u"); _LIT(KFormatExtensionPLA, "0xBA05:pla"); @@ -95,7 +99,8 @@ { EMTPSubFormatCodeUnknown, EMTPSubFormatCodeAudio, - EMTPSubFormatCodeVideo + EMTPSubFormatCodeVideo, + EMTPSubFormatCodeUndefine }; #endif // MMMTPDPFILEDEFS_H diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/inc/mmmtpdputility.h --- a/mmappcomponents/mmmtpdataprovider/inc/mmmtpdputility.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/inc/mmmtpdputility.h Wed Mar 31 22:26:09 2010 +0300 @@ -24,8 +24,7 @@ #include "mmmtpdpfiledefs.h" // forward declacration -class CMTPObjectMetaData; -class MMTPDataProviderFramework; +class RFs; class MmMtpDpUtility { @@ -52,31 +51,6 @@ static TBool HasReference( TUint16 aObjFormatCode ); /** - * Utility function to decide if the file is video. - * @param aFullFileName, the full file name - * @return TBool for decide if the file is video - */ - IMPORT_C static TBool IsVideo( const TDesC& aFullFileName ); - - /** - * Utility function to decide if the file is video. - * For internal use, this is fast version by querying framework DB - * @param aFullFileName, the full file name - * @param aFramework, the mtp framework instance pointer, default is null - * @return TBool for decide if the file is video - */ - static TBool IsVideoL( const TDesC& aFullFileName, const MMTPDataProviderFramework& aFramework ); - - /** - * Utility function to decide if the file is video. - * For internal use, this is fast version by querying framework DB - * @param aFormatCode, - * @param aSubFormatCode, - * @return TBool for decide if the file is video - */ - static TBool IsVideoL( TUint aFormatCode, TUint aSubFormatCode ); - - /** * Check the filename length to see if it exceeds Symbian 256 limit. * @param aPathName, the path name of the file * @param aFileName, the file to be check @@ -99,7 +73,7 @@ * @param aFullFileName, fine name * @return TTime for specified file */ - static TTime GetObjectDateModifiedL( RFs& aFs, const TDesC& aFullFileName ); + static void GetObjectDateModifiedL( RFs& aFs, const TDesC& aFullFileName, TDes& aDateModified ); /** * Check if file is read-only, if file doesn't exist, leave @@ -161,7 +135,7 @@ * @param aSubFormatCode, output the sub format code * @return if success, return KErrNone, otherwise, error code */ - static TInt SubFormatCodeFromMime( const TDesC8& aMimeType, TMmMtpSubFormatCode& aSubFormatCode ); + static TMmMtpSubFormatCode SubFormatCodeFromMime( const TDesC8& aMimeType ); /** * Get DRM status diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/inc/mmmtpvideodbdefs.h --- a/mmappcomponents/mmmtpdataprovider/inc/mmmtpvideodbdefs.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/inc/mmmtpvideodbdefs.h Wed Mar 31 22:26:09 2010 +0300 @@ -53,7 +53,6 @@ _LIT( KMtpVideoEncodingProfile, "EncodingProfile" ); _LIT( KMtpVideoParentalRating, "ParentalRating" ); -_LIT( KMtpVideoUseCount , "UseCount" ); _LIT( KMtpVideoDRM, "DRM" ); _LIT( KMtpVideoDeleted, "Deleted" ); @@ -86,7 +85,6 @@ _LIT( KMtpVideoEncodingProfileType, " LONG VARCHAR" ); _LIT( KMtpVideoParentalRatingType, " LONG VARCHAR" ); -_LIT( KMtpVideoUseCountType, " UNSIGNED INTEGER" ); _LIT( KMtpVideoDRMType, " UNSIGNED SMALLINT" ); _LIT( KMtpVideoDeletedType, " BIT" ); diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/inc/tobjectdescription.h --- a/mmappcomponents/mmmtpdataprovider/inc/tobjectdescription.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/inc/tobjectdescription.h Wed Mar 31 22:26:09 2010 +0300 @@ -38,6 +38,7 @@ enum TGroupCodeType { EGroupCodeGeneral = 0x00000001, + EGroupCodeSample = 0x00000100, EGroupCodeMediaDB = 0x00FF0000, EGroupCodeNotDefined = 0xFFFFFFFF // TODO: need to reconsider }; @@ -45,6 +46,7 @@ static const TGroupCodeType KSupportedGroupCode[] = { EGroupCodeGeneral, + EGroupCodeSample, EGroupCodeMediaDB }; @@ -62,14 +64,25 @@ { EMTPObjectPropCodeNonConsumable, EGroupCodeGeneral }, // The first group, addtional for all + { EMTPObjectPropCodeName, EGroupCodeGeneral }, // only for winlogo { EMTPObjectPropCodeDateCreated, EGroupCodeGeneral }, { EMTPObjectPropCodeDateModified, EGroupCodeGeneral }, - // The second group, additional for all - { EMTPObjectPropCodeName, EGroupCodeMediaDB }, + // The first group, mandatory for video + { EMTPObjectPropCodeWidth, EGroupCodeGeneral }, // only for winlogo + { EMTPObjectPropCodeHeight, EGroupCodeGeneral }, // only for winlogo + + // The second group, for non-embedded album art + { EMTPObjectPropCodeRepresentativeSampleFormat, EGroupCodeGeneral }, // changed for winlogo + { EMTPObjectPropCodeRepresentativeSampleSize, EGroupCodeGeneral }, // changed for winlogo + { EMTPObjectPropCodeRepresentativeSampleHeight, EGroupCodeGeneral }, // changed for winlogo + { EMTPObjectPropCodeRepresentativeSampleWidth, EGroupCodeGeneral }, // changed for winlogo + { EMTPObjectPropCodeRepresentativeSampleData, EGroupCodeGeneral }, // changed for winlogo + + // The third group, additional for all { EMTPObjectPropCodeDateAdded, EGroupCodeMediaDB }, - // The second group, mandatory for audio + // The third group, mandatory for audio { EMTPObjectPropCodeArtist, EGroupCodeMediaDB }, { EMTPObjectPropCodeTrack, EGroupCodeMediaDB }, { EMTPObjectPropCodeGenre, EGroupCodeMediaDB }, @@ -82,11 +95,9 @@ { EMTPObjectPropCodeOriginalReleaseDate, EGroupCodeMediaDB }, { EMTPObjectPropCodeDescription, EGroupCodeMediaDB }, { EMTPObjectPropCodeComposer, EGroupCodeMediaDB }, + { EMTPObjectPropCodeAlbumArtist, EGroupCodeMediaDB }, - // The second group, mandatory for video - { EMTPObjectPropCodeWidth, EGroupCodeMediaDB }, - { EMTPObjectPropCodeHeight, EGroupCodeMediaDB }, - { EMTPObjectPropCodeUseCount, EGroupCodeMediaDB }, + // The third group, mandatory for video { EMTPObjectPropCodeScanType, EGroupCodeMediaDB }, { EMTPObjectPropCodeVideoFourCCCodec, EGroupCodeMediaDB }, { EMTPObjectPropCodeVideoBitRate, EGroupCodeMediaDB }, @@ -94,7 +105,7 @@ { EMTPObjectPropCodeKeyFrameDistance, EGroupCodeMediaDB }, { EMTPObjectPropCodeEncodingProfile, EGroupCodeMediaDB }, - // The second group, additional for video + // The third group, additional for video { EMTPObjectPropCodeParentalRating, EGroupCodeMediaDB }, { EMTPObjectPropCodeDRMStatus, EGroupCodeMediaDB }, { EMTPExtObjectPropCodeOmaDrmStatus, EGroupCodeMediaDB } diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/group/abstractmediamtpdataprovider.mmp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/group/abstractmediamtpdataprovider.mmp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/group/abstractmediamtpdataprovider.mmp Wed Mar 31 22:26:09 2010 +0300 @@ -43,7 +43,6 @@ SOURCE cabstractmediamtpdataprovidergetobjectpropvalue.cpp SOURCE cabstractmediamtpdataprovidergetobjectproplist.cpp SOURCE cabstractmediamtpdataprovidersetobjectpropvalue.cpp -SOURCE cabstractmediamtpdataprovidersetobjectreferences.cpp SOURCE cabstractmediamtpdataproviderabstractmediapreference.cpp SOURCE cabstractmediamtpdataprovidercopyobject.cpp SOURCE cabstractmediamtpdataprovidermoveobject.cpp diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/abstractmediamtpdataproviderconst.h --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/abstractmediamtpdataproviderconst.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/abstractmediamtpdataproviderconst.h Wed Mar 31 22:26:09 2010 +0300 @@ -19,6 +19,34 @@ #define ABSTRACTMEDIAMTPDATAPROVIDERCONST_H #include +#include "mmmtpdp_variant.hrh" + +enum TMmMtpSampleSizeRange + { + EMTPMinSampleSize = 0x00000001, // 1 bytes + EMTPMaxSampleSize = 0x00010000, // 64 kb + EMTPStepSampleSize = 0x00000001 // 1 byte + }; + +enum TMmMtpSampleHeightRange + { + EMTPSampleMinHeight = 0x00000001, // 1 pixel + EMTPSampleMaxHeight = 0x00000168, // 360 pixel + EMTPSampleStepHeight = 0x00000001 // 1 pixel + }; + +enum TMmMtpSampleWidthRange + { + EMTPSampleMinWidth = 0x00000001, // 1 pixel + EMTPSampleMaxWidth = 0x00000168, // 360 pixel + EMTPSampleStepWidth = 0x00000001 // 1 pixel + }; + +// Supported sample format +static const TUint16 TMmMtpSupportedSampleFormat[] = + { + EMTPFormatCodeEXIFJPEG + }; const TUint16 EMTPExtOpCodeAbstractMediaPreference = 0x9203; @@ -27,6 +55,9 @@ */ static const TUint16 KAbstractMediaMtpDataProviderSupportedFormats[] = { +#ifdef MMMTPDP_ABSTRACTAUDIOALBUM_SUPPORT + EMTPFormatCodeAbstractAudioAlbum, +#endif EMTPFormatCodeM3UPlaylist, EMTPFormatCodeAbstractAudioVideoPlaylist }; @@ -64,4 +95,15 @@ EMTPOpCodeGetFormatCapabilities }; +// Mandatory properties for ALB +static const TUint16 KMmMtpDpSupportedPropMandatoryALB[] = + { + EMTPObjectPropCodeRepresentativeSampleFormat, + EMTPObjectPropCodeRepresentativeSampleSize, + EMTPObjectPropCodeRepresentativeSampleHeight, + EMTPObjectPropCodeRepresentativeSampleWidth, + EMTPObjectPropCodeRepresentativeSampleData, + EMTPObjectPropCodeAlbumArtist + }; + #endif // ABSTRACTMEDIAMTPDATAPROVIDERCONST_H diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/abstractmediamtpdataproviderprocessor.h --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/abstractmediamtpdataproviderprocessor.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/abstractmediamtpdataproviderprocessor.h Wed Mar 31 22:26:09 2010 +0300 @@ -22,7 +22,6 @@ // class forward class MMTPConnection; class TMTPTypeRequest; -class MMTPDataProviderFramework; class MMmRequestProcessor; class MMmMtpDpConfig; diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/cabstractmediamtpdataprovider.h --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/cabstractmediamtpdataprovider.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/cabstractmediamtpdataprovider.h Wed Mar 31 22:26:09 2010 +0300 @@ -24,6 +24,7 @@ #include "abstractmediamtpdataproviderprocessor.h" #include "mmmtpenumerationcallback.h" #include "mmmtpdpconfig.h" +#include "mmmtpdp_variant.hrh" // Forward declaration class MMmRequestProcessor; @@ -178,6 +179,8 @@ void GetSupportedPropertiesL(); + void GetAllSupportedPropL(); + private: // data RPointerArray iActiveProcessors; @@ -192,7 +195,11 @@ RArray iSupportedFormat; - RArray iSupportedProperties; +#ifdef MMMTPDP_ABSTRACTAUDIOALBUM_SUPPORT + RArray iSupportedPropAbstractAlbum; +#endif + RArray iSupportedPropPlaylist; + RArray iSupportedPropAll; CPropertySettingUtility* iPropSettingUtility; CDescriptionUtility* iDescriptionUtility; diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/cabstractmediamtpdataproviderdescriptionutility.h --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/cabstractmediamtpdataproviderdescriptionutility.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/cabstractmediamtpdataproviderdescriptionutility.h Wed Mar 31 22:26:09 2010 +0300 @@ -53,14 +53,35 @@ CMTPTypeObjectPropDesc* NewSpecificPropDescL( TUint aFormatCode, TUint16 aPropCode ); private: - // Example for further extension + /** + * Construct property description of SampleFormat. + * @return Property description dataset of sample format. + */ + CMTPTypeObjectPropDesc* NewRepresentativeSampleFormatL(); + + /** + * Construct property description of SampleSize. + * @return Property description dataset of sample size. + */ + CMTPTypeObjectPropDesc* NewRepresentativeSampleSizeL(); + /** - * Construct audio wave codec property description. - * @param aFormatCode - * @return Property description dataset of audio wave codec. + * Construct property description of SampleHeight. + * @return Property description dataset of sample height. */ - // CMTPTypeObjectPropDesc* NewAudioWaveCodecPropDescL( TUint aFormatCode ); - + CMTPTypeObjectPropDesc* NewRepresentativeSampleHeightL(); + + /** + * Construct property description of SampleWidth. + * @return Property description dataset of sample width. + */ + CMTPTypeObjectPropDesc* NewRepresentativeSampleWidthL(); + + /** + * Construct property description of SampleData. + * @return Property description dataset of sample data. + */ + CMTPTypeObjectPropDesc* NewRepresentativeSampleDataL(); }; #endif // CABSTRACTMEDIAMTPDATAPROVIDERDESCRIPTIONUTILITY_H diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/cabstractmediamtpdataproviderenumerator.h --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/cabstractmediamtpdataproviderenumerator.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/cabstractmediamtpdataproviderenumerator.h Wed Mar 31 22:26:09 2010 +0300 @@ -74,6 +74,14 @@ TInt RunError( TInt aError ); private: + + enum TEnumState + { + EEnumPlaylist, + EEnumAbstractAlbum, + EEnumCount + }; + /** * Standard C++ Constructor * @param aFramework Reference to MMTPDataProviderFramework @@ -90,7 +98,7 @@ void SignalCompleteL( MMTPEnumerationCallback& aCallback, TInt aError = KErrNone ); - void ScanStorageL( TUint32 aStorageId ); + void InitStorageL( ); /** * Scan next storage @@ -134,6 +142,7 @@ CMPXMediaArray* iAbstractMedias; TInt iCount; TInt iCurrentIndex; + TInt iEnumState; #if defined(_DEBUG) || defined(MMMTPDP_PERFLOG) CMmMtpDpPerfLog* iPerfLog; diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/cabstractmediamtpdataprovidersetobjectreferences.h --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/cabstractmediamtpdataprovidersetobjectreferences.h Mon Mar 15 12:42:31 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Set object references operation. -* -*/ - - -#ifndef CABSTRACTMEDIAMTPDATAPROVIDERSETOBJECTREFERENCES_H -#define CABSTRACTMEDIAMTPDATAPROVIDERSETOBJECTREFERENCES_H - -#include "csetobjectreferences.h" - -/** -* Defines abstract media data provider SetObjectReferences request processor -*/ -class CAbstractMediaMtpDataProviderSetObjectReferences : public CSetObjectReferences - { -public: - /** - * Two-phase construction method - * @param aFramework The data provider framework - * @param aConnection The connection from which the request comes - * @param aWrapper medadata access interface - * @return a pointer to the created request processor object - */ - static MMmRequestProcessor* NewL( MMTPDataProviderFramework& aFramework, - MMTPConnection& aConnection, - MMmMtpDpConfig& aDpConfig ); - - /** - * Destructor - */ - ~CAbstractMediaMtpDataProviderSetObjectReferences(); - -private: - /** - * Standard c++ constructor - * @param aFramework The data provider framework - * @param aConnection The connection from which the request comes - * @param aWrapper medadata access interface - */ - CAbstractMediaMtpDataProviderSetObjectReferences( MMTPDataProviderFramework& aFramework, - MMTPConnection& aConnection, - MMmMtpDpConfig& aDpConfig ); - - /** - * two-phase construction - */ - void ConstructL(); - -protected: - // from CSetObjectPropValue - /** - * set references to DB - * @param aWrapper medadata access interface - * @param aObjectFormat the format of the file - * @param aSrcFileName file name, from - * @param aRefFileArray the array of file names, to - */ - void DoSetObjectReferencesL( CMmMtpDpMetadataAccessWrapper& aWrapper, - TUint16 aObjectFormat, - const TDesC& aSrcFileName, - CDesCArray& aRefFileArray ); - - }; - -#endif // CABSTRACTMEDIAMTPDATAPROVIDERSETOBJECTREFERENCES_H diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/abstractmediamtpdataproviderprocessor.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/abstractmediamtpdataproviderprocessor.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/abstractmediamtpdataproviderprocessor.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -38,7 +38,7 @@ #include "cabstractmediamtpdataprovidersetobjectpropvalue.h" #include "csetobjectproplist.h" #include "cgetobjectreferences.h" -#include "cabstractmediamtpdataprovidersetobjectreferences.h" +#include "csetobjectreferences.h" #include "cdeleteobject.h" #include "cabstractmediamtpdataprovidercopyobject.h" #include "cabstractmediamtpdataprovidermoveobject.h" @@ -63,7 +63,7 @@ { EMTPOpCodeSetObjectPropValue, CAbstractMediaMtpDataProviderSetObjectPropValue::NewL }, { EMTPOpCodeSetObjectPropList, CSetObjectPropList::NewL }, //SetObjectPropList { EMTPOpCodeGetObjectReferences, CGetObjectReferences::NewL }, //Get Object References - { EMTPOpCodeSetObjectReferences, CAbstractMediaMtpDataProviderSetObjectReferences::NewL }, //Set Object References + { EMTPOpCodeSetObjectReferences, CSetObjectReferences::NewL }, //Set Object References { EMTPOpCodeDeleteObject, CDeleteObject::NewL }, //DeleteObject { EMTPOpCodeCopyObject, CAbstractMediaMtpDataProviderCopyObject::NewL }, // Copy Object { EMTPOpCodeMoveObject, CAbstractMediaMtpDataProviderMoveObject::NewL }, // Move Object diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovider.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovider.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovider.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -76,7 +76,11 @@ iActiveProcessor( -1 ), iRenameObject( NULL ), iSupportedFormat( KAbstractMediaMtpDpArrayGranularity ), - iSupportedProperties( KAbstractMediaMtpDpArrayGranularity ) +#ifdef MMMTPDP_ABSTRACTAUDIOALBUM_SUPPORT + iSupportedPropAbstractAlbum( KAbstractMediaMtpDpArrayGranularity ), +#endif + iSupportedPropPlaylist( KAbstractMediaMtpDpArrayGranularity ), + iSupportedPropAll( KAbstractMediaMtpDpArrayGranularity ) { // Do nothing } @@ -108,7 +112,11 @@ delete iRenameObject; iSupportedFormat.Close(); - iSupportedProperties.Close(); +#ifdef MMMTPDP_ABSTRACTAUDIOALBUM_SUPPORT + iSupportedPropAbstractAlbum.Close(); +#endif + iSupportedPropPlaylist.Close(); + iSupportedPropAll.Close(); PRINT( _L( "MM MTP => CAbstractMediaMtpDataProvider::~CAbstractMediaMtpDataProvider" ) ); } @@ -129,10 +137,11 @@ iAbstractMediaEnumerator = CAbstractMediaMtpDataProviderEnumerator::NewL( Framework(), *this ); - CMmMtpDpAccessSingleton::CreateL( Framework().Fs(), Framework() ); + CMmMtpDpAccessSingleton::CreateL( Framework() ); GetSupportedFormatL(); GetSupportedPropertiesL(); + GetAllSupportedPropL(); iPropSettingUtility = CAbstractMediaMtpDataProviderPropertySettingUtility::NewL(); iDescriptionUtility = CAbstractMediaMtpDataProviderDescriptionUtility::NewL(); @@ -360,11 +369,11 @@ case EObjectProperties: { - TInt count = iSupportedProperties.Count(); + TInt count = iSupportedPropAll.Count(); for ( TInt i = 0; i < count; i++ ) { - aArray.Append( iSupportedProperties[i] ); + aArray.Append( iSupportedPropAll[i] ); } PRINT1( _L( "MM MTP <> CAbstractMediaMtpDataProvider::Supported properties count = %d" ), aArray.Count() ); } @@ -392,7 +401,9 @@ { if( aCategory == EFormatExtensionSets ) { - //EMTPFormatCodeM3U, +#ifdef MMMTPDP_ABSTRACTAUDIOALBUM_SUPPORT + aStrings.AppendL(KFormatExtensionALB); +#endif aStrings.AppendL(KFormatExtensionM3U); aStrings.AppendL(KFormatExtensionPLA); aStrings.AppendL(KFormatExtensionVIR); @@ -527,10 +538,24 @@ } } -const RArray* CAbstractMediaMtpDataProvider::GetSupportedPropertiesL( TUint32 /*aFormatCode*/ ) const +const RArray* CAbstractMediaMtpDataProvider::GetSupportedPropertiesL( TUint32 aFormatCode ) const { - // May need add more implementation here for further extension. - return &iSupportedProperties; + if ( ( aFormatCode == EMTPFormatCodeM3UPlaylist ) || ( aFormatCode == EMTPFormatCodeAbstractAudioVideoPlaylist ) ) + { + return &iSupportedPropPlaylist; + } +#ifdef MMMTPDP_ABSTRACTAUDIOALBUM_SUPPORT + else if ( aFormatCode == EMTPFormatCodeAbstractAudioAlbum ) + { + return &iSupportedPropAbstractAlbum; + } +#endif + else + { + User::Leave( KErrNotSupported ); + } + // should never run to this line, just for avoiding warning. + return NULL; } // --------------------------------------------------------------------------- @@ -540,20 +565,37 @@ // void CAbstractMediaMtpDataProvider::GetSupportedPropertiesL() { - iSupportedProperties.Reset(); +#ifdef MMMTPDP_ABSTRACTAUDIOALBUM_SUPPORT + iSupportedPropAbstractAlbum.Reset(); +#endif + iSupportedPropPlaylist.Reset(); TInt count = 0, i = 0; count = sizeof( KMmMtpDpSupportedPropMandatoryAll ) / sizeof( TUint16 ); for ( i = 0; i < count; i++ ) { - InsertL( iSupportedProperties, KMmMtpDpSupportedPropMandatoryAll[i] ); +#ifdef MMMTPDP_ABSTRACTAUDIOALBUM_SUPPORT + InsertL( iSupportedPropAbstractAlbum, KMmMtpDpSupportedPropMandatoryAll[i] ); +#endif + InsertL( iSupportedPropPlaylist, KMmMtpDpSupportedPropMandatoryAll[i] ); } count = sizeof( KMmMtpDpSupportedPropAdditionalAll ) / sizeof( TUint16 ); for ( i = 0; i < count; i++ ) { - InsertL( iSupportedProperties, KMmMtpDpSupportedPropAdditionalAll[i] ); +#ifdef MMMTPDP_ABSTRACTAUDIOALBUM_SUPPORT + InsertL( iSupportedPropAbstractAlbum, KMmMtpDpSupportedPropAdditionalAll[i] ); +#endif + InsertL( iSupportedPropPlaylist, KMmMtpDpSupportedPropAdditionalAll[i] ); } + +#ifdef MMMTPDP_ABSTRACTAUDIOALBUM_SUPPORT + count = sizeof( KMmMtpDpSupportedPropMandatoryALB ) / sizeof( TUint16 ); + for ( i = 0; i < count; i++ ) + { + InsertL( iSupportedPropAbstractAlbum, KMmMtpDpSupportedPropMandatoryALB[i] ); + } +#endif } // --------------------------------------------------------------------------- @@ -563,7 +605,31 @@ // const RArray* CAbstractMediaMtpDataProvider::GetAllSupportedProperties() const { - return &iSupportedProperties; + return &iSupportedPropAll; + } + +void CAbstractMediaMtpDataProvider::GetAllSupportedPropL() + { + iSupportedPropAll.Reset(); + + TInt count = 0, i = 0; + count = sizeof( KMmMtpDpSupportedPropMandatoryAll ) / sizeof( TUint16 ); + for ( i = 0; i < count; i++ ) + { + InsertL( iSupportedPropAll, KMmMtpDpSupportedPropMandatoryAll[i] ); + } + + count = sizeof( KMmMtpDpSupportedPropAdditionalAll ) / sizeof( TUint16 ); + for ( i = 0; i < count; i++ ) + { + InsertL( iSupportedPropAll, KMmMtpDpSupportedPropAdditionalAll[i] ); + } + + count = sizeof( KMmMtpDpSupportedPropMandatoryALB ) / sizeof( TUint16 ); + for ( i = 0; i < count; i++ ) + { + InsertL( iSupportedPropAll, KMmMtpDpSupportedPropMandatoryALB[i] ); + } } // --------------------------------------------------------------------------- diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataproviderdescriptionutility.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataproviderdescriptionutility.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataproviderdescriptionutility.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -16,10 +16,12 @@ * */ +#include #include #include #include "cabstractmediamtpdataproviderdescriptionutility.h" +#include "abstractmediamtpdataproviderconst.h" #include "mmmtpdpconfig.h" #include "mmmtpdplogger.h" @@ -67,20 +69,156 @@ // Construct media dp specific property description. // ----------------------------------------------------------------------------- // -CMTPTypeObjectPropDesc* CAbstractMediaMtpDataProviderDescriptionUtility::NewSpecificPropDescL( TUint /*aFormatCode*/, +CMTPTypeObjectPropDesc* CAbstractMediaMtpDataProviderDescriptionUtility::NewSpecificPropDescL( TUint aFormatCode, TUint16 aPropCode ) { CMTPTypeObjectPropDesc* propertyDesc = NULL; - - switch ( aPropCode ) + if( aFormatCode == EMTPFormatCodeAbstractAudioAlbum ) { - // format specific - // May need add implementation here for further extension. - default: - // Do nothing now. - break; + switch ( aPropCode ) + { + case EMTPObjectPropCodeRepresentativeSampleFormat: + propertyDesc = NewRepresentativeSampleFormatL(); + break; + + case EMTPObjectPropCodeRepresentativeSampleSize: + propertyDesc = NewRepresentativeSampleSizeL(); + break; + + case EMTPObjectPropCodeRepresentativeSampleHeight: + propertyDesc = NewRepresentativeSampleHeightL(); + break; + + case EMTPObjectPropCodeRepresentativeSampleWidth: + propertyDesc = NewRepresentativeSampleWidthL(); + break; + + case EMTPObjectPropCodeRepresentativeSampleData: + propertyDesc = NewRepresentativeSampleDataL(); + break; + default: + // do nothing + break; + } } return propertyDesc; } +// ----------------------------------------------------------------------------- +// CAbstractMediaMtpDataProviderDescriptionUtility::NewRepresentativeSampleFormatL +// +// ----------------------------------------------------------------------------- +// +CMTPTypeObjectPropDesc* CAbstractMediaMtpDataProviderDescriptionUtility::NewRepresentativeSampleFormatL() + { + CMTPTypeObjectPropDescEnumerationForm* form = + CMTPTypeObjectPropDescEnumerationForm::NewL( EMTPTypeUINT16 ); + CleanupStack::PushL( form ); // + form + + TInt numValues = sizeof ( TMmMtpSupportedSampleFormat ) / sizeof ( TMmMtpSupportedSampleFormat[0] ); + for ( TInt i = 0; i < numValues; i++ ) + { + TMTPTypeUint16 data( TMmMtpSupportedSampleFormat[i] ); + form->AppendSupportedValueL( data ); + } + + CMTPTypeObjectPropDesc::TPropertyInfo propertyInfo; + propertyInfo.iDataType = EMTPTypeUINT16; + propertyInfo.iFormFlag = CMTPTypeObjectPropDesc::EEnumerationForm; + propertyInfo.iGetSet = CMTPTypeObjectPropDesc::EReadOnly; + CMTPTypeObjectPropDesc* propertyDesc = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeRepresentativeSampleFormat, + propertyInfo, + form ); + CleanupStack::PopAndDestroy( form ); // - form + return propertyDesc; + } + +// ----------------------------------------------------------------------------- +// CAbstractMediaMtpDataProviderDescriptionUtility::NewRepresentativeSampleSizeL +// +// ----------------------------------------------------------------------------- +// +CMTPTypeObjectPropDesc* CAbstractMediaMtpDataProviderDescriptionUtility::NewRepresentativeSampleSizeL() + { + CMTPTypeObjectPropDescRangeForm* form = + CMTPTypeObjectPropDescRangeForm::NewLC( EMTPTypeUINT32 ); // + form + + // Set expected values + form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EMinimumValue, EMTPMinSampleSize ); + form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EMaximumValue, EMTPMaxSampleSize ); + form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EStepSize, EMTPStepSampleSize ); + + CMTPTypeObjectPropDesc::TPropertyInfo propertyInfo; + propertyInfo.iDataType = EMTPTypeUINT32; + propertyInfo.iFormFlag = CMTPTypeObjectPropDesc::ERangeForm; + propertyInfo.iGetSet = CMTPTypeObjectPropDesc::EReadOnly; + CMTPTypeObjectPropDesc* propertyDesc = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeRepresentativeSampleSize, + propertyInfo, + form ); + CleanupStack::PopAndDestroy( form ); // - form + return propertyDesc; + } + +// ----------------------------------------------------------------------------- +// CAbstractMediaMtpDataProviderDescriptionUtility::NewRepresentativeSampleHeightL +// +// ----------------------------------------------------------------------------- +// +CMTPTypeObjectPropDesc* CAbstractMediaMtpDataProviderDescriptionUtility::NewRepresentativeSampleHeightL() + { + CMTPTypeObjectPropDescRangeForm* form = + CMTPTypeObjectPropDescRangeForm::NewLC( EMTPTypeUINT32 ); // + form + + // Set expected values + form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EMinimumValue, EMTPSampleMinHeight ); + form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EMaximumValue, EMTPSampleMaxHeight ); + form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EStepSize, EMTPSampleStepHeight ); + + CMTPTypeObjectPropDesc::TPropertyInfo propertyInfo; + propertyInfo.iDataType = EMTPTypeUINT32; + propertyInfo.iFormFlag = CMTPTypeObjectPropDesc::ERangeForm; + propertyInfo.iGetSet = CMTPTypeObjectPropDesc::EReadOnly; + CMTPTypeObjectPropDesc* propertyDesc = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeRepresentativeSampleHeight, + propertyInfo, + form ); + CleanupStack::PopAndDestroy( form ); // - form + return propertyDesc; + } + +// ----------------------------------------------------------------------------- +// CAbstractMediaMtpDataProviderDescriptionUtility::NewRepresentativeSampleWidthL +// +// ----------------------------------------------------------------------------- +// +CMTPTypeObjectPropDesc* CAbstractMediaMtpDataProviderDescriptionUtility::NewRepresentativeSampleWidthL() + { + CMTPTypeObjectPropDescRangeForm* form = + CMTPTypeObjectPropDescRangeForm::NewLC( EMTPTypeUINT32 ); // + form + + // Set expected values + form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EMinimumValue, EMTPSampleMinWidth ); + form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EMaximumValue, EMTPSampleMaxWidth ); + form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EStepSize, EMTPSampleStepWidth ); + + CMTPTypeObjectPropDesc::TPropertyInfo propertyInfo; + propertyInfo.iDataType = EMTPTypeUINT32; + propertyInfo.iFormFlag = CMTPTypeObjectPropDesc::ERangeForm; + propertyInfo.iGetSet = CMTPTypeObjectPropDesc::EReadOnly; + CMTPTypeObjectPropDesc* propertyDesc = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeRepresentativeSampleWidth, + propertyInfo, + form ); + CleanupStack::PopAndDestroy( form ); // - form + return propertyDesc; + } + +// ----------------------------------------------------------------------------- +// CAbstractMediaMtpDataProviderDescriptionUtility::NewRepresentativeSampleDataL +// +// ----------------------------------------------------------------------------- +// +CMTPTypeObjectPropDesc* CAbstractMediaMtpDataProviderDescriptionUtility::NewRepresentativeSampleDataL() + { + return CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeRepresentativeSampleData ); + } + // end of file diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataproviderenumerator.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataproviderenumerator.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataproviderenumerator.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -81,7 +81,8 @@ iStorages( KAbstractMediaDpArrayGranularity ), iAbstractMedias( NULL ), iCount( 0 ), - iCurrentIndex( 0 ) + iCurrentIndex( 0 ), + iEnumState ( EEnumPlaylist ) { PRINT1( _L( "MM MTP <> CAbstractMediaMtpDataProviderEnumerator::CAbstractMediaMtpDataProviderEnumerator, iDataProviderId = %d" ), iDataProviderId ); } @@ -180,124 +181,129 @@ // keep in mind for notification when enumeration complete iStorageId = aStorageId; - + iEnumState = EEnumPlaylist; if ( iStorages.Count() > 0 ) { - ScanStorageL( iStorages[0] ); + InitStorageL(); } - else - { - iStorages.Reset(); - SignalCompleteL( iDataProvider ); - } + ScanNextL(); PRINT( _L( "MM MTP <= CAbstractMediaMtpDataProviderEnumerator::StartL" ) ); } // ----------------------------------------------------------------------------- -// CAbstractMediaMtpDataProviderEnumerator::ScanStorageL -// Find out all AbstractMedia file according to storage id +// CAbstractMediaMtpDataProviderEnumerator::InitStorageL +// Initialize iAbstractMedia, iCount and iCurrentIndex according to iStorages and iEnumState // ----------------------------------------------------------------------------- // -void CAbstractMediaMtpDataProviderEnumerator::ScanStorageL( TUint32 aStorageId ) +void CAbstractMediaMtpDataProviderEnumerator::InitStorageL() { - PRINT1( _L( "MM MTP => CAbstractMediaMtpDataProviderEnumerator::ScanStorageL aStorageId = 0x%x" ), aStorageId ); + __ASSERT_DEBUG(iStorages.Count() > 0 && iEnumState < EEnumCount, User::Invariant() ); + PRINT2( _L( "MM MTP => CAbstractMediaMtpDataProviderEnumerator::InitStorageL storageId = 0x%x, state=%d" ), iStorages[0], iEnumState ); const CMTPStorageMetaData& storage( - iFramework.StorageMgr().StorageL( aStorageId ) ); + iFramework.StorageMgr().StorageL( iStorages[0] ) ); __ASSERT_DEBUG( ( storage.Uint( CMTPStorageMetaData::EStorageSystemType ) == CMTPStorageMetaData::ESystemTypeDefaultFileSystem ), User::Invariant() ); TFileName root( storage.DesC( CMTPStorageMetaData::EStorageSuid ) ); - PRINT1( _L( "MM MTP <> CAbstractMediaMtpDataProviderEnumerator::ScanStorageL StorageSuid = %S" ), &root ); + PRINT1( _L( "MM MTP <> CAbstractMediaMtpDataProviderEnumerator::InitStorageL StorageSuid = %S" ), &root ); - // created by windows media player, or else return responsecode is Access denied - // Create playlist directory if it does not exist - // NOTE: Only playlist need to create directory here, for the dummy files - HBufC* tempBuf = HBufC::NewLC( KMaxFileName ); // + tempBuf - TPtr folder = tempBuf->Des(); - folder.Zero(); - folder.Append( root ); - folder.Append( KPlaylistFilePath ); - TBool ret = BaflUtils::FileExists( iFramework.Fs(), folder ); - PRINT2( _L( "MM MTP <> CAbstractMediaMtpDataProviderEnumerator::ScanStorageL ret = %d, folder = %S" ), ret, &folder ); - if( !ret ) + if ( iEnumState == EEnumPlaylist ) { - TInt err = iFramework.Fs().MkDirAll( folder ); - PRINT2( _L( "MM MTP <> CAbstractMediaMtpDataProviderEnumerator::ScanStorageL Creating folder (%S) returned error %d" ), tempBuf, err ); + // created by windows media player, or else return responsecode is Access denied + // Create playlist directory if it does not exist + // NOTE: Only playlist need to create directory here, for the dummy files + HBufC* tempBuf = HBufC::NewLC( KMaxFileName ); // + tempBuf + TPtr folder = tempBuf->Des(); + folder.Zero(); + folder.Append( root ); + folder.Append( KPlaylistFilePath ); + TBool ret = BaflUtils::FileExists( iFramework.Fs(), folder ); + PRINT2( _L( "MM MTP <> CAbstractMediaMtpDataProviderEnumerator::InitStorageL ret = %d, folder = %S" ), ret, &folder ); + if( !ret ) + { + TInt err = iFramework.Fs().MkDirAll( folder ); + PRINT2( _L( "MM MTP <> CAbstractMediaMtpDataProviderEnumerator::InitStorageL Creating folder (%S) returned error %d" ), tempBuf, err ); - // add this new folder to framework metadata DB - CMTPObjectMetaData* object = CMTPObjectMetaData::NewLC( 0, // Dev Dp hard code - EMTPFormatCodeAssociation, - aStorageId, - folder ); // + object - object->SetUint( CMTPObjectMetaData::EParentHandle, KMTPHandleNoParent ); - object->SetUint( CMTPObjectMetaData::EFormatSubCode, EMTPAssociationTypeGenericFolder ); - PERFLOGSTART( KObjectManagerInsert ); - iObjectMgr.InsertObjectL( *object ); - PERFLOGSTOP( KObjectManagerInsert ); - CleanupStack::PopAndDestroy( object ); // - object + // add this new folder to framework metadata DB + CMTPObjectMetaData* object = CMTPObjectMetaData::NewLC( 0, // Dev Dp hard code + EMTPFormatCodeAssociation, + iStorages[0], + folder ); // + object + object->SetUint( CMTPObjectMetaData::EParentHandle, KMTPHandleNoParent ); + object->SetUint( CMTPObjectMetaData::EFormatSubCode, EMTPAssociationTypeGenericFolder ); + PERFLOGSTART( KObjectManagerInsert ); + iObjectMgr.InsertObjectL( *object ); + PERFLOGSTOP( KObjectManagerInsert ); + CleanupStack::PopAndDestroy( object ); // - object + } + CleanupStack::PopAndDestroy( tempBuf ); // - tempBuf } - CleanupStack::PopAndDestroy( tempBuf ); // - tempBuf // find all abstract medias stored in MPX delete iAbstractMedias; iAbstractMedias = NULL; + TMPXGeneralCategory category = ( iEnumState == EEnumPlaylist ) ? EMPXPlaylist : EMPXAbstractAlbum; PERFLOGSTART( KMpxGetAllAbstractMedia ); - TRAPD( err, iDataProvider.GetWrapperL().GetAllAbstractMediaL( root, &iAbstractMedias, EMPXPlaylist ) ); + TRAPD( err, iDataProvider.GetWrapperL().GetAllAbstractMediaL( root, &iAbstractMedias, category ) ); PERFLOGSTOP( KMpxGetAllAbstractMedia ); if ( iAbstractMedias != NULL && err == KErrNone ) { iCount = iAbstractMedias->Count(); - iCurrentIndex = 0; - - TRequestStatus* status = &iStatus; - User::RequestComplete( status, iStatus.Int() ); - SetActive(); } else { iCount = 0; - iCurrentIndex = 0; - ScanNextL(); } + iCurrentIndex = 0; - PRINT( _L( "MM MTP <= CAbstractMediaMtpDataProviderEnumerator::ScanStorageL" ) ); + PRINT( _L( "MM MTP <= CAbstractMediaMtpDataProviderEnumerator::InitStorageL" ) ); } // ----------------------------------------------------------------------------- -// CAbstractMediaMtpDataProviderEnumerator::ScanNextStorageL -// +// CAbstractMediaMtpDataProviderEnumerator::ScanNextL +// Proceed to next abstract media item // ----------------------------------------------------------------------------- // void CAbstractMediaMtpDataProviderEnumerator::ScanNextL() { - PRINT1( _L( "MM MTP => CAbstractMediaMtpDataProviderEnumerator::ScanNextL iStorages.Count = %d" ), iStorages.Count() ); - if ( iCurrentIndex < iCount ) + while (iStorages.Count() > 0) { - TRequestStatus* status = &iStatus; - User::RequestComplete( status, iStatus.Int() ); - SetActive(); - - PRINT2( _L( "MM MTP <> Current storage is still being scanned, current index = %d, total AbstractMedia count = %d" ), - iCurrentIndex, - iCount ); + while ( iEnumState < EEnumCount ) + { + if ( iCurrentIndex < iCount ) + { + TRequestStatus* status = &iStatus; + User::RequestComplete( status, iStatus.Int() ); + SetActive(); + PRINT2( _L( "MM MTP <> Current storage is still being scanned, current index = %d, total AbstractMedia count = %d" ), + iCurrentIndex, + iCount ); + return; + } + ++iEnumState; + if (iEnumState == EEnumCount) + { + break; + } + InitStorageL(); + } + iStorages.Remove( 0 ); + if (iStorages.Count() == 0) + { + break; + } + iEnumState = EEnumPlaylist; + InitStorageL(); } - // If there are one or more unscanned storages left - // (the currently scanned one is still on the list) - else if ( iStorages.Count() > 1 ) - { - iStorages.Remove( 0 ); - ScanStorageL( iStorages[0] ); - } - else - { - // We are done - PRINT( _L( "MM MTP <> Objects enumeration completed 2" ) ); - iStorages.Reset(); - SignalCompleteL( iDataProvider ); - } + // We are done + PRINT( _L( "MM MTP <> Objects enumeration completed" ) ); + delete iAbstractMedias; + iAbstractMedias = NULL; + iStorages.Reset(); + SignalCompleteL( iDataProvider ); } // ----------------------------------------------------------------------------- @@ -314,23 +320,35 @@ // Increase the index first in case of leave iCurrentIndex++; - - HBufC* abstractMedia = iDataProvider.GetWrapperL().GetAbstractMediaNameL( media, EMPXPlaylist ); + TMPXGeneralCategory category = ( iEnumState == EEnumPlaylist ) ? EMPXPlaylist : EMPXAbstractAlbum; + HBufC* abstractMedia = iDataProvider.GetWrapperL().GetAbstractMediaNameL( media, category ); CleanupStack::PushL( abstractMedia ); // + abstractMedia - AddEntryL( *abstractMedia ); - - // find all reference of each abstract media - CDesCArray* references = new ( ELeave ) CDesCArrayFlat( KMTPDriveGranularity ); - CleanupStack::PushL( references ); // + references + TBool ret = ETrue; + if ( iEnumState == EEnumAbstractAlbum ) + { + //The abstract album may be removed, check it first + ret = BaflUtils::FileExists( iFramework.Fs(), *abstractMedia ); + PRINT2( _L( "MM MTP <> BaflUtils::FileExists( RFs,%S ) ret = %d" ), abstractMedia, ret ); + } - PERFLOGSTART( KMpxQueryAbstractMediaReference ); - iDataProvider.GetWrapperL().GetAllReferenceL( media, *references ); - PERFLOGSTOP( KMpxQueryAbstractMediaReference ); + if ( ret ) + { + PRINT1( _L( "MM MTP <> CAbstractMediaMtpDataProviderEnumerator::RunL abstractMedia=%S" ), abstractMedia ); + AddEntryL( *abstractMedia ); - // insert references into reference db - AddReferencesL( *abstractMedia, *references ); - - CleanupStack::PopAndDestroy( references ); // - references + // find all reference of each abstract media + CDesCArray* references = new ( ELeave ) CDesCArrayFlat( KMTPDriveGranularity ); + CleanupStack::PushL( references ); // + references + + PERFLOGSTART( KMpxQueryAbstractMediaReference ); + iDataProvider.GetWrapperL().GetAllReferenceL( media, *references ); + PERFLOGSTOP( KMpxQueryAbstractMediaReference ); + + // insert references into reference db + AddReferencesL( *abstractMedia, *references ); + + CleanupStack::PopAndDestroy( references ); // - references + } CleanupStack::PopAndDestroy( abstractMedia ); // - abstractMedia ScanNextL(); @@ -392,6 +410,7 @@ PERFLOGSTART( KObjectManagerObjectUid ); TUint32 parentHandle = iFramework.ObjectMgr().HandleL( parser.DriveAndPath() ); PERFLOGSTOP( KObjectManagerObjectUid ); + object->SetUint( CMTPObjectMetaData::EParentHandle, parentHandle ); PERFLOGSTART( KObjectManagerInsert ); @@ -400,10 +419,14 @@ CleanupStack::PopAndDestroy( object );// - object - iDataProvider.GetWrapperL().CreateDummyFile( aSuid ); + //Only remember the playlist file for clean up + if( iEnumState == EEnumPlaylist ) + { + iDataProvider.GetWrapperL().CreateDummyFile( aSuid ); - // remember the abstract media file for clean up - iDataProvider.GetWrapperL().AddDummyFileL( aSuid ); + // remember the abstract media file for clean up + iDataProvider.GetWrapperL().AddDummyFileL( aSuid ); + } PRINT( _L( "MM MTP <= CAbstractMediaMtpDataProviderEnumerator::AddEntryL" ) ); } diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovidergetobjectproplist.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovidergetobjectproplist.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovidergetobjectproplist.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -16,6 +16,10 @@ */ +#include +#include +#include + #include "cabstractmediamtpdataprovidergetobjectproplist.h" #include "abstractmediamtpdataproviderconst.h" #include "mmmtpdplogger.h" @@ -81,15 +85,70 @@ // do nothing here, just leave, as this should never be invoked or invalid propcode // ----------------------------------------------------------------------------- // -TInt CAbstractMediaMtpDataProviderGetObjectPropList::ServiceSpecificObjectPropertyL( TUint16 /*aPropCode*/, - TUint32 /*aHandle*/ ) +TInt CAbstractMediaMtpDataProviderGetObjectPropList::ServiceSpecificObjectPropertyL( TUint16 aPropCode, + TUint32 aHandle ) { - PRINT( _L( "MM MTP <> CAbstractMediaMtpDataProviderGetObjectPropList::ServiceSpecificObjectPropertyL, leave with KErrNotSupported" ) ); + PRINT( _L( "MM MTP => CAbstractMediaMtpDataProviderGetObjectPropList::ServiceSpecificObjectPropertyL" ) ); + TInt err = KErrNone; + switch ( aPropCode ) + { + case EMTPObjectPropCodeRepresentativeSampleFormat: + { + iPropertyElement = &( iPropertyList->ReservePropElemL( aHandle, aPropCode ) ); + iPropertyElement->SetUint16L( CMTPTypeObjectPropListElement::EValue, 0 ); + } + break; + case EMTPObjectPropCodeRepresentativeSampleSize: + case EMTPObjectPropCodeRepresentativeSampleHeight: + case EMTPObjectPropCodeRepresentativeSampleWidth: + { + iPropertyElement = &( iPropertyList->ReservePropElemL( aHandle, aPropCode ) ); + iPropertyElement->SetUint32L( CMTPTypeObjectPropListElement::EValue, 0 ); + } + break; + case EMTPObjectPropCodeRepresentativeSampleData: + { + const TDesC& suid( iObject->DesC( CMTPObjectMetaData::ESuid ) ); + CMTPTypeArray* desData = CMTPTypeArray::NewLC( EMTPTypeAUINT8 ); // + desData + + RFile sampleFile; + TInt err = sampleFile.Open( iFramework.Fs(), suid, EFileShareReadersOnly ); + PRINT2( _L( "MM MTP <> EMTPObjectPropCodeRepresentativeSampleData open filename=%S, err=%d" ), &suid, err ); - // Do nothing now. - // May need add implementation here for further extension. + CleanupClosePushL( sampleFile ); // + sampleFile + TInt size = 0; + if( err == KErrNone ) + { + err = sampleFile.Size( size ); + } + PRINT2( _L( "MM MTP <> EMTPObjectPropCodeRepresentativeSampleData sampleFile.Size size=%d, err=%d" ), size, err ); + if( err == KErrNone && size > 0 ) + { + HBufC8* sampleData = HBufC8::NewLC( size * sizeof( TUint8 ) ); // + sampleData + TPtr8 samplePtr = sampleData->Des(); + err = sampleFile.Read( samplePtr ); + PRINT1( _L( "MM MTP <> EMTPObjectPropCodeRepresentativeSampleData sampleFile.Read err=%d" ), err ); + PRINT1( _L( "MM MTP <> EMTPObjectPropCodeRepresentativeSampleData samplePtr.Size=%d" ), samplePtr.Size() ); + if( err == KErrNone ) + { + desData->SetByDesL( samplePtr ); + } + CleanupStack::PopAndDestroy( sampleData ); // - sampleData + } + iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode)); + iPropertyElement->SetArrayL( CMTPTypeObjectPropListElement::EValue, *desData ); - return KErrNotSupported; + CleanupStack::PopAndDestroy( &sampleFile ); // - sampleFile + CleanupStack::PopAndDestroy( desData ); // - desData + } + break; + + default: + err = KErrNotSupported; + } + + PRINT1( _L( "MM MTP <= CAbstractMediaMtpDataProviderGetObjectPropList::ServiceSpecificObjectPropertyL, err = %d" ), err ); + return err; } // end of file diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovidergetobjectpropvalue.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovidergetobjectpropvalue.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovidergetobjectpropvalue.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -16,6 +16,9 @@ */ +#include +#include + #include "cabstractmediamtpdataprovidergetobjectpropvalue.h" #include "abstractmediamtpdataproviderconst.h" #include "mmmtpdplogger.h" @@ -81,13 +84,64 @@ // invoked or invalid propcode // ----------------------------------------------------------------------------- // -void CAbstractMediaMtpDataProviderGetObjectPropValue::ServiceSpecificObjectPropertyL( TUint16 /*aPropCode*/ ) +void CAbstractMediaMtpDataProviderGetObjectPropValue::ServiceSpecificObjectPropertyL( TUint16 aPropCode ) { - PRINT( _L( "MM MTP <> CAbstractMediaMtpDataProviderGetObjectPropValue::ServiceSpecificObjectPropertyL, leave with KErrNotSupported")); + PRINT( _L( "MM MTP => CAbstractMediaMtpDataProviderGetObjectPropValue::ServiceSpecificObjectPropertyL" ) ); + switch ( aPropCode ) + { + case EMTPObjectPropCodeRepresentativeSampleFormat: + { + iMTPTypeUint16.Set( 0 ); + SendDataL( iMTPTypeUint16 ); + } + break; + + case EMTPObjectPropCodeRepresentativeSampleSize: // fall through + case EMTPObjectPropCodeRepresentativeSampleHeight: // fall through + case EMTPObjectPropCodeRepresentativeSampleWidth: + { + iMTPTypeUint32.Set( 0 ); + SendDataL( iMTPTypeUint32 ); + } + break; - // May need add implementation here for further extension. + case EMTPObjectPropCodeRepresentativeSampleData: + { + if ( iMTPTypeArray != NULL ) + { + delete iMTPTypeArray; + iMTPTypeArray = NULL; + } + iMTPTypeArray = CMTPTypeArray::NewL( EMTPTypeAUINT8 ); + + const TDesC& suid = iObjectInfo->DesC( CMTPObjectMetaData::ESuid ); + PRINT1( _L( "MM MTP <> EMTPObjectPropCodeRepresentativeSampleData file suid=%S" ), &suid ); + RFile sampleFile; + User::LeaveIfError( sampleFile.Open( iFramework.Fs(), suid, EFileShareReadersOnly ) ); + CleanupClosePushL( sampleFile ); // + sampleFile + + TInt size = 0; + User::LeaveIfError( sampleFile.Size( size ) ); + PRINT1( _L( "MM MTP <> EMTPObjectPropCodeRepresentativeSampleData sampleFile.Size() size=%d" ), size ); - User::Leave( KErrNotSupported ); + if( size > 0 ) + { + HBufC8* sampleData = HBufC8::NewLC( size * sizeof(TUint8) ); // + sampleData + TPtr8 samplePtr = sampleData->Des(); + User::LeaveIfError( sampleFile.Read( samplePtr ) ); + iMTPTypeArray->SetByDesL( samplePtr ); + CleanupStack::PopAndDestroy( sampleData ); // - sampleData + } + CleanupStack::PopAndDestroy( &sampleFile ); // - sampleFile + + SendDataL( *iMTPTypeArray ); + } + break; + + default: + PRINT( _L( "MM MTP <> CAbstractMediaMtpDataProviderGetObjectPropValue::ServiceSpecificObjectPropertyL, leave with KErrNotSupported")); + User::Leave( KErrNotSupported ); + } } // end of file diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataproviderpropertysettingutility.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataproviderpropertysettingutility.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataproviderpropertysettingutility.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -17,6 +17,8 @@ #include #include +#include +#include #include "cabstractmediamtpdataproviderpropertysettingutility.h" #include "mmmtpdplogger.h" @@ -54,17 +56,40 @@ // Do nothing } -TMTPResponseCode CAbstractMediaMtpDataProviderPropertySettingUtility::SetSpecificObjectPropertyL( MMmMtpDpConfig& /*aDpConfig*/, - TUint16 /*aPropCode*/, - const CMTPObjectMetaData& /*aObject*/, - const CMTPTypeObjectPropListElement& /*aElement*/ ) +TMTPResponseCode CAbstractMediaMtpDataProviderPropertySettingUtility::SetSpecificObjectPropertyL( MMmMtpDpConfig& aDpConfig, + TUint16 aPropCode, + const CMTPObjectMetaData& aObject, + const CMTPTypeObjectPropListElement& aElement ) { PRINT( _L( "MM MTP => CAbstractMediaMtpDataProviderPropertySettingUtility::SetSpecificObjectPropertyL" ) ); - // Do nothing now. - // May need add implementation here for further extension. + TMTPResponseCode responseCode = EMTPRespCodeOK; + + switch ( aPropCode ) + { + case EMTPObjectPropCodeRepresentativeSampleData: + { + CMTPTypeArray* desData = CMTPTypeArray::NewLC( EMTPTypeAUINT8 ); + desData->SetByDesL( aElement.ArrayL( CMTPTypeObjectPropListElement::EValue ) ); + responseCode = SetMetaDataToWrapper( aDpConfig, aPropCode, *desData, aObject ); + CleanupStack::PopAndDestroy( desData ); + } + break; - return EMTPRespCodeOK; + case EMTPObjectPropCodeRepresentativeSampleFormat: + case EMTPObjectPropCodeRepresentativeSampleSize: + case EMTPObjectPropCodeRepresentativeSampleHeight: + case EMTPObjectPropCodeRepresentativeSampleWidth: + // no place to store, do nothing. reserve here for future usage + break; + + default: + // Should not happen, property code should have been checked before set to store. + User::Leave( KErrNotSupported ); + } + + PRINT( _L( "MM MTP <= CAbstractMediaMtpDataProviderPropertySettingUtility::SetSpecificObjectPropertyL" ) ); + return responseCode; } // end of file diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataproviderrenameobject.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataproviderrenameobject.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataproviderrenameobject.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -17,10 +17,9 @@ #include -#include #include +#include #include -#include #include "cabstractmediamtpdataproviderrenameobject.h" #include "mmmtpdplogger.h" @@ -92,7 +91,7 @@ } else { - TRAPD( err, iWrapper.RenameObjectL( iOldFileName, iFileName ) ); + TRAPD( err, iWrapper.RenameObjectL( *iObjectInfo, iFileName ) ); // should not fail for 1 file, keep it going, as folder already renamed if ( err != KErrNone ) diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovidersetobjectpropvalue.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovidersetobjectpropvalue.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovidersetobjectpropvalue.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -16,6 +16,8 @@ */ +#include + #include "cabstractmediamtpdataprovidersetobjectpropvalue.h" #include "abstractmediamtpdataproviderconst.h" #include "mmmtpdplogger.h" @@ -81,9 +83,22 @@ // invalid propcode // ----------------------------------------------------------------------------- // -TBool CAbstractMediaMtpDataProviderSetObjectPropValue::IsSpecificPropCodeReadOnly( TUint16 /*aPropCode*/ ) const +TBool CAbstractMediaMtpDataProviderSetObjectPropValue::IsSpecificPropCodeReadOnly( TUint16 aPropCode ) const { - return EFalse; + TBool ret = EFalse; + switch ( aPropCode ) + { + case EMTPObjectPropCodeRepresentativeSampleFormat: + case EMTPObjectPropCodeRepresentativeSampleSize: + case EMTPObjectPropCodeRepresentativeSampleHeight: + case EMTPObjectPropCodeRepresentativeSampleWidth: + ret = ETrue; + break; + default: + ret = EFalse; + break; + } + return ret; } // ----------------------------------------------------------------------------- @@ -92,14 +107,24 @@ // invalid propcode // ----------------------------------------------------------------------------- // -void CAbstractMediaMtpDataProviderSetObjectPropValue::ReceiveDataSpecificObjectPropertyL( TUint16 /*aPropCode*/ ) +void CAbstractMediaMtpDataProviderSetObjectPropValue::ReceiveDataSpecificObjectPropertyL( TUint16 aPropCode ) { - PRINT( _L( "MM MTP => CAbstractMediaMtpDataProviderSetObjectPropValue::ReceiveDataSpecificObjectPropertyL leave with KErrNotSupported" ) ); + PRINT( _L( "MM MTP => CAbstractMediaMtpDataProviderSetObjectPropValue::ReceiveDataSpecificObjectPropertyL" ) ); + if ( aPropCode == EMTPObjectPropCodeRepresentativeSampleData ) + { + delete iMTPTypeArray; + iMTPTypeArray = NULL; - // Do nothing now. - // May need add implementation here for further extension. - - User::Leave( KErrNotSupported ); + iMTPTypeArray = CMTPTypeArray::NewL( EMTPTypeAUINT8 ); + ReceiveDataL( *iMTPTypeArray ); + } + else + { + PRINT( _L( "MM MTP => CAbstractMediaMtpDataProviderSetObjectPropValue::ReceiveDataSpecificObjectPropertyL leave with KErrNotSupported" ) ); + // Do nothing now. + // May need add implementation here for further extension. + User::Leave( KErrNotSupported ); + } } // ----------------------------------------------------------------------------- @@ -108,15 +133,26 @@ // invalid propcode // ----------------------------------------------------------------------------- // -TMTPResponseCode CAbstractMediaMtpDataProviderSetObjectPropValue::ServiceSpecificObjectPropertyL( TUint16 /*aPropCode*/ ) +TMTPResponseCode CAbstractMediaMtpDataProviderSetObjectPropValue::ServiceSpecificObjectPropertyL( TUint16 aPropCode ) { - PRINT( _L( "MM MTP => CAbstractMediaMtpDataProviderSetObjectPropValue::ServiceSpecificObjectPropertyL leave with KErrNotSupported" ) ); + PRINT( _L( "MM MTP => CAbstractMediaMtpDataProviderSetObjectPropValue::ServiceSpecificObjectPropertyL" ) ); + TMTPResponseCode responseCode = EMTPRespCodeOK; - // Do nothing now. - // May need add implementation here for further extension. - User::Leave( KErrNotSupported ); - - return EMTPRespCodeOK; + if ( aPropCode == EMTPObjectPropCodeRepresentativeSampleData ) + { + responseCode = ServiceMetaDataToWrapperL( aPropCode, + *iMTPTypeArray, + *iObjectInfo ); + } + else + { + PRINT( _L( "MM MTP => CAbstractMediaMtpDataProviderSetObjectPropValue::ServiceSpecificObjectPropertyL leave with KErrNotSupported" ) ); + // Do nothing now. + // May need add implementation here for further extension. + User::Leave( KErrNotSupported ); + } + PRINT( _L( "MM MTP <= CAbstractMediaMtpDataProviderSetObjectPropValue::ServiceSpecificObjectPropertyL" ) ); + return responseCode; } // end of file diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovidersetobjectreferences.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovidersetobjectreferences.cpp Mon Mar 15 12:42:31 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,105 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implement the operation: SetObjectReferences -* -*/ - - -#include "cabstractmediamtpdataprovidersetobjectreferences.h" -#include "abstractmediamtpdataproviderconst.h" -#include "cmmmtpdpmetadataaccesswrapper.h" -#include "mmmtpdplogger.h" - -// ----------------------------------------------------------------------------- -// CAbstractMediaMtpDataProviderSetObjectReferences::NewL -// Two-phase construction method -// ----------------------------------------------------------------------------- -// -MMmRequestProcessor* CAbstractMediaMtpDataProviderSetObjectReferences::NewL( MMTPDataProviderFramework& aFramework, - MMTPConnection& aConnection, - MMmMtpDpConfig& aDpConfig ) - { - CAbstractMediaMtpDataProviderSetObjectReferences* self = - new ( ELeave ) CAbstractMediaMtpDataProviderSetObjectReferences( aFramework, - aConnection, - aDpConfig ); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - - return self; - } - -// ----------------------------------------------------------------------------- -// CAbstractMediaMtpDataProviderSetObjectReferences::ConstructL -// Two-phase construction method -// ----------------------------------------------------------------------------- -// -void CAbstractMediaMtpDataProviderSetObjectReferences::ConstructL() - { - // Do nothing - } - -// ----------------------------------------------------------------------------- -// CAbstractMediaMtpDataProviderSetObjectReferences::~CAbstractMediaMtpDataProviderSetObjectReferences -// Destructor -// ----------------------------------------------------------------------------- -// -CAbstractMediaMtpDataProviderSetObjectReferences::~CAbstractMediaMtpDataProviderSetObjectReferences() - { - // Do nothing - } - -// ----------------------------------------------------------------------------- -// CAbstractMediaMtpDataProviderSetObjectReferences::CAbstractMediaMtpDataProviderSetObjectReferences -// Standard c++ constructor -// ----------------------------------------------------------------------------- -// -CAbstractMediaMtpDataProviderSetObjectReferences::CAbstractMediaMtpDataProviderSetObjectReferences( MMTPDataProviderFramework& aFramework, - MMTPConnection& aConnection, - MMmMtpDpConfig& aDpConfig ) : - CSetObjectReferences( aFramework, aConnection, aDpConfig ) - { - // Do nothing - } - -// ----------------------------------------------------------------------------- -// CAbstractMediaMtpDataProviderSetObjectReferences::DoSetObjectReferencesL -// set references to DB -// ----------------------------------------------------------------------------- -// -void CAbstractMediaMtpDataProviderSetObjectReferences::DoSetObjectReferencesL( CMmMtpDpMetadataAccessWrapper& aWrapper, - TUint16 aObjectFormat, - const TDesC& aSrcFileName, - CDesCArray& aRefFileArray ) - { - TInt count = sizeof( KAbstractMediaMtpDataProviderSupportedFormats ) / sizeof (TUint16); - TBool supported = EFalse; - - for ( TInt i = 0; i < count; i++ ) - { - if( KAbstractMediaMtpDataProviderSupportedFormats[i] == aObjectFormat ) - { - supported = ETrue; - break; - } - } - - if ( supported ) - { - aWrapper.SetAbstractMediaL( aSrcFileName, aRefFileArray, EMPXPlaylist ); - } - } - -// end of file diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/inc/mediamtpdataproviderconst.h --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/inc/mediamtpdataproviderconst.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/inc/mediamtpdataproviderconst.h Wed Mar 31 22:26:09 2010 +0300 @@ -78,21 +78,21 @@ enum TMmMtpWidthRange { EMTPMinWidth = 0x000000b0, // 176 pixels - EMTPMaxWidth = 0x00000500, // 1280 pixels + EMTPMaxWidth = 0x00000500, // 1280 pixels, standard for 720p content EMTPStepWidth = 0x00000001, }; enum TMmMtpHeightRange { EMTPMinHeight = 0x00000090, // 144 pixels - EMTPMaxHeight = 0x000002D0, // 720 pixels + EMTPMaxHeight = 0x000002D0, // 720 pixels, standard for 720p content EMTPStepHeight = 0x00000001, }; enum TMmMtpVideoBitRateRange { EMTPWMVMinBitrate = 0x00000000, - EMTPWMVMaxBitrate = 0x01312D00, // 20 Mbps + EMTPWMVMaxBitrate = 0x01312D00, // 20 Mbps, recommanded by Helix team EMTPVideoBitrateStep = 0x00000001 }; @@ -111,7 +111,7 @@ enum TMmMtpFramesPerThousandSecondsRange { EMTPMinFramesPerThousandSeconds = 0x00000000, - EMTPMaxFramesPerThousandSeconds = 0x00007530, // 30000 frame per thousand seconds (30 frame/s) + EMTPMaxFramesPerThousandSeconds = 0x00007530, // 30000 frame per ms (30 frame/s), standard for progressive content EMTPStepFramesPerThousandSeconds = 0x00000001 }; @@ -195,6 +195,7 @@ EMTPObjectPropCodeNumberOfChannels, EMTPObjectPropCodeAudioWAVECodec, EMTPObjectPropCodeAudioBitRate, + EMTPObjectPropCodeAlbumArtist }; // Additional for audio formats @@ -215,7 +216,6 @@ EMTPObjectPropCodeHeight, EMTPObjectPropCodeDuration, EMTPObjectPropCodeGenre, - EMTPObjectPropCodeUseCount, EMTPObjectPropCodeSampleRate, EMTPObjectPropCodeNumberOfChannels, EMTPObjectPropCodeScanType, diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/inc/mediamtpdataproviderprocessor.h --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/inc/mediamtpdataproviderprocessor.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/inc/mediamtpdataproviderprocessor.h Wed Mar 31 22:26:09 2010 +0300 @@ -19,16 +19,14 @@ #ifndef MEDIAMTPDATAPROVIDERPROCESSOR_H #define MEDIAMTPDATAPROVIDERPROCESSOR_H -#include "crequestprocessor.h" - // class forward class MMTPConnection; class TMTPTypeRequest; class CMTPDataProviderPlugin; -class MMTPDataProviderFramework; class MMTPRequestProcessor; class CMediaMtpDataProvider; class MMmMtpDpConfig; +class MMmRequestProcessor; typedef MMmRequestProcessor* ( *TMediaMtpDataProviderRequestProcessorCreateFunc )( MMTPDataProviderFramework& aFramework, diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovider.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovider.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovider.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -25,6 +25,7 @@ #include #include "cmediamtpdataprovider.h" +#include "crequestprocessor.h" #include "mediamtpdataproviderconst.h" #include "cmediamtpdataproviderenumerator.h" #include "mmmtpdplogger.h" @@ -130,7 +131,7 @@ iMediaEnumerator = CMediaMtpDataProviderEnumerator::NewL( Framework(), *this ); - CMmMtpDpAccessSingleton::CreateL( Framework().Fs(), Framework() ); + CMmMtpDpAccessSingleton::CreateL( Framework() ); GetSupportedFormatL(); GetSupportedPropL(); diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidercopyobject.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidercopyobject.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidercopyobject.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -16,7 +16,6 @@ */ -#include #include #include #include @@ -172,7 +171,6 @@ case EMTPObjectPropCodeWidth: case EMTPObjectPropCodeHeight: case EMTPObjectPropCodeDuration: - case EMTPObjectPropCodeUseCount: case EMTPObjectPropCodeSampleRate: case EMTPObjectPropCodeAudioWAVECodec: case EMTPObjectPropCodeAudioBitRate: @@ -217,6 +215,7 @@ break; } + // centralize logic to handle error, doing so, that's on need to trap the // Ignore all errors came from mpx db. // It's enough that only file copied successfully no matter metadata got whatever failure. if ( err != KErrNone ) diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataproviderdescriptionutility.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataproviderdescriptionutility.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataproviderdescriptionutility.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -120,7 +120,6 @@ case EMTPObjectPropCodeArtist: // Artist case EMTPObjectPropCodeTrack: // Track case EMTPObjectPropCodeGenre: // Genre - case EMTPObjectPropCodeUseCount: // Use Count case EMTPObjectPropCodeAlbumName: // Album Name case EMTPObjectPropCodeAlbumArtist: // Album Artist case EMTPObjectPropCodeOriginalReleaseDate: // Original Release Date @@ -531,16 +530,17 @@ CMTPTypeObjectPropDescEnumerationForm* expectedForm = CMTPTypeObjectPropDescEnumerationForm::NewLC( EMTPTypeString ); // + expectedForm - CMTPTypeString* string = CMTPTypeString::NewLC( _L("SP@LL") ); // + string + CMTPTypeString* string = CMTPTypeString::NewLC( _L( "SP@LL" ) ); // + string expectedForm->AppendSupportedValueL( *string ); - string->SetL( _L("SP@ML") ); + string->SetL( _L("SP@ML")); expectedForm->AppendSupportedValueL( *string ); - string->SetL( _L("MP@LL") ); + string->SetL( _L("MP@LL")); expectedForm->AppendSupportedValueL( *string ); - string->SetL( _L("MP@ML") ); + // newly added to support 720p content as suggested by Helix team + string->SetL( _L("MP@ML")); expectedForm->AppendSupportedValueL( *string ); - string->SetL( _L("MP@HL") ); + string->SetL( _L("MP@HL")); expectedForm->AppendSupportedValueL( *string ); CMTPTypeObjectPropDesc::TPropertyInfo propertyInfo; diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidergetobjectproplist.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidergetobjectproplist.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidergetobjectproplist.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -16,7 +16,6 @@ */ -#include #include #include #include @@ -156,7 +155,6 @@ case EMTPObjectPropCodeWidth: case EMTPObjectPropCodeHeight: case EMTPObjectPropCodeDuration: - case EMTPObjectPropCodeUseCount: case EMTPObjectPropCodeSampleRate: case EMTPObjectPropCodeAudioWAVECodec: case EMTPObjectPropCodeAudioBitRate: diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidergetobjectpropvalue.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidergetobjectpropvalue.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidergetobjectpropvalue.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -16,7 +16,6 @@ */ -#include #include #include @@ -120,7 +119,6 @@ case EMTPObjectPropCodeWidth: // 0xDC87 case EMTPObjectPropCodeHeight: // 0xDC88 case EMTPObjectPropCodeDuration: // 0xDC89 - case EMTPObjectPropCodeUseCount: // 0xDC91 case EMTPObjectPropCodeSampleRate: // 0xDE93 case EMTPObjectPropCodeAudioWAVECodec: // 0xDE99 case EMTPObjectPropCodeAudioBitRate: // 0xDE9A diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidermoveobject.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidermoveobject.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidermoveobject.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -15,7 +15,7 @@ * */ -#include + #include #include #include @@ -184,7 +184,6 @@ case EMTPObjectPropCodeWidth: case EMTPObjectPropCodeHeight: case EMTPObjectPropCodeDuration: - case EMTPObjectPropCodeUseCount: case EMTPObjectPropCodeSampleRate: case EMTPObjectPropCodeAudioWAVECodec: case EMTPObjectPropCodeAudioBitRate: diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataproviderpropertysettingutility.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataproviderpropertysettingutility.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataproviderpropertysettingutility.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -22,6 +22,7 @@ #include #include #include +#include #include "tobjectdescription.h" #include "cmmmtpdpmetadataaccesswrapper.h" @@ -118,7 +119,6 @@ case EMTPObjectPropCodeWidth: case EMTPObjectPropCodeHeight: case EMTPObjectPropCodeDuration: - case EMTPObjectPropCodeUseCount: case EMTPObjectPropCodeSampleRate: case EMTPObjectPropCodeAudioWAVECodec: case EMTPObjectPropCodeAudioBitRate: diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidersetobjectpropvalue.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidersetobjectpropvalue.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidersetobjectpropvalue.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -16,7 +16,6 @@ */ -#include #include #include #include @@ -132,7 +131,6 @@ case EMTPObjectPropCodeWidth: // 0xDC87 case EMTPObjectPropCodeHeight: // 0xDC88 case EMTPObjectPropCodeDuration: // 0xDC89 - case EMTPObjectPropCodeUseCount: // 0xDC91 case EMTPObjectPropCodeSampleRate: // 0xDE93 case EMTPObjectPropCodeAudioWAVECodec: // 0xDE99 case EMTPObjectPropCodeAudioBitRate: // 0xDE9A @@ -185,7 +183,6 @@ case EMTPObjectPropCodeWidth: //0xDC87 case EMTPObjectPropCodeHeight: //0xDC88 case EMTPObjectPropCodeDuration: //0xDC89 - case EMTPObjectPropCodeUseCount: //0xDC91 case EMTPObjectPropCodeSampleRate: //0xDE93 case EMTPObjectPropCodeAudioWAVECodec: //0xDE99 case EMTPObjectPropCodeAudioBitRate: //0xDE9A diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/bwins/mmmtpdprequestprocessoru.def --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/bwins/mmmtpdprequestprocessoru.def Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/bwins/mmmtpdprequestprocessoru.def Wed Mar 31 22:26:09 2010 +0300 @@ -22,18 +22,18 @@ ?NewL@CSetObjectReferences@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 21 NONAME ; class MMmRequestProcessor * CSetObjectReferences::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) ?Release@CMmMtpDpAccessSingleton@@SAXXZ @ 22 NONAME ; void CMmMtpDpAccessSingleton::Release(void) ?UsbDisconnect@CSendObject@@MAEXXZ @ 23 NONAME ; void CSendObject::UsbDisconnect(void) - ?DoSetObjectReferencesL@CSetObjectReferences@@MAEXAAVCMmMtpDpMetadataAccessWrapper@@GABVTDesC16@@AAVCDesC16Array@@@Z @ 24 NONAME ; void CSetObjectReferences::DoSetObjectReferencesL(class CMmMtpDpMetadataAccessWrapper &, unsigned short, class TDesC16 const &, class CDesC16Array &) - ?ServiceL@CGetFormatCapabilities@@MAEXXZ @ 25 NONAME ; void CGetFormatCapabilities::ServiceL(void) - ?GetAllReferenceL@CMmMtpDpMetadataAccessWrapper@@QAEXPAVCMPXMedia@@AAVCDesC16Array@@@Z @ 26 NONAME ; void CMmMtpDpMetadataAccessWrapper::GetAllReferenceL(class CMPXMedia *, class CDesC16Array &) - ??1CSetObjectPropList@@UAE@XZ @ 27 NONAME ; CSetObjectPropList::~CSetObjectPropList(void) - ?ServiceL@CSetObjectPropList@@MAEXXZ @ 28 NONAME ; void CSetObjectPropList::ServiceL(void) - ??0CMoveObject@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 29 NONAME ; CMoveObject::CMoveObject(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) - ??0CRequestUnknown@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@@Z @ 30 NONAME ; CRequestUnknown::CRequestUnknown(class MMTPDataProviderFramework &, class MMTPConnection &) - ?ConstructL@CGetObjectPropList@@IAEXXZ @ 31 NONAME ; void CGetObjectPropList::ConstructL(void) - ??1CSendObject@@UAE@XZ @ 32 NONAME ; CSendObject::~CSendObject(void) - ?ServiceMetaDataFromWrapperL@CGetObjectPropValue@@IAEXGAAVMMTPType@@ABVCMTPObjectMetaData@@@Z @ 33 NONAME ; void CGetObjectPropValue::ServiceMetaDataFromWrapperL(unsigned short, class MMTPType &, class CMTPObjectMetaData const &) - ?NewL@CGetObject@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 34 NONAME ; class MMmRequestProcessor * CGetObject::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) - ??1CGetObjectPropValue@@UAE@XZ @ 35 NONAME ; CGetObjectPropValue::~CGetObjectPropValue(void) + ?ServiceL@CGetFormatCapabilities@@MAEXXZ @ 24 NONAME ; void CGetFormatCapabilities::ServiceL(void) + ?GetAllReferenceL@CMmMtpDpMetadataAccessWrapper@@QAEXPAVCMPXMedia@@AAVCDesC16Array@@@Z @ 25 NONAME ; void CMmMtpDpMetadataAccessWrapper::GetAllReferenceL(class CMPXMedia *, class CDesC16Array &) + ??1CSetObjectPropList@@UAE@XZ @ 26 NONAME ; CSetObjectPropList::~CSetObjectPropList(void) + ?ServiceL@CSetObjectPropList@@MAEXXZ @ 27 NONAME ; void CSetObjectPropList::ServiceL(void) + ??0CMoveObject@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 28 NONAME ; CMoveObject::CMoveObject(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) + ??0CRequestUnknown@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@@Z @ 29 NONAME ; CRequestUnknown::CRequestUnknown(class MMTPDataProviderFramework &, class MMTPConnection &) + ?ConstructL@CGetObjectPropList@@IAEXXZ @ 30 NONAME ; void CGetObjectPropList::ConstructL(void) + ??1CSendObject@@UAE@XZ @ 31 NONAME ; CSendObject::~CSendObject(void) + ?ServiceMetaDataFromWrapperL@CGetObjectPropValue@@IAEXGAAVMMTPType@@ABVCMTPObjectMetaData@@@Z @ 32 NONAME ; void CGetObjectPropValue::ServiceMetaDataFromWrapperL(unsigned short, class MMTPType &, class CMTPObjectMetaData const &) + ?NewL@CGetObject@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 33 NONAME ; class MMmRequestProcessor * CGetObject::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) + ??1CGetObjectPropValue@@UAE@XZ @ 34 NONAME ; CGetObjectPropValue::~CGetObjectPropValue(void) + ?CreateL@CMmMtpDpAccessSingleton@@SAXAAVMMTPDataProviderFramework@@@Z @ 35 NONAME ; void CMmMtpDpAccessSingleton::CreateL(class MMTPDataProviderFramework &) ??1CGetFormatCapabilities@@UAE@XZ @ 36 NONAME ; CGetFormatCapabilities::~CGetFormatCapabilities(void) ?ServiceL@CSetObjectReferences@@EAEXXZ @ 37 NONAME ; void CSetObjectReferences::ServiceL(void) ?DoHandleDataIToRPhaseL@CRequestProcessor@@MAEHXZ @ 38 NONAME ; int CRequestProcessor::DoHandleDataIToRPhaseL(void) @@ -43,118 +43,117 @@ ?ServiceL@CGetObjectPropValue@@MAEXXZ @ 42 NONAME ; void CGetObjectPropValue::ServiceL(void) ??1CRenameObject@@UAE@XZ @ 43 NONAME ; CRenameObject::~CRenameObject(void) ?Match@CRequestProcessor@@MBEHABVTMTPTypeEvent@@AAVMMTPConnection@@@Z @ 44 NONAME ; int CRequestProcessor::Match(class TMTPTypeEvent const &, class MMTPConnection &) const - ?IsVideo@MmMtpDpUtility@@SAHABVTDesC16@@@Z @ 45 NONAME ; int MmMtpDpUtility::IsVideo(class TDesC16 const &) - ?DoHandleCompletingPhaseL@CSendObject@@MAEHXZ @ 46 NONAME ; int CSendObject::DoHandleCompletingPhaseL(void) - ?GetDrmStatus@MmMtpDpUtility@@SAHABVTDesC16@@@Z @ 47 NONAME ; int MmMtpDpUtility::GetDrmStatus(class TDesC16 const &) - ?RunL@CRenameObject@@MAEXXZ @ 48 NONAME ; void CRenameObject::RunL(void) - ??0CSetObjectReferences@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 49 NONAME ; CSetObjectReferences::CSetObjectReferences(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) - ??0CRequestProcessor@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@HPBUTMTPRequestElementInfo@@@Z @ 50 NONAME ; CRequestProcessor::CRequestProcessor(class MMTPDataProviderFramework &, class MMTPConnection &, int, struct TMTPRequestElementInfo const *) - ?ServiceL@CSendObject@@MAEXXZ @ 51 NONAME ; void CSendObject::ServiceL(void) - ?Request@CRequestProcessor@@MBEABVTMTPTypeRequest@@XZ @ 52 NONAME ; class TMTPTypeRequest const & CRequestProcessor::Request(void) const - ?CreateL@CMmMtpDpAccessSingleton@@SAXAAVRFs@@AAVMMTPDataProviderFramework@@@Z @ 53 NONAME ; void CMmMtpDpAccessSingleton::CreateL(class RFs &, class MMTPDataProviderFramework &) - ?DoCancel@CRequestProcessor@@MAEXXZ @ 54 NONAME ; void CRequestProcessor::DoCancel(void) - ?CheckRequestL@CGetPartialObject@@MAE?AW4TMTPResponseCode@@XZ @ 55 NONAME ; enum TMTPResponseCode CGetPartialObject::CheckRequestL(void) - ?NewL@CRequestUnknown@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@@Z @ 56 NONAME ; class MMmRequestProcessor * CRequestUnknown::NewL(class MMTPDataProviderFramework &, class MMTPConnection &) - ??0CGetFormatCapabilities@@AAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 57 NONAME ; CGetFormatCapabilities::CGetFormatCapabilities(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) - ?ConstructL@CGetObjectInfo@@AAEXXZ @ 58 NONAME ; void CGetObjectInfo::ConstructL(void) - ?UsbDisconnect@CRequestProcessor@@MAEXXZ @ 59 NONAME ; void CRequestProcessor::UsbDisconnect(void) - ?UpdateMusicCollectionL@CMmMtpDpMetadataAccessWrapper@@QAEXXZ @ 60 NONAME ; void CMmMtpDpMetadataAccessWrapper::UpdateMusicCollectionL(void) - ??1CMoveObject@@UAE@XZ @ 61 NONAME ; CMoveObject::~CMoveObject(void) - ?CheckRequestL@CSendObject@@MAE?AW4TMTPResponseCode@@XZ @ 62 NONAME ; enum TMTPResponseCode CSendObject::CheckRequestL(void) - ??1CRequestProcessor@@MAE@XZ @ 63 NONAME ; CRequestProcessor::~CRequestProcessor(void) - ?SetAbstractMediaL@CMmMtpDpMetadataAccessWrapper@@QAEXABVTDesC16@@AAVCDesC16Array@@W4TMPXGeneralCategory@@@Z @ 64 NONAME ; void CMmMtpDpMetadataAccessWrapper::SetAbstractMediaL(class TDesC16 const &, class CDesC16Array &, enum TMPXGeneralCategory) - ?DoCancel@CDeleteObject@@MAEXXZ @ 65 NONAME ; void CDeleteObject::DoCancel(void) - ??1CGetObject@@UAE@XZ @ 66 NONAME ; CGetObject::~CGetObject(void) - ?NewL@CGetInterdependentPropDesc@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 67 NONAME ; class MMmRequestProcessor * CGetInterdependentPropDesc::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) - ?DoHandleResponsePhaseL@CSetObjectReferences@@EAEHXZ @ 68 NONAME ; int CSetObjectReferences::DoHandleResponsePhaseL(void) - ?GetAccessWrapperL@CMmMtpDpAccessSingleton@@SAAAVCMmMtpDpMetadataAccessWrapper@@XZ @ 69 NONAME ; class CMmMtpDpMetadataAccessWrapper & CMmMtpDpAccessSingleton::GetAccessWrapperL(void) - ??1CGetObjectPropsSupported@@UAE@XZ @ 70 NONAME ; CGetObjectPropsSupported::~CGetObjectPropsSupported(void) - ?CheckRequestL@CGetObjectPropList@@MAE?AW4TMTPResponseCode@@XZ @ 71 NONAME ; enum TMTPResponseCode CGetObjectPropList::CheckRequestL(void) - ?HasDataphase@CRequestProcessor@@MBEHXZ @ 72 NONAME ; int CRequestProcessor::HasDataphase(void) const - ?NewL@CGetObjectPropsSupported@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 73 NONAME ; class MMmRequestProcessor * CGetObjectPropsSupported::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) - ?Connection@CRequestProcessor@@MBEAAVMMTPConnection@@XZ @ 74 NONAME ; class MMTPConnection & CRequestProcessor::Connection(void) const - ?ConstructL@CGetFormatCapabilities@@AAEXXZ @ 75 NONAME ; void CGetFormatCapabilities::ConstructL(void) - ??1CPropertySettingUtility@@UAE@XZ @ 76 NONAME ; CPropertySettingUtility::~CPropertySettingUtility(void) - ??1CGetPartialObject@@UAE@XZ @ 77 NONAME ; CGetPartialObject::~CGetPartialObject(void) - ?NewL@CGetObjectInfo@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 78 NONAME ; class MMmRequestProcessor * CGetObjectInfo::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) - ?RunError@CSetObjectPropList@@MAEHH@Z @ 79 NONAME ; int CSetObjectPropList::RunError(int) - ?CheckRequestL@CGetInterdependentPropDesc@@MAE?AW4TMTPResponseCode@@XZ @ 80 NONAME ; enum TMTPResponseCode CGetInterdependentPropDesc::CheckRequestL(void) - ?Match@CRequestUnknown@@MBEHABVTMTPTypeRequest@@AAVMMTPConnection@@@Z @ 81 NONAME ; int CRequestUnknown::Match(class TMTPTypeRequest const &, class MMTPConnection &) const - ?ServiceL@CMoveObject@@MAEXXZ @ 82 NONAME ; void CMoveObject::ServiceL(void) - ?CreateDummyFile@CMmMtpDpMetadataAccessWrapper@@QAEXABVTDesC16@@@Z @ 83 NONAME ; void CMmMtpDpMetadataAccessWrapper::CreateDummyFile(class TDesC16 const &) - ?CheckRequestL@CGetObjectPropDesc@@MAE?AW4TMTPResponseCode@@XZ @ 84 NONAME ; enum TMTPResponseCode CGetObjectPropDesc::CheckRequestL(void) - ?DoHandleRToIPhaseL@CRequestProcessor@@MAEHXZ @ 85 NONAME ; int CRequestProcessor::DoHandleRToIPhaseL(void) - ?ServiceMetaDataToWrapperL@CSetObjectPropValue@@IAE?AW4TMTPResponseCode@@GAAVMMTPType@@ABVCMTPObjectMetaData@@@Z @ 86 NONAME ; enum TMTPResponseCode CSetObjectPropValue::ServiceMetaDataToWrapperL(unsigned short, class MMTPType &, class CMTPObjectMetaData const &) - ?NewCommonObjectPropertyL@CDescriptionUtility@@QAEPAVCMTPTypeObjectPropDesc@@G@Z @ 87 NONAME ; class CMTPTypeObjectPropDesc * CDescriptionUtility::NewCommonObjectPropertyL(unsigned short) - ?FormatFromFilename@MmMtpDpUtility@@SA?AW4TMTPFormatCode@@ABVTDesC16@@@Z @ 88 NONAME ; enum TMTPFormatCode MmMtpDpUtility::FormatFromFilename(class TDesC16 const &) - ?CheckRequestL@CSetObjectPropValue@@MAE?AW4TMTPResponseCode@@XZ @ 89 NONAME ; enum TMTPResponseCode CSetObjectPropValue::CheckRequestL(void) - ??0CPropertySettingUtility@@IAE@XZ @ 90 NONAME ; CPropertySettingUtility::CPropertySettingUtility(void) - ?Match@CRequestProcessor@@MBEHABVTMTPTypeRequest@@AAVMMTPConnection@@@Z @ 91 NONAME ; int CRequestProcessor::Match(class TMTPTypeRequest const &, class MMTPConnection &) const - ??0CCopyObject@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 92 NONAME ; CCopyObject::CCopyObject(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) - ?CheckRequestL@CRequestProcessor@@MAE?AW4TMTPResponseCode@@XZ @ 93 NONAME ; enum TMTPResponseCode CRequestProcessor::CheckRequestL(void) - ?SendResponseL@CRequestProcessor@@IAEXW4TMTPResponseCode@@HPAK@Z @ 94 NONAME ; void CRequestProcessor::SendResponseL(enum TMTPResponseCode, int, unsigned long *) - ??0CGetPartialObject@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@@Z @ 95 NONAME ; CGetPartialObject::CGetPartialObject(class MMTPDataProviderFramework &, class MMTPConnection &) - ?DoHandleCompletingPhaseL@CRequestProcessor@@MAEHXZ @ 96 NONAME ; int CRequestProcessor::DoHandleCompletingPhaseL(void) - ?DeleteDummyFile@CMmMtpDpMetadataAccessWrapper@@QAEXABVTDesC16@@@Z @ 97 NONAME ; void CMmMtpDpMetadataAccessWrapper::DeleteDummyFile(class TDesC16 const &) - ??1CGetObjectInfo@@UAE@XZ @ 98 NONAME ; CGetObjectInfo::~CGetObjectInfo(void) - ?ServiceL@CRequestUnknown@@MAEXXZ @ 99 NONAME ; void CRequestUnknown::ServiceL(void) - ?HasDataphase@CSetObjectPropList@@MBEHXZ @ 100 NONAME ; int CSetObjectPropList::HasDataphase(void) const - ?NewL@CGetObjectReferences@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 101 NONAME ; class MMmRequestProcessor * CGetObjectReferences::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) - ?DoCancel@CRenameObject@@MAEXXZ @ 102 NONAME ; void CRenameObject::DoCancel(void) - ??1CSetObjectReferences@@UAE@XZ @ 103 NONAME ; CSetObjectReferences::~CSetObjectReferences(void) - ?Match@CSendObject@@MBEHABVTMTPTypeRequest@@AAVMMTPConnection@@@Z @ 104 NONAME ; int CSendObject::Match(class TMTPTypeRequest const &, class MMTPConnection &) const - ?NewL@CSetObjectPropList@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 105 NONAME ; class MMmRequestProcessor * CSetObjectPropList::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) - ?GetAllAbstractMediaL@CMmMtpDpMetadataAccessWrapper@@QAEXABVTDesC16@@PAPAVCMPXMediaArray@@W4TMPXGeneralCategory@@@Z @ 106 NONAME ; void CMmMtpDpMetadataAccessWrapper::GetAllAbstractMediaL(class TDesC16 const &, class CMPXMediaArray * *, enum TMPXGeneralCategory) - ??1CCopyObject@@UAE@XZ @ 107 NONAME ; CCopyObject::~CCopyObject(void) - ?RunL@CGetObjectPropList@@MAEXXZ @ 108 NONAME ; void CGetObjectPropList::RunL(void) - ?GetModifiedContentL@CMmMtpDpMetadataAccessWrapper@@QAEXABVTDesC16@@AAHAAVCDesC16Array@@@Z @ 109 NONAME ; void CMmMtpDpMetadataAccessWrapper::GetModifiedContentL(class TDesC16 const &, int &, class CDesC16Array &) - ?NewRangeFormDescriptionL@CDescriptionUtility@@QAEPAVCMTPTypeObjectPropDesc@@GKKKH@Z @ 110 NONAME ; class CMTPTypeObjectPropDesc * CDescriptionUtility::NewRangeFormDescriptionL(unsigned short, unsigned long, unsigned long, unsigned long, int) - ?RunError@CRequestProcessor@@MAEHH@Z @ 111 NONAME ; int CRequestProcessor::RunError(int) - ?SessionId@CRequestProcessor@@MAEKXZ @ 112 NONAME ; unsigned long CRequestProcessor::SessionId(void) - ??0CDescriptionUtility@@IAE@XZ @ 113 NONAME ; CDescriptionUtility::CDescriptionUtility(void) - ?HandleEventL@CRequestProcessor@@MAEXABVTMTPTypeEvent@@@Z @ 114 NONAME ; void CRequestProcessor::HandleEventL(class TMTPTypeEvent const &) - ?NewL@CGetPartialObject@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 115 NONAME ; class MMmRequestProcessor * CGetPartialObject::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) - ?HasDataphase@CSetObjectReferences@@EBEHXZ @ 116 NONAME ; int CSetObjectReferences::HasDataphase(void) const - ?ConstructL@CGetInterdependentPropDesc@@IAEXXZ @ 117 NONAME ; void CGetInterdependentPropDesc::ConstructL(void) - ?RenameObjectL@CMmMtpDpMetadataAccessWrapper@@QAEXABVTDesC16@@0@Z @ 118 NONAME ; void CMmMtpDpMetadataAccessWrapper::RenameObjectL(class TDesC16 const &, class TDesC16 const &) - ?RunError@CGetObjectPropList@@MAEHH@Z @ 119 NONAME ; int CGetObjectPropList::RunError(int) - ?DoHandleResponsePhaseL@CSetObjectPropList@@MAEHXZ @ 120 NONAME ; int CSetObjectPropList::DoHandleResponsePhaseL(void) - ??0CDeleteObject@@AAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 121 NONAME ; CDeleteObject::CDeleteObject(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) - ?NewL@CRenameObject@@SAPAV1@AAVMMTPDataProviderFramework@@AAVCMmMtpDpMetadataAccessWrapper@@@Z @ 122 NONAME ; class CRenameObject * CRenameObject::NewL(class MMTPDataProviderFramework &, class CMmMtpDpMetadataAccessWrapper &) - ?GetObjectMetadataValueL@CMmMtpDpMetadataAccessWrapper@@QAEXGAAVMMTPType@@ABVCMTPObjectMetaData@@@Z @ 123 NONAME ; void CMmMtpDpMetadataAccessWrapper::GetObjectMetadataValueL(unsigned short, class MMTPType &, class CMTPObjectMetaData const &) - ?AddDummyFileL@CMmMtpDpMetadataAccessWrapper@@QAEXABVTDesC16@@@Z @ 124 NONAME ; void CMmMtpDpMetadataAccessWrapper::AddDummyFileL(class TDesC16 const &) - ??0CGetObjectPropDesc@@AAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 125 NONAME ; CGetObjectPropDesc::CGetObjectPropDesc(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) - ?ConstructL@CGetObjectPropDesc@@AAEXXZ @ 126 NONAME ; void CGetObjectPropDesc::ConstructL(void) - ??0CGetInterdependentPropDesc@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 127 NONAME ; CGetInterdependentPropDesc::CGetInterdependentPropDesc(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) - ??1CGetObjectPropDesc@@UAE@XZ @ 128 NONAME ; CGetObjectPropDesc::~CGetObjectPropDesc(void) - ?ServiceL@CGetObjectPropDesc@@MAEXXZ @ 129 NONAME ; void CGetObjectPropDesc::ServiceL(void) - ?HasDataphase@CSetObjectPropValue@@MBEHXZ @ 130 NONAME ; int CSetObjectPropValue::HasDataphase(void) const - ?ServiceL@CCopyObject@@MAEXXZ @ 131 NONAME ; void CCopyObject::ServiceL(void) - ?CheckRequestL@CGetObjectPropValue@@MAE?AW4TMTPResponseCode@@XZ @ 132 NONAME ; enum TMTPResponseCode CGetObjectPropValue::CheckRequestL(void) - ?CloseSessionL@CMmMtpDpAccessSingleton@@SAXXZ @ 133 NONAME ; void CMmMtpDpAccessSingleton::CloseSessionL(void) - ?NewL@CGetFormatCapabilities@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 134 NONAME ; class MMmRequestProcessor * CGetFormatCapabilities::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) - ?ReceiveDataL@CRequestProcessor@@IAEXAAVMMTPType@@@Z @ 135 NONAME ; void CRequestProcessor::ReceiveDataL(class MMTPType &) - ??1CDescriptionUtility@@UAE@XZ @ 136 NONAME ; CDescriptionUtility::~CDescriptionUtility(void) - ?RunL@CSetObjectPropList@@MAEXXZ @ 137 NONAME ; void CSetObjectPropList::RunL(void) - ?ConstructL@CMoveObject@@IAEXXZ @ 138 NONAME ; void CMoveObject::ConstructL(void) - ?NewL@CSendObject@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 139 NONAME ; class MMmRequestProcessor * CSendObject::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) - ??1CGetObjectReferences@@UAE@XZ @ 140 NONAME ; CGetObjectReferences::~CGetObjectReferences(void) - ?HasDataphase@CSendObject@@MBEHXZ @ 141 NONAME ; int CSendObject::HasDataphase(void) const - ??1CSetObjectPropValue@@UAE@XZ @ 142 NONAME ; CSetObjectPropValue::~CSetObjectPropValue(void) - ?ConstructL@CRenameObject@@IAEXXZ @ 143 NONAME ; void CRenameObject::ConstructL(void) - ?SendDataL@CRequestProcessor@@IAEXABVMMTPType@@@Z @ 144 NONAME ; void CRequestProcessor::SendDataL(class MMTPType const &) - ?DoHandleResponsePhaseL@CSendObject@@MAEHXZ @ 145 NONAME ; int CSendObject::DoHandleResponsePhaseL(void) - ?DoCancel@CGetObjectPropList@@MAEXXZ @ 146 NONAME ; void CGetObjectPropList::DoCancel(void) - ?ServiceL@CGetInterdependentPropDesc@@MAEXXZ @ 147 NONAME ; void CGetInterdependentPropDesc::ServiceL(void) - ?DoHandleRequestPhaseL@CRequestProcessor@@MAEHXZ @ 148 NONAME ; int CRequestProcessor::DoHandleRequestPhaseL(void) - ?GetAbstractMediaNameL@CMmMtpDpMetadataAccessWrapper@@QAEPAVHBufC16@@PAVCMPXMedia@@W4TMPXGeneralCategory@@@Z @ 149 NONAME ; class HBufC16 * CMmMtpDpMetadataAccessWrapper::GetAbstractMediaNameL(class CMPXMedia *, enum TMPXGeneralCategory) - ?ServiceL@CSetObjectPropValue@@MAEXXZ @ 150 NONAME ; void CSetObjectPropValue::ServiceL(void) - ?RunError@CRenameObject@@MAEHH@Z @ 151 NONAME ; int CRenameObject::RunError(int) - ??1CDeleteObject@@UAE@XZ @ 152 NONAME ; CDeleteObject::~CDeleteObject(void) - ?DoHandleResponsePhaseL@CGetPartialObject@@MAEHXZ @ 153 NONAME ; int CGetPartialObject::DoHandleResponsePhaseL(void) - ?CheckRequestL@CGetFormatCapabilities@@MAE?AW4TMTPResponseCode@@XZ @ 154 NONAME ; enum TMTPResponseCode CGetFormatCapabilities::CheckRequestL(void) - ??0CSetObjectPropValue@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 155 NONAME ; CSetObjectPropValue::CSetObjectPropValue(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) - ??1CGetObjectPropList@@UAE@XZ @ 156 NONAME ; CGetObjectPropList::~CGetObjectPropList(void) - ?ServiceL@CGetObjectPropList@@MAEXXZ @ 157 NONAME ; void CGetObjectPropList::ServiceL(void) - ??0CRenameObject@@IAE@AAVMMTPDataProviderFramework@@AAVCMmMtpDpMetadataAccessWrapper@@@Z @ 158 NONAME ; CRenameObject::CRenameObject(class MMTPDataProviderFramework &, class CMmMtpDpMetadataAccessWrapper &) + ?DoHandleCompletingPhaseL@CSendObject@@MAEHXZ @ 45 NONAME ; int CSendObject::DoHandleCompletingPhaseL(void) + ?GetDrmStatus@MmMtpDpUtility@@SAHABVTDesC16@@@Z @ 46 NONAME ; int MmMtpDpUtility::GetDrmStatus(class TDesC16 const &) + ?RunL@CRenameObject@@MAEXXZ @ 47 NONAME ; void CRenameObject::RunL(void) + ??0CSetObjectReferences@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 48 NONAME ; CSetObjectReferences::CSetObjectReferences(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) + ??0CRequestProcessor@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@HPBUTMTPRequestElementInfo@@@Z @ 49 NONAME ; CRequestProcessor::CRequestProcessor(class MMTPDataProviderFramework &, class MMTPConnection &, int, struct TMTPRequestElementInfo const *) + ?ServiceL@CSendObject@@MAEXXZ @ 50 NONAME ; void CSendObject::ServiceL(void) + ?Request@CRequestProcessor@@MBEABVTMTPTypeRequest@@XZ @ 51 NONAME ; class TMTPTypeRequest const & CRequestProcessor::Request(void) const + ?DoCancel@CRequestProcessor@@MAEXXZ @ 52 NONAME ; void CRequestProcessor::DoCancel(void) + ?CheckRequestL@CGetPartialObject@@MAE?AW4TMTPResponseCode@@XZ @ 53 NONAME ; enum TMTPResponseCode CGetPartialObject::CheckRequestL(void) + ?NewL@CRequestUnknown@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@@Z @ 54 NONAME ; class MMmRequestProcessor * CRequestUnknown::NewL(class MMTPDataProviderFramework &, class MMTPConnection &) + ??0CGetFormatCapabilities@@AAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 55 NONAME ; CGetFormatCapabilities::CGetFormatCapabilities(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) + ?ConstructL@CGetObjectInfo@@AAEXXZ @ 56 NONAME ; void CGetObjectInfo::ConstructL(void) + ?UsbDisconnect@CRequestProcessor@@MAEXXZ @ 57 NONAME ; void CRequestProcessor::UsbDisconnect(void) + ?UpdateMusicCollectionL@CMmMtpDpMetadataAccessWrapper@@QAEXXZ @ 58 NONAME ; void CMmMtpDpMetadataAccessWrapper::UpdateMusicCollectionL(void) + ??1CMoveObject@@UAE@XZ @ 59 NONAME ; CMoveObject::~CMoveObject(void) + ?CheckRequestL@CSendObject@@MAE?AW4TMTPResponseCode@@XZ @ 60 NONAME ; enum TMTPResponseCode CSendObject::CheckRequestL(void) + ??1CRequestProcessor@@MAE@XZ @ 61 NONAME ; CRequestProcessor::~CRequestProcessor(void) + ?DoCancel@CDeleteObject@@MAEXXZ @ 62 NONAME ; void CDeleteObject::DoCancel(void) + ??1CGetObject@@UAE@XZ @ 63 NONAME ; CGetObject::~CGetObject(void) + ?NewL@CGetInterdependentPropDesc@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 64 NONAME ; class MMmRequestProcessor * CGetInterdependentPropDesc::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) + ?DoHandleResponsePhaseL@CSetObjectReferences@@EAEHXZ @ 65 NONAME ; int CSetObjectReferences::DoHandleResponsePhaseL(void) + ?GetAccessWrapperL@CMmMtpDpAccessSingleton@@SAAAVCMmMtpDpMetadataAccessWrapper@@XZ @ 66 NONAME ; class CMmMtpDpMetadataAccessWrapper & CMmMtpDpAccessSingleton::GetAccessWrapperL(void) + ??1CGetObjectPropsSupported@@UAE@XZ @ 67 NONAME ; CGetObjectPropsSupported::~CGetObjectPropsSupported(void) + ?CheckRequestL@CGetObjectPropList@@MAE?AW4TMTPResponseCode@@XZ @ 68 NONAME ; enum TMTPResponseCode CGetObjectPropList::CheckRequestL(void) + ?HasDataphase@CRequestProcessor@@MBEHXZ @ 69 NONAME ; int CRequestProcessor::HasDataphase(void) const + ?NewL@CGetObjectPropsSupported@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 70 NONAME ; class MMmRequestProcessor * CGetObjectPropsSupported::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) + ?Connection@CRequestProcessor@@MBEAAVMMTPConnection@@XZ @ 71 NONAME ; class MMTPConnection & CRequestProcessor::Connection(void) const + ?ConstructL@CGetFormatCapabilities@@AAEXXZ @ 72 NONAME ; void CGetFormatCapabilities::ConstructL(void) + ??1CPropertySettingUtility@@UAE@XZ @ 73 NONAME ; CPropertySettingUtility::~CPropertySettingUtility(void) + ??1CGetPartialObject@@UAE@XZ @ 74 NONAME ; CGetPartialObject::~CGetPartialObject(void) + ?NewL@CGetObjectInfo@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 75 NONAME ; class MMmRequestProcessor * CGetObjectInfo::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) + ?RunError@CSetObjectPropList@@MAEHH@Z @ 76 NONAME ; int CSetObjectPropList::RunError(int) + ?CheckRequestL@CGetInterdependentPropDesc@@MAE?AW4TMTPResponseCode@@XZ @ 77 NONAME ; enum TMTPResponseCode CGetInterdependentPropDesc::CheckRequestL(void) + ?Match@CRequestUnknown@@MBEHABVTMTPTypeRequest@@AAVMMTPConnection@@@Z @ 78 NONAME ; int CRequestUnknown::Match(class TMTPTypeRequest const &, class MMTPConnection &) const + ?ServiceL@CMoveObject@@MAEXXZ @ 79 NONAME ; void CMoveObject::ServiceL(void) + ?CreateDummyFile@CMmMtpDpMetadataAccessWrapper@@QAEXABVTDesC16@@@Z @ 80 NONAME ; void CMmMtpDpMetadataAccessWrapper::CreateDummyFile(class TDesC16 const &) + ?CheckRequestL@CGetObjectPropDesc@@MAE?AW4TMTPResponseCode@@XZ @ 81 NONAME ; enum TMTPResponseCode CGetObjectPropDesc::CheckRequestL(void) + ?DoHandleRToIPhaseL@CRequestProcessor@@MAEHXZ @ 82 NONAME ; int CRequestProcessor::DoHandleRToIPhaseL(void) + ?ServiceMetaDataToWrapperL@CSetObjectPropValue@@IAE?AW4TMTPResponseCode@@GAAVMMTPType@@ABVCMTPObjectMetaData@@@Z @ 83 NONAME ; enum TMTPResponseCode CSetObjectPropValue::ServiceMetaDataToWrapperL(unsigned short, class MMTPType &, class CMTPObjectMetaData const &) + ?NewCommonObjectPropertyL@CDescriptionUtility@@QAEPAVCMTPTypeObjectPropDesc@@G@Z @ 84 NONAME ; class CMTPTypeObjectPropDesc * CDescriptionUtility::NewCommonObjectPropertyL(unsigned short) + ?FormatFromFilename@MmMtpDpUtility@@SA?AW4TMTPFormatCode@@ABVTDesC16@@@Z @ 85 NONAME ; enum TMTPFormatCode MmMtpDpUtility::FormatFromFilename(class TDesC16 const &) + ?CheckRequestL@CSetObjectPropValue@@MAE?AW4TMTPResponseCode@@XZ @ 86 NONAME ; enum TMTPResponseCode CSetObjectPropValue::CheckRequestL(void) + ??0CPropertySettingUtility@@IAE@XZ @ 87 NONAME ; CPropertySettingUtility::CPropertySettingUtility(void) + ?Match@CRequestProcessor@@MBEHABVTMTPTypeRequest@@AAVMMTPConnection@@@Z @ 88 NONAME ; int CRequestProcessor::Match(class TMTPTypeRequest const &, class MMTPConnection &) const + ??0CCopyObject@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 89 NONAME ; CCopyObject::CCopyObject(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) + ?CheckRequestL@CRequestProcessor@@MAE?AW4TMTPResponseCode@@XZ @ 90 NONAME ; enum TMTPResponseCode CRequestProcessor::CheckRequestL(void) + ?SendResponseL@CRequestProcessor@@IAEXW4TMTPResponseCode@@HPAK@Z @ 91 NONAME ; void CRequestProcessor::SendResponseL(enum TMTPResponseCode, int, unsigned long *) + ??0CGetPartialObject@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@@Z @ 92 NONAME ; CGetPartialObject::CGetPartialObject(class MMTPDataProviderFramework &, class MMTPConnection &) + ?DoHandleCompletingPhaseL@CRequestProcessor@@MAEHXZ @ 93 NONAME ; int CRequestProcessor::DoHandleCompletingPhaseL(void) + ?DeleteDummyFile@CMmMtpDpMetadataAccessWrapper@@QAEXABVTDesC16@@@Z @ 94 NONAME ; void CMmMtpDpMetadataAccessWrapper::DeleteDummyFile(class TDesC16 const &) + ?DoSetObjectReferencesL@CSetObjectReferences@@IAEXABVCMTPObjectMetaData@@@Z @ 95 NONAME ; void CSetObjectReferences::DoSetObjectReferencesL(class CMTPObjectMetaData const &) + ??1CGetObjectInfo@@UAE@XZ @ 96 NONAME ; CGetObjectInfo::~CGetObjectInfo(void) + ?ServiceL@CRequestUnknown@@MAEXXZ @ 97 NONAME ; void CRequestUnknown::ServiceL(void) + ?HasDataphase@CSetObjectPropList@@MBEHXZ @ 98 NONAME ; int CSetObjectPropList::HasDataphase(void) const + ?NewL@CGetObjectReferences@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 99 NONAME ; class MMmRequestProcessor * CGetObjectReferences::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) + ?DoCancel@CRenameObject@@MAEXXZ @ 100 NONAME ; void CRenameObject::DoCancel(void) + ??1CSetObjectReferences@@UAE@XZ @ 101 NONAME ; CSetObjectReferences::~CSetObjectReferences(void) + ?Match@CSendObject@@MBEHABVTMTPTypeRequest@@AAVMMTPConnection@@@Z @ 102 NONAME ; int CSendObject::Match(class TMTPTypeRequest const &, class MMTPConnection &) const + ?NewL@CSetObjectPropList@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 103 NONAME ; class MMmRequestProcessor * CSetObjectPropList::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) + ?GetAllAbstractMediaL@CMmMtpDpMetadataAccessWrapper@@QAEXABVTDesC16@@PAPAVCMPXMediaArray@@W4TMPXGeneralCategory@@@Z @ 104 NONAME ; void CMmMtpDpMetadataAccessWrapper::GetAllAbstractMediaL(class TDesC16 const &, class CMPXMediaArray * *, enum TMPXGeneralCategory) + ??1CCopyObject@@UAE@XZ @ 105 NONAME ; CCopyObject::~CCopyObject(void) + ?GetModifiedContentL@CMmMtpDpMetadataAccessWrapper@@QAEXABVTDesC16@@AAHAAVCDesC16Array@@@Z @ 106 NONAME ; void CMmMtpDpMetadataAccessWrapper::GetModifiedContentL(class TDesC16 const &, int &, class CDesC16Array &) + ?RunL@CGetObjectPropList@@MAEXXZ @ 107 NONAME ; void CGetObjectPropList::RunL(void) + ?NewRangeFormDescriptionL@CDescriptionUtility@@QAEPAVCMTPTypeObjectPropDesc@@GKKKH@Z @ 108 NONAME ; class CMTPTypeObjectPropDesc * CDescriptionUtility::NewRangeFormDescriptionL(unsigned short, unsigned long, unsigned long, unsigned long, int) + ?RunError@CRequestProcessor@@MAEHH@Z @ 109 NONAME ; int CRequestProcessor::RunError(int) + ?SessionId@CRequestProcessor@@MAEKXZ @ 110 NONAME ; unsigned long CRequestProcessor::SessionId(void) + ??0CDescriptionUtility@@IAE@XZ @ 111 NONAME ; CDescriptionUtility::CDescriptionUtility(void) + ?HandleEventL@CRequestProcessor@@MAEXABVTMTPTypeEvent@@@Z @ 112 NONAME ; void CRequestProcessor::HandleEventL(class TMTPTypeEvent const &) + ?NewL@CGetPartialObject@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 113 NONAME ; class MMmRequestProcessor * CGetPartialObject::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) + ?HasDataphase@CSetObjectReferences@@EBEHXZ @ 114 NONAME ; int CSetObjectReferences::HasDataphase(void) const + ?ConstructL@CGetInterdependentPropDesc@@IAEXXZ @ 115 NONAME ; void CGetInterdependentPropDesc::ConstructL(void) + ?RunError@CGetObjectPropList@@MAEHH@Z @ 116 NONAME ; int CGetObjectPropList::RunError(int) + ?DoHandleResponsePhaseL@CSetObjectPropList@@MAEHXZ @ 117 NONAME ; int CSetObjectPropList::DoHandleResponsePhaseL(void) + ??0CDeleteObject@@AAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 118 NONAME ; CDeleteObject::CDeleteObject(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) + ?NewL@CRenameObject@@SAPAV1@AAVMMTPDataProviderFramework@@AAVCMmMtpDpMetadataAccessWrapper@@@Z @ 119 NONAME ; class CRenameObject * CRenameObject::NewL(class MMTPDataProviderFramework &, class CMmMtpDpMetadataAccessWrapper &) + ?RenameObjectL@CMmMtpDpMetadataAccessWrapper@@QAEXABVCMTPObjectMetaData@@ABVTDesC16@@@Z @ 120 NONAME ; void CMmMtpDpMetadataAccessWrapper::RenameObjectL(class CMTPObjectMetaData const &, class TDesC16 const &) + ?GetObjectMetadataValueL@CMmMtpDpMetadataAccessWrapper@@QAEXGAAVMMTPType@@ABVCMTPObjectMetaData@@@Z @ 121 NONAME ; void CMmMtpDpMetadataAccessWrapper::GetObjectMetadataValueL(unsigned short, class MMTPType &, class CMTPObjectMetaData const &) + ?AddDummyFileL@CMmMtpDpMetadataAccessWrapper@@QAEXABVTDesC16@@@Z @ 122 NONAME ; void CMmMtpDpMetadataAccessWrapper::AddDummyFileL(class TDesC16 const &) + ??0CGetObjectPropDesc@@AAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 123 NONAME ; CGetObjectPropDesc::CGetObjectPropDesc(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) + ?ConstructL@CGetObjectPropDesc@@AAEXXZ @ 124 NONAME ; void CGetObjectPropDesc::ConstructL(void) + ??0CGetInterdependentPropDesc@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 125 NONAME ; CGetInterdependentPropDesc::CGetInterdependentPropDesc(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) + ??1CGetObjectPropDesc@@UAE@XZ @ 126 NONAME ; CGetObjectPropDesc::~CGetObjectPropDesc(void) + ?ServiceL@CGetObjectPropDesc@@MAEXXZ @ 127 NONAME ; void CGetObjectPropDesc::ServiceL(void) + ?HasDataphase@CSetObjectPropValue@@MBEHXZ @ 128 NONAME ; int CSetObjectPropValue::HasDataphase(void) const + ?ServiceL@CCopyObject@@MAEXXZ @ 129 NONAME ; void CCopyObject::ServiceL(void) + ?CheckRequestL@CGetObjectPropValue@@MAE?AW4TMTPResponseCode@@XZ @ 130 NONAME ; enum TMTPResponseCode CGetObjectPropValue::CheckRequestL(void) + ?CloseSessionL@CMmMtpDpAccessSingleton@@SAXXZ @ 131 NONAME ; void CMmMtpDpAccessSingleton::CloseSessionL(void) + ?NewL@CGetFormatCapabilities@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 132 NONAME ; class MMmRequestProcessor * CGetFormatCapabilities::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) + ?ReceiveDataL@CRequestProcessor@@IAEXAAVMMTPType@@@Z @ 133 NONAME ; void CRequestProcessor::ReceiveDataL(class MMTPType &) + ??1CDescriptionUtility@@UAE@XZ @ 134 NONAME ; CDescriptionUtility::~CDescriptionUtility(void) + ?RunL@CSetObjectPropList@@MAEXXZ @ 135 NONAME ; void CSetObjectPropList::RunL(void) + ?ConstructL@CMoveObject@@IAEXXZ @ 136 NONAME ; void CMoveObject::ConstructL(void) + ?NewL@CSendObject@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 137 NONAME ; class MMmRequestProcessor * CSendObject::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) + ??1CGetObjectReferences@@UAE@XZ @ 138 NONAME ; CGetObjectReferences::~CGetObjectReferences(void) + ?HasDataphase@CSendObject@@MBEHXZ @ 139 NONAME ; int CSendObject::HasDataphase(void) const + ??1CSetObjectPropValue@@UAE@XZ @ 140 NONAME ; CSetObjectPropValue::~CSetObjectPropValue(void) + ?ConstructL@CRenameObject@@IAEXXZ @ 141 NONAME ; void CRenameObject::ConstructL(void) + ?SendDataL@CRequestProcessor@@IAEXABVMMTPType@@@Z @ 142 NONAME ; void CRequestProcessor::SendDataL(class MMTPType const &) + ?DoHandleResponsePhaseL@CSendObject@@MAEHXZ @ 143 NONAME ; int CSendObject::DoHandleResponsePhaseL(void) + ?SetReferenceL@CMmMtpDpMetadataAccessWrapper@@QAEXABVCMTPObjectMetaData@@AAVCDesC16Array@@@Z @ 144 NONAME ; void CMmMtpDpMetadataAccessWrapper::SetReferenceL(class CMTPObjectMetaData const &, class CDesC16Array &) + ?DoCancel@CGetObjectPropList@@MAEXXZ @ 145 NONAME ; void CGetObjectPropList::DoCancel(void) + ?ServiceL@CGetInterdependentPropDesc@@MAEXXZ @ 146 NONAME ; void CGetInterdependentPropDesc::ServiceL(void) + ?DoHandleRequestPhaseL@CRequestProcessor@@MAEHXZ @ 147 NONAME ; int CRequestProcessor::DoHandleRequestPhaseL(void) + ?GetAbstractMediaNameL@CMmMtpDpMetadataAccessWrapper@@QAEPAVHBufC16@@PAVCMPXMedia@@W4TMPXGeneralCategory@@@Z @ 148 NONAME ; class HBufC16 * CMmMtpDpMetadataAccessWrapper::GetAbstractMediaNameL(class CMPXMedia *, enum TMPXGeneralCategory) + ?ServiceL@CSetObjectPropValue@@MAEXXZ @ 149 NONAME ; void CSetObjectPropValue::ServiceL(void) + ?RunError@CRenameObject@@MAEHH@Z @ 150 NONAME ; int CRenameObject::RunError(int) + ??1CDeleteObject@@UAE@XZ @ 151 NONAME ; CDeleteObject::~CDeleteObject(void) + ?DoHandleResponsePhaseL@CGetPartialObject@@MAEHXZ @ 152 NONAME ; int CGetPartialObject::DoHandleResponsePhaseL(void) + ?CheckRequestL@CGetFormatCapabilities@@MAE?AW4TMTPResponseCode@@XZ @ 153 NONAME ; enum TMTPResponseCode CGetFormatCapabilities::CheckRequestL(void) + ??0CSetObjectPropValue@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 154 NONAME ; CSetObjectPropValue::CSetObjectPropValue(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) + ??1CGetObjectPropList@@UAE@XZ @ 155 NONAME ; CGetObjectPropList::~CGetObjectPropList(void) + ?ServiceL@CGetObjectPropList@@MAEXXZ @ 156 NONAME ; void CGetObjectPropList::ServiceL(void) + ??0CRenameObject@@IAE@AAVMMTPDataProviderFramework@@AAVCMmMtpDpMetadataAccessWrapper@@@Z @ 157 NONAME ; CRenameObject::CRenameObject(class MMTPDataProviderFramework &, class CMmMtpDpMetadataAccessWrapper &) diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/eabi/mmmtpdprequestprocessoru.def --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/eabi/mmmtpdprequestprocessoru.def Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/eabi/mmmtpdprequestprocessoru.def Wed Mar 31 22:26:09 2010 +0300 @@ -49,231 +49,230 @@ _ZN14CGetObjectInfoD2Ev @ 48 NONAME _ZN14MmMtpDpUtility12GetDrmStatusERK7TDesC16 @ 49 NONAME _ZN14MmMtpDpUtility18FormatFromFilenameERK7TDesC16 @ 50 NONAME - _ZN14MmMtpDpUtility7IsVideoERK7TDesC16 @ 51 NONAME - _ZN15CRequestUnknown4NewLER25MMTPDataProviderFrameworkR14MMTPConnection @ 52 NONAME - _ZN15CRequestUnknown8ServiceLEv @ 53 NONAME - _ZN15CRequestUnknownC1ER25MMTPDataProviderFrameworkR14MMTPConnection @ 54 NONAME - _ZN15CRequestUnknownC2ER25MMTPDataProviderFrameworkR14MMTPConnection @ 55 NONAME - _ZN15CRequestUnknownD0Ev @ 56 NONAME - _ZN15CRequestUnknownD1Ev @ 57 NONAME - _ZN15CRequestUnknownD2Ev @ 58 NONAME - _ZN17CGetPartialObject13CheckRequestLEv @ 59 NONAME - _ZN17CGetPartialObject22DoHandleResponsePhaseLEv @ 60 NONAME - _ZN17CGetPartialObject4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 61 NONAME - _ZN17CGetPartialObject8ServiceLEv @ 62 NONAME - _ZN17CGetPartialObjectC1ER25MMTPDataProviderFrameworkR14MMTPConnection @ 63 NONAME - _ZN17CGetPartialObjectC2ER25MMTPDataProviderFrameworkR14MMTPConnection @ 64 NONAME - _ZN17CGetPartialObjectD0Ev @ 65 NONAME - _ZN17CGetPartialObjectD1Ev @ 66 NONAME - _ZN17CGetPartialObjectD2Ev @ 67 NONAME - _ZN17CRequestProcessor12HandleEventLERK13TMTPTypeEvent @ 68 NONAME - _ZN17CRequestProcessor12ReceiveDataLER8MMTPType @ 69 NONAME - _ZN17CRequestProcessor13CheckRequestLEv @ 70 NONAME - _ZN17CRequestProcessor13SendResponseLE16TMTPResponseCodeiPm @ 71 NONAME - _ZN17CRequestProcessor13UsbDisconnectEv @ 72 NONAME - _ZN17CRequestProcessor14HandleRequestLERK15TMTPTypeRequest20TMTPTransactionPhase @ 73 NONAME - _ZN17CRequestProcessor18DoHandleRToIPhaseLEv @ 74 NONAME - _ZN17CRequestProcessor21DoHandleRequestPhaseLEv @ 75 NONAME - _ZN17CRequestProcessor22DoHandleDataIToRPhaseLEv @ 76 NONAME - _ZN17CRequestProcessor22DoHandleResponsePhaseLEv @ 77 NONAME - _ZN17CRequestProcessor24DoHandleCompletingPhaseLEv @ 78 NONAME - _ZN17CRequestProcessor4RunLEv @ 79 NONAME - _ZN17CRequestProcessor7ReleaseEv @ 80 NONAME - _ZN17CRequestProcessor8DoCancelEv @ 81 NONAME - _ZN17CRequestProcessor8RunErrorEi @ 82 NONAME - _ZN17CRequestProcessor9SendDataLERK8MMTPType @ 83 NONAME - _ZN17CRequestProcessor9SessionIdEv @ 84 NONAME - _ZN17CRequestProcessorC2ER25MMTPDataProviderFrameworkR14MMTPConnectioniPK22TMTPRequestElementInfo @ 85 NONAME - _ZN17CRequestProcessorD0Ev @ 86 NONAME - _ZN17CRequestProcessorD1Ev @ 87 NONAME - _ZN17CRequestProcessorD2Ev @ 88 NONAME - _ZN18CGetObjectPropDesc10ConstructLEv @ 89 NONAME - _ZN18CGetObjectPropDesc13CheckRequestLEv @ 90 NONAME - _ZN18CGetObjectPropDesc4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 91 NONAME - _ZN18CGetObjectPropDesc8ServiceLEv @ 92 NONAME - _ZN18CGetObjectPropDescC1ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 93 NONAME - _ZN18CGetObjectPropDescC2ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 94 NONAME - _ZN18CGetObjectPropDescD0Ev @ 95 NONAME - _ZN18CGetObjectPropDescD1Ev @ 96 NONAME - _ZN18CGetObjectPropDescD2Ev @ 97 NONAME - _ZN18CGetObjectPropList10ConstructLEv @ 98 NONAME - _ZN18CGetObjectPropList13CheckRequestLEv @ 99 NONAME - _ZN18CGetObjectPropList4RunLEv @ 100 NONAME - _ZN18CGetObjectPropList8DoCancelEv @ 101 NONAME - _ZN18CGetObjectPropList8RunErrorEi @ 102 NONAME - _ZN18CGetObjectPropList8ServiceLEv @ 103 NONAME - _ZN18CGetObjectPropListC2ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 104 NONAME - _ZN18CGetObjectPropListD0Ev @ 105 NONAME - _ZN18CGetObjectPropListD1Ev @ 106 NONAME - _ZN18CGetObjectPropListD2Ev @ 107 NONAME - _ZN18CSetObjectPropList13CheckRequestLEv @ 108 NONAME - _ZN18CSetObjectPropList22DoHandleResponsePhaseLEv @ 109 NONAME - _ZN18CSetObjectPropList4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 110 NONAME - _ZN18CSetObjectPropList4RunLEv @ 111 NONAME - _ZN18CSetObjectPropList8DoCancelEv @ 112 NONAME - _ZN18CSetObjectPropList8RunErrorEi @ 113 NONAME - _ZN18CSetObjectPropList8ServiceLEv @ 114 NONAME - _ZN18CSetObjectPropListD0Ev @ 115 NONAME - _ZN18CSetObjectPropListD1Ev @ 116 NONAME - _ZN18CSetObjectPropListD2Ev @ 117 NONAME - _ZN19CDescriptionUtility24NewCommonObjectPropertyLEt @ 118 NONAME - _ZN19CDescriptionUtility24NewRangeFormDescriptionLEtmmmi @ 119 NONAME - _ZN19CDescriptionUtilityC2Ev @ 120 NONAME - _ZN19CDescriptionUtilityD0Ev @ 121 NONAME - _ZN19CDescriptionUtilityD1Ev @ 122 NONAME - _ZN19CDescriptionUtilityD2Ev @ 123 NONAME - _ZN19CGetObjectPropValue13CheckRequestLEv @ 124 NONAME - _ZN19CGetObjectPropValue27ServiceMetaDataFromWrapperLEtR8MMTPTypeRK18CMTPObjectMetaData @ 125 NONAME - _ZN19CGetObjectPropValue8ServiceLEv @ 126 NONAME - _ZN19CGetObjectPropValueC2ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 127 NONAME - _ZN19CGetObjectPropValueD0Ev @ 128 NONAME - _ZN19CGetObjectPropValueD1Ev @ 129 NONAME - _ZN19CGetObjectPropValueD2Ev @ 130 NONAME - _ZN19CSetObjectPropValue13CheckRequestLEv @ 131 NONAME - _ZN19CSetObjectPropValue22DoHandleResponsePhaseLEv @ 132 NONAME - _ZN19CSetObjectPropValue25ServiceMetaDataToWrapperLEtR8MMTPTypeRK18CMTPObjectMetaData @ 133 NONAME - _ZN19CSetObjectPropValue8ServiceLEv @ 134 NONAME - _ZN19CSetObjectPropValueC2ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 135 NONAME - _ZN19CSetObjectPropValueD0Ev @ 136 NONAME - _ZN19CSetObjectPropValueD1Ev @ 137 NONAME - _ZN19CSetObjectPropValueD2Ev @ 138 NONAME - _ZN20CGetObjectReferences4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 139 NONAME - _ZN20CGetObjectReferencesD0Ev @ 140 NONAME - _ZN20CGetObjectReferencesD1Ev @ 141 NONAME - _ZN20CGetObjectReferencesD2Ev @ 142 NONAME - _ZN20CSetObjectReferences22DoHandleResponsePhaseLEv @ 143 NONAME - _ZN20CSetObjectReferences22DoSetObjectReferencesLER29CMmMtpDpMetadataAccessWrappertRK7TDesC16R12CDesC16Array @ 144 NONAME - _ZN20CSetObjectReferences4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 145 NONAME - _ZN20CSetObjectReferences8ServiceLEv @ 146 NONAME - _ZN20CSetObjectReferencesC1ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 147 NONAME - _ZN20CSetObjectReferencesC2ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 148 NONAME - _ZN20CSetObjectReferencesD0Ev @ 149 NONAME - _ZN20CSetObjectReferencesD1Ev @ 150 NONAME - _ZN20CSetObjectReferencesD2Ev @ 151 NONAME - _ZN22CGetFormatCapabilities10ConstructLEv @ 152 NONAME - _ZN22CGetFormatCapabilities13CheckRequestLEv @ 153 NONAME - _ZN22CGetFormatCapabilities4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 154 NONAME - _ZN22CGetFormatCapabilities8ServiceLEv @ 155 NONAME - _ZN22CGetFormatCapabilitiesC1ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 156 NONAME - _ZN22CGetFormatCapabilitiesC2ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 157 NONAME - _ZN22CGetFormatCapabilitiesD0Ev @ 158 NONAME - _ZN22CGetFormatCapabilitiesD1Ev @ 159 NONAME - _ZN22CGetFormatCapabilitiesD2Ev @ 160 NONAME - _ZN23CMmMtpDpAccessSingleton12OpenSessionLEv @ 161 NONAME - _ZN23CMmMtpDpAccessSingleton13CloseSessionLEv @ 162 NONAME - _ZN23CMmMtpDpAccessSingleton17GetAccessWrapperLEv @ 163 NONAME - _ZN23CMmMtpDpAccessSingleton7CreateLER3RFsR25MMTPDataProviderFramework @ 164 NONAME - _ZN23CMmMtpDpAccessSingleton7ReleaseEv @ 165 NONAME - _ZN23CPropertySettingUtility20SetMetaDataToWrapperER14MMmMtpDpConfigtR8MMTPTypeRK18CMTPObjectMetaData @ 166 NONAME - _ZN23CPropertySettingUtilityC2Ev @ 167 NONAME - _ZN23CPropertySettingUtilityD0Ev @ 168 NONAME - _ZN23CPropertySettingUtilityD1Ev @ 169 NONAME - _ZN23CPropertySettingUtilityD2Ev @ 170 NONAME - _ZN24CGetObjectPropsSupported4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 171 NONAME - _ZN24CGetObjectPropsSupported8ServiceLEv @ 172 NONAME - _ZN24CGetObjectPropsSupportedD0Ev @ 173 NONAME - _ZN24CGetObjectPropsSupportedD1Ev @ 174 NONAME - _ZN24CGetObjectPropsSupportedD2Ev @ 175 NONAME - _ZN26CGetInterdependentPropDesc10ConstructLEv @ 176 NONAME - _ZN26CGetInterdependentPropDesc13CheckRequestLEv @ 177 NONAME - _ZN26CGetInterdependentPropDesc4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 178 NONAME - _ZN26CGetInterdependentPropDesc8ServiceLEv @ 179 NONAME - _ZN26CGetInterdependentPropDescC1ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 180 NONAME - _ZN26CGetInterdependentPropDescC2ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 181 NONAME - _ZN26CGetInterdependentPropDescD0Ev @ 182 NONAME - _ZN26CGetInterdependentPropDescD1Ev @ 183 NONAME - _ZN26CGetInterdependentPropDescD2Ev @ 184 NONAME - _ZN29CMmMtpDpMetadataAccessWrapper13AddDummyFileLERK7TDesC16 @ 185 NONAME - _ZN29CMmMtpDpMetadataAccessWrapper13RenameObjectLERK7TDesC16S2_ @ 186 NONAME + _ZN15CRequestUnknown4NewLER25MMTPDataProviderFrameworkR14MMTPConnection @ 51 NONAME + _ZN15CRequestUnknown8ServiceLEv @ 52 NONAME + _ZN15CRequestUnknownC1ER25MMTPDataProviderFrameworkR14MMTPConnection @ 53 NONAME + _ZN15CRequestUnknownC2ER25MMTPDataProviderFrameworkR14MMTPConnection @ 54 NONAME + _ZN15CRequestUnknownD0Ev @ 55 NONAME + _ZN15CRequestUnknownD1Ev @ 56 NONAME + _ZN15CRequestUnknownD2Ev @ 57 NONAME + _ZN17CGetPartialObject13CheckRequestLEv @ 58 NONAME + _ZN17CGetPartialObject22DoHandleResponsePhaseLEv @ 59 NONAME + _ZN17CGetPartialObject4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 60 NONAME + _ZN17CGetPartialObject8ServiceLEv @ 61 NONAME + _ZN17CGetPartialObjectC1ER25MMTPDataProviderFrameworkR14MMTPConnection @ 62 NONAME + _ZN17CGetPartialObjectC2ER25MMTPDataProviderFrameworkR14MMTPConnection @ 63 NONAME + _ZN17CGetPartialObjectD0Ev @ 64 NONAME + _ZN17CGetPartialObjectD1Ev @ 65 NONAME + _ZN17CGetPartialObjectD2Ev @ 66 NONAME + _ZN17CRequestProcessor12HandleEventLERK13TMTPTypeEvent @ 67 NONAME + _ZN17CRequestProcessor12ReceiveDataLER8MMTPType @ 68 NONAME + _ZN17CRequestProcessor13CheckRequestLEv @ 69 NONAME + _ZN17CRequestProcessor13SendResponseLE16TMTPResponseCodeiPm @ 70 NONAME + _ZN17CRequestProcessor13UsbDisconnectEv @ 71 NONAME + _ZN17CRequestProcessor14HandleRequestLERK15TMTPTypeRequest20TMTPTransactionPhase @ 72 NONAME + _ZN17CRequestProcessor18DoHandleRToIPhaseLEv @ 73 NONAME + _ZN17CRequestProcessor21DoHandleRequestPhaseLEv @ 74 NONAME + _ZN17CRequestProcessor22DoHandleDataIToRPhaseLEv @ 75 NONAME + _ZN17CRequestProcessor22DoHandleResponsePhaseLEv @ 76 NONAME + _ZN17CRequestProcessor24DoHandleCompletingPhaseLEv @ 77 NONAME + _ZN17CRequestProcessor4RunLEv @ 78 NONAME + _ZN17CRequestProcessor7ReleaseEv @ 79 NONAME + _ZN17CRequestProcessor8DoCancelEv @ 80 NONAME + _ZN17CRequestProcessor8RunErrorEi @ 81 NONAME + _ZN17CRequestProcessor9SendDataLERK8MMTPType @ 82 NONAME + _ZN17CRequestProcessor9SessionIdEv @ 83 NONAME + _ZN17CRequestProcessorC2ER25MMTPDataProviderFrameworkR14MMTPConnectioniPK22TMTPRequestElementInfo @ 84 NONAME + _ZN17CRequestProcessorD0Ev @ 85 NONAME + _ZN17CRequestProcessorD1Ev @ 86 NONAME + _ZN17CRequestProcessorD2Ev @ 87 NONAME + _ZN18CGetObjectPropDesc10ConstructLEv @ 88 NONAME + _ZN18CGetObjectPropDesc13CheckRequestLEv @ 89 NONAME + _ZN18CGetObjectPropDesc4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 90 NONAME + _ZN18CGetObjectPropDesc8ServiceLEv @ 91 NONAME + _ZN18CGetObjectPropDescC1ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 92 NONAME + _ZN18CGetObjectPropDescC2ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 93 NONAME + _ZN18CGetObjectPropDescD0Ev @ 94 NONAME + _ZN18CGetObjectPropDescD1Ev @ 95 NONAME + _ZN18CGetObjectPropDescD2Ev @ 96 NONAME + _ZN18CGetObjectPropList10ConstructLEv @ 97 NONAME + _ZN18CGetObjectPropList13CheckRequestLEv @ 98 NONAME + _ZN18CGetObjectPropList4RunLEv @ 99 NONAME + _ZN18CGetObjectPropList8DoCancelEv @ 100 NONAME + _ZN18CGetObjectPropList8RunErrorEi @ 101 NONAME + _ZN18CGetObjectPropList8ServiceLEv @ 102 NONAME + _ZN18CGetObjectPropListC2ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 103 NONAME + _ZN18CGetObjectPropListD0Ev @ 104 NONAME + _ZN18CGetObjectPropListD1Ev @ 105 NONAME + _ZN18CGetObjectPropListD2Ev @ 106 NONAME + _ZN18CSetObjectPropList13CheckRequestLEv @ 107 NONAME + _ZN18CSetObjectPropList22DoHandleResponsePhaseLEv @ 108 NONAME + _ZN18CSetObjectPropList4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 109 NONAME + _ZN18CSetObjectPropList4RunLEv @ 110 NONAME + _ZN18CSetObjectPropList8DoCancelEv @ 111 NONAME + _ZN18CSetObjectPropList8RunErrorEi @ 112 NONAME + _ZN18CSetObjectPropList8ServiceLEv @ 113 NONAME + _ZN18CSetObjectPropListD0Ev @ 114 NONAME + _ZN18CSetObjectPropListD1Ev @ 115 NONAME + _ZN18CSetObjectPropListD2Ev @ 116 NONAME + _ZN19CDescriptionUtility24NewCommonObjectPropertyLEt @ 117 NONAME + _ZN19CDescriptionUtility24NewRangeFormDescriptionLEtmmmi @ 118 NONAME + _ZN19CDescriptionUtilityC2Ev @ 119 NONAME + _ZN19CDescriptionUtilityD0Ev @ 120 NONAME + _ZN19CDescriptionUtilityD1Ev @ 121 NONAME + _ZN19CDescriptionUtilityD2Ev @ 122 NONAME + _ZN19CGetObjectPropValue13CheckRequestLEv @ 123 NONAME + _ZN19CGetObjectPropValue27ServiceMetaDataFromWrapperLEtR8MMTPTypeRK18CMTPObjectMetaData @ 124 NONAME + _ZN19CGetObjectPropValue8ServiceLEv @ 125 NONAME + _ZN19CGetObjectPropValueC2ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 126 NONAME + _ZN19CGetObjectPropValueD0Ev @ 127 NONAME + _ZN19CGetObjectPropValueD1Ev @ 128 NONAME + _ZN19CGetObjectPropValueD2Ev @ 129 NONAME + _ZN19CSetObjectPropValue13CheckRequestLEv @ 130 NONAME + _ZN19CSetObjectPropValue22DoHandleResponsePhaseLEv @ 131 NONAME + _ZN19CSetObjectPropValue25ServiceMetaDataToWrapperLEtR8MMTPTypeRK18CMTPObjectMetaData @ 132 NONAME + _ZN19CSetObjectPropValue8ServiceLEv @ 133 NONAME + _ZN19CSetObjectPropValueC2ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 134 NONAME + _ZN19CSetObjectPropValueD0Ev @ 135 NONAME + _ZN19CSetObjectPropValueD1Ev @ 136 NONAME + _ZN19CSetObjectPropValueD2Ev @ 137 NONAME + _ZN20CGetObjectReferences4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 138 NONAME + _ZN20CGetObjectReferencesD0Ev @ 139 NONAME + _ZN20CGetObjectReferencesD1Ev @ 140 NONAME + _ZN20CGetObjectReferencesD2Ev @ 141 NONAME + _ZN20CSetObjectReferences22DoHandleResponsePhaseLEv @ 142 NONAME + _ZN20CSetObjectReferences22DoSetObjectReferencesLERK18CMTPObjectMetaData @ 143 NONAME + _ZN20CSetObjectReferences4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 144 NONAME + _ZN20CSetObjectReferences8ServiceLEv @ 145 NONAME + _ZN20CSetObjectReferencesC1ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 146 NONAME + _ZN20CSetObjectReferencesC2ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 147 NONAME + _ZN20CSetObjectReferencesD0Ev @ 148 NONAME + _ZN20CSetObjectReferencesD1Ev @ 149 NONAME + _ZN20CSetObjectReferencesD2Ev @ 150 NONAME + _ZN22CGetFormatCapabilities10ConstructLEv @ 151 NONAME + _ZN22CGetFormatCapabilities13CheckRequestLEv @ 152 NONAME + _ZN22CGetFormatCapabilities4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 153 NONAME + _ZN22CGetFormatCapabilities8ServiceLEv @ 154 NONAME + _ZN22CGetFormatCapabilitiesC1ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 155 NONAME + _ZN22CGetFormatCapabilitiesC2ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 156 NONAME + _ZN22CGetFormatCapabilitiesD0Ev @ 157 NONAME + _ZN22CGetFormatCapabilitiesD1Ev @ 158 NONAME + _ZN22CGetFormatCapabilitiesD2Ev @ 159 NONAME + _ZN23CMmMtpDpAccessSingleton12OpenSessionLEv @ 160 NONAME + _ZN23CMmMtpDpAccessSingleton13CloseSessionLEv @ 161 NONAME + _ZN23CMmMtpDpAccessSingleton17GetAccessWrapperLEv @ 162 NONAME + _ZN23CMmMtpDpAccessSingleton7CreateLER25MMTPDataProviderFramework @ 163 NONAME + _ZN23CMmMtpDpAccessSingleton7ReleaseEv @ 164 NONAME + _ZN23CPropertySettingUtility20SetMetaDataToWrapperER14MMmMtpDpConfigtR8MMTPTypeRK18CMTPObjectMetaData @ 165 NONAME + _ZN23CPropertySettingUtilityC2Ev @ 166 NONAME + _ZN23CPropertySettingUtilityD0Ev @ 167 NONAME + _ZN23CPropertySettingUtilityD1Ev @ 168 NONAME + _ZN23CPropertySettingUtilityD2Ev @ 169 NONAME + _ZN24CGetObjectPropsSupported4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 170 NONAME + _ZN24CGetObjectPropsSupported8ServiceLEv @ 171 NONAME + _ZN24CGetObjectPropsSupportedD0Ev @ 172 NONAME + _ZN24CGetObjectPropsSupportedD1Ev @ 173 NONAME + _ZN24CGetObjectPropsSupportedD2Ev @ 174 NONAME + _ZN26CGetInterdependentPropDesc10ConstructLEv @ 175 NONAME + _ZN26CGetInterdependentPropDesc13CheckRequestLEv @ 176 NONAME + _ZN26CGetInterdependentPropDesc4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 177 NONAME + _ZN26CGetInterdependentPropDesc8ServiceLEv @ 178 NONAME + _ZN26CGetInterdependentPropDescC1ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 179 NONAME + _ZN26CGetInterdependentPropDescC2ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 180 NONAME + _ZN26CGetInterdependentPropDescD0Ev @ 181 NONAME + _ZN26CGetInterdependentPropDescD1Ev @ 182 NONAME + _ZN26CGetInterdependentPropDescD2Ev @ 183 NONAME + _ZN29CMmMtpDpMetadataAccessWrapper13AddDummyFileLERK7TDesC16 @ 184 NONAME + _ZN29CMmMtpDpMetadataAccessWrapper13RenameObjectLERK18CMTPObjectMetaDataRK7TDesC16 @ 185 NONAME + _ZN29CMmMtpDpMetadataAccessWrapper13SetReferenceLERK18CMTPObjectMetaDataR12CDesC16Array @ 186 NONAME _ZN29CMmMtpDpMetadataAccessWrapper15CreateDummyFileERK7TDesC16 @ 187 NONAME _ZN29CMmMtpDpMetadataAccessWrapper15DeleteDummyFileERK7TDesC16 @ 188 NONAME _ZN29CMmMtpDpMetadataAccessWrapper16CleanupDatabaseLEv @ 189 NONAME _ZN29CMmMtpDpMetadataAccessWrapper16GetAllReferenceLEP9CMPXMediaR12CDesC16Array @ 190 NONAME - _ZN29CMmMtpDpMetadataAccessWrapper17SetAbstractMediaLERK7TDesC16R12CDesC16Array19TMPXGeneralCategory @ 191 NONAME - _ZN29CMmMtpDpMetadataAccessWrapper19GetModifiedContentLERK7TDesC16RiR12CDesC16Array @ 192 NONAME - _ZN29CMmMtpDpMetadataAccessWrapper20GetAllAbstractMediaLERK7TDesC16PP14CMPXMediaArray19TMPXGeneralCategory @ 193 NONAME - _ZN29CMmMtpDpMetadataAccessWrapper21GetAbstractMediaNameLEP9CMPXMedia19TMPXGeneralCategory @ 194 NONAME - _ZN29CMmMtpDpMetadataAccessWrapper22UpdateMusicCollectionLEv @ 195 NONAME - _ZN29CMmMtpDpMetadataAccessWrapper23GetObjectMetadataValueLEtR8MMTPTypeRK18CMTPObjectMetaData @ 196 NONAME - _ZNK11CSendObject12HasDataphaseEv @ 197 NONAME - _ZNK11CSendObject5MatchERK15TMTPTypeRequestR14MMTPConnection @ 198 NONAME - _ZNK15CRequestUnknown5MatchERK15TMTPTypeRequestR14MMTPConnection @ 199 NONAME - _ZNK17CRequestProcessor10ConnectionEv @ 200 NONAME - _ZNK17CRequestProcessor12HasDataphaseEv @ 201 NONAME - _ZNK17CRequestProcessor5MatchERK13TMTPTypeEventR14MMTPConnection @ 202 NONAME - _ZNK17CRequestProcessor5MatchERK15TMTPTypeRequestR14MMTPConnection @ 203 NONAME - _ZNK17CRequestProcessor7RequestEv @ 204 NONAME - _ZNK18CSetObjectPropList12HasDataphaseEv @ 205 NONAME - _ZNK19CSetObjectPropValue12HasDataphaseEv @ 206 NONAME - _ZNK20CSetObjectReferences12HasDataphaseEv @ 207 NONAME - _ZTI10CGetObject @ 208 NONAME - _ZTI11CCopyObject @ 209 NONAME - _ZTI11CMoveObject @ 210 NONAME - _ZTI11CSendObject @ 211 NONAME - _ZTI13CDeleteObject @ 212 NONAME - _ZTI13CRenameObject @ 213 NONAME - _ZTI14CGetObjectInfo @ 214 NONAME - _ZTI15CRequestChecker @ 215 NONAME - _ZTI15CRequestUnknown @ 216 NONAME - _ZTI15TMTPTypeFlatBuf @ 217 NONAME - _ZTI17CGetPartialObject @ 218 NONAME - _ZTI17CRequestProcessor @ 219 NONAME - _ZTI18CGetObjectPropDesc @ 220 NONAME - _ZTI18CGetObjectPropList @ 221 NONAME - _ZTI18CHXMetaDataUtility @ 222 NONAME - _ZTI18CSetObjectPropList @ 223 NONAME - _ZTI19CDescriptionUtility @ 224 NONAME - _ZTI19CGetObjectPropValue @ 225 NONAME - _ZTI19CSetObjectPropValue @ 226 NONAME - _ZTI20CGetObjectReferences @ 227 NONAME - _ZTI20CSetObjectReferences @ 228 NONAME - _ZTI22CGetFormatCapabilities @ 229 NONAME - _ZTI23CMmMtpDpAccessSingleton @ 230 NONAME - _ZTI23CPropertySettingUtility @ 231 NONAME - _ZTI24CGetObjectPropsSupported @ 232 NONAME - _ZTI25CMmMtpDpMetadataMpxAccess @ 233 NONAME - _ZTI26CGetInterdependentPropDesc @ 234 NONAME - _ZTI27CMmMtpDpMetadataVideoAccess @ 235 NONAME - _ZTI29CMmMtpDpMetadataAccessWrapper @ 236 NONAME - _ZTV10CGetObject @ 237 NONAME - _ZTV11CCopyObject @ 238 NONAME - _ZTV11CMoveObject @ 239 NONAME - _ZTV11CSendObject @ 240 NONAME - _ZTV13CDeleteObject @ 241 NONAME - _ZTV13CRenameObject @ 242 NONAME - _ZTV14CGetObjectInfo @ 243 NONAME - _ZTV15CRequestChecker @ 244 NONAME - _ZTV15CRequestUnknown @ 245 NONAME - _ZTV15TMTPTypeFlatBuf @ 246 NONAME - _ZTV17CGetPartialObject @ 247 NONAME - _ZTV17CRequestProcessor @ 248 NONAME - _ZTV18CGetObjectPropDesc @ 249 NONAME - _ZTV18CGetObjectPropList @ 250 NONAME - _ZTV18CHXMetaDataUtility @ 251 NONAME - _ZTV18CSetObjectPropList @ 252 NONAME - _ZTV19CDescriptionUtility @ 253 NONAME - _ZTV19CGetObjectPropValue @ 254 NONAME - _ZTV19CSetObjectPropValue @ 255 NONAME - _ZTV20CGetObjectReferences @ 256 NONAME - _ZTV20CSetObjectReferences @ 257 NONAME - _ZTV22CGetFormatCapabilities @ 258 NONAME - _ZTV23CMmMtpDpAccessSingleton @ 259 NONAME - _ZTV23CPropertySettingUtility @ 260 NONAME - _ZTV24CGetObjectPropsSupported @ 261 NONAME - _ZTV25CMmMtpDpMetadataMpxAccess @ 262 NONAME - _ZTV26CGetInterdependentPropDesc @ 263 NONAME - _ZTV27CMmMtpDpMetadataVideoAccess @ 264 NONAME - _ZTV29CMmMtpDpMetadataAccessWrapper @ 265 NONAME - _ZThn28_N11CSendObject13UsbDisconnectEv @ 266 NONAME - _ZThn28_N17CRequestProcessor12HandleEventLERK13TMTPTypeEvent @ 267 NONAME - _ZThn28_N17CRequestProcessor13UsbDisconnectEv @ 268 NONAME - _ZThn28_N17CRequestProcessor14HandleRequestLERK15TMTPTypeRequest20TMTPTransactionPhase @ 269 NONAME - _ZThn28_N17CRequestProcessor7ReleaseEv @ 270 NONAME - _ZThn28_N17CRequestProcessor9SessionIdEv @ 271 NONAME - _ZThn28_NK11CSendObject5MatchERK15TMTPTypeRequestR14MMTPConnection @ 272 NONAME - _ZThn28_NK15CRequestUnknown5MatchERK15TMTPTypeRequestR14MMTPConnection @ 273 NONAME - _ZThn28_NK17CRequestProcessor10ConnectionEv @ 274 NONAME - _ZThn28_NK17CRequestProcessor5MatchERK13TMTPTypeEventR14MMTPConnection @ 275 NONAME - _ZThn28_NK17CRequestProcessor5MatchERK15TMTPTypeRequestR14MMTPConnection @ 276 NONAME - _ZThn28_NK17CRequestProcessor7RequestEv @ 277 NONAME + _ZN29CMmMtpDpMetadataAccessWrapper19GetModifiedContentLERK7TDesC16RiR12CDesC16Array @ 191 NONAME + _ZN29CMmMtpDpMetadataAccessWrapper20GetAllAbstractMediaLERK7TDesC16PP14CMPXMediaArray19TMPXGeneralCategory @ 192 NONAME + _ZN29CMmMtpDpMetadataAccessWrapper21GetAbstractMediaNameLEP9CMPXMedia19TMPXGeneralCategory @ 193 NONAME + _ZN29CMmMtpDpMetadataAccessWrapper22UpdateMusicCollectionLEv @ 194 NONAME + _ZN29CMmMtpDpMetadataAccessWrapper23GetObjectMetadataValueLEtR8MMTPTypeRK18CMTPObjectMetaData @ 195 NONAME + _ZNK11CSendObject12HasDataphaseEv @ 196 NONAME + _ZNK11CSendObject5MatchERK15TMTPTypeRequestR14MMTPConnection @ 197 NONAME + _ZNK15CRequestUnknown5MatchERK15TMTPTypeRequestR14MMTPConnection @ 198 NONAME + _ZNK17CRequestProcessor10ConnectionEv @ 199 NONAME + _ZNK17CRequestProcessor12HasDataphaseEv @ 200 NONAME + _ZNK17CRequestProcessor5MatchERK13TMTPTypeEventR14MMTPConnection @ 201 NONAME + _ZNK17CRequestProcessor5MatchERK15TMTPTypeRequestR14MMTPConnection @ 202 NONAME + _ZNK17CRequestProcessor7RequestEv @ 203 NONAME + _ZNK18CSetObjectPropList12HasDataphaseEv @ 204 NONAME + _ZNK19CSetObjectPropValue12HasDataphaseEv @ 205 NONAME + _ZNK20CSetObjectReferences12HasDataphaseEv @ 206 NONAME + _ZTI10CGetObject @ 207 NONAME + _ZTI11CCopyObject @ 208 NONAME + _ZTI11CMoveObject @ 209 NONAME + _ZTI11CSendObject @ 210 NONAME + _ZTI13CDeleteObject @ 211 NONAME + _ZTI13CRenameObject @ 212 NONAME + _ZTI14CGetObjectInfo @ 213 NONAME + _ZTI15CRequestChecker @ 214 NONAME + _ZTI15CRequestUnknown @ 215 NONAME + _ZTI15TMTPTypeFlatBuf @ 216 NONAME + _ZTI17CGetPartialObject @ 217 NONAME + _ZTI17CRequestProcessor @ 218 NONAME + _ZTI18CGetObjectPropDesc @ 219 NONAME + _ZTI18CGetObjectPropList @ 220 NONAME + _ZTI18CHXMetaDataUtility @ 221 NONAME + _ZTI18CSetObjectPropList @ 222 NONAME + _ZTI19CDescriptionUtility @ 223 NONAME + _ZTI19CGetObjectPropValue @ 224 NONAME + _ZTI19CSetObjectPropValue @ 225 NONAME + _ZTI20CGetObjectReferences @ 226 NONAME + _ZTI20CSetObjectReferences @ 227 NONAME + _ZTI22CGetFormatCapabilities @ 228 NONAME + _ZTI23CMmMtpDpAccessSingleton @ 229 NONAME + _ZTI23CPropertySettingUtility @ 230 NONAME + _ZTI24CGetObjectPropsSupported @ 231 NONAME + _ZTI25CMmMtpDpMetadataMpxAccess @ 232 NONAME + _ZTI26CGetInterdependentPropDesc @ 233 NONAME + _ZTI27CMmMtpDpMetadataVideoAccess @ 234 NONAME + _ZTI29CMmMtpDpMetadataAccessWrapper @ 235 NONAME + _ZTV10CGetObject @ 236 NONAME + _ZTV11CCopyObject @ 237 NONAME + _ZTV11CMoveObject @ 238 NONAME + _ZTV11CSendObject @ 239 NONAME + _ZTV13CDeleteObject @ 240 NONAME + _ZTV13CRenameObject @ 241 NONAME + _ZTV14CGetObjectInfo @ 242 NONAME + _ZTV15CRequestChecker @ 243 NONAME + _ZTV15CRequestUnknown @ 244 NONAME + _ZTV15TMTPTypeFlatBuf @ 245 NONAME + _ZTV17CGetPartialObject @ 246 NONAME + _ZTV17CRequestProcessor @ 247 NONAME + _ZTV18CGetObjectPropDesc @ 248 NONAME + _ZTV18CGetObjectPropList @ 249 NONAME + _ZTV18CHXMetaDataUtility @ 250 NONAME + _ZTV18CSetObjectPropList @ 251 NONAME + _ZTV19CDescriptionUtility @ 252 NONAME + _ZTV19CGetObjectPropValue @ 253 NONAME + _ZTV19CSetObjectPropValue @ 254 NONAME + _ZTV20CGetObjectReferences @ 255 NONAME + _ZTV20CSetObjectReferences @ 256 NONAME + _ZTV22CGetFormatCapabilities @ 257 NONAME + _ZTV23CMmMtpDpAccessSingleton @ 258 NONAME + _ZTV23CPropertySettingUtility @ 259 NONAME + _ZTV24CGetObjectPropsSupported @ 260 NONAME + _ZTV25CMmMtpDpMetadataMpxAccess @ 261 NONAME + _ZTV26CGetInterdependentPropDesc @ 262 NONAME + _ZTV27CMmMtpDpMetadataVideoAccess @ 263 NONAME + _ZTV29CMmMtpDpMetadataAccessWrapper @ 264 NONAME + _ZThn28_N11CSendObject13UsbDisconnectEv @ 265 NONAME + _ZThn28_N17CRequestProcessor12HandleEventLERK13TMTPTypeEvent @ 266 NONAME + _ZThn28_N17CRequestProcessor13UsbDisconnectEv @ 267 NONAME + _ZThn28_N17CRequestProcessor14HandleRequestLERK15TMTPTypeRequest20TMTPTransactionPhase @ 268 NONAME + _ZThn28_N17CRequestProcessor7ReleaseEv @ 269 NONAME + _ZThn28_N17CRequestProcessor9SessionIdEv @ 270 NONAME + _ZThn28_NK11CSendObject5MatchERK15TMTPTypeRequestR14MMTPConnection @ 271 NONAME + _ZThn28_NK15CRequestUnknown5MatchERK15TMTPTypeRequestR14MMTPConnection @ 272 NONAME + _ZThn28_NK17CRequestProcessor10ConnectionEv @ 273 NONAME + _ZThn28_NK17CRequestProcessor5MatchERK13TMTPTypeEventR14MMTPConnection @ 274 NONAME + _ZThn28_NK17CRequestProcessor5MatchERK15TMTPTypeRequestR14MMTPConnection @ 275 NONAME + _ZThn28_NK17CRequestProcessor7RequestEv @ 276 NONAME diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/ccopyobject.h --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/ccopyobject.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/ccopyobject.h Wed Mar 31 22:26:09 2010 +0300 @@ -21,7 +21,6 @@ #include "crequestprocessor.h" -class RFs; class CMTPObjectMetaData; class CMTPTypeObjectPropList; class CMTPTypeObjectPropListElement; @@ -34,17 +33,6 @@ { public: /** - * Two-phase construction method - * @param aFramework The data provider framework - * @param aConnection The connection from which the request comes - * @param aWrapper medadata access interface - * @return a pointer to the created request processor object - */ - //IMPORT_C static MMmRequestProcessor* NewL( MMTPDataProviderFramework& aFramework, - // MMTPConnection& aConnection, - // CMmMtpDpMetadataAccessWrapper& aWrapper ); - - /** * Destructor */ IMPORT_C virtual ~CCopyObject(); @@ -54,8 +42,8 @@ * Standard c++ constructor */ IMPORT_C CCopyObject( MMTPDataProviderFramework& aFramework, - MMTPConnection& aConnection, - MMmMtpDpConfig& aDpConfig ); + MMTPConnection& aConnection, + MMmMtpDpConfig& aDpConfig ); /** * Second phase constructor @@ -79,15 +67,22 @@ */ void GetParametersL(); + /** + * Set a default destination if it is not specified + */ void SetDefaultParentObjectL(); /** - * Copy object operation + * Copy file and metadata and send response to pc + * If everything was right, the handle of newly created file + * should be sent back */ void CopyObjectL(); /** - * Check if we can copy the file to the new location + * Check if the file can be copied + * @param aOldName used to get file size + * @param aNewName the full path name of newly copied file */ TMTPResponseCode CanCopyObjectL( const TDesC& aOldName, const TDesC& aNewName ) const; @@ -95,22 +90,26 @@ /** * Save the object properties before doing the copy */ - void GetPreviousPropertiesL( const CMTPObjectMetaData& aObject ); + void GetPreviousPropertiesL(); /** * Set the object properties after doing the copy */ - void SetPreviousPropertiesL( const CMTPObjectMetaData& aObject ); + void SetPreviousPropertiesL(); /** * A helper function of CopyObjectL. * @param aNewFileName the new full filename after copy. - * @return objectHandle of new copy of object. + * @return handle of the newly copied object. */ TUint32 CopyFileL( const TDesC& aNewFileName ); /** - * Update object info in the database. + * Add metadata of the newly created file into database and + * update related references + * @param aOldObjectName old reference owner + * @param aNewObjectName new reference owner + * @return handle of the newly copied object */ TUint32 AddObjectToStoreL( const TDesC& aOldObjectName, const TDesC& aNewObjectName ); @@ -122,7 +121,8 @@ private: TUint32 iStorageId; - CMTPObjectMetaData* iObjectInfo; // Not owned + CMTPObjectMetaData* iSourceObject; + CMTPObjectMetaData* iTargetObject; HBufC* iDest; TUint32 iNewParentHandle; TTime iPreviousModifiedTime; diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cdeleteobject.h --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cdeleteobject.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cdeleteobject.h Wed Mar 31 22:26:09 2010 +0300 @@ -19,16 +19,11 @@ #ifndef CDELETEOBJECT_H #define CDELETEOBJECT_H -#include #include -#include #include "crequestprocessor.h" //forward declaration -class RFs; -class CMTPTypeArray; -class MMTPObjectMgr; class MMmMtpDpConfig; /** @@ -110,12 +105,6 @@ void DeleteObjectL( const CMTPObjectMetaData& aObjectInfo ); private: - // MTP Object Manager - MMTPObjectMgr& iObjectMgr; - - // File server used to open the database - RFs& iFs; - // Array of all the objects to delete RArray iObjectsToDelete; diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetformatcapabilities.h --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetformatcapabilities.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetformatcapabilities.h Wed Mar 31 22:26:09 2010 +0300 @@ -24,7 +24,6 @@ // forward declaration class MMmMtpDpConfig; class CMTPTypeObjectPropDesc; -class CMTPTypeInterdependentPropDesc; /** Implements the file data provider CMTPGetFormatCapabilities request processor. diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetobject.h --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetobject.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetobject.h Wed Mar 31 22:26:09 2010 +0300 @@ -22,7 +22,6 @@ #include "crequestprocessor.h" // forward declaration -class RFs; class CMTPTypeFile; class MMmMtpDpConfig; @@ -78,9 +77,6 @@ void GetObjectL( const TDesC& aFileName ); private: - // File server used to open the database - RFs& iFs; - // File Object to encapsulate the object to send back CMTPTypeFile* iFileObject; diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetobjectinfo.h --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetobjectinfo.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetobjectinfo.h Wed Mar 31 22:26:09 2010 +0300 @@ -22,7 +22,6 @@ #include "crequestprocessor.h" // forward declacration -class CMmMtpDpMetadataAccessWrapper; class CMTPTypeObjectInfo; class MMmMtpDpConfig; diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetobjectpropvalue.h --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetobjectpropvalue.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetobjectpropvalue.h Wed Mar 31 22:26:09 2010 +0300 @@ -29,7 +29,6 @@ class TMTPTypeUint128; class CMTPTypeString; class CMTPTypeArray; -class TMTPObjectInfo; class MMmMtpDpConfig; diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetpartialobject.h --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetpartialobject.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetpartialobject.h Wed Mar 31 22:26:09 2010 +0300 @@ -21,7 +21,6 @@ #include "crequestprocessor.h" -class MMTPDataProviderFramework; class CMTPTypeFile; class CMmMtpDpMetadataAccessWrapper; class MMmMtpDpConfig; diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cmoveobject.h --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cmoveobject.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cmoveobject.h Wed Mar 31 22:26:09 2010 +0300 @@ -22,7 +22,6 @@ #include "crequestprocessor.h" class CMTPObjectMetaData; -class CMmMtpDpMetadataAccessWrapper; class CMTPTypeObjectPropList; class CMTPTypeObjectPropListElement; class MMmMtpDpConfig; @@ -112,8 +111,7 @@ /** * Set the object properties in the object property store. */ - void SetPropertiesL( const TDesC& aOldFileName, - const TDesC& aNewFileName ); + void SetPropertiesL( const TDesC& aNewFileName ); /* * Move a single object and update the database diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/crenameobject.h --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/crenameobject.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/crenameobject.h Wed Mar 31 22:26:09 2010 +0300 @@ -22,7 +22,6 @@ // Forward declarations class MMTPDataProviderFramework; class CMmMtpDpMetadataAccessWrapper; -class MMTPObjectMgr; class CMTPObjectMetaData; class CRenameObject: public CActive diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/crequestchecker.h --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/crequestchecker.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/crequestchecker.h Wed Mar 31 22:26:09 2010 +0300 @@ -19,11 +19,9 @@ #ifndef CREQUESTCHECKER_H #define CREQUESTCHECKER_H -#include -#include #include +#include -class CMTPObjectMetaData; class MMTPDataProviderFramework; class MMTPConnection; @@ -121,7 +119,7 @@ * @return a pointer to the created request checker object */ static CRequestChecker* NewL( MMTPDataProviderFramework& aFramework, - MMTPConnection& aConnection ); + MMTPConnection& aConnection ); /** * Destructor diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/crequestprocessor.h --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/crequestprocessor.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/crequestprocessor.h Wed Mar 31 22:26:09 2010 +0300 @@ -19,22 +19,24 @@ #ifndef CREQUESTPROCESSOR_H #define CREQUESTPROCESSOR_H -#include + +#include #include #include #include -#include + +// for derived processors +#include #include "crequestchecker.h" class MMTPConnection; class TMTPTypeRequest; -class CMTPDataProviderPlugin; class MMTPDataProviderFramework; class TMTPTypeEvent; class CMTPObjectInfo; -static const TInt KMmMtpRArrayGranularity = 2; +const TInt KMmMtpRArrayGranularity = 2; /** * Defines a request processor interface @@ -111,9 +113,8 @@ /** * Defines a processor factory function pointer */ -typedef MMmRequestProcessor - * (*TMTPRequestProcessorCreateFunc)( MMTPDataProviderFramework& aFramework, - MMTPConnection& aConnection ); +typedef MMmRequestProcessor* (*TMTPRequestProcessorCreateFunc)( MMTPDataProviderFramework& aFramework, + MMTPConnection& aConnection ); /** * Defines an entry which maps from operation code to the request processor @@ -243,6 +244,7 @@ * @return session id */ IMPORT_C TUint32 SessionId(); + protected: // from CActive /** @@ -261,7 +263,7 @@ IMPORT_C TInt RunError( TInt aError ); protected: - //new virtuals + // new virtuals /** * Handle the request phase of the current request * @return EFalse diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/csetobjectreferences.h --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/csetobjectreferences.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/csetobjectreferences.h Wed Mar 31 22:26:09 2010 +0300 @@ -64,16 +64,9 @@ protected: /** * set references to DB - * @param aWrapper medadata access interface - * @param aObjectFormat the format of the file - * @param aSrcFileName file name, from - * @param aRefFileArray the array of file names, to + * @param aObject, the reference owner */ - IMPORT_C virtual void - DoSetObjectReferencesL( CMmMtpDpMetadataAccessWrapper& aWrapper, - TUint16 aObjectFormat, - const TDesC& aSrcFileName, - CDesCArray& aRefFileArray ); + void DoSetObjectReferencesL( const CMTPObjectMetaData& aObject ); private: //from CRequestProcessor diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/ccopyobject.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/ccopyobject.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/ccopyobject.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -17,11 +17,9 @@ #include -#include #include #include #include -#include #include #include #include @@ -74,6 +72,7 @@ { Cancel(); + delete iTargetObject; delete iDest; if ( iPropertyElement ) @@ -93,7 +92,9 @@ aConnection, sizeof( KMTPCopyObjectPolicy ) / sizeof( TMTPRequestElementInfo ), KMTPCopyObjectPolicy ), - iDpConfig( aDpConfig ) + iDpConfig( aDpConfig ), + iSourceObject( NULL ), + iTargetObject( NULL ) { PRINT( _L( "Operation: CopyObject(0x101A)" ) ); } @@ -144,7 +145,7 @@ newObjectName.CleanupClosePushL(); // + newObjectName newObjectName = *iDest; - const TDesC& suid( iObjectInfo->DesC( CMTPObjectMetaData::ESuid ) ); + const TDesC& suid( iSourceObject->DesC( CMTPObjectMetaData::ESuid ) ); TParsePtrC fileNameParser( suid ); if ( ( newObjectName.Length() + fileNameParser.NameAndExt().Length() ) <= newObjectName.MaxLength() ) @@ -191,8 +192,8 @@ iNewParentHandle ); // not taking owernship - iObjectInfo = iRequestChecker->GetObjectInfo( objectHandle ); - __ASSERT_DEBUG( iObjectInfo, Panic( EMmMTPDpObjectNull ) ); + iSourceObject = iRequestChecker->GetObjectInfo( objectHandle ); + __ASSERT_DEBUG( iSourceObject, Panic( EMmMTPDpObjectNull ) ); if ( iNewParentHandle == KMTPHandleNone ) { @@ -213,7 +214,7 @@ // ----------------------------------------------------------------------------- // CCopyObject::SetDefaultParentObjectL -// Get a default parent object, ff the request does not specify a parent object, +// Set a default destination, if the request does not specify a parent object, // ----------------------------------------------------------------------------- // void CCopyObject::SetDefaultParentObjectL() @@ -280,7 +281,7 @@ #endif } // This is used to keep the same behavior in mass storage and device file manager. - else if ( iObjectInfo->Uint( CMTPObjectMetaData::EFormatCode ) + else if ( iSourceObject->Uint( CMTPObjectMetaData::EFormatCode ) == EMTPFormatCodeAbstractAudioVideoPlaylist ) { PRINT( _L( "MM MTP <> CCopyObject::CanCopyObjectL playlist file can't copy" ) ); @@ -298,31 +299,25 @@ // TUint32 CCopyObject::CopyFileL( const TDesC& aNewFileName ) { - const TDesC& suid( iObjectInfo->DesC( CMTPObjectMetaData::ESuid ) ); - PRINT2( _L( "MM MTP => CCopyObject::CopyFileL old name = %S, aNewFileName = %S" ), - &suid, - &aNewFileName ); + PRINT( _L( "MM MTP => CCopyObject::CopyFileL" ) ); - GetPreviousPropertiesL( *iObjectInfo ); + GetPreviousPropertiesL(); // TODO: Need rollback mechanism for consistant with image dp in fw. // Not sure if it should be trap if something wrong with MPX db. - TUint32 handle = AddObjectToStoreL( suid, aNewFileName ); + TPtrC oldFileName( iSourceObject->DesC( CMTPObjectMetaData::ESuid ) ); + TUint32 handle = AddObjectToStoreL( oldFileName, aNewFileName ); // Only leave when getting proplist element from data received by fw. // It should not happen after ReceiveDataL in which construction of proplist already succeed. - SetPreviousPropertiesL( *iObjectInfo ); + SetPreviousPropertiesL(); CFileMan* fileMan = CFileMan::NewL( iFramework.Fs() ); - User::LeaveIfError( fileMan->Copy( suid, aNewFileName ) ); + User::LeaveIfError( fileMan->Copy( oldFileName, aNewFileName ) ); delete fileMan; fileMan = NULL; - User::LeaveIfError( iFramework.Fs().SetModified( aNewFileName, - iPreviousModifiedTime ) ); - - PRINT1( _L( "MM MTP <= CCopyObject::CopyFileL handle = 0x%x" ), handle ); - + PRINT( _L( "MM MTP <= CCopyObject::CopyFileL" ) ); return handle; } @@ -331,20 +326,17 @@ // Save the object properties before doing the copy // ----------------------------------------------------------------------------- // -void CCopyObject::GetPreviousPropertiesL( const CMTPObjectMetaData& aObject ) +void CCopyObject::GetPreviousPropertiesL() { PRINT( _L( "MM MTP => CCopyObject::GetPreviousPropertiesL" ) ); - const TDesC& suid( aObject.DesC( CMTPObjectMetaData::ESuid ) ); - User::LeaveIfError( iFramework.Fs().Modified( suid, iPreviousModifiedTime ) ); - - TUint formatCode = aObject.Uint( CMTPObjectMetaData::EFormatCode ); + TUint formatCode = iSourceObject->Uint( CMTPObjectMetaData::EFormatCode ); const RArray* properties = iDpConfig.GetSupportedPropertiesL( formatCode ); TInt count = properties->Count(); TInt err = KErrNone; TUint16 propCode; - TUint32 handle = aObject.Uint( CMTPObjectMetaData::EHandle ); + TUint32 handle = iSourceObject->Uint( CMTPObjectMetaData::EHandle ); if ( iPropertyElement != NULL ) { @@ -372,41 +364,39 @@ case EMTPObjectPropCodeNonConsumable: iPropertyElement = &( iPropertyList->ReservePropElemL( handle, propCode ) ); iPropertyElement->SetUint8L( CMTPTypeObjectPropListElement::EValue, - aObject.Uint( CMTPObjectMetaData::ENonConsumable ) ); + iSourceObject->Uint( CMTPObjectMetaData::ENonConsumable ) ); break; case EMTPObjectPropCodeName: case EMTPObjectPropCodeDateAdded: - if ( ( propCode == EMTPObjectPropCodeName ) - || ( !MmMtpDpUtility::IsVideoL( aObject.DesC( CMTPObjectMetaData::ESuid ), iFramework ) - && ( propCode == EMTPObjectPropCodeDateAdded ) ) ) - { - CMTPTypeString* textData = CMTPTypeString::NewLC(); // + textData + case EMTPObjectPropCodeAlbumArtist: + { + CMTPTypeString* textData = CMTPTypeString::NewLC(); // + textData - TRAP( err, iDpConfig.GetWrapperL().GetObjectMetadataValueL( propCode, - *textData, - aObject ) ); + TRAP( err, iDpConfig.GetWrapperL().GetObjectMetadataValueL( propCode, + *textData, + *iSourceObject ) ); - PRINT1( _L( "MM MTP <> CCopyObject::GetPreviousPropertiesL err = %d" ), err ); + PRINT1( _L( "MM MTP <> CCopyObject::GetPreviousPropertiesL err = %d" ), err ); - if ( err == KErrNone ) - { - iPropertyElement = &( iPropertyList->ReservePropElemL( handle, propCode ) ); - iPropertyElement->SetStringL( CMTPTypeObjectPropListElement::EValue, - textData->StringChars() ); - } - else - { - iPropertyElement = NULL; - } + if ( err == KErrNone ) + { + iPropertyElement = &( iPropertyList->ReservePropElemL( handle, propCode ) ); + iPropertyElement->SetStringL( CMTPTypeObjectPropListElement::EValue, + textData->StringChars() ); + } + else + { + iPropertyElement = NULL; + } - CleanupStack::PopAndDestroy( textData ); // - textData - } + CleanupStack::PopAndDestroy( textData ); // - textData + } break; default: { - ServiceGetSpecificObjectPropertyL( propCode, handle, aObject ); + ServiceGetSpecificObjectPropertyL( propCode, handle, *iSourceObject ); } break; } @@ -426,7 +416,7 @@ // Set the object properties after doing the copy // ----------------------------------------------------------------------------- // -void CCopyObject::SetPreviousPropertiesL( const CMTPObjectMetaData& aObject ) +void CCopyObject::SetPreviousPropertiesL() { PRINT( _L( "MM MTP => CCopyObject::SetPreviousPropertiesL" ) ); @@ -461,22 +451,23 @@ break; case EMTPObjectPropCodeNonConsumable: - iObjectInfo->SetUint( CMTPObjectMetaData::ENonConsumable, + iTargetObject->SetUint( CMTPObjectMetaData::ENonConsumable, element.Uint8L( CMTPTypeObjectPropListElement::EValue ) ); // TODO: need to reconsider, // should wait all property setting finished then insert object, or not? // need to investigate if it will affect performance result - iFramework.ObjectMgr().ModifyObjectL( *iObjectInfo ); + iFramework.ObjectMgr().ModifyObjectL( *iTargetObject ); break; case EMTPObjectPropCodeName: + case EMTPObjectPropCodeAlbumArtist: { CMTPTypeString *stringData = CMTPTypeString::NewLC( element.StringL( CMTPTypeObjectPropListElement::EValue ) ); // + stringData respcode = iDpConfig.PropSettingUtility()->SetMetaDataToWrapper( iDpConfig, propertyCode, *stringData, - aObject ); + *iTargetObject ); CleanupStack::PopAndDestroy( stringData ); // - stringData } @@ -486,7 +477,7 @@ { respcode = iDpConfig.PropSettingUtility()->SetSpecificObjectPropertyL( iDpConfig, propertyCode, - aObject, + *iTargetObject, element ); } break; @@ -514,21 +505,21 @@ &aOldObjectName, &aNewObjectName ); - CMTPObjectMetaData* objectInfo = CMTPObjectMetaData::NewLC(); // + objectInfo + iTargetObject = CMTPObjectMetaData::NewL(); // 1. Add new object into objectMgr db - objectInfo->SetUint( CMTPObjectMetaData::EDataProviderId, iObjectInfo->Uint( CMTPObjectMetaData::EDataProviderId ) ); - TUint formatCode = iObjectInfo->Uint( CMTPObjectMetaData::EFormatCode ); - objectInfo->SetUint( CMTPObjectMetaData::EFormatCode, formatCode ); - TUint subFormatCode = iObjectInfo->Uint( CMTPObjectMetaData::EFormatSubCode ); - objectInfo->SetUint( CMTPObjectMetaData::EFormatSubCode, subFormatCode ); - objectInfo->SetUint( CMTPObjectMetaData::EParentHandle, iNewParentHandle ); - objectInfo->SetUint( CMTPObjectMetaData::EStorageId, iStorageId ); - objectInfo->SetDesCL( CMTPObjectMetaData::ESuid, aNewObjectName ); - iFramework.ObjectMgr().InsertObjectL( *objectInfo ); + iTargetObject->SetUint( CMTPObjectMetaData::EDataProviderId, iSourceObject->Uint( CMTPObjectMetaData::EDataProviderId ) ); + TUint formatCode = iSourceObject->Uint( CMTPObjectMetaData::EFormatCode ); + iTargetObject->SetUint( CMTPObjectMetaData::EFormatCode, formatCode ); + TUint subFormatCode = iSourceObject->Uint( CMTPObjectMetaData::EFormatSubCode ); + iTargetObject->SetUint( CMTPObjectMetaData::EFormatSubCode, subFormatCode ); + iTargetObject->SetUint( CMTPObjectMetaData::EParentHandle, iNewParentHandle ); + iTargetObject->SetUint( CMTPObjectMetaData::EStorageId, iStorageId ); + iTargetObject->SetDesCL( CMTPObjectMetaData::ESuid, aNewObjectName ); + iFramework.ObjectMgr().InsertObjectL( *iTargetObject ); // 2. Add new object into MPX db - iDpConfig.GetWrapperL().AddObjectL( aNewObjectName, formatCode, subFormatCode ); + iDpConfig.GetWrapperL().AddObjectL( *iTargetObject ); // 3. Set references into references db if ( formatCode == EMTPFormatCodeM3UPlaylist ) @@ -539,8 +530,7 @@ CleanupStack::PopAndDestroy( references ); // - references } - TUint32 handle = objectInfo->Uint( CMTPObjectMetaData::EHandle ); - CleanupStack::PopAndDestroy( objectInfo ); // - objectInfo + TUint32 handle = iTargetObject->Uint( CMTPObjectMetaData::EHandle ); PRINT1( _L( "MM MTP <= CCopyObject::AddObjectToStoreL handle = 0x%x" ), handle ); return handle; diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cdeleteobject.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cdeleteobject.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cdeleteobject.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -16,10 +16,8 @@ */ -#include #include #include -#include #include "cdeleteobject.h" #include "mmmtpdplogger.h" @@ -27,7 +25,7 @@ #include "cmmmtpdpmetadataaccesswrapper.h" #include "mmmtpdputility.h" -static const TInt KMaxDeletionTimes = 10; +const TInt KMaxDeletionTimes = 10; const TInt KDeletionThreshold = 100 * 1000; // (100 millisec) // ----------------------------------------------------------------------------- @@ -92,8 +90,6 @@ aConnection, sizeof( KMTPDeleteObjectPolicy ) / sizeof( TMTPRequestElementInfo ), KMTPDeleteObjectPolicy ), - iObjectMgr( aFramework.ObjectMgr() ), - iFs( aFramework.Fs() ), iObjectsToDelete( KMmMtpRArrayGranularity ), iDeleteError( KErrNone ), iDpConfig( aDpConfig ) @@ -194,7 +190,7 @@ CMTPObjectMetaData* objectInfo = CMTPObjectMetaData::NewLC(); // + objectInfo TUint32 handle = iObjectsToDelete[0]; - iObjectMgr.ObjectL( handle, *objectInfo ); + iFramework.ObjectMgr().ObjectL( handle, *objectInfo ); TFileName fileName( objectInfo->DesC( CMTPObjectMetaData::ESuid ) ); PRINT2( _L( "MM MTP <> CDeleteObject::RunL delete object handle is 0x%x, fileName is %S" ), handle, &fileName ); @@ -234,7 +230,7 @@ // record in MPX is not inlined with framework db, playlist should not be deleted // until next session. // This is used to keep the same behavior in mass storage and device file manager. - if ( aObjectInfo.Uint(CMTPObjectMetaData::EFormatCode ) + if ( aObjectInfo.Uint( CMTPObjectMetaData::EFormatCode ) == EMTPFormatCodeAbstractAudioVideoPlaylist && !iDpConfig.GetWrapperL().IsExistL( fileName ) ) { @@ -245,7 +241,7 @@ // 1. Delete object from file system TEntry fileInfo; - iFs.Entry( fileName, fileInfo ); + iFramework.Fs().Entry( fileName, fileInfo ); if ( fileInfo.IsReadOnly() ) { iDeleteError = KErrAccessDenied; @@ -257,7 +253,7 @@ TInt count = KMaxDeletionTimes; while ( count > 0 ) { - iDeleteError = iFs.Delete( fileName ); + iDeleteError = iFramework.Fs().Delete( fileName ); if ( iDeleteError == KErrNone || iDeleteError == KErrNotFound ) { break; @@ -275,11 +271,11 @@ } // 2. Delete object from metadata db - TRAP( iDeleteError, iDpConfig.GetWrapperL().DeleteObjectL( fileName, aObjectInfo.Uint( CMTPObjectMetaData::EFormatCode ) )); + TRAP( iDeleteError, iDpConfig.GetWrapperL().DeleteObjectL( aObjectInfo ) ); PRINT1( _L( "MM MTP <> CDeleteObject::DeleteObjectL, Delete from Media DB, err = %d" ), iDeleteError ); // 3. Delete object from framework db - iObjectMgr.RemoveObjectL( aObjectInfo.Uint( CMTPObjectMetaData::EHandle ) ); + iFramework.ObjectMgr().RemoveObjectL( aObjectInfo.Uint( CMTPObjectMetaData::EHandle ) ); // 4. If the object has references, Delete references from reference manager if ( MmMtpDpUtility::HasReference( aObjectInfo.Uint( CMTPObjectMetaData::EFormatCode ) ) ) @@ -363,7 +359,7 @@ else { CMTPObjectMetaData* objectInfo = CMTPObjectMetaData::NewLC(); // + objectInfo - iObjectMgr.ObjectL( handles[i], *objectInfo ); + iFramework.ObjectMgr().ObjectL( handles[i], *objectInfo ); if ( EMTPFormatCodeAssociation == objectInfo->Uint( CMTPObjectMetaData::EFormatCode ) ) { GetObjectHandlesL( KMTPStorageAll, handles[i] ); diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cdescriptionutility.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cdescriptionutility.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cdescriptionutility.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -52,6 +52,7 @@ case EMTPObjectPropCodePersistentUniqueObjectIdentifier: case EMTPObjectPropCodeName: case EMTPObjectPropCodeDateAdded: + case EMTPObjectPropCodeAlbumArtist: propertyDesc = CMTPTypeObjectPropDesc::NewL( aPropCode ); break; diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobject.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobject.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobject.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -16,8 +16,6 @@ */ -#include -#include #include #include "cgetobject.h" @@ -88,7 +86,6 @@ aConnection, sizeof( KMTPGetObjectPolicy ) / sizeof( TMTPRequestElementInfo ), KMTPGetObjectPolicy ), - iFs( iFramework.Fs() ), iError( EMTPRespCodeOK ) { PRINT( _L( "Operation: GetObject(0x1009)" ) ); @@ -141,7 +138,7 @@ // Create the file object delete iFileObject; iFileObject = NULL; - iFileObject = CMTPTypeFile::NewL( iFs, aFileName, EFileRead ); + iFileObject = CMTPTypeFile::NewL( iFramework.Fs(), aFileName, EFileRead ); PRINT( _L( "MM MTP <= CGetObject::GetObjectL" ) ); } diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectinfo.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectinfo.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectinfo.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -16,7 +16,6 @@ */ -#include #include #include @@ -163,7 +162,7 @@ TUint32 width(0); TUint32 height(0); TInt err = KErrNone; - TRAP( err, iDpConfig.GetWrapperL().GetImageObjPropL( suid, width, height ) ); + TRAP( err, iDpConfig.GetWrapperL().GetImageObjPropL( *object, width, height ) ); if( err != KErrNone ) PRINT1( _L( "MM MTP <> CGetObjectInfo::BuildObjectInfoL TRAP iWrapper.GetImageObjPropL err = %d" ), err ); @@ -187,11 +186,9 @@ TParsePtrC parse( suid ); iObjectInfo->SetStringL( CMTPTypeObjectInfo::EFilename, parse.NameAndExt() ); - TTime dataModified; - dataModified = MmMtpDpUtility::GetObjectDateModifiedL( iFramework.Fs(), suid ); + TBuf date; + MmMtpDpUtility::GetObjectDateModifiedL( iFramework.Fs(), suid, date ); - TBuf date; - dataModified.FormatL( date, KMtpDateTimeFormat ); PRINT1( _L( "MM MTP <> CGetObjectInfo::BuildObjectInfo date is %S" ), &date ); // Date Created diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectproplist.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectproplist.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectproplist.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -18,12 +18,11 @@ #include #include -#include + #include #include #include #include -#include #include "tobjectdescription.h" #include "cgetobjectproplist.h" @@ -552,23 +551,15 @@ const TInt count = iPropertyArray.Count(); TInt err = KErrNone; - TBool successQuery = EFalse; for ( TInt i = 0; i < count; i++ ) { err = ServiceOneObjectPropertyL( aHandle, iPropertyArray[i] ); - if ( err == KErrNone ) - successQuery = ETrue; if ( err == KErrNotSupported || err == KErrNotFound ) // Skip err = KErrNone; if ( err != KErrNone ) break; } - // In PC Suite combined mode, a file that was found at the beginning could be deleted by PC Suite protocol - // Need to fail it here. - if ( successQuery == EFalse ) - err = KErrNotFound; - PRINT1( _L( "MM MTP <= CGetObjectPropList::ServiceGroupPropertiesL err = %d" ), err ); return err; @@ -670,44 +661,35 @@ case EMTPObjectPropCodeName: case EMTPObjectPropCodeDateAdded: + case EMTPObjectPropCodeAlbumArtist: { - if ( ( aPropCode == EMTPObjectPropCodeName ) - || ( ( !MmMtpDpUtility::IsVideoL( iObject->DesC( CMTPObjectMetaData::ESuid ), iFramework ) ) - && ( aPropCode == EMTPObjectPropCodeDateAdded ) ) ) - { - textData = CMTPTypeString::NewLC(); // + textData + textData = CMTPTypeString::NewLC(); // + textData - TRAP( err, iDpConfig.GetWrapperL().GetObjectMetadataValueL( aPropCode, - *textData, - *iObject ) ); + TRAP( err, iDpConfig.GetWrapperL().GetObjectMetadataValueL( aPropCode, + *textData, + *iObject ) ); - PRINT1( _L( "MM MTP <> CGetObjectPropList::ServiceOneObjectPropertyL err = %d" ), err ); - - iPropertyElement = &(iPropertyList->ReservePropElemL( aHandle, aPropCode ) ); - iPropertyElement->SetStringL( CMTPTypeObjectPropListElement::EValue, textData->StringChars() ); + PRINT1( _L( "MM MTP <> CGetObjectPropList::ServiceOneObjectPropertyL err = %d" ), err ); - CleanupStack::PopAndDestroy( textData ); // - textData - break; - } - // Else, video DB does not support DateAdded field, use the file system date! - // It's the same behavior with DateCreated and DateModified. - // Fall through intentional. + iPropertyElement = &( iPropertyList->ReservePropElemL( aHandle, aPropCode ) ); + iPropertyElement->SetStringL( CMTPTypeObjectPropListElement::EValue, textData->StringChars() ); + + CleanupStack::PopAndDestroy( textData ); // - textData } + break; case EMTPObjectPropCodeDateCreated: case EMTPObjectPropCodeDateModified: { - TTime dataModified; - dataModified = MmMtpDpUtility::GetObjectDateModifiedL( iFramework.Fs(), - iObject->DesC( CMTPObjectMetaData::ESuid ) ); + TBuf timeStr; + MmMtpDpUtility::GetObjectDateModifiedL( iFramework.Fs(), + iObject->DesC( CMTPObjectMetaData::ESuid ), + timeStr ); + PRINT1( _L( "MM MTP <> CGetObjectPropList::ServiceOneObjectPropertyL Date time %S" ), &timeStr ); - TBuf timeStr; - dataModified.FormatL( timeStr, KMtpDateTimeFormat ); - PRINT1( _L( "MM MTP <> CGetObjectPropList::ServiceOneObjectPropertyL Date time %S" ), &timeStr ); CMTPTypeString* datastring = CMTPTypeString::NewLC( timeStr ); // + datastring - - iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode)); - iPropertyElement->SetStringL(CMTPTypeObjectPropListElement::EValue, datastring->StringChars()); + iPropertyElement = &(iPropertyList->ReservePropElemL( aHandle, aPropCode ) ); + iPropertyElement->SetStringL( CMTPTypeObjectPropListElement::EValue, datastring->StringChars() ); CleanupStack::PopAndDestroy( datastring ); // - datastring } break; diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectpropvalue.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectpropvalue.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectpropvalue.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -18,9 +18,7 @@ #include #include -#include #include -#include #include #include "cgetobjectpropvalue.h" @@ -228,29 +226,21 @@ // Name and DataAdded (audio only) fall under the same branch while dateadded(video)/modified/created fall under another case EMTPObjectPropCodeName: // 0xDC44 case EMTPObjectPropCodeDateAdded: // 0xDC4E + case EMTPObjectPropCodeAlbumArtist: { - if ( ( propCode == EMTPObjectPropCodeName ) - || ( ( !MmMtpDpUtility::IsVideoL(iObjectInfo->DesC( CMTPObjectMetaData::ESuid ), iFramework ) ) - && ( propCode == EMTPObjectPropCodeDateAdded ) ) ) - { - iMTPTypeString = CMTPTypeString::NewL(); - ServiceMetaDataFromWrapperL( propCode, *iMTPTypeString, *iObjectInfo ); - break; - } - // Else, video DB does not support DateAdded field, use the file system date! - // It's the same behavior with DateCreated and DateModified. - // Fall through intentional. + iMTPTypeString = CMTPTypeString::NewL(); + ServiceMetaDataFromWrapperL( propCode, *iMTPTypeString, *iObjectInfo ); } + break; //lint -fallthrough case EMTPObjectPropCodeDateCreated: case EMTPObjectPropCodeDateModified: { - TTime dataModified; - dataModified = MmMtpDpUtility::GetObjectDateModifiedL( iFramework.Fs(), - iObjectInfo->DesC( CMTPObjectMetaData::ESuid ) ); + TBuf timeStr; + MmMtpDpUtility::GetObjectDateModifiedL( iFramework.Fs(), + iObjectInfo->DesC( CMTPObjectMetaData::ESuid ), + timeStr ); - TBuf timeStr; - dataModified.FormatL( timeStr, KMtpDateTimeFormat ); PRINT1( _L( "MM MTP <> CGetObjectPropValue::ServiceL Date time %S" ), &timeStr ); iMTPTypeString = CMTPTypeString::NewL( timeStr ); SendDataL( *iMTPTypeString ); diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectreferences.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectreferences.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectreferences.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -17,10 +17,8 @@ #include -#include #include #ifdef _DEBUG -#include #include #include #endif diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetpartialobject.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetpartialobject.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetpartialobject.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -17,8 +17,6 @@ #include -#include -#include #include "cgetpartialobject.h" #include "mmmtpdplogger.h" @@ -154,6 +152,7 @@ CMTPObjectMetaData* objectInfo = iRequestChecker->GetObjectInfo( iObjectHandle ); __ASSERT_DEBUG( objectInfo, Panic( EMmMTPDpObjectNull ) ); + // NOTE: Change all TBuf into TFileName for easily change when fs change the limitation of filename TFileName fileSuid; fileSuid.Append( objectInfo->DesC( CMTPObjectMetaData::ESuid ) ); diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cmoveobject.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cmoveobject.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cmoveobject.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -17,10 +17,8 @@ #include -#include #include #include -#include #include #include #include @@ -296,7 +294,7 @@ // Move the file first no matter if it will fail in Get/SetPreviousPropertiesL // Already trapped inside GetPreviousPropertiesL( *iObjectInfo ); - TRAPD( err, SetPropertiesL( oldFileName, aNewFileName ) ); + TRAPD( err, SetPropertiesL( aNewFileName ) ); CFileMan* fileMan = CFileMan::NewL( iFramework.Fs() ); err = fileMan->Move( oldFileName, aNewFileName ); @@ -360,31 +358,28 @@ case EMTPObjectPropCodeName: case EMTPObjectPropCodeDateAdded: - if ( ( propCode == EMTPObjectPropCodeName ) - || ( !MmMtpDpUtility::IsVideoL( aObject.DesC( CMTPObjectMetaData::ESuid ), iFramework ) - && ( propCode == EMTPObjectPropCodeDateAdded ) ) ) - { - CMTPTypeString* textData = CMTPTypeString::NewLC(); // + textData + case EMTPObjectPropCodeAlbumArtist: + { + CMTPTypeString* textData = CMTPTypeString::NewLC(); // + textData - TRAP( err, iDpConfig.GetWrapperL().GetObjectMetadataValueL( propCode, - *textData, - aObject ) ); - - PRINT1( _L( "MM MTP <> CMoveObject::GetPreviousPropertiesL err = %d" ), err ); + TRAP( err, iDpConfig.GetWrapperL().GetObjectMetadataValueL( propCode, + *textData, + aObject ) ); + PRINT1( _L( "MM MTP <> CMoveObject::GetPreviousPropertiesL err = %d" ), err ); - if ( err == KErrNone ) - { - iPropertyElement = &( iPropertyList->ReservePropElemL( handle, propCode ) ); - iPropertyElement->SetStringL( CMTPTypeObjectPropListElement::EValue, - textData->StringChars() ); - } - else - { - iPropertyElement = NULL; - } + if ( err == KErrNone ) + { + iPropertyElement = &( iPropertyList->ReservePropElemL( handle, propCode ) ); + iPropertyElement->SetStringL( CMTPTypeObjectPropListElement::EValue, + textData->StringChars() ); + } + else + { + iPropertyElement = NULL; + } - CleanupStack::PopAndDestroy( textData ); // - textData - } + CleanupStack::PopAndDestroy( textData ); // - textData + } break; default: @@ -450,6 +445,7 @@ break; case EMTPObjectPropCodeName: + case EMTPObjectPropCodeAlbumArtist: { CMTPTypeString *stringData = CMTPTypeString::NewLC( element.StringL( CMTPTypeObjectPropListElement::EValue ) ); // + stringData @@ -474,7 +470,7 @@ } // end of for loop // ignore errors - if (respcode == EMTPRespCodeOK) + if ( respcode == EMTPRespCodeOK ) { // do nothing, just to get rid of build warning } @@ -487,17 +483,9 @@ // Set the object properties in the object property store. // ----------------------------------------------------------------------------- // -void CMoveObject::SetPropertiesL( const TDesC& aOldFileName, - const TDesC& aNewFileName ) +void CMoveObject::SetPropertiesL( const TDesC& aNewFileName ) { - PRINT2( _L( "MM MTP => CMoveObject::SetPropertiesL aOldFileName = %S, aNewFileName = %S" ), - &aOldFileName, - &aNewFileName ); - - iObjectInfo->SetDesCL( CMTPObjectMetaData::ESuid, aNewFileName ); - iObjectInfo->SetUint( CMTPObjectMetaData::EStorageId, iStorageId ); - iObjectInfo->SetUint( CMTPObjectMetaData::EParentHandle, iNewParentHandle ); - iFramework.ObjectMgr().ModifyObjectL( *iObjectInfo ); + PRINT1( _L( "MM MTP => CMoveObject::SetPropertiesL, aNewFileName = %S" ), &aNewFileName ); TUint32 formatCode = iObjectInfo->Uint( CMTPObjectMetaData::EFormatCode ); if ( formatCode == EMTPFormatCodeAbstractAudioVideoPlaylist ) @@ -511,16 +499,12 @@ { if ( iSameStorage ) { - iDpConfig.GetWrapperL().RenameObjectL( aOldFileName, aNewFileName ); + iDpConfig.GetWrapperL().RenameObjectL( *iObjectInfo, aNewFileName ); } else // if the two object in different storage, we should delete the old one and insert new one { - iDpConfig.GetWrapperL().DeleteObjectL( aOldFileName, formatCode ); - - TUint32 subFormatCode = iObjectInfo->Uint( CMTPObjectMetaData::EFormatSubCode ); - iDpConfig.GetWrapperL().AddObjectL( aNewFileName, - formatCode, - subFormatCode ); + iDpConfig.GetWrapperL().DeleteObjectL( *iObjectInfo ); + iDpConfig.GetWrapperL().AddObjectL( *iObjectInfo ); // Only leave when getting proplist element from data received by fw. // It should not happen after ReceiveDataL in which construction of proplist already succeed. @@ -528,6 +512,11 @@ } } + iObjectInfo->SetDesCL( CMTPObjectMetaData::ESuid, aNewFileName ); + iObjectInfo->SetUint( CMTPObjectMetaData::EStorageId, iStorageId ); + iObjectInfo->SetUint( CMTPObjectMetaData::EParentHandle, iNewParentHandle ); + iFramework.ObjectMgr().ModifyObjectL( *iObjectInfo ); + // It's not necessary to change references of playlists since Reference DB is used PUID PRINT( _L( "MM MTP <= CMoveObject::SetPropertiesL" ) ); diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cpropertysettingutility.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cpropertysettingutility.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cpropertysettingutility.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -51,8 +51,8 @@ { TMTPResponseCode responseCode = EMTPRespCodeOK; TRAPD( err, aDpConfig.GetWrapperL().SetObjectMetadataValueL( aPropCode, - aNewData, - aObjectMetaData ) ); + aNewData, + aObjectMetaData ) ); PRINT1( _L("MM MTP <> CPropertySettingUtility::SetMetaDataToWrapper err = %d"), err); diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/crenameobject.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/crenameobject.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/crenameobject.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -18,9 +18,7 @@ #include -#include #include -#include #include #include "crenameobject.h" @@ -147,6 +145,8 @@ if ( iNewFolderName.Length() + iRightPartName.Length() <= KMaxFileName ) { + PerformAdditionalActionL(); + iFileName.Zero(); iFileName.Append( iNewFolderName ); iFileName.Append( iRightPartName ); @@ -155,8 +155,6 @@ iObjectInfo->SetDesCL( CMTPObjectMetaData::ESuid, iFileName ); iObjectInfo->SetUint( CMTPObjectMetaData::EObjectMetaDataUpdate, 1 ); iFramework.ObjectMgr().ModifyObjectL( *iObjectInfo ); - - PerformAdditionalActionL(); } } @@ -287,7 +285,7 @@ PRINT( _L( "MM MTP => CRenameObject::PerformAdditionalActionL" ) ); // update MPX DB - TRAPD( err, iWrapper.RenameObjectL( iOldFileName, iFileName ) ); + TRAPD( err, iWrapper.RenameObjectL( *iObjectInfo, iFileName ) ); // should not fail for 1 file, keep it going, as folder already renamed if ( err != KErrNone ) diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/crequestchecker.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/crequestchecker.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/crequestchecker.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -16,7 +16,6 @@ */ -#include #include #include #include @@ -211,7 +210,7 @@ // ----------------------------------------------------------------------------- // TMTPResponseCode CRequestChecker::VerifySessionId( TUint32 aSessionId, - const TMTPRequestElementInfo& /*aElementInfo*/ ) const + const TMTPRequestElementInfo& /*aElementInfo*/ ) const { TMTPResponseCode ret = EMTPRespCodeOK; @@ -237,7 +236,7 @@ // ----------------------------------------------------------------------------- // TMTPResponseCode CRequestChecker::VerifyObjectHandleL( TUint32 aHandle, - const TMTPRequestElementInfo& aElementInfo ) + const TMTPRequestElementInfo& aElementInfo ) { PRINT1( _L("MM MTP => CRequestChecker::VerifyObjectHandleL aHandle = 0x%x"), aHandle ); TMTPResponseCode ret = EMTPRespCodeOK; @@ -255,58 +254,32 @@ TEntry entry; TInt err = iFramework.Fs().Entry( suid, entry ); - if ( object->Uint( CMTPObjectMetaData::EFormatCode ) == EMTPFormatCodeAssociation ) -// && ( object->Uint( CMTPObjectMetaData::EFormatSubCode ) == EMTPAssociationTypeGenericFolder ) ) + if ( err == KErrNotFound ) { - // Special association type .. not always present on the filesystem. - return ret; + iFramework.ObjectMgr().RemoveObjectL( suid ); + // TODO: workaround for abstractalbumart + // ret = EMTPRespCodeInvalidObjectHandle; } - else + else if ( err != KErrNone ) + ret = EMTPRespCodeGeneralError; + else if ( object->Uint( CMTPObjectMetaData::EFormatCode ) != EMTPFormatCodeAssociation ) { - User::LeaveIfError( err ); - if ( iFramework.ObjectMgr().ObjectOwnerId( aHandle ) != iFramework.DataProviderId() ) - { - PRINT( _L(" ewrwe ret = EMTPRespCodeInvalidObjectHandle;")); ret = EMTPRespCodeInvalidObjectHandle; - } - } - if ( aElementInfo.iElementAttr & EMTPElementAttrWrite ) - { - if ( entry.IsReadOnly() ) - { + if ( ( aElementInfo.iElementAttr & EMTPElementAttrWrite ) && entry.IsReadOnly() ) ret = EMTPRespCodeObjectWriteProtected; - } - } - - //((EMTPRespCodeOK == ret) && (aElementInfo.iElementAttr & EMTPElementAttrFileOrDir)) is - // covered implicitly here, EMTPRespCodeOK will be returned. It is a valid case for an object to be either a folder or file - // for certain operation's request parameter, for instance the first parameter of copyObject or - // moveObject can be either a file or a directory. - // Other cases. - if ( ( EMTPRespCodeOK == ret ) && ( aElementInfo.iElementAttr & EMTPElementAttrFile ) ) - { - if ( entry.IsDir() ) - { + if ( ( EMTPRespCodeOK == ret ) && ( aElementInfo.iElementAttr & EMTPElementAttrFile ) && entry.IsDir() ) ret = EMTPRespCodeInvalidObjectHandle; - } - } - if ( ( EMTPRespCodeOK == ret ) && ( aElementInfo.iElementAttr & EMTPElementAttrDir ) ) - { - if (!entry.IsDir()) - { + if ( ( EMTPRespCodeOK == ret ) && ( aElementInfo.iElementAttr & EMTPElementAttrDir ) && !entry.IsDir() ) ret = EMTPRespCodeInvalidParentObject; - } } } else - { - PRINT( _L( "MM MTP <> CRequestChecker::VerifyObjectHandleL, Object does not exist." ) ); ret = EMTPRespCodeInvalidObjectHandle; - } + PRINT1( _L( "MM MTP <= CRequestChecker::VerifyObjectHandleL ret = 0x%x" ), ret ); return ret; @@ -318,7 +291,7 @@ // ----------------------------------------------------------------------------- // TMTPResponseCode CRequestChecker::VerifyStorageIdL( TUint32 aStorageId, - const TMTPRequestElementInfo& aElementInfo ) const + const TMTPRequestElementInfo& aElementInfo ) const { MMTPStorageMgr& mgr( iFramework.StorageMgr() ); TMTPResponseCode ret( EMTPRespCodeOK ); @@ -369,7 +342,7 @@ // ----------------------------------------------------------------------------- // TMTPResponseCode CRequestChecker::VerifyFormatCode( TUint32 aFormatCode, - const TMTPRequestElementInfo& aElementInfo ) const + const TMTPRequestElementInfo& aElementInfo ) const { PRINT1( _L( "MM MTP => CRequestChecker::VerifyFormatCode aFormatCode = 0x%x" ), aFormatCode ); TMTPResponseCode ret = EMTPRespCodeInvalidObjectFormatCode; @@ -407,7 +380,7 @@ // ----------------------------------------------------------------------------- // TBool CRequestChecker::IsSpecialValue( TUint32 aParameter, - const TMTPRequestElementInfo& aElementInfo ) const + const TMTPRequestElementInfo& aElementInfo ) const { TBool result = EFalse; switch ( aElementInfo.iCount ) diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/crequestprocessor.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/crequestprocessor.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/crequestprocessor.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -18,7 +18,6 @@ #include #include -#include #include #include #include diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csendobject.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csendobject.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csendobject.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -16,13 +16,11 @@ */ -#include #include #include #include #include #include -#include #include #include @@ -81,10 +79,7 @@ // EXPORT_C CSendObject::~CSendObject() { - if ( ( iProgress == EObjectInfoSucceed - || iProgress == EObjectInfoFail - || iProgress == EObjectInfoInProgress ) - && !iNoRollback ) + if ( !iNoRollback ) { // Not finished SendObjectInfo \ SendObject pair detected. Rollback(); @@ -581,54 +576,60 @@ TBool result = ETrue; - TEntry fileEntry; - User::LeaveIfError( iFs.Entry( iFullPath, fileEntry ) ); - if ( fileEntry.FileSize() != iObjectSize ) + // SendObject is cancelled or connection is dropped. + if ( iCancelled ) { - iFs.Delete( iFullPath ); - iObjectMgr.UnreserveObjectHandleL( *iReceivedObjectInfo ); - TMTPResponseCode responseCode = EMTPRespCodeObjectTooLarge; - if ( fileEntry.FileSize() < iObjectSize ) - { - responseCode = EMTPRespCodeIncompleteTransfer; - } - SendResponseL( responseCode ); - result = EFalse; - } - - // SendObject is cancelled or connection is dropped. - if ( result && iCancelled ) - { + // In SendObject response phase, unregister is not necessary. + // But there's no harm, still keep it here. iFramework.RouteRequestUnregisterL( iExpectedSendObjectRequest, iConnection ); + Rollback(); SendResponseL( EMTPRespCodeTransactionCancelled ); } - else if ( result && !iCancelled ) + else { - if ( iObjectSize > 0 ) // media file - { - TRAPD( err, AddMediaToStoreL() ); - PRINT1( _L( "MM MTP <= CSendObject::DoHandleResponsePhaseObjectL err = %d" ), err ); + TEntry fileEntry; + User::LeaveIfError( iFs.Entry( iFullPath, fileEntry ) ); - if ( ( iPreviousOperation == EMTPOpCodeSendObjectPropList ) - && ( err == KErrNone ) ) + if ( fileEntry.FileSize() != iObjectSize ) + { + Rollback(); + TMTPResponseCode responseCode = EMTPRespCodeObjectTooLarge; + if ( fileEntry.FileSize() < iObjectSize ) + { + responseCode = EMTPRespCodeIncompleteTransfer; + } + SendResponseL( responseCode ); + result = EFalse; + } + else + { + if ( iObjectSize > 0 ) // media file { - // Only leave when getting proplist element from data received by fw. - // It should not happen after ReceiveDataL in which construction of proplist already succeed. - SetObjectPropListL(); + TRAPD( err, AddMediaToStoreL() ); + PRINT1( _L( "MM MTP <> CSendObject::DoHandleResponsePhaseObjectL err = %d" ), err ); + + if ( ( iPreviousOperation == EMTPOpCodeSendObjectPropList ) + && ( err == KErrNone ) ) + { + // Only leave when getting proplist element from data received by fw. + // It should not happen after ReceiveDataL in which construction of proplist already succeed. + SetObjectPropListL(); + } + + // Commits into MTP data object enumeration store the object handle and + // storage space previously reserved for the specified object. + iFramework.ObjectMgr().CommitReservedObjectHandleL( *iReceivedObjectInfo ); } - // Commits into MTP data object enumeration store the object handle and - // storage space previously reserved for the specified object. - iFramework.ObjectMgr().CommitReservedObjectHandleL( *iReceivedObjectInfo ); - } + // In SendObject response phase, unregister is not necessary. + // But there's no harm, still keep it here. + iFramework.RouteRequestUnregisterL( iExpectedSendObjectRequest, + iConnection ); - // Commit object to MTP data store - iFramework.RouteRequestUnregisterL( iExpectedSendObjectRequest, - iConnection ); - - SendResponseL( EMTPRespCodeOK ); + SendResponseL( EMTPRespCodeOK ); + } } PRINT1( _L( "MM MTP <= CSendObject::DoHandleResponsePhaseObjectL result = %d" ), result ); @@ -940,6 +941,7 @@ break; case EMTPObjectPropCodeName: + case EMTPObjectPropCodeAlbumArtist: { CMTPTypeString* stringData = CMTPTypeString::NewLC( element.StringL( CMTPTypeObjectPropListElement::EValue ) );// + stringData @@ -1078,17 +1080,32 @@ PRINT1( _L("MM MTP => CSendObject::GetFullPathNameL aFileName = %S"), &aFileName ); TBool result( EFalse ); + if ( aFileName.Length() > 0 ) { iFullPath.Zero(); iFullPath.Append( *iParentSuid ); - if ( ( iFullPath.Length() + aFileName.Length() ) < KMaxFileName ) + + // TODO: need to be done in derived class + // Only add extension for alb to pass winlogo test cases + TInt length = iFullPath.Length() + aFileName.Length(); + + TParsePtrC parser( aFileName ); + TBool isAlbWithoutExt = + ( ( iObjectFormat == EMTPFormatCodeAbstractAudioAlbum ) && ( !parser.ExtPresent() ) ); + if ( isAlbWithoutExt ) + length += KTxtExtensionALB().Length(); + + if ( length < KMaxFileName ) { iFullPath.Append( aFileName ); + if ( isAlbWithoutExt ) + iFullPath.Append( KTxtExtensionALB ); PRINT1( _L( "MM MTP <> CSendObject::GetFullPathNameL iFullPath = %S" ), &iFullPath ); result = iFramework.Fs().IsValidName( iFullPath ); } } + if ( result && ( iObjectFormat != MmMtpDpUtility::FormatFromFilename( iFullPath ) ) ) { PRINT2( _L( "MM MTP <> %S does not match 0x%x" ), &iFullPath, iObjectFormat ); @@ -1276,50 +1293,11 @@ // Might need to set dateadded and datemodify for further extension. SetProtectionStatus(); - TBool isVideo = EFalse; - TMmMtpSubFormatCode subFormatCode = EMTPSubFormatCodeUnknown; - switch ( iObjectFormat ) - { - case EMTPFormatCode3GPContainer: - case EMTPFormatCodeMP4Container: - case EMTPFormatCodeASF: - { - if ( MmMtpDpUtility::IsVideo( iFullPath ) ) - { - subFormatCode = EMTPSubFormatCodeVideo; - isVideo = ETrue; - } - else - { - subFormatCode = EMTPSubFormatCodeAudio; - isVideo = EFalse; - } - - iReceivedObjectInfo->SetUint( CMTPObjectMetaData::EFormatSubCode, - ( TUint ) subFormatCode ); - } - break; - - // put all just video format codes here - case EMTPFormatCodeWMV: - { - isVideo = ETrue; - } - break; - - default: - PRINT( _L( "MM MTP <> CSendObject::DoHandleResponsePhaseObjectL default" ) ); - break; - } - iDpConfig.GetWrapperL().SetStorageRootL( iFullPath ); PRINT1( _L( "MM MTP <> CSendObject::AddMediaToStoreL iFullPath = %S" ), &iFullPath ); - iDpConfig.GetWrapperL().AddObjectL( iFullPath, iObjectFormat, subFormatCode ); + iDpConfig.GetWrapperL().AddObjectL( *iReceivedObjectInfo ); - if ( isVideo ) - { - iDpConfig.GetWrapperL().SetImageObjPropL( iFullPath, iWidth, iHeight ); - } + iDpConfig.GetWrapperL().SetImageObjPropL( *iReceivedObjectInfo, iWidth, iHeight ); PRINT( _L( "MM MTP <= CSendObject::AddMediaToStoreL" ) ); } @@ -1344,7 +1322,9 @@ void CSendObject::Rollback() { // Delete this object from file system. - if ( iProgress == ESendObjectInProgress ) + if ( iProgress == ESendObjectInProgress + || iProgress == EObjectInfoSucceed + ||iProgress == EObjectInfoFail ) { PRINT1( _L( "MM MTP <> CSendObject::Rollback ROLLBACK_FILE %S" ), &iFullPath ); // Close the interrupted transfer file by delete iFileReceived object diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csetobjectproplist.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csetobjectproplist.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csetobjectproplist.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -16,7 +16,6 @@ */ -#include #include #include #include @@ -231,34 +230,31 @@ { responseCode = EMTPRespCodeInvalidDataset; } - else if ( ( KErrNone == err ) || ( KErrAlreadyExists == err ) ) + else if ( KErrNone == err ) // TODO: ( KErrAlreadyExists == err ) { - TRAP( err, iDpConfig.GetWrapperL().RenameObjectL( suid, newSuid ) ); //Update MPX DB - PRINT1( _L( "MM MTP <> Rename Object err = %d" ), err ); + TRAP( err, iDpConfig.GetWrapperL().RenameObjectL( *object, newSuid ) ); //Update MPX DB + + PRINT1( _L( "MM MTP <> Rename MPX object file name err = %d" ), err ); // it is ok if file is not found in DB, following S60 solution if ( KErrNotFound == err ) { - TUint formatCode = object->Uint( CMTPObjectMetaData::EFormatCode ); - TUint subFormatCode = object->Uint( CMTPObjectMetaData::EFormatSubCode ); - TRAP( err, iDpConfig.GetWrapperL().AddObjectL( newSuid, formatCode, subFormatCode ) ); - PRINT1( _L( "MM MTP <> Add Object err = %d" ), err ); + TRAP( err, iDpConfig.GetWrapperL().AddObjectL( *object ) ); + PRINT1( _L( "MM MTP <> Add MPX object file name err = %d" ), err ); } - if ( KErrNone == err ) - { - object->SetDesCL( CMTPObjectMetaData::ESuid, newSuid ); - iFramework.ObjectMgr().ModifyObjectL( *object ); - } - else - { - responseCode = EMTPRespCodeGeneralError; - } + object->SetDesCL( CMTPObjectMetaData::ESuid, newSuid ); + iFramework.ObjectMgr().ModifyObjectL( *object ); + } + else + { + responseCode = EMTPRespCodeGeneralError; } } } break; case EMTPObjectPropCodeName: + case EMTPObjectPropCodeAlbumArtist: { CMTPTypeString* stringData = CMTPTypeString::NewLC( aPropListElement.StringL( CMTPTypeObjectPropListElement::EValue ) );// + stringData diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csetobjectpropvalue.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csetobjectpropvalue.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csetobjectpropvalue.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -16,7 +16,6 @@ */ -#include #include #include #include @@ -231,6 +230,7 @@ // Get Data for String objects case EMTPObjectPropCodeObjectFileName: // 0xDC07 case EMTPObjectPropCodeName: // 0xDC44 + case EMTPObjectPropCodeAlbumArtist: { delete iMTPTypeString; iMTPTypeString = NULL; @@ -280,38 +280,36 @@ err = MmMtpDpUtility::UpdateObjectFileName( iFramework.Fs(), suid, newSuid ); + // TODO: if the new name is the same with old name PRINT1( _L( "MM MTP <> Update object file name err = %d" ), err ); if ( KErrOverflow == err ) // full path name is too long { responseCode = EMTPRespCodeInvalidDataset; } - else if ( ( KErrNone == err ) || ( KErrAlreadyExists == err ) ) + else if ( KErrNone == err ) { - TRAP( err, iDpConfig.GetWrapperL().RenameObjectL( suid, newSuid ) ); //Update MPX DB + TRAP( err, iDpConfig.GetWrapperL().RenameObjectL( *iObjectInfo, newSuid ) ); //Update MPX DB PRINT1( _L( "MM MTP <> Rename MPX object file name err = %d" ), err ); // it is ok if file is not found in DB, following S60 solution if ( KErrNotFound == err ) { - TUint formatCode = iObjectInfo->Uint( CMTPObjectMetaData::EFormatCode ); - TUint subFormatCode = iObjectInfo->Uint( CMTPObjectMetaData::EFormatSubCode ); - TRAP( err, iDpConfig.GetWrapperL().AddObjectL( newSuid, formatCode, subFormatCode ) ); + TRAP( err, iDpConfig.GetWrapperL().AddObjectL( *iObjectInfo ) ); PRINT1( _L( "MM MTP <> Add MPX object file name err = %d" ), err ); } - if ( KErrNone == err ) - { - iObjectInfo->SetDesCL( CMTPObjectMetaData::ESuid, newSuid ); - iFramework.ObjectMgr().ModifyObjectL( *iObjectInfo ); - } - else - { - responseCode = EMTPRespCodeGeneralError; - } + + iObjectInfo->SetDesCL( CMTPObjectMetaData::ESuid, newSuid ); + iFramework.ObjectMgr().ModifyObjectL( *iObjectInfo ); + } + else + { + responseCode = EMTPRespCodeGeneralError; } } } break; case EMTPObjectPropCodeName: // 0xDC44 + case EMTPObjectPropCodeAlbumArtist: { responseCode = ServiceMetaDataToWrapperL( iPropCode, *iMTPTypeString, diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csetobjectreferences.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csetobjectreferences.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csetobjectreferences.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -18,7 +18,6 @@ #include #include -#include #include #include "csetobjectreferences.h" @@ -28,6 +27,8 @@ #include "mmmtpdputility.h" #include "mmmtpdpconfig.h" +const TInt KMmMtpRefArrayGranularity = 3; + // ----------------------------------------------------------------------------- // Verification data for the SetReferences request // ----------------------------------------------------------------------------- @@ -88,16 +89,14 @@ // Standard c++ constructor // ----------------------------------------------------------------------------- // -EXPORT_C CSetObjectReferences::CSetObjectReferences( - MMTPDataProviderFramework& aFramework, +EXPORT_C CSetObjectReferences::CSetObjectReferences( MMTPDataProviderFramework& aFramework, MMTPConnection& aConnection, MMmMtpDpConfig& aDpConfig ) : - CRequestProcessor( - aFramework, - aConnection, - sizeof( KMTPSetObjectReferencesPolicy )/sizeof( TMTPRequestElementInfo ), - KMTPSetObjectReferencesPolicy ), - iDpConfig( aDpConfig ) + CRequestProcessor( aFramework, + aConnection, + sizeof( KMTPSetObjectReferencesPolicy ) / sizeof( TMTPRequestElementInfo ), + KMTPSetObjectReferencesPolicy ), + iDpConfig( aDpConfig ) { PRINT( _L( "Operation: SetObjectReferences(0x9811)" ) ); } @@ -107,12 +106,15 @@ // set references to DB // ----------------------------------------------------------------------------- // -EXPORT_C void CSetObjectReferences::DoSetObjectReferencesL( CMmMtpDpMetadataAccessWrapper& /*aWrapper*/, - TUint16 /*aObjectFormat*/, - const TDesC& /*aSrcFileName*/, - CDesCArray& /*aRefFileArray*/ ) +EXPORT_C void CSetObjectReferences::DoSetObjectReferencesL( const CMTPObjectMetaData& aObject ) { - // do nothing, do special thing by inheriting + TUint formatCode = aObject.Uint( CMTPObjectMetaData::EFormatCode ); + TBool hasReference = MmMtpDpUtility::HasReference( formatCode ); + + if ( hasReference ) + { + iDpConfig.GetWrapperL().SetReferenceL( aObject, *iReferenceSuids ); + } } // ----------------------------------------------------------------------------- @@ -142,7 +144,7 @@ delete iReferenceSuids; iReferenceSuids = NULL; - iReferenceSuids = new ( ELeave ) CDesCArrayFlat( 3 ); + iReferenceSuids = new ( ELeave ) CDesCArrayFlat( KMmMtpRefArrayGranularity ); if ( !VerifyReferenceHandlesL() ) { @@ -159,10 +161,7 @@ CMTPObjectMetaData* object = CMTPObjectMetaData::NewLC(); // + object iFramework.ObjectMgr().ObjectL( objectHandle, *object ); PRINT1( _L( "MM MTP <> object file name is %S" ), &(object->DesC( CMTPObjectMetaData::ESuid ) ) ); - DoSetObjectReferencesL( iDpConfig.GetWrapperL(), - object->Uint( CMTPObjectMetaData::EFormatCode ), - object->DesC( CMTPObjectMetaData::ESuid ), - *iReferenceSuids ); + DoSetObjectReferencesL( *object ); CleanupStack::PopAndDestroy( object ); // - object @@ -196,8 +195,9 @@ result = EFalse; break; } - - iReferenceSuids->AppendL( object->DesC( CMTPObjectMetaData::ESuid ) ); + // Only audio in playlist is supported + if ( iDpConfig.GetWrapperL().Category( *object ) == EMPXSong ) + iReferenceSuids->AppendL( object->DesC( CMTPObjectMetaData::ESuid ) ); } CleanupStack::PopAndDestroy( object ); // - object PRINT( _L( "MM MTP <= CSetObjectReferences::VerifyReferenceHandlesL" ) ); diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/src/cmmmtpdpaccesssingleton.cpp --- a/mmappcomponents/mmmtpdataprovider/src/cmmmtpdpaccesssingleton.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/src/cmmmtpdpaccesssingleton.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -50,14 +50,13 @@ // create singleton instance // ----------------------------------------------------------------------------- // -EXPORT_C void CMmMtpDpAccessSingleton::CreateL( RFs& aRfs, - MMTPDataProviderFramework& aFramework ) +EXPORT_C void CMmMtpDpAccessSingleton::CreateL( MMTPDataProviderFramework& aFramework ) { CMmMtpDpAccessSingleton* self = reinterpret_cast( Dll::Tls() ); if ( self == NULL ) { - self = CMmMtpDpAccessSingleton::NewL( aRfs, aFramework ); + self = CMmMtpDpAccessSingleton::NewL( aFramework ); Dll::SetTls( reinterpret_cast( self ) ); } else @@ -135,12 +134,11 @@ // two-phase construction // ----------------------------------------------------------------------------- // -CMmMtpDpAccessSingleton* CMmMtpDpAccessSingleton::NewL( RFs& aRfs, - MMTPDataProviderFramework& aFramework ) +CMmMtpDpAccessSingleton* CMmMtpDpAccessSingleton::NewL( MMTPDataProviderFramework& aFramework ) { CMmMtpDpAccessSingleton* self = new(ELeave) CMmMtpDpAccessSingleton; CleanupStack::PushL( self ); - self->ConstructL(aRfs, aFramework); + self->ConstructL( aFramework ); CleanupStack::Pop( self ); return self; } @@ -150,10 +148,9 @@ // two-phase construction // ----------------------------------------------------------------------------- // -void CMmMtpDpAccessSingleton::ConstructL( RFs& aRfs, - MMTPDataProviderFramework& aFramework ) +void CMmMtpDpAccessSingleton::ConstructL( MMTPDataProviderFramework& aFramework ) { - iWrapper = CMmMtpDpMetadataAccessWrapper::NewL( aRfs, aFramework ); + iWrapper = CMmMtpDpMetadataAccessWrapper::NewL( aFramework ); } diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/src/cmmmtpdpmetadataaccesswrapper.cpp --- a/mmappcomponents/mmmtpdataprovider/src/cmmmtpdpmetadataaccesswrapper.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/src/cmmmtpdpmetadataaccesswrapper.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -18,6 +18,8 @@ #include #include +#include +#include #include #include #include @@ -27,14 +29,14 @@ #include "cmmmtpdpmetadatampxaccess.h" #include "cmmmtpdpmetadatavideoaccess.h" #include "mmmtpdputility.h" +#include "tobjectdescription.h" #include "mmmtpdplogger.h" -const TInt KMMMTPDummyFileArrayGranularity = 5; +const TInt KMmMtpDummyFileArrayGranularity = 5; -CMmMtpDpMetadataAccessWrapper* CMmMtpDpMetadataAccessWrapper::NewL( RFs& aRfs, - MMTPDataProviderFramework& aFramework ) +CMmMtpDpMetadataAccessWrapper* CMmMtpDpMetadataAccessWrapper::NewL( MMTPDataProviderFramework& aFramework ) { - CMmMtpDpMetadataAccessWrapper* me = new (ELeave) CMmMtpDpMetadataAccessWrapper( aRfs, aFramework ); + CMmMtpDpMetadataAccessWrapper* me = new (ELeave) CMmMtpDpMetadataAccessWrapper( aFramework ); CleanupStack::PushL( me ); me->ConstructL(); CleanupStack::Pop( me ); @@ -42,10 +44,9 @@ return me; } -CMmMtpDpMetadataAccessWrapper::CMmMtpDpMetadataAccessWrapper( RFs& aRfs, - MMTPDataProviderFramework& aFramework ) : - iRfs( aRfs ), - iFramework( aFramework ) +CMmMtpDpMetadataAccessWrapper::CMmMtpDpMetadataAccessWrapper( MMTPDataProviderFramework& aFramework ) : + iFramework( aFramework ), + iFs( aFramework.Fs() ) { // Do nothing } @@ -59,11 +60,11 @@ { PRINT( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::ConstructL" ) ); - iMmMtpDpMetadataMpxAccess = CMmMtpDpMetadataMpxAccess::NewL( iRfs, iFramework ); + iMmMtpDpMetadataMpxAccess = CMmMtpDpMetadataMpxAccess::NewL( iFs ); - iMmMtpDpMetadataVideoAccess = CMmMtpDpMetadataVideoAccess::NewL( iRfs ); + iMmMtpDpMetadataVideoAccess = CMmMtpDpMetadataVideoAccess::NewL( iFs ); - iAbstractMediaArray = new ( ELeave ) CDesCArrayFlat( KMMMTPDummyFileArrayGranularity ); + iAbstractMediaArray = new ( ELeave ) CDesCArrayFlat( KMmMtpDummyFileArrayGranularity ); // Create the PS key to notify subscribers that MTP mode is activated _LIT_SECURITY_POLICY_C1(KKeyReadPolicy, ECapabilityReadUserData); @@ -100,22 +101,24 @@ } // ----------------------------------------------------------------------------- -// CMmMtpDpMetadataAccessWrapper::SetAbstractMediaL +// CMmMtpDpMetadataAccessWrapper::SetReferenceL // Set abstract media to DB // ----------------------------------------------------------------------------- // -EXPORT_C void CMmMtpDpMetadataAccessWrapper::SetAbstractMediaL( const TDesC& aAbstractMediaFileName, - CDesCArray& aRefFileArray, - TMPXGeneralCategory aCategory ) +EXPORT_C void CMmMtpDpMetadataAccessWrapper::SetReferenceL( const CMTPObjectMetaData& aObject, + CDesCArray& aRefFileArray ) { - PRINT1( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::SetAbstractMediaL aAbstractMediaFileName = %S" ), &aAbstractMediaFileName ); + TPtrC refOwner( aObject.DesC( CMTPObjectMetaData::ESuid ) ); + PRINT1( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::SetReferenceL reference owner = %S" ), + &refOwner ); - if ( !MmMtpDpUtility::IsVideoL( aAbstractMediaFileName, iFramework ) ) + TMPXGeneralCategory category = Category( aObject ); + if ( category == EMPXPlaylist || category == EMPXAbstractAlbum ) { - iMmMtpDpMetadataMpxAccess->SetAbstractMediaL( aAbstractMediaFileName, aRefFileArray, aCategory ); + iMmMtpDpMetadataMpxAccess->SetReferenceL( refOwner, aRefFileArray, category ); } - PRINT( _L( "MM MTP <= CMmMtpDpMetadataAccessWrapper::SetAbstractMediaL" ) ); + PRINT( _L( "MM MTP <= CMmMtpDpMetadataAccessWrapper::SetReferenceL" ) ); } // --------------------------------------------------------------------------- @@ -129,18 +132,53 @@ { PRINT( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::GetObjectMetadataValueL" ) ); - TPtrC fullFileName( aObjectMetaData.DesC( CMTPObjectMetaData::ESuid ) ); - if ( !MmMtpDpUtility::IsVideoL( fullFileName, iFramework ) ) + TMPXGeneralCategory category = Category( aObjectMetaData ); + switch ( category ) { - iMmMtpDpMetadataMpxAccess->GetObjectMetadataValueL( aPropCode, - aNewData, - aObjectMetaData ); - } - else - { - iMmMtpDpMetadataVideoAccess->GetObjectMetadataValueL( aPropCode, - aNewData, - aObjectMetaData ); + case EMPXAbstractAlbum: + if ( aPropCode == EMTPObjectPropCodeDateAdded && EMTPTypeString == aNewData.Type() ) + { + TBuf timeStr; + MmMtpDpUtility::GetObjectDateModifiedL( iFs, + aObjectMetaData.DesC( CMTPObjectMetaData::ESuid ), + timeStr ); + PRINT1( _L( "MM MTP <> CGetObjectPropList::ServiceOneObjectPropertyL Date time %S" ), &timeStr ); + + ( ( CMTPTypeString & ) aNewData ).SetL( timeStr ); + break; + } + // else + // get from mpx + case EMPXPlaylist: + case EMPXSong: + { + iMmMtpDpMetadataMpxAccess->GetObjectMetadataValueL( aPropCode, + aNewData, + aObjectMetaData.DesC( CMTPObjectMetaData::ESuid ), + category ); + } + break; + case EMPXVideo: + if ( aPropCode == EMTPObjectPropCodeDateAdded && EMTPTypeString == aNewData.Type() ) + { + TBuf timeStr; + MmMtpDpUtility::GetObjectDateModifiedL( iFs, + aObjectMetaData.DesC( CMTPObjectMetaData::ESuid ), + timeStr ); + PRINT1( _L( "MM MTP <> CGetObjectPropList::ServiceOneObjectPropertyL Date time %S" ), &timeStr ); + + ( ( CMTPTypeString & ) aNewData ).SetL( timeStr ); + } + else + { + iMmMtpDpMetadataVideoAccess->GetObjectMetadataValueL( aPropCode, + aNewData, + aObjectMetaData ); + } + break; + default: + // do nothing + break; } PRINT( _L( "MM MTP <= CMmMtpDpMetadataAccessWrapper::GetObjectMetadataValueL" ) ); @@ -157,99 +195,90 @@ { PRINT( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::SetObjectMetadataValueL" ) ); - // In SendObjectPropList, formatCode has already know, but object handle has not been committed into db - // In that case, format couldn't be get from object manager - TUint formatCode = aObjectMetaData.Uint( CMTPObjectMetaData::EFormatCode ); - TUint formatSubCode = aObjectMetaData.Uint( CMTPObjectMetaData::EFormatSubCode ); - - TBool isVideo = EFalse; - isVideo = MmMtpDpUtility::IsVideoL( formatCode, formatSubCode ); - - if ( isVideo ) + TMPXGeneralCategory category = Category( aObjectMetaData ); + switch ( category ) { - iMmMtpDpMetadataVideoAccess->SetObjectMetadataValueL( aPropCode, - aNewData, - aObjectMetaData ); - } - else - { - iMmMtpDpMetadataMpxAccess->SetObjectMetadataValueL( aPropCode, - aNewData, - aObjectMetaData ); + case EMPXAbstractAlbum: + case EMPXSong: + case EMPXPlaylist: + iMmMtpDpMetadataMpxAccess->SetObjectMetadataValueL( aPropCode, + aNewData, + aObjectMetaData.DesC( CMTPObjectMetaData::ESuid ), + category ); + break; + case EMPXVideo: + iMmMtpDpMetadataVideoAccess->SetObjectMetadataValueL( aPropCode, + aNewData, + aObjectMetaData ); + break; + default: + break; } PRINT( _L( "MM MTP <= CMmMtpDpMetadataAccessWrapper::SetObjectMetadataValueL" ) ); } // --------------------------------------------------------------------------- -// CMmMtpDpMetadataAccessWrapper::SetObjectMetadataValueL +// CMmMtpDpMetadataAccessWrapper::RenameObjectL // Renames the file part of a record in the collection database // --------------------------------------------------------------------------- // -EXPORT_C void CMmMtpDpMetadataAccessWrapper::RenameObjectL( const TDesC& aOldFileName, +EXPORT_C void CMmMtpDpMetadataAccessWrapper::RenameObjectL( const CMTPObjectMetaData& aOldObject, const TDesC& aNewFileName ) { + TPtrC oldFileName( aOldObject.DesC( CMTPObjectMetaData::ESuid ) ); PRINT2( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::RenameObjectL old = %S, new = %S" ), - &aOldFileName, + &oldFileName, &aNewFileName ); - if ( MmMtpDpUtility::IsVideoL( aOldFileName, iFramework ) ) - { - iMmMtpDpMetadataVideoAccess->RenameRecordL( aOldFileName, aNewFileName ); - } - else + TMPXGeneralCategory category = Category( aOldObject ); + switch ( category ) { - CMTPObjectMetaData* object = CMTPObjectMetaData::NewLC(); - iFramework.ObjectMgr().ObjectL( aOldFileName, *object ); - iMmMtpDpMetadataMpxAccess->RenameObjectL( aOldFileName, - aNewFileName, - object->Uint( CMTPObjectMetaData::EFormatCode ) ); - CleanupStack::PopAndDestroy( object ); + case EMPXSong: + case EMPXAbstractAlbum: + case EMPXPlaylist: + { + iMmMtpDpMetadataMpxAccess->RenameObjectL( oldFileName, + aNewFileName, + category ); + } + break; + case EMPXVideo: + iMmMtpDpMetadataVideoAccess->RenameRecordL( oldFileName, aNewFileName ); + break; + default: + break; } + PRINT( _L( "MM MTP <= CMmMtpDpMetadataAccessWrapper::RenameObjectL" ) ); } // --------------------------------------------------------------------------- -// CMmMtpDpMetadataAccessWrapper::SetObjectMetadataValueL +// CMmMtpDpMetadataAccessWrapper::DeleteObjectL // Deletes metadata information associated with the object // --------------------------------------------------------------------------- // -void CMmMtpDpMetadataAccessWrapper::DeleteObjectL( const TDesC& aFullFileName, - const TUint aFormatCode ) +void CMmMtpDpMetadataAccessWrapper::DeleteObjectL( const CMTPObjectMetaData& aObject ) { - PRINT( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::DeleteObjectL" ) ); - - TMPXGeneralCategory category = Category( aFormatCode ); + TPtrC fileName( aObject.DesC( CMTPObjectMetaData::ESuid ) ); + PRINT1( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::DeleteObjectL name = %S" ), &fileName ); - // Have to do this. File might not be in file system anymore, have to - // reply on ObjectManager - if ( ( aFormatCode == EMTPFormatCodeMP4Container ) - || ( aFormatCode == EMTPFormatCode3GPContainer ) - || ( aFormatCode == EMTPFormatCodeASF ) ) - { - if ( MmMtpDpUtility::IsVideoL( aFullFileName, iFramework ) ) - { - category = EMPXVideo; - } - else - { - category = EMPXSong; - } - } + TMPXGeneralCategory category = Category( aObject ); switch ( category ) { + case EMPXSong: + case EMPXAbstractAlbum: case EMPXPlaylist: - case EMPXSong: { - iMmMtpDpMetadataMpxAccess->DeleteObjectL( aFullFileName, category ); + iMmMtpDpMetadataMpxAccess->DeleteObjectL( fileName, category ); } break; case EMPXVideo: { - iMmMtpDpMetadataVideoAccess->DeleteRecordL( aFullFileName ); + iMmMtpDpMetadataVideoAccess->DeleteRecordL( fileName ); } break; @@ -275,19 +304,25 @@ PRINT( _L( "MM MTP <= CMmMtpDpMetadataAccessWrapper::SetStorageRootL" ) ); } + // ----------------------------------------------------------------------------- // CMmMtpDpMetadataMpxAccess::SetImageObjPropL // set image specific properties specific to videos // ----------------------------------------------------------------------------- // -void CMmMtpDpMetadataAccessWrapper::SetImageObjPropL( const TDesC& aFullFileName, +void CMmMtpDpMetadataAccessWrapper::SetImageObjPropL( const CMTPObjectMetaData& aObject, const TUint32 aWidth, const TUint32 aHeight ) { - iMmMtpDpMetadataVideoAccess->SetStorageRootL( aFullFileName ); - iMmMtpDpMetadataVideoAccess->SetImageObjPropL( aFullFileName, - aWidth, - aHeight ); + TMPXGeneralCategory category = Category( aObject ); + if ( category == EMPXVideo ) + { + TPtrC fullFileName( aObject.DesC( CMTPObjectMetaData::ESuid ) ); + iMmMtpDpMetadataVideoAccess->SetStorageRootL( fullFileName ); + iMmMtpDpMetadataVideoAccess->SetImageObjPropL( fullFileName, + aWidth, + aHeight ); + } } // ----------------------------------------------------------------------------- @@ -295,16 +330,19 @@ // get image specific properties specific to videos // ----------------------------------------------------------------------------- // -void CMmMtpDpMetadataAccessWrapper::GetImageObjPropL( const TDesC& aFullFileName, +void CMmMtpDpMetadataAccessWrapper::GetImageObjPropL( const CMTPObjectMetaData& aObject, TUint32& aWidth, TUint32& aHeight ) { - if ( MmMtpDpUtility::IsVideoL( aFullFileName, iFramework ) ) + TMPXGeneralCategory category = Category( aObject ); + if ( category == EMPXVideo ) { - iMmMtpDpMetadataVideoAccess->SetStorageRootL( aFullFileName ); - iMmMtpDpMetadataVideoAccess->GetImageObjPropL( aFullFileName, aWidth, aHeight ); + TPtrC fullFileName( aObject.DesC( CMTPObjectMetaData::ESuid ) ); + iMmMtpDpMetadataVideoAccess->SetStorageRootL( fullFileName ); + iMmMtpDpMetadataVideoAccess->GetImageObjPropL( fullFileName, aWidth, aHeight ); } } + // ----------------------------------------------------------------------------- // CMmMtpDpMetadataAccessWrapper::OpenSessionL // Called when the MTP session is initialised @@ -339,29 +377,61 @@ // Get category according format code // --------------------------------------------------------------------------- // -TMPXGeneralCategory CMmMtpDpMetadataAccessWrapper::Category( const TUint aFormatCode ) +TMPXGeneralCategory CMmMtpDpMetadataAccessWrapper::Category( const CMTPObjectMetaData& aObject ) { TMPXGeneralCategory category = EMPXNoCategory; - switch ( aFormatCode ) + TUint formatCode = aObject.Uint( CMTPObjectMetaData::EFormatCode ); + switch ( formatCode ) { + case EMTPFormatCodeASF: + case EMTPFormatCodeMP4Container: + case EMTPFormatCode3GPContainer: + { + TUint aSubFormatCode = aObject.Uint( CMTPObjectMetaData::EFormatSubCode ); + if ( aSubFormatCode == EMTPSubFormatCodeUnknown ) + { + category = ContainerCategory( aObject.DesC( CMTPObjectMetaData::ESuid ) ); + if ( category == EMPXSong ) + aSubFormatCode = EMTPSubFormatCodeAudio; + else if ( category == EMPXVideo ) + aSubFormatCode = EMTPSubFormatCodeVideo; + else + aSubFormatCode = EMTPSubFormatCodeUndefine; + const_cast(aObject).SetUint( CMTPObjectMetaData::EFormatSubCode, aSubFormatCode ); + // If object doesn't exist, do nothing + TRAP_IGNORE( iFramework.ObjectMgr().ModifyObjectL( aObject ) ); + } + else if ( aSubFormatCode == EMTPSubFormatCodeAudio ) + category = EMPXSong; + else if ( aSubFormatCode == EMTPSubFormatCodeVideo ) + category = EMPXVideo; + else if( aSubFormatCode == EMTPSubFormatCodeUndefine ) + category = EMPXOther; + } + break; + case EMTPFormatCodeMP3: case EMTPFormatCodeWAV: case EMTPFormatCodeWMA: case EMTPFormatCodeAAC: - case EMTPFormatCodeASF: - case EMTPFormatCodeMP4Container: - case EMTPFormatCode3GPContainer: { category = EMPXSong; } break; + case EMTPFormatCodeM3UPlaylist: case EMTPFormatCodeAbstractAudioVideoPlaylist: { category = EMPXPlaylist; } break; + case EMTPFormatCodeAbstractAudioAlbum: + { + category = EMPXAbstractAlbum; + } + break; + case EMTPFormatCodeWMV: { category = EMPXVideo; @@ -371,6 +441,46 @@ default: break; } + PRINT1( _L( "MM MTP <= CMmMtpDpMetadataAccessWrapper::Category category = %d" ), category ); + return category; + } + +TMPXGeneralCategory CMmMtpDpMetadataAccessWrapper::ContainerCategory( const TDesC& aFullFileName ) + { + PRINT1( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::ContainerCategory aFullFileName = %S" ), &aFullFileName ); + + TMPXGeneralCategory category = EMPXNoCategory; + TParsePtrC pathParser( aFullFileName ); + TPtrC ext( pathParser.Ext() ); + + if ( ext.Length() <= 0 ) + category = EMPXOther; + + if ( ext.CompareF( KTxtExtensionMP4 ) == 0 + || ext.CompareF( KTxtExtension3GP ) == 0 + || ext.CompareF( KTxtExtension3G2 ) == 0 + || ext.CompareF( KTxtExtensionODF ) == 0 + || ext.CompareF( KTxtExtensionASF ) == 0 ) + { + HBufC8* mimetype = MmMtpDpUtility::ContainerMimeType( aFullFileName ); + if ( mimetype != NULL ) + { + TMmMtpSubFormatCode subFormatCode = MmMtpDpUtility::SubFormatCodeFromMime( *mimetype ); + + if ( subFormatCode == EMTPSubFormatCodeVideo ) + category = EMPXVideo; + else if( subFormatCode == EMTPSubFormatCodeAudio ) + category = EMPXSong; + else + category = EMPXOther; + } + } + else if ( ext.CompareF( KTxtExtensionO4V ) == 0 ) + category = EMPXVideo; + else + category = EMPXOther; + + PRINT1( _L( "MM MTP <= CMmMtpDpMetadataAccessWrapper::ContainerCategory, category = %d" ), category ); return category; } @@ -408,38 +518,27 @@ // Add object (music, video, playlist and abstract media) info to DB // ----------------------------------------------------------------------------- // -void CMmMtpDpMetadataAccessWrapper::AddObjectL( const TDesC& aFullFileName, TUint aFormatCode, TUint aSubFormatCode ) +void CMmMtpDpMetadataAccessWrapper::AddObjectL( const CMTPObjectMetaData& aObject ) { - PRINT1( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::AddObjectL aFullFileName = %S" ), &aFullFileName ); + PRINT( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::AddObjectL" ) ); + TMPXGeneralCategory category = Category( aObject ); - if ( aFullFileName.Length() <= 0 ) - { - User::Leave( KErrArgument ); - } - if ( MmMtpDpUtility::IsVideoL( aFormatCode, aSubFormatCode ) ) + TPtrC fullFileName( aObject.DesC( CMTPObjectMetaData::ESuid ) ); + if ( category == EMPXVideo ) { PRINT( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::AddObjectL Addvideo" ) ); - iMmMtpDpMetadataVideoAccess->AddVideoL( aFullFileName ); + iMmMtpDpMetadataVideoAccess->AddVideoL( fullFileName ); } - else + else if ( category == EMPXPlaylist || category == EMPXAbstractAlbum ) { - if ( aFormatCode == EMTPFormatCodeM3UPlaylist - || aFormatCode == EMTPFormatCodeMPLPlaylist - || aFormatCode == EMTPFormatCodeAbstractAudioVideoPlaylist - || aFormatCode == EMTPFormatCodeAbstractAudioPlaylist - || aFormatCode == EMTPFormatCodeAbstractVideoPlaylist - || aFormatCode == EMTPFormatCodeASXPlaylist - || aFormatCode == EMTPFormatCodePLSPlaylist ) - { - PRINT( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::AddObjectL AddPlaylist" ) ); - iMmMtpDpMetadataMpxAccess->AddAbstractMediaL( aFullFileName, - EMPXPlaylist ); - } - else - { - PRINT( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::AddObjectL AddSong" ) ); - iMmMtpDpMetadataMpxAccess->AddSongL( aFullFileName ); - } + PRINT( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::AddObjectL AddPlaylist" ) ); + iMmMtpDpMetadataMpxAccess->AddAbstractMediaL( fullFileName, + category ); + } + else if ( category == EMPXSong ) + { + PRINT( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::AddObjectL AddSong" ) ); + iMmMtpDpMetadataMpxAccess->AddSongL( fullFileName ); } PRINT( _L( "MM MTP <= CMmMtpDpMetadataAccessWrapper::AddObjectL" ) ); @@ -518,7 +617,7 @@ EMTPFormatCodeAbstractAudioVideoPlaylist ) { RFile newfile; - TInt err = newfile.Replace( iFramework.Fs(), aPlaylistName, EFileWrite ); + TInt err = newfile.Replace( iFs, aPlaylistName, EFileWrite ); if ( err != KErrNone ) { @@ -529,7 +628,7 @@ { err = newfile.Flush(); newfile.Close(); - err = iFramework.Fs().SetAtt( aPlaylistName, KEntryAttSystem | KEntryAttHidden, + err = iFs.SetAtt( aPlaylistName, KEntryAttSystem | KEntryAttHidden, KEntryAttReadOnly | KEntryAttNormal ); if ( err != KErrNone ) PRINT1( _L( "MM MTP <> CMmMtpDpMetadataAccessWrapper::CreateDummyFile Dummy Playlist file created. err = %d" ), err ); @@ -539,7 +638,7 @@ // ----------------------------------------------------------------------------- // CMmMtpDpMetadataAccessWrapper::RemoveDummyFiles -// Remove all dummy file of which format is "pla", and leave the "m3u" +// Remove all dummy file of which format is "pla" and "alb", and leave the "m3u" // ----------------------------------------------------------------------------- // void CMmMtpDpMetadataAccessWrapper::RemoveDummyFiles() @@ -547,25 +646,43 @@ PRINT( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::RemoveDummyFiles" ) ); TInt count = iAbstractMediaArray->Count(); + PRINT1( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::RemoveDummyFiles, count = %d" ), count ); // Check if playlist file is a dummy file or an imported file for ( TInt i = 0; i < count; i++ ) { - TPtrC dummyFileName( (*iAbstractMediaArray)[i] ); - if ( MmMtpDpUtility::FormatFromFilename( dummyFileName ) != - EMTPFormatCodeM3UPlaylist ) + TPtrC fileName( (*iAbstractMediaArray)[i] ); + PRINT1( _L( "MM MTP <> CMmMtpDpMetadataAccessWrapper::RemoveDummyFiles, fileName = %S" ), &fileName ); + + TMTPFormatCode format = MmMtpDpUtility::FormatFromFilename( fileName ); + PRINT1( _L( "MM MTP <> CMmMtpDpMetadataAccessWrapper::RemoveDummyFiles, format = 0x%x" ), format ); + if ( format == EMTPFormatCodeAbstractAudioAlbum ) { - // delete the virtual playlist - // iFramework has release don't use iFramework.FS() - TInt err = iRfs.Delete( ( *iAbstractMediaArray )[i] ); + // delete the abstract album if its size is zero + TEntry entry; + TInt err = iFs.Entry( fileName, entry ); + if ( err == KErrNone && entry.iSize == 0 ) + { + TRAP( err, iMmMtpDpMetadataMpxAccess->DeleteObjectL( fileName, EMPXAbstractAlbum ) ); + if( err == KErrNone ) + { + err = iFs.Delete( fileName ); + } + } + PRINT3( _L( "MM MTP <> CMmMtpDpMetadataAccessWrapper::RemoveDummyFile filename = %S, err %d, entry.iSize = %d" ), + &fileName, err, entry.iSize ); + } + else if ( format != EMTPFormatCodeM3UPlaylist ) + { + TInt err = iFs.Delete( fileName ); PRINT2( _L( "MM MTP <> CMmMtpDpMetadataAccessWrapper::RemoveDummyFile filename = %S, err %d" ), - &dummyFileName, + &fileName, err ); } else { // leave the Imported playlist in the file system - PRINT1( _L( "MM MTP <> CMmMtpDpMetadataAccessWrapper::RemoveDummyFile, Don't delete m3u file [%S]" ), &dummyFileName ); + PRINT1( _L( "MM MTP <> CMmMtpDpMetadataAccessWrapper::RemoveDummyFile, Don't delete m3u file [%S]" ), &fileName ); } } PRINT( _L( "MM MTP <= CMmMtpDpMetadataAccessWrapper::RemoveDummyFiles" ) ); diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/src/cmmmtpdpmetadatampxaccess.cpp --- a/mmappcomponents/mmmtpdataprovider/src/cmmmtpdpmetadatampxaccess.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/src/cmmmtpdpmetadatampxaccess.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -24,9 +24,7 @@ #include #include #include -#include #include -#include #include // from MPX #include @@ -71,10 +69,9 @@ _LIT( KMtpMpxPanic, "CMmMtpDpMetadataMpxAccess" ); #endif -CMmMtpDpMetadataMpxAccess* CMmMtpDpMetadataMpxAccess::NewL( RFs& aRfs, - MMTPDataProviderFramework& aFramework ) +CMmMtpDpMetadataMpxAccess* CMmMtpDpMetadataMpxAccess::NewL( RFs& aRfs ) { - CMmMtpDpMetadataMpxAccess* self = new(ELeave) CMmMtpDpMetadataMpxAccess( aRfs, aFramework ); + CMmMtpDpMetadataMpxAccess* self = new( ELeave ) CMmMtpDpMetadataMpxAccess( aRfs ); CleanupStack::PushL( self ); self->ConstructL(); CleanupStack::Pop( self ); @@ -82,10 +79,8 @@ return self; } -CMmMtpDpMetadataMpxAccess::CMmMtpDpMetadataMpxAccess( RFs& aRfs, - MMTPDataProviderFramework& aFramework ): - iRfs( aRfs ), - iFramework( aFramework ) +CMmMtpDpMetadataMpxAccess::CMmMtpDpMetadataMpxAccess( RFs& aRfs ): + iRfs( aRfs ) { // Do nothing } @@ -129,25 +124,18 @@ // void CMmMtpDpMetadataMpxAccess::GetObjectMetadataValueL( const TUint16 aPropCode, MMTPType& aNewData, - const CMTPObjectMetaData& aObjectMetaData ) + const TDesC& aFullFileName, + TMPXGeneralCategory aCategory ) { PRINT1( _L( "MM MTP => CMmMtpDpMetadataMpxAccess::GetObjectMetadataValueL aPropCode = 0x%x" ), aPropCode ); - // File Path - HBufC* suid = aObjectMetaData.DesC( CMTPObjectMetaData::ESuid ).AllocLC(); // + suid - TUint format = aObjectMetaData.Uint( CMTPObjectMetaData::EFormatCode ); - TMPXGeneralCategory category = ( format == EMTPFormatCodeAbstractAudioVideoPlaylist ) || - ( format == EMTPFormatCodeM3UPlaylist ) ? EMPXPlaylist : EMPXSong; - PERFLOGSTART( KMpxCollectionGetL ); - const CMPXMedia& media = CollectionHelperL()->GetL( *suid, category ); + const CMPXMedia& media = CollectionHelperL()->GetL( aFullFileName, aCategory ); PERFLOGSTOP( KMpxCollectionGetL ); - CleanupStack::PopAndDestroy( suid ); // - suid - TMPXAttributeData attrib( MpxAttribFromPropL( aPropCode ) ); TBool isSupported = media.IsSupported( attrib ); - PRINT1(_L( "MM MTP <> CMmMtpDpMetadataMpxAccess::GetObjectMetadataValueL isSupported = %d" ), isSupported); + PRINT1(_L( "MM MTP <> CMmMtpDpMetadataMpxAccess::GetObjectMetadataValueL isSupported = %d" ), isSupported ); if ( aPropCode != EMTPObjectPropCodeOriginalReleaseDate && aPropCode != EMTPObjectPropCodeDRMStatus @@ -602,25 +590,14 @@ // void CMmMtpDpMetadataMpxAccess::RenameObjectL( const TDesC& aOldFileName, const TDesC& aNewFileName, - TUint aFormatCode ) + TMPXGeneralCategory aCategory ) { PRINT2( _L( "MM MTP => CMmMtpDpMetadataMpxAccess::RenameObjectL aOldFileName = %S, aNewFileName = %S" ), &aOldFileName, &aNewFileName ); TInt err = KErrNone; - - if ( ( aFormatCode == EMTPFormatCodeAbstractAudioVideoPlaylist ) - || ( aFormatCode == EMTPFormatCodeM3UPlaylist ) ) - { - PRINT( _L( "MM MTP <> Playlist" ) ); - TRAP( err, CollectionHelperL()->RenameL( aOldFileName, aNewFileName, EMPXPlaylist ) ); - } - else // Not a playlist - { - PRINT( _L( "MM MTP <> Non-Playlist" ) ); - TRAP( err, CollectionHelperL()->RenameL( aOldFileName, aNewFileName, EMPXSong ) ); - } + TRAP( err, CollectionHelperL()->RenameL( aOldFileName, aNewFileName, aCategory ) ); if ( KErrNotFound == err ) { @@ -639,112 +616,35 @@ // ----------------------------------------------------------------------------- void CMmMtpDpMetadataMpxAccess::SetObjectMetadataValueL( const TUint16 aPropCode, const MMTPType& aNewData, - const TDesC& aSuid ) + const TDesC& aFullFileName, + TMPXGeneralCategory aCategory ) { - PRINT2( _L( "MM MTP => CMmMtpDpMetadataMpxAccess::SetObjectMetadataValueL aPropCode = 0x%x aSuid = %S" ), - aPropCode, - &aSuid ); - CMPXMedia* media = NULL; + PRINT1( _L( "MM MTP => CMmMtpDpMetadataMpxAccess::SetObjectMetadataValueL aPropCode = 0x%x" ), aPropCode ); - // Creat media properties for the song RArray contentIDs; CleanupClosePushL( contentIDs ); // + contentIDs + contentIDs.AppendL( KMPXMediaIdGeneral ); - contentIDs.AppendL( KMPXMediaIdAudio ); - contentIDs.AppendL( KMPXMediaIdMusic ); - contentIDs.AppendL( KMPXMediaIdMTP ); - media = CMPXMedia::NewL( contentIDs.Array() ); - CleanupStack::PopAndDestroy( &contentIDs ); // - contentIDs + if ( aCategory == EMPXSong ) + { + contentIDs.AppendL( KMPXMediaIdAudio ); + contentIDs.AppendL( KMPXMediaIdMusic ); + contentIDs.AppendL( KMPXMediaIdMTP ); + } + + CMPXMedia* media = CMPXMedia::NewL( contentIDs.Array() ); CleanupStack::PushL( media ); // + media - media->SetTObjectValueL( - KMPXMediaGeneralCategory, - EMPXSong ); + media->SetTObjectValueL( KMPXMediaGeneralCategory, aCategory ); // MPXMedia default types media->SetTObjectValueL( KMPXMediaGeneralType, EMPXItem ); - // Get file path - TParsePtrC parse( aSuid ); - media->SetTextValueL( KMPXMediaGeneralUri, aSuid ); + TParsePtrC parse( aFullFileName ); + media->SetTextValueL( KMPXMediaGeneralUri, aFullFileName ); media->SetTextValueL( KMPXMediaGeneralDrive, parse.Drive() ); - TRAPD( err, SetMetadataValueL( aPropCode, aNewData, *media ) ); - - if ( err == KErrNone ) - { - SetStorageRootL( parse.Drive() ); - - // Update the song's metadata with the media object - PERFLOGSTART( KMpxCollectionSetL ); - CollectionHelperL()->SetL( media ); - PERFLOGSTOP( KMpxCollectionSetL ); - } - else - { - PRINT1( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::SetObjectMetadataValueL ERROR = %d" ), err ); - - User::Leave( err ); - } - - CleanupStack::PopAndDestroy( media ); // - media - PRINT( _L( "MM MTP <= CMmMtpDpMetadataMpxAccess::SetObjectMetadataValueL" ) ); - } - -// ----------------------------------------------------------------------------- -// CMmMtpDpMetadataMpxAccess::SetObjectMetadataValueL -// Updated object metadata in MPX database -// ----------------------------------------------------------------------------- -void CMmMtpDpMetadataMpxAccess::SetObjectMetadataValueL( const TUint16 aPropCode, - const MMTPType& aNewData, - const CMTPObjectMetaData& aObjectMetaData ) - { - PRINT1( _L( "MM MTP => CMmMtpDpMetadataMpxAccess::SetObjectMetadataValueL aPropCode = 0x%x" ), aPropCode ); - CMPXMedia* media = NULL; - - RArray contentIDs; - CleanupClosePushL( contentIDs ); // + contentIDs - - TUint format = aObjectMetaData.Uint( CMTPObjectMetaData::EFormatCode ); - if ( ( format == EMTPFormatCodeAbstractAudioVideoPlaylist ) - || ( format == EMTPFormatCodeM3UPlaylist ) ) - { - PRINT( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::SetObjectMetadataValueL format is abstract media" ) ); - contentIDs.AppendL( KMPXMediaIdGeneral ); - - media = CMPXMedia::NewL( contentIDs.Array() ); - CleanupStack::PushL( media ); // + media - - media->SetTObjectValueL( KMPXMediaGeneralCategory, - EMPXPlaylist ); - } - else - { - // Creat media properties for the song - contentIDs.AppendL( KMPXMediaIdGeneral ); - contentIDs.AppendL( KMPXMediaIdAudio ); - contentIDs.AppendL( KMPXMediaIdMusic ); - contentIDs.AppendL( KMPXMediaIdMTP ); - - media = CMPXMedia::NewL( contentIDs.Array() ); - CleanupStack::PushL( media ); // + media - - media->SetTObjectValueL( - KMPXMediaGeneralCategory, - EMPXSong ); - } - - // MPXMedia default types - media->SetTObjectValueL( KMPXMediaGeneralType, EMPXItem ); - - // Get file path - HBufC* suid = aObjectMetaData.DesC( CMTPObjectMetaData::ESuid ).AllocLC(); // + suid - TParsePtrC parse( *suid ); - media->SetTextValueL( KMPXMediaGeneralUri, *suid ); - media->SetTextValueL( KMPXMediaGeneralDrive, parse.Drive() ); - CleanupStack::PopAndDestroy( suid ); // - suid - PERFLOGSTART( KSetMetadataValue ); SetMetadataValueL( aPropCode, aNewData, *media ); PERFLOGSTOP( KSetMetadataValue ); @@ -951,6 +851,27 @@ } break; + case EMTPObjectPropCodeRepresentativeSampleData: + { + const CMTPTypeArray& mtpTypeArray = static_cast( aNewData ); + TUint32 numElements = mtpTypeArray.NumElements(); + const TDesC& suid = aMediaProp.ValueText( KMPXMediaGeneralUri ); + PRINT2( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::SetMetadataValueL SampleData numElements = %d, suid = %S" ), numElements, &suid ); + + HBufC8* sampleData = HBufC8::NewLC( numElements * sizeof( TUint8 ) ); + TPtr8 samplePtr = sampleData->Des(); + mtpTypeArray.ToDes( samplePtr ); + RFile sampleFile; + CleanupClosePushL( sampleFile ); + User::LeaveIfError( sampleFile.Replace( iRfs, suid, EFileWrite ) ); + User::LeaveIfError( sampleFile.Write( samplePtr ) ); + CleanupStack::PopAndDestroy( &sampleFile ); + CleanupStack::PopAndDestroy( sampleData ); + aMediaProp.SetTObjectValueL( attrib, ETrue ); + PRINT1( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::SetMetadataValueL SampleData is ready = %u" ), 1 ); + } + break; + default: { User::Leave( KErrNotSupported ); @@ -1156,13 +1077,17 @@ TParsePtrC parse( aFullFileName ); media->SetTextValueL( KMPXMediaGeneralDrive, parse.Drive() ); - if ( aCategory == EMPXPlaylist ) + if ( ( aCategory == EMPXPlaylist ) || ( aCategory == EMPXAbstractAlbum ) ) { media->SetTextValueL( KMPXMediaGeneralTitle, parse.Name() ); } media->SetTObjectValueL( KMPXMediaGeneralSynchronized, ETrue ); media->SetCObjectValueL( KMPXMediaArrayContents, abstractMediaArray ); media->SetTObjectValueL( KMPXMediaArrayCount, abstractMediaArray->Count() ); + if ( aCategory == EMPXAbstractAlbum ) + { + media->SetTObjectValueL( KMPXMediaMTPSampleDataFlag, EFalse ); + } PERFLOGSTART( KMpxCollectionAddL ); CollectionHelperL()->AddL( media ); @@ -1180,26 +1105,21 @@ } // ----------------------------------------------------------------------------- -// CMmMtpDpMetadataMpxAccess::SetAbstractMediaL +// CMmMtpDpMetadataMpxAccess::SetReferenceL // Set abstract media to DB // ----------------------------------------------------------------------------- // -void CMmMtpDpMetadataMpxAccess::SetAbstractMediaL( const TDesC& aAbstractMediaFileName, - CDesCArray& aRefFileArray, TMPXGeneralCategory aCategory ) +void CMmMtpDpMetadataMpxAccess::SetReferenceL( const TDesC& aRefOwnerName, + CDesCArray& aRefFileArray, + TMPXGeneralCategory aCategory ) { - PRINT( _L( "MM MTP => CMmMtpDpMetadataMpxAccess::SetAbstractMediaL" ) ); + PRINT( _L( "MM MTP => CMmMtpDpMetadataMpxAccess::SetReferenceL" ) ); CMPXMediaArray* abstractMediaArray = CMPXMediaArray::NewL(); CleanupStack::PushL( abstractMediaArray ); // + abstractMediaArray TUint count = aRefFileArray.Count(); for ( TUint j = 0; j < count; j++ ) { - // if the file is video, skip it and continue - if ( MmMtpDpUtility::IsVideoL( aRefFileArray[j], iFramework ) ) - { - continue; - } - // Creat media properties for the song RArray contentIDs; CleanupClosePushL( contentIDs ); // + contentIDs @@ -1217,10 +1137,10 @@ EMPXItem ); media->SetTObjectValueL( KMPXMediaGeneralCategory, EMPXSong ); - // File Path - // + + media->SetTextValueL( KMPXMediaGeneralUri, aRefFileArray[j] ); + // TODO: need to confirm that should set drive letter or storage root path. TParsePtrC parse( aRefFileArray[j] ); - media->SetTextValueL( KMPXMediaGeneralUri, aRefFileArray[j] ); media->SetTextValueL( KMPXMediaGeneralDrive, parse.Drive() ); // Add media into array contents @@ -1238,12 +1158,9 @@ CleanupStack::PushL( abstractMedia ); // + abstractMedia abstractMedia->SetTObjectValueL( KMPXMediaGeneralType, EMPXItem ); - abstractMedia->SetTObjectValueL( KMPXMediaGeneralCategory, aCategory ); - - abstractMedia->SetTextValueL( KMPXMediaGeneralUri, aAbstractMediaFileName ); - - TParsePtrC parse( aAbstractMediaFileName ); + abstractMedia->SetTextValueL( KMPXMediaGeneralUri, aRefOwnerName ); + TParsePtrC parse( aRefOwnerName ); abstractMedia->SetTextValueL( KMPXMediaGeneralDrive, parse.Drive() ); abstractMedia->SetTObjectValueL( KMPXMediaGeneralSynchronized, ETrue ); @@ -1257,11 +1174,9 @@ PERFLOGSTOP( KMpxCollectionSetReferenceL ); CleanupStack::PopAndDestroy( abstractMedia ); // - abstractMedia - - // Clear the array CleanupStack::PopAndDestroy( abstractMediaArray ); // - abstractMediaArray - PRINT( _L( "MM MTP <= CMmMtpDpMetadataMpxAccess::SetAbstractMediaL" ) ); + PRINT( _L( "MM MTP <= CMmMtpDpMetadataMpxAccess::SetReferenceL" ) ); } // --------------------------------------------------------------------------- @@ -1311,8 +1226,8 @@ aMediaProp.SetTextValueL( KMPXMediaMusicGenre, KNullDesC ); // Composer aMediaProp.SetTextValueL( KMPXMediaMusicComposer, KNullDesC ); - // Album artFilename - aMediaProp.SetTextValueL( KMPXMediaMusicAlbumArtFileName, KNullDesC ); + // Album Artist + aMediaProp.SetTextValueL( KMPXMediaMusicAlbumArtist, KNullDesC ); // URL aMediaProp.SetTextValueL( KMPXMediaMusicURL, KNullDesC ); @@ -1357,7 +1272,8 @@ { EMTPObjectPropCodeAudioBitRate, KMPXMediaAudioBitrate }, { EMTPObjectPropCodeSampleRate, KMPXMediaAudioSamplerate }, { EMTPObjectPropCodeAudioWAVECodec, KMPXMediaAudioAudioCodec }, - { EMTPObjectPropCodeAlbumArtist, KMPXMediaMusicArtist } + { EMTPObjectPropCodeAlbumArtist, KMPXMediaMusicAlbumArtist }, + { EMTPObjectPropCodeRepresentativeSampleData,KMPXMediaMTPSampleDataFlag } }; TInt i = 0; @@ -1384,7 +1300,8 @@ // --------------------------------------------------------------------------- // void CMmMtpDpMetadataMpxAccess::GetAllAbstractMediaL( const TDesC& aStoreRoot, - CMPXMediaArray** aAbstractMedias, TMPXGeneralCategory aCategory ) + CMPXMediaArray** aAbstractMedias, + TMPXGeneralCategory aCategory ) { PRINT( _L( "MM MTP => CMmMtpDpMetadataMpxAccess::GetAllAbstractMediaL" ) ); @@ -1548,6 +1465,14 @@ } name = aAbstractMedia->ValueText( KMPXMediaGeneralUri ).AllocL(); } + else if ( aCategory == EMPXAbstractAlbum ) + { + if ( !aAbstractMedia->IsSupported( KMPXMediaGeneralTitle ) ) + { + User::Leave( KErrNotSupported ); + } + name = aAbstractMedia->ValueText( KMPXMediaGeneralTitle ).AllocL(); + } else { User::Leave( KErrNotSupported ); diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/src/cmmmtpdpmetadatavideoaccess.cpp --- a/mmappcomponents/mmmtpdataprovider/src/cmmmtpdpmetadatavideoaccess.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/src/cmmmtpdpmetadatavideoaccess.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -303,10 +303,6 @@ formatBuf.Append( KMtpVideoParentalRatingType ); formatBuf.Append( KMtpVideoCommaSign ); - formatBuf.Append( KMtpVideoUseCount ); - formatBuf.Append( KMtpVideoUseCountType ); - formatBuf.Append( KMtpVideoCommaSign ); - formatBuf.Append( KMtpVideoDRM ); formatBuf.Append( KMtpVideoDRMType ); formatBuf.Append( KMtpVideoCommaSign ); @@ -662,9 +658,6 @@ num = iColSet->ColNo( KMtpVideoParentalRating ); iRecordSet.SetColL( num, KNullDesC ); - num = iColSet->ColNo( KMtpVideoUseCount ); - iRecordSet.SetColL( num, 0 ); - num = iColSet->ColNo( KMtpVideoDRM ); iRecordSet.SetColL( num, 0 ); } @@ -1006,22 +999,6 @@ } break; - case EMTPObjectPropCodeUseCount: - { - PRINT( _L( "MM MTP <> EMTPObjectPropCodeUseCount-MD" ) ); - num = iColSet->ColNo( KMtpVideoUseCount ); - uInt32 = iRecordSet.ColUint32( num ); - if ( EMTPTypeUINT32 == aNewData.Type() ) - { - ( ( TMTPTypeUint32 & ) aNewData ).Set( uInt32 ); - } - else - { - User::Leave( KErrArgument ); - } - } - break; - case EMTPObjectPropCodeDRMStatus: { PRINT( _L( "MM MTP <> EMTPObjectPropCodeDRMStatus-MD" ) ); @@ -1174,7 +1151,6 @@ case EMTPObjectPropCodeVideoBitRate: case EMTPObjectPropCodeFramesPerThousandSeconds: case EMTPObjectPropCodeKeyFrameDistance: - case EMTPObjectPropCodeUseCount: { if ( EMTPTypeUINT32 != aNewData.Type() ) { @@ -1499,7 +1475,6 @@ { EMTPObjectPropCodeScanType, KMtpVideoScanType }, { EMTPObjectPropCodeEncodingProfile, KMtpVideoEncodingProfile }, { EMTPObjectPropCodeParentalRating, KMtpVideoParentalRating }, - { EMTPObjectPropCodeUseCount, KMtpVideoUseCount }, { EMTPObjectPropCodeAudioWAVECodec, KMtpVideoAudioCodec }, { EMTPObjectPropCodeDRMStatus, KMtpVideoDRM }, }; diff -r d240f0a77280 -r 780c925249c1 mmappcomponents/mmmtpdataprovider/src/mmmtpdputility.cpp --- a/mmappcomponents/mmmtpdataprovider/src/mmmtpdputility.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/src/mmmtpdputility.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -45,6 +45,9 @@ _LIT( KHxMimeTypeWma, "audio/x-hx-wma" ); _LIT( KHxMimeTypeWmv, "video/x-hx-wmv" ); +const TInt KMaxRenameTimes = 10; +const TInt KRenameThreshold = 100 * 1000; // (100 millisec) + // ----------------------------------------------------------------------------- // MmMtpDpUtility::FormatFromFilename // Utility function to get the type of an object from the filename @@ -61,6 +64,9 @@ TParsePtrC file( aFullFileName ); + if ( !file.ExtPresent() ) + return EMTPFormatCodeUndefined; + // need to do it in popularity of format, to optmize performance if ( file.Ext().CompareF( KTxtExtensionMP3 ) == 0 ) return EMTPFormatCodeMP3; @@ -117,6 +123,9 @@ } } + if ( file.Ext().CompareF( KTxtExtensionALB ) == 0 ) + return EMTPFormatCodeAbstractAudioAlbum; + if (( file.Ext().CompareF( KTxtExtensionPLA ) == 0 ) || ( file.Ext().CompareF( KTxtExtensionVIR ) == 0 ) ) return EMTPFormatCodeAbstractAudioVideoPlaylist; @@ -164,130 +173,6 @@ } // ----------------------------------------------------------------------------- -// MmMtpDpUtility::IsVideo (Slow Version) -// Utility function to determine whether a format is Video or not -// ----------------------------------------------------------------------------- -// -EXPORT_C TBool MmMtpDpUtility::IsVideo( const TDesC& aFullFileName ) - { - PRINT1( _L( "MM MTP => MmMtpDpUtility::IsVideoL (Slow Version) aFullFileName = %S" ), &aFullFileName ); - - TParsePtrC pathParser( aFullFileName ); - TPtrC ext( pathParser.Ext() ); - - if ( ext.Length() <= 0 ) - { - PRINT( _L( "MM MTP <> MmMtpDpUtility::IsVideoL ext len <= 0, return false" ) ); - return EFalse; - } - - // move WMV early to optmize comparison - if ( ext.CompareF( KTxtExtensionWMV ) == 0 ) - { - return ETrue; - } - else if ( ext.CompareF( KTxtExtensionMP4 ) == 0 - || ext.CompareF( KTxtExtension3GP ) == 0 - || ext.CompareF( KTxtExtension3G2 ) == 0 - || ext.CompareF( KTxtExtensionODF ) == 0 - || ext.CompareF( KTxtExtensionASF ) == 0 ) - { - HBufC8* mimetype = ContainerMimeType( aFullFileName ); - if ( mimetype != NULL ) - { - TMmMtpSubFormatCode subFormatCode; - - TInt err = SubFormatCodeFromMime(*mimetype, subFormatCode); - PRINT1( _L( "MM MTP <> MmMtpDpUtility::IsVideoL SubFormatCodeFromMime err = %d" ), err ); - - if ( subFormatCode == EMTPSubFormatCodeVideo ) - { - return ETrue; - } - } - } - else if ( ext.CompareF( KTxtExtensionO4V ) == 0 ) - return ETrue; - - // NOTE: Treate all non-video files as audio files even it's not audio - // since the entry is not going to be find out in MPX - // we can handle that situation gracefully. - return EFalse; - } - -// ----------------------------------------------------------------------------- -// MmMtpDpUtility::IsVideoL (Fast Version) -// Utility function to determine whether a format is Video or not -// ----------------------------------------------------------------------------- -// -TBool MmMtpDpUtility::IsVideoL( const TDesC& aFullFileName, - const MMTPDataProviderFramework& aFramework ) - { - PRINT1( _L( "MM MTP => MmMtpDpUtility::IsVideoL (Fast Version) aFullFileName = %S" ), &aFullFileName ); - - CMTPObjectMetaData* info = CMTPObjectMetaData::NewLC(); // + info - aFramework.ObjectMgr().ObjectL( aFullFileName, *info ); - - TUint formatCode = info->Uint( CMTPObjectMetaData::EFormatCode ); - TUint subFormatCode = info->Uint( CMTPObjectMetaData::EFormatSubCode ); - TBool ifNeedParse = ( ( formatCode == EMTPFormatCodeMP4Container ) - || ( formatCode == EMTPFormatCode3GPContainer ) - || ( formatCode== EMTPFormatCodeASF ) ) - && ( subFormatCode == EMTPSubFormatCodeUnknown ); - TBool isVideo = EFalse; - if ( ifNeedParse ) - { - isVideo = MmMtpDpUtility::IsVideo( aFullFileName ); - subFormatCode = isVideo ? EMTPSubFormatCodeVideo : EMTPSubFormatCodeAudio; - - // Once we got the subformat code, set it into fw db - aFramework.ObjectMgr().ModifyObjectL( *info ); - } - else - { - isVideo = MmMtpDpUtility::IsVideoL( formatCode, subFormatCode ); - } - - CleanupStack::PopAndDestroy( info ); // - info - - return isVideo; - } - -// ----------------------------------------------------------------------------- -// MmMtpDpUtility::IsVideoL (Fast Version) -// Utility function to determine whether a format is Video or not -// ----------------------------------------------------------------------------- -// -TBool MmMtpDpUtility::IsVideoL( TUint aFormatCode, TUint aSubFormatCode ) - { - if ( aFormatCode == KMTPFormatsAll ) - User::Leave( KErrArgument ); - - if ( aFormatCode == EMTPFormatCodeWMV ) - { - return ETrue; - } - else if ( ( aFormatCode == EMTPFormatCodeMP4Container ) - || ( aFormatCode == EMTPFormatCode3GPContainer ) - || ( aFormatCode == EMTPFormatCodeASF ) ) - { - if ( aSubFormatCode == EMTPSubFormatCodeAudio ) - { - return EFalse; - } - else if ( aSubFormatCode == EMTPSubFormatCodeVideo ) - { - return ETrue; - } - } - - PRINT( _L( "MM MTP <= MmMtpDpUtility::IsVideoL (Fast Version)" ) ); - - // other format, as audio - return EFalse; - } - -// ----------------------------------------------------------------------------- // MmMtpDpUtility::ValidateFilename // Check the filename to see if it exceeds Symbian 256 limit. // ----------------------------------------------------------------------------- @@ -323,16 +208,14 @@ // Get the file date modified. // ----------------------------------------------------------------------------- // -TTime MmMtpDpUtility::GetObjectDateModifiedL( RFs& aFs, const TDesC& aFullFileName ) +void MmMtpDpUtility::GetObjectDateModifiedL( RFs& aFs, const TDesC& aFullFileName, TDes& aDateModified ) { - TTime dataModified; + TTime date; TEntry fileInfo; // Shouldn't leave User::LeaveIfError( aFs.Entry( aFullFileName, fileInfo ) ); - - dataModified = fileInfo.iModified; - - return dataModified; + date = fileInfo.iModified; + date.FormatL( aDateModified, KMtpDateTimeFormat ); } // ----------------------------------------------------------------------------- @@ -364,7 +247,7 @@ // Check if property type match datatype. // ----------------------------------------------------------------------------- // -TMTPResponseCode MmMtpDpUtility::CheckPropType(TUint16 aPropertyCode, TUint16 aDataType) +TMTPResponseCode MmMtpDpUtility::CheckPropType( TUint16 aPropertyCode, TUint16 aDataType ) { PRINT2( _L( "MM MTP => MmMtpDpUtility::CheckPropCode aPropertyCode = 0x%x, aDataType = 0x%x" ), aPropertyCode, @@ -384,6 +267,10 @@ case EMTPObjectPropCodeDateModified: case EMTPObjectPropCodeDateAdded: case EMTPObjectPropCodeVideoBitRate: + case EMTPObjectPropCodeRepresentativeSampleFormat: + case EMTPObjectPropCodeRepresentativeSampleSize: + case EMTPObjectPropCodeRepresentativeSampleHeight: + case EMTPObjectPropCodeRepresentativeSampleWidth: { responseCode = EMTPRespCodeAccessDenied; } @@ -399,6 +286,7 @@ case EMTPObjectPropCodeOriginalReleaseDate: // 0xDC99 case EMTPObjectPropCodeAlbumName: // 0xDC9A case EMTPObjectPropCodeEncodingProfile: // 0xDEA1 + case EMTPObjectPropCodeAlbumArtist: // 0xDC9B { if ( aDataType != EMTPTypeString ) { @@ -420,7 +308,6 @@ case EMTPObjectPropCodeWidth: // 0xDC87 case EMTPObjectPropCodeHeight: // 0xDC88 case EMTPObjectPropCodeDuration: // 0xDC89 - case EMTPObjectPropCodeUseCount: // 0xDC91 case EMTPObjectPropCodeSampleRate: // 0xDE93 case EMTPObjectPropCodeAudioWAVECodec: // 0xDE99 case EMTPObjectPropCodeAudioBitRate: // 0xDE9A @@ -459,6 +346,15 @@ } break; + case EMTPObjectPropCodeRepresentativeSampleData: + { + if ( aDataType != EMTPTypeAUINT8 ) + { + responseCode = EMTPRespCodeInvalidObjectPropFormat; + } + } + break; + default: { responseCode = EMTPRespCodeInvalidObjectPropCode; @@ -493,7 +389,27 @@ aNewName.Insert( 0, ptr ); } - return aFs.Rename( aFullFileName, aNewName ); + TInt ret = KErrNone; + // Some other component might be holding on to the file (MDS background harvesting), + // try again after 100 millisec, up to 10 times, before give up + TInt count = KMaxRenameTimes; + while ( count > 0 ) + { + ret = aFs.Rename( aFullFileName, aNewName ); + if ( ( ret == KErrInUse ) && ( count > 1 ) ) + { + User::After( KRenameThreshold ); + count--; + } + else + { + break; + } + } + + PRINT1( _L( "MM MTP <> MmMtpDpUtility::UpdateObjectFileName, ret = %d" ), ret ); + + return ret; } // ----------------------------------------------------------------------------- @@ -774,11 +690,12 @@ // Get subformat code from mime string // ----------------------------------------------------------------------------- // -TInt MmMtpDpUtility::SubFormatCodeFromMime( const TDesC8& aMimeType, - TMmMtpSubFormatCode& aSubFormatCode ) +TMmMtpSubFormatCode MmMtpDpUtility::SubFormatCodeFromMime( const TDesC8& aMimeType ) { PRINT( _L( "MM MTP => MmMtpDpUtility::SubFormatCodeFromMime" ) ); + TMmMtpSubFormatCode subFormatCode = EMTPSubFormatCodeUnknown; + if ( aMimeType.CompareF( KMimeTypeVideoMp4 ) == 0 || aMimeType.CompareF( KMimeTypeVideo3gpp ) == 0 #ifdef __WINDOWS_MEDIA @@ -786,7 +703,7 @@ #endif ) { - aSubFormatCode = EMTPSubFormatCodeVideo; + subFormatCode = EMTPSubFormatCodeVideo; } else if ( aMimeType.CompareF( KMimeTypeAudioMp4 ) == 0 || aMimeType.CompareF( KMimeTypeAudio3gpp ) == 0 @@ -795,16 +712,17 @@ #endif ) { - aSubFormatCode = EMTPSubFormatCodeAudio; + subFormatCode = EMTPSubFormatCodeAudio; } else { PRINT( _L( "MM MTP <= MmMtpDpUtility::SubFormatCodeFromMime format not supported" ) ); - return KErrNotFound; + subFormatCode = EMTPSubFormatCodeUndefine; } - PRINT( _L( "MM MTP <= MmMtpDpUtility::SubFormatCodeFromMime" ) ); - return KErrNone; + PRINT1( _L( "MM MTP <= MmMtpDpUtility::SubFormatCodeFromMime SubFormatCode = %d" ), subFormatCode ); + + return subFormatCode; } // ----------------------------------------------------------------------------- diff -r d240f0a77280 -r 780c925249c1 mmappfw_plat/collection_helper_api/tsrc/CollectionHelperTestClass/inc/CollectionHelperTestClass.h --- a/mmappfw_plat/collection_helper_api/tsrc/CollectionHelperTestClass/inc/CollectionHelperTestClass.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappfw_plat/collection_helper_api/tsrc/CollectionHelperTestClass/inc/CollectionHelperTestClass.h Wed Mar 31 22:26:09 2010 +0300 @@ -73,6 +73,28 @@ _LIT( KRenameOldUri, "c:\\Blackbird.aac"); _LIT( KRenameNewUri, "c:\\data\\Blackbird.aac"); +_LIT( KFileWmaSong, "f:\\1.wma"); + +_LIT( KFile1, "e:\\data\\sounds\\digital\\1.mp3"); //ok +_LIT( KOldAbstractAlbumName, "1.wma"); //ok +_LIT( KNewAbstractAlbumName, "The 99 Most Essential Beethoven MasterpiecesVarious Artists"); //ok +_LIT( KFile3, "e:\\data\\sounds\\digital\\(01) Amber - Yes.mp3"); //ok +_LIT( KFilet, "e:\\data\\sounds\\digital\\02 What A Wonderful World.mp3"); //ok + + +_LIT( KTestFile3, "e:\\data\\sounds\\digital\\Atomic Kitten - It's Ok.mp3"); //ok +_LIT( KSongtest, "e:\\data\\sounds\\digital\\02 What A Wonderful World.mp3"); //ok + +_LIT( KAbstractalbum1, "f:\\1.alb"); +_LIT( KAbstractalbum2, "f:\\2.alb"); +_LIT( KAbstractalbum3, "f:\\3.alb"); +_LIT( KStoreRoot, "f:\\"); + +_LIT( KAbstractAlbumName, "The 99 Most Essential Beethoven MasterpiecesVarious Artists"); + +_LIT( KAlbumArtistShort, "testAlbumArtist"); + + // FORWARD DECLARATIONS class CCollectionHelperTestClass; @@ -300,7 +322,6 @@ TInt SetAllowedPanic( CStifItemParser& aItem ); void CreateTestMediaL( CMPXMedia*& aNewProperty ); - /** * Connect to the default client to the server * @since S60 3.2 @@ -316,8 +337,21 @@ virtual TInt CloseUiHelperL(CStifItemParser& aItem); virtual TInt CloseHelperL(CStifItemParser& aItem); virtual TInt CloseCachedHelperL(CStifItemParser& aItem); - + virtual TInt AddSongL(CStifItemParser& aItem); + TInt FindMediaL(const TDesC& aPath, TMPXGeneralCategory aCategory); + virtual TInt RemoveSongL(CStifItemParser& aItem ); + virtual TInt AddAbstractAlbumL(CStifItemParser& aItem); + virtual TInt RemoveAbstractAlbumL(CStifItemParser& aItem); + virtual TInt SetAbstractAlbumL(CStifItemParser& aItem); + virtual TInt SetSongAlbumArtistL(CStifItemParser& aItem); + virtual TInt GetSongAlbumArtistL(CStifItemParser& aItem); + virtual TInt SetAbstractAlbumArtistL(CStifItemParser& aItem); + virtual TInt GetAbstractAlbumArtistL(CStifItemParser& aItem); + virtual TInt UpdateAbstractAlbumNameL(CStifItemParser& aItem); + virtual TInt GetAbstractAlbumAndSongsL(CStifItemParser& aItem); + virtual TInt RenameAbstractAlbumL(CStifItemParser& aItem); + void AttachSongsL(CMPXMediaArray* aAbstractalbumArray, const TDesC& aPath); /** * From MMPXCollectionRemoveObserver * Handles removing a collection path @@ -339,7 +373,8 @@ * @param aError error code */ void HandleFindAllL(const CMPXMedia& aResults, TBool aComplete,TInt aError); - + + public: // Data protected: // Data diff -r d240f0a77280 -r 780c925249c1 mmappfw_plat/collection_helper_api/tsrc/CollectionHelperTestClass/src/CollectionHelperTestClassBlocks.cpp --- a/mmappfw_plat/collection_helper_api/tsrc/CollectionHelperTestClass/src/CollectionHelperTestClassBlocks.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappfw_plat/collection_helper_api/tsrc/CollectionHelperTestClass/src/CollectionHelperTestClassBlocks.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -30,6 +30,7 @@ #include #include #include "debug.h" +#include // EXTERNAL DATA STRUCTURES //extern ?external_data; @@ -134,10 +135,22 @@ ENTRY( "NewUiHelper", CCollectionHelperTestClass::NewUiHelperL ), ENTRY( "NewHelper", CCollectionHelperTestClass::NewHelperL ), ENTRY( "NewCachedHelper", CCollectionHelperTestClass::NewCachedHelperL ), + ENTRY( "AddSong", CCollectionHelperTestClass::AddSongL ), + ENTRY( "RemoveSong", CCollectionHelperTestClass::RemoveSongL ), + ENTRY( "AddAbstractAlbum", CCollectionHelperTestClass::AddAbstractAlbumL ), + ENTRY( "RemoveAbstractAlbum", CCollectionHelperTestClass::RemoveAbstractAlbumL ), + ENTRY( "SetAbstractAlbum", CCollectionHelperTestClass::SetAbstractAlbumL ), + ENTRY( "SetSongAlbumArtist", CCollectionHelperTestClass::SetSongAlbumArtistL ), + ENTRY( "GetSongAlbumArtist", CCollectionHelperTestClass::GetSongAlbumArtistL ), +ENTRY( "SetAbstractAlbumArtist", CCollectionHelperTestClass::SetAbstractAlbumArtistL ), +ENTRY( "GetAbstractAlbumArtist", CCollectionHelperTestClass::GetAbstractAlbumArtistL ), +ENTRY( "UpdateAbstractAlbumName", CCollectionHelperTestClass::UpdateAbstractAlbumNameL ), + ENTRY("GetAbstractAlbumAndSongs",CCollectionHelperTestClass::GetAbstractAlbumAndSongsL), + ENTRY( "RenameAbstractAlbum", CCollectionHelperTestClass::RenameAbstractAlbumL ), ENTRY( "CloseUiHelper", CCollectionHelperTestClass::CloseUiHelperL ), ENTRY( "CloseHelper", CCollectionHelperTestClass::CloseHelperL ), ENTRY( "CloseCachedHelper", CCollectionHelperTestClass::CloseCachedHelperL ), - }; + }; const TInt count = sizeof( KFunctions ) / sizeof( TStifFunctionInfo ); @@ -511,6 +524,640 @@ return result; } + + +//Removing song from collection +//By calling CMPXCollectionCachedHelper API RemoveL +TInt CCollectionHelperTestClass::RemoveSongL(CStifItemParser& /*aItem*/) + { + FTRACE(FPrint(_L("CCollectionHelperTest::RemoveSongL"))); + TRAPD(result, iCachedHelper->RemoveL(KFileWmaSong, EMPXSong)); + iLog->Log(_L("CCollectionHelperTestClass::RemoveSong done with result=[%d]"), result); + return result; + } + +//Removing AbstractAlbum from collection +//By calling CMPXCollectionCachedHelper API RemoveL +//precondition: e:\\data\\sounds\\digital\\1.alb on test HW +//output: 1.alb is delete from MPX DB +TInt CCollectionHelperTestClass::RemoveAbstractAlbumL(CStifItemParser& /*aItem*/) + { + FTRACE(FPrint(_L("CCollectionHelperTest::RemoveAbstractAlbumL"))); + TRAPD(result, iCachedHelper->RemoveL(KAbstractalbum1, EMPXAbstractAlbum)); + iLog->Log(_L("CCollectionHelperTestClass::RemoveAbstractAlbumL done with result=[%d]"), result); + return result; + } +//Adds song to the database +//WMP to MTP step1 +//By calling CMPXCollectionCachedHelper API AddL +//precondition: c:\\data\\sounds\\digital\\1.wma on test emulator +//precondition: e:\\data\\sounds\\digital\\1.wma on test HW +//output: 1.wma is added into MPX DB +TInt CCollectionHelperTestClass::AddSongL(CStifItemParser& /*aItem*/ ) + { + FTRACE(FPrint(_L("CCollectionHelperTest::AddSongL"))); + //Does a record already exist for this abstractalbum? + //this is the part to check if the song already exist in db? + TInt result; + TPtrC name(KFileWmaSong); + TInt mediafound = FindMediaL(name, EMPXSong); + + //media already in collection DB, no need to add + if (mediafound == 1) + { + return 0; + } + + else if (mediafound == 0) //media not in collection DB, continue to add*/ + { + // Create media properties for the song will added + iLog->Log(_L("Create media properties")); + RArray contentIDs; + contentIDs.AppendL(KMPXMediaIdGeneral); + contentIDs.AppendL(KMPXMediaIdAudio); + contentIDs.AppendL(KMPXMediaIdMusic); + contentIDs.AppendL(KMPXMediaIdMTP); + + CMPXMedia* media = CMPXMedia::NewL(contentIDs.Array()); + CleanupStack::PushL(media); + contentIDs.Close(); + + // MPXMedia default types + media->SetTObjectValueL(KMPXMediaGeneralType, EMPXItem); + media->SetTObjectValueL(KMPXMediaGeneralCategory, EMPXSong); + + // File Path + TParsePtrC parse(name); + + media->SetTextValueL(KMPXMediaGeneralUri, name); + media->SetTextValueL(KMPXMediaGeneralDrive, parse.Drive()); + + // Title + media->SetTextValueL(KMPXMediaGeneralTitle, parse.NameAndExt()); + // Comment + media->SetTextValueL(KMPXMediaGeneralComment, KNullDesC); + // Artist + media->SetTextValueL(KMPXMediaMusicArtist, KNullDesC); + // Album + media->SetTextValueL(KMPXMediaMusicAlbum, KNullDesC); + //AlbumArtist + media->SetTextValueL(KMPXMediaMusicAlbumArtist, KAlbumArtistShort); + // Track + media->SetTextValueL(KMPXMediaMusicAlbumTrack, KNullDesC); + // Genre + media->SetTextValueL(KMPXMediaMusicGenre, KNullDesC); + // Composer + media->SetTextValueL(KMPXMediaMusicComposer, KNullDesC); + // URL + media->SetTextValueL(KMPXMediaMusicURL, KNullDesC); + iLog->Log(_L("Default values set to Media")); + + // Update MPX WMP Roundtrip Metadata of the media object + media->SetTObjectValueL(KMPXMediaGeneralDeleted, EFalse); + media->SetTObjectValueL(KMPXMediaGeneralModified, EFalse); + media->SetTObjectValueL(KMPXMediaGeneralSynchronized, ETrue); + + media->SetTObjectValueL(KMPXMediaGeneralFlags, KMPXMediaGeneralFlagsIsInvalid|KMPXMediaGeneralFlagsIsCorrupted); + + // Add new media to collection + TRAP(result, iCachedHelper->AddL(media)); + FTRACE(FPrint(_L("CCollectionHelperTestClass::AddSongL, Media added into collection"))); + + CleanupStack::PopAndDestroy(media); + } + iLog->Log(_L("CCollectionHelperTestClass::AddSongL done with result=[%d]"), result); + + return result; + } + +//Adds abstractalbum to the database, *.alb file +//WMP to MTP step2 +//By calling CMPXCollectionCachedHelper API AddL +//precondition: c:\\data\\sounds\\digital\\1.alb on test emulator +//precondition: e:\\data\\sounds\\digital\\1.alb on test HW +//output: 1.alb is added into MPX DB +TInt CCollectionHelperTestClass::AddAbstractAlbumL(CStifItemParser& /*aItem*/) + { + FTRACE(FPrint(_L("CCollectionHelperTestClass::AddAbstractAlbumL"))); + TInt result; + TPtrC name(KAbstractalbum1); + TInt mediafound = FindMediaL(name, EMPXAbstractAlbum); + + //media already in collection DB, no need to add + if (mediafound == 1) + { + return 0; + } + + else if(mediafound == 0) // media not in collection DB, continue to add*/ + { + RArray contentIDs; + contentIDs.AppendL(KMPXMediaIdGeneral); + + CMPXMediaArray* abstractalbumArray = CMPXMediaArray::NewL(); + CleanupStack::PushL(abstractalbumArray); + + CMPXMedia* media = CMPXMedia::NewL(contentIDs.Array()); + CleanupStack::PushL(media); + contentIDs.Close(); + + // MPXMedia default types + media->SetTObjectValueL(KMPXMediaGeneralType, EMPXItem); + //EMPXAbstractAlbum is the new category added for non-embedded art + media->SetTObjectValueL(KMPXMediaGeneralCategory, EMPXAbstractAlbum); + + // File Path + media->SetTextValueL(KMPXMediaGeneralUri, name); + TParsePtrC parse(name); + media->SetTextValueL(KMPXMediaGeneralDrive, parse.Drive()); + media->SetTextValueL(KMPXMediaGeneralTitle, parse.Name()); + + //AlbumArtist + media->SetTextValueL(KMPXMediaMusicAlbumArtist, KAlbumArtistShort); + media->SetTObjectValueL(KMPXMediaGeneralSynchronized, ETrue); + media->SetTObjectValueL( KMPXMediaMTPSampleDataFlag, EFalse ); + media->SetCObjectValueL(KMPXMediaArrayContents, abstractalbumArray); + media->SetTObjectValueL(KMPXMediaArrayCount, abstractalbumArray->Count()); + + // Add new media to collection + TRAP( result, iCachedHelper->AddL(media)); + CleanupStack::PopAndDestroy(media); + + // Clear the array + CleanupStack::PopAndDestroy(abstractalbumArray); + } + iLog->Log(_L("CCollectionHelperTestClass::AddAbstractAlbumL done with result=[%d]"), result); + return result; + } + +//Associate abstractalbum with songs +//WMP to MTP step3 +//By calling CMPXCollectionCachedHelper API SetL +//precondition on emulator: c:\\data\\sounds\\digital\\1.wma +// c:\\data\\sounds\\digital\\1.alb +//precondition on HW : f:\\1.wma +// f:\\1.alb +//output: 1.wma and 1.alb is associated +TInt CCollectionHelperTestClass::SetAbstractAlbumL(CStifItemParser& /*aItem*/) + { + FTRACE(FPrint(_L("CCollectionHelperTest::SetAbstractAlbumL"))); + + CMPXMediaArray* mediaArray = CMPXMediaArray::NewL(); + CleanupStack::PushL(mediaArray); + //add songs to media array + AttachSongsL(mediaArray, KFileWmaSong()); + iLog->Log(_L("song added to abstractalbumArray, mediaArray->Count()=%d"), mediaArray->Count() ); + RArray contentIDs; + contentIDs.AppendL(KMPXMediaIdGeneral); + + CMPXMedia* abstractalbumMedia = CMPXMedia::NewL(contentIDs.Array()); + CleanupStack::PushL(abstractalbumMedia); + contentIDs.Close(); + + abstractalbumMedia->SetTObjectValueL(KMPXMediaGeneralType, EMPXItem); + abstractalbumMedia->SetTObjectValueL(KMPXMediaGeneralCategory, EMPXAbstractAlbum); + + abstractalbumMedia->SetTextValueL(KMPXMediaGeneralUri, KAbstractalbum1()); + + TParsePtrC parse(KAbstractalbum1()); + abstractalbumMedia->SetTextValueL(KMPXMediaGeneralDrive, parse.Drive()); + abstractalbumMedia->SetTObjectValueL(KMPXMediaGeneralSynchronized, ETrue); + + abstractalbumMedia->SetCObjectValueL(KMPXMediaArrayContents, mediaArray); + abstractalbumMedia->SetTObjectValueL(KMPXMediaArrayCount, mediaArray->Count()); + + TRAPD( result, iCachedHelper->SetL(abstractalbumMedia)); + CleanupStack::PopAndDestroy(abstractalbumMedia); + + // Clear the array + CleanupStack::PopAndDestroy(mediaArray); + iLog->Log(_L("CCollectionHelperTestClass::SetAbstractAlbumL done with result=[%d]"), result); + + return result; +} + +//Update AlbumArtist field in Music table +//By calling CMPXCollectionCachedHelper API SetL +//precondition on emulator: c:\\data\\sounds\\digital\\1.wma +//precondition on HW: f:\\1.wma +//output: MUSIC.AlbumArtist field of song 1.wma is changed +TInt CCollectionHelperTestClass::SetSongAlbumArtistL(CStifItemParser& /*aItem*/) + { + FTRACE(FPrint(_L("CCollectionHelperTest::SetSongAlbumArtistL"))); + + CMPXMedia* media = NULL; + + // Creat media properties for the song + RArray contentIDs; + contentIDs.AppendL( KMPXMediaIdGeneral ); + contentIDs.AppendL( KMPXMediaIdAudio ); + contentIDs.AppendL( KMPXMediaIdMusic ); + contentIDs.AppendL( KMPXMediaIdMTP ); + + media = CMPXMedia::NewL( contentIDs.Array() ); + CleanupStack::PushL( media ); // + media + contentIDs.Close(); + + media->SetTObjectValueL( + KMPXMediaGeneralCategory, + EMPXSong ); + + // MPXMedia default types + media->SetTObjectValueL( KMPXMediaGeneralType, EMPXItem ); + + // Get file path + media->SetTextValueL( KMPXMediaGeneralUri, KFileWmaSong() ); //wma test file + + media->SetTextValueL( KMPXMediaGeneralDrive, KStoreRoot() ); + media->SetTextValueL( KMPXMediaMusicAlbumArtist, KAlbumArtistShort()); + + TRAPD( result, iCachedHelper->SetL(media)); + + CleanupStack::PopAndDestroy( media ); // - media + iLog->Log(_L("CCollectionHelperTestClass::SetSongAlbumArtistL done with result=[%d]"), result); + + return result; +} +//Retrive MUSIC.AlbumArtist field +//By calling CMPXCollectionCachedHelper GetL +//precondition on emulator: c:\\data\\sounds\\digital\\1.wma +//precondition on HW: f:\\1.wma +//output: song 1.wma is returned and MUSIC.AlbumArtist field of song 1.wma is retrived. +TInt CCollectionHelperTestClass::GetSongAlbumArtistL(CStifItemParser& /*aItem*/) +{ + FTRACE(FPrint(_L("CCollectionHelperTest::GetSongAlbumArtistL"))); + TMPXGeneralCategory category = EMPXSong; + // CMPXMedia* foundMedia= NULL; + + const CMPXMedia& foundMedia = iCachedHelper->GetL( KFileWmaSong(), category ); + + if (foundMedia.IsSupported(KMPXMediaMusicAlbumArtist)) + { + const TDesC& albumartist = foundMedia.ValueText( KMPXMediaMusicAlbumArtist ); + } + iLog->Log(_L("CCollectionHelperTestClass::GetSongAlbumArtistL done ")); + + return 1; +} + + + +//Update ABSTRACTALBUM.AlbumArtist +//Update AlbumArtist field in Abstractalbum table +//By calling CMPXCollectionCachedHelper API SetL +//precondition on emulator: c:\\data\\sounds\\digital\\1.alb +//precondition on HW: f:\\1.alb +//output: ABSTRACTALBUM.AlbumArtist field of abstractalbum 1.alb is changed +TInt CCollectionHelperTestClass::SetAbstractAlbumArtistL(CStifItemParser& /*aItem*/) + { + FTRACE(FPrint(_L("CCollectionHelperTest::SetAbstractAlbumArtistL"))); + + CMPXMedia* media = NULL; + + RArray contentIDs; + contentIDs.AppendL( KMPXMediaIdGeneral ); + + media = CMPXMedia::NewL( contentIDs.Array() ); + CleanupStack::PushL( media ); // + media + contentIDs.Close(); + media->SetTObjectValueL( KMPXMediaGeneralCategory, + EMPXAbstractAlbum ); + media->SetTObjectValueL( KMPXMediaGeneralType, EMPXItem ); + + media->SetTextValueL( KMPXMediaGeneralUri, KAbstractalbum1() ); + media->SetTextValueL( KMPXMediaGeneralDrive, KStoreRoot() ); + + media->SetTextValueL( KMPXMediaMusicAlbumArtist, KAlbumArtistShort() ); + + TRAPD( result, iCachedHelper->SetL(media)); + + CleanupStack::PopAndDestroy(media); + iLog->Log(_L("CCollectionHelperTestClass::SetAbstractAlbumArtistL done with result=[%d]"), result); + + + return result; +} + +//Retrieve ABSTRACTALBUM.AlbumArtist +//By calling CMPXCollectionCachedHelper API GetL +//precondition on emulator: c:\\data\\sounds\\digital\\1.alb +//precondition on HW: f:\\1.alb +//output: abstractalbum 1.alb is returned and ABSTRACTALBUM.AlbumArtist field of 1.alb is retrived. +TInt CCollectionHelperTestClass::GetAbstractAlbumArtistL(CStifItemParser& /*aItem*/) + { + FTRACE(FPrint(_L("CCollectionHelperTest::GetAbstractAlbumArtistL"))); + TMPXGeneralCategory category = EMPXAbstractAlbum; + const CMPXMedia& foundMedia = iCachedHelper->GetL( KAbstractalbum1(), category ); //wma test file + + + //print out foundMedia attributes + if (foundMedia.IsSupported(KMPXMediaMusicAlbumArtist)) + { + iLog->Log(_L("CCollectionHelperTestClass::GetAbstractAlbumArtistL, ABSTRACTALBUM.AlbumArtist retrived")); + + + + + const TDesC& albumartist = foundMedia.ValueText( KMPXMediaMusicAlbumArtist ); + + } + + if (foundMedia.IsSupported(KMPXMediaGeneralTitle)) + { + + + // HBufC* albumartist; + // albumartist = foundMedia.ValueText( KMPXMediaMusicAlbumArtist ).AllocLC(); // + data + const TDesC& name = foundMedia.ValueText( KMPXMediaGeneralTitle ); + iLog->Log(_L("CCollectionHelperTestClass::GetAbstractAlbumArtistL, ABSTRACTALBUM.name retrived")); + + + + } + if (foundMedia.IsSupported(KMPXMediaGeneralUri)) + { + + + // HBufC* albumartist; + // albumartist = foundMedia.ValueText( KMPXMediaMusicAlbumArtist ).AllocLC(); // + data + const TDesC& uri = foundMedia.ValueText( KMPXMediaGeneralUri ); + iLog->Log(_L("CCollectionHelperTestClass::GetAbstractAlbumArtistL, ABSTRACTALBUM.uri retrived")); + + } + iLog->Log(_L("CCollectionHelperTestClass::GetAbstractAlbumArtistL done")); + return 1; + } + + +//Update ABSTRACTALBUM.Name +//Update Name field in Abstractalbum table +//By calling CMPXCollectionCachedHelper API SetL +//precondition on emulator: c:\\data\\sounds\\digital\\1.alb +//precondition on HW: f:\\1.alb +//output: ABSTRACTALBUM.name field of 1.alb is changed. +TInt CCollectionHelperTestClass::UpdateAbstractAlbumNameL(CStifItemParser& /*aItem*/) + { + FTRACE(FPrint(_L("CCollectionHelperTest::UpdateAbstractAlbumNameL"))); + CMPXMedia* media = NULL; + + // Creat media properties for the song + RArray contentIDs; + contentIDs.AppendL( KMPXMediaIdGeneral ); + + media = CMPXMedia::NewL( contentIDs.Array() ); + + CleanupStack::PushL( media ); // + media + contentIDs.Close(); //- contentIDs + + media->SetTObjectValueL( + KMPXMediaGeneralCategory, + EMPXAbstractAlbum ); + + media->SetTObjectValueL( KMPXMediaGeneralType, EMPXItem ); + + media->SetTextValueL( KMPXMediaGeneralUri, KAbstractalbum1() ); + media->SetTextValueL( KMPXMediaGeneralDrive, KStoreRoot() ); + + //media->SetTextValueL( KMPXMediaMusicAlbumArtist, KAbstractAlbumName() ); + media->SetTextValueL( KMPXMediaGeneralTitle, KAbstractAlbumName() ); + // media->SetTextValueL( KMPXMediaMusicAlbumArtFileName, KNewAbstractAlbumName() ); + + TRAPD( result, iCachedHelper->SetL(media)); + CleanupStack::PopAndDestroy(media); // - media + + iLog->Log(_L("CCollectionHelperTestClass::UpdateAbstractAlbumNameL, done with result[%d]"), result); + return result; +} + + +//Find all abstractalbums on KStoreRoot +//Find all songs associated with the found Abstractalbums +//By calling CMPXCollectionCachedHelper API GetL +//precondition on emulator: c:\\data\\sounds\\digital\\1.wma +// c:\\data\\sounds\\digital\\1.alb +//1.wma and 1.alb are associated +//precondition on HW : f:\\1.wma +// f:\\1.alb +//1.wma and 1.alb are associated +//all AbstractAlbum on drive c: (e:) is returned, all songs associated with the returned AbstractAlbum are returned. +TInt CCollectionHelperTestClass::GetAbstractAlbumAndSongsL(CStifItemParser& /*aItem*/) + { + FTRACE(FPrint(_L("CCollectionHelperTest::GetAlbumAndSongsL"))); + TUint32 abstractalbumId(0); + RArray contentIDs; + contentIDs.AppendL(KMPXMediaIdGeneral); + + CMPXMedia* searchMedia = CMPXMedia::NewL(contentIDs.Array()); + CleanupStack::PushL(searchMedia); + contentIDs.Close(); + + searchMedia->SetTObjectValueL(KMPXMediaGeneralType, EMPXItem); + searchMedia->SetTObjectValueL(KMPXMediaGeneralCategory, EMPXAbstractAlbum); + searchMedia->SetTextValueL(KMPXMediaGeneralDrive, KStoreRoot()); + + RArray abstractalbumAttributes; + CleanupClosePushL(abstractalbumAttributes); + abstractalbumAttributes.AppendL(KMPXMediaGeneralId); + abstractalbumAttributes.AppendL(KMPXMediaGeneralTitle); + abstractalbumAttributes.AppendL(KMPXMediaGeneralUri); + + //foundMedia will hold all .alb on KStoreRoot() + CMPXMedia* foundMedia = NULL; + TRAPD( err, foundMedia = iCachedHelper->FindAllL( + *searchMedia, abstractalbumAttributes.Array())); + + iLog->Log(_L("CCollectionHelperTestClass::GetAlbumAndSongsL, foundMedia assigned from FindAllL")); + + CleanupStack::PopAndDestroy(&abstractalbumAttributes); + CleanupStack::PopAndDestroy(searchMedia); + CleanupStack::PushL(foundMedia); //+ foundMedia + + if ( err != KErrNone ) + { + iLog->Log(_L("CCollectionHelperTestClass::GetAlbumAndSongsL, err = [%d]"), err ); + iCachedHelper->Close(); + iCachedHelper = NULL; + User::Leave( KErrGeneral ); + } + + if (!foundMedia->IsSupported(KMPXMediaArrayCount)) + { + User::Leave(KErrNotSupported); + } + + TInt foundItemCount = *foundMedia->Value(KMPXMediaArrayCount); + iLog->Log(_L("CCollectionHelperTestClass::GetAlbumAndSongsL, foundItemCount=%d"), foundItemCount ); + + CMPXMediaArray* foundArray = + foundMedia->Value(KMPXMediaArrayContents); + CleanupStack::PopAndDestroy(foundMedia); + + for (TInt j = 0; j < foundItemCount; ++j) + { + CMPXMedia* abstractalbumMedia = CMPXMedia::NewL(*(*foundArray)[j]); + CleanupStack::PushL(abstractalbumMedia); + + //to print out founded media attributes + if (abstractalbumMedia->IsSupported(KMPXMediaGeneralTitle)) + { + const TDesC& name = abstractalbumMedia->ValueText( KMPXMediaGeneralTitle ); + iLog->Log(_L("CCollectionHelperTestClass::GetAlbumAndSongsL, found abstractalbumName = [%s]"), name ); + } + + if (abstractalbumMedia->IsSupported(KMPXMediaGeneralId)) + { + abstractalbumId = abstractalbumMedia->ValueTObjectL(KMPXMediaGeneralId); + abstractalbumMedia->ValueTObjectL(KMPXMediaGeneralId); + } + + // find the media object that contains a list of songs in the abstractalbum + RArray contentIDs; + contentIDs.AppendL(KMPXMediaIdGeneral); + + CMPXMedia* searchMediaSong = CMPXMedia::NewL(contentIDs.Array()); + CleanupStack::PushL(searchMediaSong); + contentIDs.Close(); + + searchMediaSong->SetTObjectValueL(KMPXMediaGeneralType, EMPXGroup); + + searchMediaSong->SetTObjectValueL(KMPXMediaGeneralCategory, EMPXSong); + searchMediaSong->SetTObjectValueL(KMPXMediaGeneralId, abstractalbumId); + + RArray songAttributes; + CleanupClosePushL(songAttributes); + songAttributes.AppendL(KMPXMediaGeneralId); + songAttributes.AppendL(KMPXMediaGeneralUri); + + //search from MPX collection to get all songs associated with .alb + CMPXMedia* foundSongs = NULL; + TRAPD( err, foundSongs = iCachedHelper->FindAllL( + *searchMediaSong, songAttributes.Array())); + + CleanupStack::PopAndDestroy(&songAttributes); + CleanupStack::PopAndDestroy(searchMediaSong); + CleanupStack::PopAndDestroy(abstractalbumMedia); + + CleanupStack::PushL( foundSongs ); // + foundSongs + if ( err != KErrNone ) + { + iLog->Log(_L("CCollectionHelperTestClass::GetAlbumAndSongsL, err = [%d]"), err ); + iCachedHelper->Close(); + iCachedHelper = NULL; + User::Leave( KErrGeneral ); + } + + if (!foundSongs->IsSupported(KMPXMediaArrayCount)) + { + User::Leave(KErrNotSupported); + } + + // Number of references + TInt numOfSongsRefs = *foundSongs->Value(KMPXMediaArrayCount); + iLog->Log(_L("CCollectionHelperTestClass::GetAlbumAndSongsL, numOfSongsRefs=%d"), numOfSongsRefs ); + CleanupStack::PopAndDestroy( foundSongs ); // - foundSong + } + return 1; + } + + +//By calling CMPXCollectionCachedHelper API RenameL +//precondition on emulator: c:\\data\\sounds\\digital\\1.wma +// c:\\data\\sounds\\digital\\1.alb +//1.wma and 1.alb are associated +//precondition on HW : f:\\1.wma +// f:\\1.alb +//output: 1.alb is renamed to 2.alb and all songs associated with 1.alb are updated in MUSIC table +TInt CCollectionHelperTestClass::RenameAbstractAlbumL(CStifItemParser& /*aItem*/) + { + TRAPD( result, iCachedHelper->RenameL( KAbstractalbum1, KAbstractalbum2, EMPXAbstractAlbum ) ); + iLog->Log(_L("CCollectionHelperTestClass::RenameAbstractAlbumL, done with result=[%d]")); + + return result; + } + +//Helper function for Finding in the MPX DB +//By calling CMPXCollectionCachedHelper API FindAllL +//output: all media with filename: aPath and aCategory is returned +TInt CCollectionHelperTestClass::FindMediaL(const TDesC& aPath, TMPXGeneralCategory aCategory) +{ + FTRACE(FPrint(_L("CCollectionHelperTestClass::FindL"))); + // Check does a record already exist for this aPath(URI)? + RArray contentIDs; + contentIDs.AppendL( KMPXMediaIdGeneral ); + + CMPXMedia* searchMedia = CMPXMedia::NewL( contentIDs.Array() ); + CleanupStack::PushL( searchMedia ); // + searchMedia + contentIDs.Close(); + searchMedia->SetTObjectValueL( KMPXMediaGeneralType, EMPXItem ); + searchMedia->SetTObjectValueL( KMPXMediaGeneralCategory, aCategory ); + searchMedia->SetTextValueL( KMPXMediaGeneralUri, aPath ); + +//note: some of the attributes are not needed + RArray mediaAttributes; + CleanupClosePushL( mediaAttributes ); // + mediaAttributes + mediaAttributes.AppendL( KMPXMediaGeneralId ); + mediaAttributes.AppendL( KMPXMediaGeneralTitle ); + mediaAttributes.AppendL( KMPXMediaGeneralUri ); + + CMPXMedia* foundMedia = iCachedHelper->FindAllL( *searchMedia, + mediaAttributes.Array() ); + + CleanupStack::PopAndDestroy( &mediaAttributes ); // - mediaAttributes + CleanupStack::PopAndDestroy( searchMedia ); // - searchMedia + CleanupStack::PushL( foundMedia ); // + foundMedia + + if ( !foundMedia->IsSupported( KMPXMediaArrayCount ) ) + { + CleanupStack::PopAndDestroy( foundMedia ); // - foundMedia + return KErrNotSupported; + } + TInt foundItemCount = *foundMedia->Value( KMPXMediaArrayCount ); + CleanupStack::PopAndDestroy( foundMedia ); // - foundMedia + + iLog->Log(_L("CCollectionHelperTestClass::FindMediaL, foundItemCount=[%d]"), foundItemCount); + if ( foundItemCount >1) //more than 1 same item in collection + { + iLog->Log(_L("CCollectionHelperTestClass::FindMediaL, error, find more than 1 same media in collection")); + return KErrGeneral; + } + + else if ( foundItemCount ==0 || foundItemCount ==1 ) //no such item in collection + { + iLog->Log(_L("CCollectionHelperTestClass::FindMediaL, error, no this item in collection")); + return foundItemCount; + } + + return KErrNone; + } + + + +//Helper function for appending songs for SetAbstractAlbumL() +void CCollectionHelperTestClass::AttachSongsL(CMPXMediaArray* aAbstractAlbumArray, const TDesC& aPath) +{ + FTRACE(FPrint(_L("CCollectionHelperTestClass::AttachSongsL"))); + RArray contentIDs; + contentIDs.AppendL(KMPXMediaIdGeneral); + contentIDs.AppendL(KMPXMediaIdAudio); + contentIDs.AppendL(KMPXMediaIdMusic); + contentIDs.AppendL(KMPXMediaIdMTP); + CMPXMedia* media = CMPXMedia::NewL(contentIDs.Array()); + CleanupStack::PushL(media); + contentIDs.Close(); + + // MPXMedia default types + media->SetTObjectValueL(KMPXMediaGeneralType, EMPXItem); + media->SetTObjectValueL(KMPXMediaGeneralCategory, EMPXSong); + // File Path + TParsePtrC parse(aPath); + media->SetTextValueL(KMPXMediaGeneralUri, aPath); + media->SetTextValueL(KMPXMediaGeneralDrive, parse.Drive()); + + // Add media into array contents + aAbstractAlbumArray->AppendL(media); + CleanupStack::Pop(media); +} + // ----------------------------------------------------------------------------- // CCollectionHelperTestClass::CloseUiHelperL() // Returns: Symbian OS errors. diff -r d240f0a77280 -r 780c925249c1 mmappfw_plat/collection_helper_api/tsrc/conf/CollectionHelperTestClass.cfg --- a/mmappfw_plat/collection_helper_api/tsrc/conf/CollectionHelperTestClass.cfg Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappfw_plat/collection_helper_api/tsrc/conf/CollectionHelperTestClass.cfg Wed Mar 31 22:26:09 2010 +0300 @@ -66,4 +66,165 @@ [Endtest] +[Test] +title 4. Add Song +create CollectionHelperTestClass test +test OpenCollectionUtility +waittestclass test +test NewCachedHelper +test AddSong +test CloseCachedHelper +delete test +pause 1000 +[Endtest] +[Test] +title 5. Remove Song +create CollectionHelperTestClass test +test OpenCollectionUtility +waittestclass test +test NewCachedHelper +test RemoveSong +test CloseCachedHelper +delete test +pause 1000 +[Endtest] + +[Test] +title 6. AddAbstractAlbum +create CollectionHelperTestClass test +test OpenCollectionUtility +waittestclass test +test NewCachedHelper +test AddAbstractAlbum +test CloseCachedHelper +delete test +pause 1000 +[Endtest] + +[Test] +title 7. Remove AbstractAlbum +create CollectionHelperTestClass test +test OpenCollectionUtility +waittestclass test +test NewCachedHelper +test RemoveAbstractAlbum +test CloseCachedHelper +delete test +pause 1000 +[Endtest] +RemoveAbstractAlbumL + + +[Test] +title 8. Associate Song with AbstractAlbum +create CollectionHelperTestClass test +test OpenCollectionUtility +waittestclass test +test NewCachedHelper +test SetAbstractAlbum +test CloseCachedHelper +delete test +pause 1000 +[Endtest] +[Test] + + +[Test] +title 9. Set SongAlbumArtist +create CollectionHelperTestClass test +test OpenCollectionUtility +waittestclass test +test NewCachedHelper +test SetSongAlbumArtist +test CloseCachedHelper +delete test +pause 1000 +[Endtest] +[Test] + + +[Test] +title 10. Get SongAlbumArtist +create CollectionHelperTestClass test +test OpenCollectionUtility +waittestclass test +test NewCachedHelper +test GetSongAlbumArtist +test CloseCachedHelper +delete test +pause 1000 +[Endtest] + +[Test] +title 11. set AbstractAlbumArtist +create CollectionHelperTestClass test +test OpenCollectionUtility +waittestclass test +test NewCachedHelper +test SetAbstractAlbumArtist +test CloseCachedHelper +delete test +pause 1000 +[Endtest] +[Test] + +[Test] +title 12. Get AbstractAlbumArtist +create CollectionHelperTestClass test +test OpenCollectionUtility +waittestclass test +test NewCachedHelper +test GetAbstractAlbumArtist +test CloseCachedHelper +delete test +pause 1000 +[Endtest] +[Test] + + +[Test] +title 13. Update AbstractAlbumName +create CollectionHelperTestClass test +test OpenCollectionUtility +waittestclass test +test NewCachedHelper +test UpdateAbstractAlbumName +test CloseCachedHelper +delete test +pause 1000 +[Endtest] + + +title 14. Get AbstractAlbum and Songs +create CollectionHelperTestClass test +test OpenCollectionUtility +waittestclass test +test NewCachedHelper +test GetAbstractAlbumAndSongs +test CloseCachedHelper +delete test +pause 1000 +[Endtest] +[Test] + +title 15. Rename AbstractAlbum +create CollectionHelperTestClass test +test OpenCollectionUtility +waittestclass test +test NewCachedHelper +test RenameAbstractAlbum +test CloseCachedHelper +delete test +pause 1000 +[Endtest] +[Test] + + + + + + + + + \ No newline at end of file diff -r d240f0a77280 -r 780c925249c1 mmappfw_plat/collection_helper_api/tsrc/init/TestFramework.ini --- a/mmappfw_plat/collection_helper_api/tsrc/init/TestFramework.ini Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappfw_plat/collection_helper_api/tsrc/init/TestFramework.ini Wed Mar 31 22:26:09 2010 +0300 @@ -1,5 +1,5 @@ # -# This is STIF initialization file +# This is STIFTestFramework initialization file # Comment lines start with '#'-character. # See STIF TestFramework users guide.doc for instructions @@ -29,15 +29,12 @@ # # - File Creation Mode indicates test report overwriting if file exist. # + OVERWRITE, Overwrites if the Test report file exist. -# + APPEND, Continue logging after the old Test report information if +# + APPEND, Continue logging after the old Test report information if # report exist. # - Sets a device reset module's dll name(Reboot). # + If Nokia specific reset module is not available or it is not correct one # StifHWResetStub module may use as a template for user specific reset -# module. -# - Sets STIF test measurement disable options. e.g. pluging1 and pluging2 disablation -# DisableMeasurement= stifmeasurementplugin01 stifmeasurementplugin02 -# +# module. [Engine_Defaults] @@ -46,8 +43,9 @@ CreateTestReport= YES # Possible values: YES or NO -TestReportFilePath= C:\LOGS\TestFramework\ -TestReportFileName= TestReport_CollectionHelperTestClass +#TestReportFilePath= C:\LOGS\TestFramework\ +TestReportFilePath= c:\testing\log\ +TestReportFileName= TestReport TestReportFormat= TXT # Possible values: TXT or HTML TestReportOutput= FILE # Possible values: FILE or RDEBUG @@ -55,14 +53,6 @@ DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting -DisableMeasurement= stifmeasurementdisablenone # Possible values are: - # 'stifmeasurementdisablenone', 'stifmeasurementdisableall' - # 'stifmeasurementplugin01', 'stifmeasurementplugin02', - # 'stifmeasurementplugin03', 'stifmeasurementplugin04', - # 'stifmeasurementplugin05' or 'stifbappeaprofiler' - -Timeout= 0 # Default timeout value for each test case. In milliseconds -UITestingSupport= YES [End_Defaults] # -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- @@ -88,29 +78,28 @@ # In the simplest case it is enough to specify only the # name of the test module when adding new test module -[New_Module] -ModuleName= testscripter -TestCaseFile= c:\testframework\CollectionHelperTestClass.cfg -[End_Module] +#[New_Module] +#ModuleName= demomodule +#[End_Module] # Load testmoduleXXX, optionally with initialization file and/or test case files -#[New_Module] -#ModuleName= testmodulexxx +[New_Module] +ModuleName= testscripter #TestModuleXXX used initialization file #IniFile= c:\testframework\init.txt #TestModuleXXX used configuration file(s) -#TestCaseFile= c:\testframework\testcases1.cfg -#TestCaseFile= c:\testframework\testcases2.cfg -#TestCaseFile= c:\testframework\manualtestcases.cfg - -#[End_Module] +#TestCaseFile= c:\testframework\epos_omasuplpostestercfg.cfg +TestCaseFile= c:\testframework\CollectionHelperTestClass.cfg +[End_Module] # -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + + # -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -# Set STIF logging overwrite parameters for Logger. +# Set STIFTestFramework logging overwrite parameters for Logger. # Hardware and emulator environment logging path and styles can # be configured from here to overwrite the Logger's implemented values. # @@ -155,41 +144,34 @@ # + NO, No line break(s). # # - Will event ranking include to the log file. -# + YES, Event ranking number added to each line in log file(s). Ranking number +# + YES, Event ranking number added to each line in log file(s). Ranking number # depends on environment's tics, for example(includes time stamp also) # '012 12.Nov.2003 115958 LOGGING INFO' # + NO, No event ranking. # -# - Will write log file in unicode format. -# + YES, Log file will be written in unicode format -# + NO, Log will be written as normal, not unicode, file. -# [Logger_Defaults] -#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#' -#NOTE: TestEngine and TestServer logging settings cannot change here +#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#' -#CreateLogDirectories= YES # Possible values: YES or NO +#CreateLogDirectories= YES # Possible values: YES or NO #EmulatorBasePath= C:\LOGS\TestFramework\ -#EmulatorFormat= HTML # Possible values: TXT or HTML -#EmulatorOutput= FILE # Possible values: FILE or RDEBUG +#EmulatorFormat= HTML # Possible values: TXT or HTML +#EmulatorOutput= FILE # Possible values: FILE or RDEBUG #HardwareBasePath= D:\LOGS\TestFramework\ -#HardwareFormat= HTML # Possible values: TXT or HTML -#HardwareOutput= FILE # Possible values: FILE or RDEBUG +#HardwareFormat= HTML # Possible values: TXT or HTML +#HardwareOutput= FILE # Possible values: FILE or RDEBUG -#FileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND +#FileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND -#ThreadIdToLogFile= YES # Possible values: YES or NO -#WithTimeStamp= YES # Possible values: YES or NO -#WithLineBreak= YES # Possible values: YES or NO -#WithEventRanking= YES # Possible values: YES or NO +#ThreadIdToLogFile= YES # Possible values: YES or NO +#WithTimeStamp= YES # Possible values: YES or NO +#WithLineBreak= YES # Possible values: YES or NO +#WithEventRanking= YES # Possible values: YES or NO -#FileUnicode= YES # Possible values: YES or NO -#AddTestCaseTitle= YES # Possible values: YES or NO [End_Logger_Defaults] # -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -# End of file +# End of file \ No newline at end of file diff -r d240f0a77280 -r 780c925249c1 mmappfw_plat/harvester_metadata_extractor_api/inc/mpxmetadataextractor.h --- a/mmappfw_plat/harvester_metadata_extractor_api/inc/mpxmetadataextractor.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappfw_plat/harvester_metadata_extractor_api/inc/mpxmetadataextractor.h Wed Mar 31 22:26:09 2010 +0300 @@ -168,6 +168,13 @@ const TDesC& aFile, TDesC8& aValue); + /** + * Check if can send request to TNM or not. + * @since 5.0 + * + */ + void CheckBeforeSendRequest(); + private: /** diff -r d240f0a77280 -r 780c925249c1 mmappfw_plat/mpx_albumart_utility_api/inc/mpxalbumartutility.h --- a/mmappfw_plat/mpx_albumart_utility_api/inc/mpxalbumartutility.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappfw_plat/mpx_albumart_utility_api/inc/mpxalbumartutility.h Wed Mar 31 22:26:09 2010 +0300 @@ -21,7 +21,7 @@ #include #include -#include +#include class CMPXMedia; class CMPXImageUtil; diff -r d240f0a77280 -r 780c925249c1 mmappfw_plat/mpx_common_api/inc/mpxmediageneraldefs.h --- a/mmappfw_plat/mpx_common_api/inc/mpxmediageneraldefs.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappfw_plat/mpx_common_api/inc/mpxmediageneraldefs.h Wed Mar 31 22:26:09 2010 +0300 @@ -451,7 +451,7 @@ EMPXFile, EMPXImage, EMPXVideo, - EMPXRadio, + EMPXAbstractAlbum, EMPXMessage, EMPXTag, EMPXCommand, diff -r d240f0a77280 -r 780c925249c1 mmappfw_plat/mpx_common_api/inc/mpxmediamtpdefs.h --- a/mmappfw_plat/mpx_common_api/inc/mpxmediamtpdefs.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappfw_plat/mpx_common_api/inc/mpxmediamtpdefs.h Wed Mar 31 22:26:09 2010 +0300 @@ -34,6 +34,7 @@ * Attributes supported for KMPXMediaIdMTP */ const TMPXAttributeData KMPXMediaMTPDrmStatus = {KMPXMediaIdMTP, 0x0001}; // TUint16 +const TMPXAttributeData KMPXMediaMTPSampleDataFlag = {KMPXMediaIdMTP, 0x0002}; // TBool const TMPXAttributeData KMPXMediaMTPAll = {KMPXMediaIdMTP, 0xffffffff}; #endif // MPXMEDIAMTPDEFS_H diff -r d240f0a77280 -r 780c925249c1 mmappfw_plat/mpx_common_api/inc/mpxmediamusicdefs.h --- a/mmappfw_plat/mpx_common_api/inc/mpxmediamusicdefs.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappfw_plat/mpx_common_api/inc/mpxmediamusicdefs.h Wed Mar 31 22:26:09 2010 +0300 @@ -45,6 +45,7 @@ const TMPXAttributeData KMPXMediaMusicAlbumArtThumbnail={KMPXMediaIdMusic,0x400}; // CFbsImage const TMPXAttributeData KMPXMediaMusicAlbumArtThumbnailSize={KMPXMediaIdMusic,0x800}; // TSint const TMPXAttributeData KMPXMediaMusicAlbumArtChanged={KMPXMediaIdMusic,0x1000}; // TInt +const TMPXAttributeData KMPXMediaMusicAlbumArtist={KMPXMediaIdMusic,0x2000}; // Text const TMPXAttributeData KMPXMediaMusicAll={KMPXMediaIdMusic,0xffffffff}; // Text /** @@ -66,6 +67,7 @@ EMPXMediaMusicOriginalAlbumArtFileName=0x200, // Text EMPXMediaMusicAlbumArtThumbnail=0x400, EMPXMediaMusicAlbumArtThumbnailSize=0x800, + EMPXMediaMusicAlbumArtist=0x2000, EMPXMediaMusicAll=0xffffffff }; diff -r d240f0a77280 -r 780c925249c1 mmappfw_plat/mpx_playback_utility_api/tsrc/conf/mpxplaybackutilitytest.cfg --- a/mmappfw_plat/mpx_playback_utility_api/tsrc/conf/mpxplaybackutilitytest.cfg Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappfw_plat/mpx_playback_utility_api/tsrc/conf/mpxplaybackutilitytest.cfg Wed Mar 31 22:26:09 2010 +0300 @@ -1,40 +1,253 @@ + +[Define] +KErrNotFound -1 +KErrNotSupported -5 +KErrArgument -6 +KErrNotReady -18 +KErrAccessDenied -21 + +KTrue 1 +KFalse 0 + +// UID definition for playback mode +KPbModeDefault 271067440 // 0x10282930 Uses same player as any other player running in same. +KPbModeActivePlayer 271067441 // 0x10282931 Currently active player or any player if no active player. +KPbModeNewPlayer 271067442 // 0x10282932 New player +KPbModeAppUID 111 // Application UID + +// Category for playback utility creation. +KMPXCategoryUndefined 0 +KMPXCategoryMusic 1 +KMPXCategoryVideo 2 + +// UID for Helix Plugin +KVideoHelixPlaybackPluginUid 271066449 // 0x10282551 + +// Timers +KTimerEndTest 5000 // 5 sec + +[Enddefine] + [Test] +// +// Test NewL +// - Mode NewPlayer +// - Category Default(Music) +// title 1 MMPXPlaybackUtilityNewL -create mpxplaybackutilitytest foobar -foobar MMPXPlaybackUtilityNewL -delete foobar +create mpxplaybackutilitytest pbutil +pbutil MMPXPlaybackUtilityNewL KPbModeNewPlayer +pbutil EndTest +delete pbutil +[Endtest] + +[Test] +// +// Test NewL +// - Mode ActivePlayer +// - Category Video +// +title 2 MMPXPlaybackUtilityNewL with category video +create mpxplaybackutilitytest pbutil +pbutil MMPXPlaybackUtilityNewWithCatL KMPXCategoryVideo KPbModeActivePlayer +pbutil EndTest +delete pbutil [Endtest] [Test] -title 2 MMPXPlaybackUtilityUtilityL -create mpxplaybackutilitytest foobar -foobar MMPXPlaybackUtilityUtilityL -delete foobar +// +// Test UtilityL +// - Mode UID +// - Category Default(Music) +// +title 3 MMPXPlaybackUtilityUtilityL +create mpxplaybackutilitytest pbutil +pbutil MMPXPlaybackUtilityUtilityL KPbModeAppUID +pbutil EndTest +delete pbutil +[Endtest] + +[Test] +// +// Test UtilityL +// - Mode Default +// - Category Video +// +title 4 MMPXPlaybackUtilityUtilityL with category video +create mpxplaybackutilitytest pbutil +pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeDefault +pbutil EndTest +delete pbutil +[Endtest] + +[Test] +// +// Test InitL with Playlist +// - Mode NewPlayer +// - Category Default (Music) +// +title 5 MMPXPlaybackUtilityInitL(playlist) +create mpxplaybackutilitytest pbutil +pbutil MMPXPlaybackUtilityUtilityL KPbModeNewPlayer +pbutil MMPXPlaybackUtilityAddObserverL +pbutil MMPXPlaybackUtilityInitWithPlaylistL +pause KTimerEndTest +pbutil EndTest +delete pbutil +[Endtest] + +[Test] +// +// Test InitL with URI +// - UtilityL with Mode NewPlayer, Category Video +// - Add Observer +// - SelectPlayerL with HelixPlugin UID +// - InitL with URI, File Battle_160x100_30kbps.rm +// +title 6 MMPXPlaybackUtilityInitL(uri) +create mpxplaybackutilitytest pbutil +pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer +pbutil MMPXPlaybackUtilityAddObserverL +pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid +pbutil MMPXPlaybackUtilityInitWithUriL Battle_160x100_30kbps.rm +pause KTimerEndTest +pbutil EndTest +delete pbutil [Endtest] [Test] -title 3 MMPXPlaybackUtilityInit64L -create mpxplaybackutilitytest foobar -foobar MMPXPlaybackUtilityNewL -foobar MMPXPlaybackUtilityInit64L Battle_160x100_30kbps.rm -delete foobar +// +// Test InitL with URI +// - UtilityL with Mode NewPlayer, Category Video +// - Add Observer +// - SelectPlayerL with HelixPlugin UID +// - InitL with URI, File XVID_176x144_15fps_261Kbps.avi +// +title 7 MMPXPlaybackUtilityInitL(uri) +create mpxplaybackutilitytest pbutil +pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer +pbutil MMPXPlaybackUtilityAddObserverL +pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid +pbutil MMPXPlaybackUtilityInitWithUriL XVID_176x144_15fps_261Kbps.avi +pause KTimerEndTest +pbutil EndTest +delete pbutil +[Endtest] + +[Test] +// +// Test InitL with RFile +// - UtilityL with Mode NewPlayer, Category Video +// - Add Observer +// - SelectPlayerL with HelixPlugin UID +// - InitL with RFile, File 20k_H263_WB_176x144_15fps.3gp +// +title 8 MMPXPlaybackUtilityInitL(rfile) +create mpxplaybackutilitytest pbutil +pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer +pbutil MMPXPlaybackUtilityAddObserverL +pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid +pbutil MMPXPlaybackUtilityInitWithRFileL 20k_H263_WB_176x144_15fps.3gp +pause KTimerEndTest +pbutil EndTest +delete pbutil +[Endtest] + +[Test] +// +// Test InitStreamingL with URI +// - UtilityL with Mode NewPlayer, Category Video +// - Add Observer +// - SelectPlayerL with HelixPlugin UID +// - InitStreamingL with URI, File 30k_MPEG4_AAC_8Khz_176x144_15fps_30secs.mp4 +// +title 9 MMPXPlaybackUtilityInitStreamingL(uri) +create mpxplaybackutilitytest pbutil +pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer +pbutil MMPXPlaybackUtilityAddObserverL +pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid +pbutil MMPXPlaybackUtilityInitStreamingWithUriL 30k_MPEG4_AAC_8Khz_176x144_15fps_30secs.mp4 +pause KTimerEndTest +pbutil EndTest +delete pbutil [Endtest] [Test] -title 4 MMPXPlaybackUtilityInitStreaming64L -create mpxplaybackutilitytest foobar -foobar MMPXPlaybackUtilityNewL -foobar MMPXPlaybackUtilityInitStreaming64L Battle_160x100_30kbps.rm -delete foobar +// +// Test InitStreamingL with RFile +// - UtilityL with Mode NewPlayer, Category Video +// - Add Observer +// - SelectPlayerL with HelixPlugin UID +// - InitStreamingL with RFile, File 80k_H264_AAC16M22_176x144_15fps.3gp +// +title 10 MMPXPlaybackUtilityInitStreamingL(rfile) +create mpxplaybackutilitytest pbutil +pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer +pbutil MMPXPlaybackUtilityAddObserverL +pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid +pbutil MMPXPlaybackUtilityInitStreamingWithRFileL 80k_H264_AAC16M22_176x144_15fps.3gp +pause KTimerEndTest +pbutil EndTest +delete pbutil +[Endtest] + +[Test] +// +// Test Init64L +// - UtilityL with Mode NewPlayer, Category Video +// - Add Observer +// - SelectPlayerL with HelixPlugin UID +// - Init64L with RFile64, File DivX_MP3_256x112_30fps_300Kbps.avi +// +title 11 MMPXPlaybackUtilityInit64L +create mpxplaybackutilitytest pbutil +pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer +pbutil MMPXPlaybackUtilityAddObserverL +pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid +pbutil MMPXPlaybackUtilityInit64L DivX_MP3_256x112_30fps_300Kbps.avi +pause KTimerEndTest +pbutil EndTest +delete pbutil [Endtest] [Test] -title 5 MMPXPlaybackUtilityFile64L -create mpxplaybackutilitytest foobar -foobar MMPXPlaybackUtilityNewL -foobar MMPXPlaybackUtilityInit64L Battle_160x100_30kbps.rm -foobar MMPXPlaybackUtilityFile64L -delete foobar +// +// Test InitStreaming64L +// - UtilityL with Mode NewPlayer, Category Video +// - Add Observer +// - SelectPlayerL with HelixPlugin UID +// - InitStreaming64L with RFile64, File honey_im_home_horror_ad.avi +// +title 12 MMPXPlaybackUtilityInitStreaming64L +create mpxplaybackutilitytest pbutil +pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer +pbutil MMPXPlaybackUtilityAddObserverL +pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid +pbutil MMPXPlaybackUtilityInitStreaming64L honey_im_home_horror_ad.avi +pause KTimerEndTest +pbutil EndTest +delete pbutil [Endtest] +[Test] +// +// Test File64L +// - UtilityL with Mode NewPlayer, Category Video +// - Add Observer +// - SelectPlayerL with HelixPlugin UID +// - Init64L with RFile64, File MPEG4_VBR_176x144_15fps.3gp +// - File64L to get RFile64 file handler +// +title 13 MMPXPlaybackUtilityFile64L +create mpxplaybackutilitytest pbutil +pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer +pbutil MMPXPlaybackUtilityAddObserverL +pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid +pbutil MMPXPlaybackUtilityInit64L MPEG4_VBR_176x144_15fps.3gp +pause KTimerEndTest +pbutil MMPXPlaybackUtilityFile64L +pbutil EndTest +delete pbutil +[Endtest] + diff -r d240f0a77280 -r 780c925249c1 mmappfw_plat/mpx_playback_utility_api/tsrc/data/mmc/20k_H263_WB_176x144_15fps.3gp Binary file mmappfw_plat/mpx_playback_utility_api/tsrc/data/mmc/20k_H263_WB_176x144_15fps.3gp has changed diff -r d240f0a77280 -r 780c925249c1 mmappfw_plat/mpx_playback_utility_api/tsrc/data/mmc/30k_MPEG4_AAC_8Khz_176x144_15fps_30secs.mp4 Binary file mmappfw_plat/mpx_playback_utility_api/tsrc/data/mmc/30k_MPEG4_AAC_8Khz_176x144_15fps_30secs.mp4 has changed diff -r d240f0a77280 -r 780c925249c1 mmappfw_plat/mpx_playback_utility_api/tsrc/data/mmc/80k_H264_AAC16M22_176x144_15fps.3gp Binary file mmappfw_plat/mpx_playback_utility_api/tsrc/data/mmc/80k_H264_AAC16M22_176x144_15fps.3gp has changed diff -r d240f0a77280 -r 780c925249c1 mmappfw_plat/mpx_playback_utility_api/tsrc/data/mmc/DivX_MP3_256x112_30fps_300Kbps.avi Binary file mmappfw_plat/mpx_playback_utility_api/tsrc/data/mmc/DivX_MP3_256x112_30fps_300Kbps.avi has changed diff -r d240f0a77280 -r 780c925249c1 mmappfw_plat/mpx_playback_utility_api/tsrc/data/mmc/MPEG4_VBR_176x144_15fps.3gp Binary file mmappfw_plat/mpx_playback_utility_api/tsrc/data/mmc/MPEG4_VBR_176x144_15fps.3gp has changed diff -r d240f0a77280 -r 780c925249c1 mmappfw_plat/mpx_playback_utility_api/tsrc/data/mmc/XVID_176x144_15fps_261Kbps.avi Binary file mmappfw_plat/mpx_playback_utility_api/tsrc/data/mmc/XVID_176x144_15fps_261Kbps.avi has changed diff -r d240f0a77280 -r 780c925249c1 mmappfw_plat/mpx_playback_utility_api/tsrc/data/mmc/honey_im_home_horror_ad.avi Binary file mmappfw_plat/mpx_playback_utility_api/tsrc/data/mmc/honey_im_home_horror_ad.avi has changed diff -r d240f0a77280 -r 780c925249c1 mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/group/mpxplaybackutilitytest.mmp --- a/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/group/mpxplaybackutilitytest.mmp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/group/mpxplaybackutilitytest.mmp Wed Mar 31 22:26:09 2010 +0300 @@ -54,6 +54,7 @@ LIBRARY stiftestengine.lib LIBRARY mpxplaybackutility.lib LIBRARY mpxcommon.lib +LIBRARY mpxcollectionutility.lib LANG SC diff -r d240f0a77280 -r 780c925249c1 mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/group/mpxplaybackutilitytest.pkg --- a/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/group/mpxplaybackutilitytest.pkg Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/group/mpxplaybackutilitytest.pkg Wed Mar 31 22:26:09 2010 +0300 @@ -21,7 +21,7 @@ &EN ; Provide value for uid -#{"STIF mpxplaybackutilitytest Application"},(0x10005942),1,1,0,TYPE=SA +#{"MPX PlaybackUtility STIF"}, (0x101FB3E3), 1, 0, 1, TYPE=SA, RU ; Series60 product id for S60 3.0 [0x101F7961], 0, 0, 0, {"Series60ProductID"} @@ -32,35 +32,16 @@ ; Unique Vendor name :"Nokia" -; Logo -; None - -; Package signature - Optional -; None - -; Start of Package body - -; Condition blocks -; None - -; Options list -; None +; Install files +"\epoc32\release\armv5\udeb\mpxplaybackutilitytest.dll" - "!:\Sys\Bin\mpxplaybackutilitytest.dll" +"..\..\init\TestFramework.ini" - "c:\testframework\TestFramework.ini" +"..\..\conf\mpxplaybackutilitytest.cfg" - "c:\testframework\mpxplaybackutilitytest.cfg" -; Install files -"..\..\data\mmc\Battle_160x100_30kbps.rm" - "e:\testing\data\Battle_160x100_30kbps.rm" - -"..\..\init\TestFramework.ini" - "c:\testframework\TestFramework.ini" -"..\..\conf\mpxplaybackutilitytest.cfg" - "c:\testframework\mpxplaybackutilitytest.cfg" - -"\epoc32\release\armv5\udeb\mpxplaybackutilitytest.dll" - "c:\Sys\Bin\mpxplaybackutilitytest.dll" - -; Embedded SIS -; None - -; End of Package body - -; PKG dependencies -; None - -; PKG capabilities -; None +"..\..\data\mmc\Battle_160x100_30kbps.rm" - "f:\testing\data\Battle_160x100_30kbps.rm" +"..\..\data\mmc\20k_H263_WB_176x144_15fps.3gp" - "f:\testing\data\20k_H263_WB_176x144_15fps.3gp" +"..\..\data\mmc\30k_MPEG4_AAC_8Khz_176x144_15fps_30secs.mp4" - "f:\testing\data\30k_MPEG4_AAC_8Khz_176x144_15fps_30secs.mp4" +"..\..\data\mmc\80k_H264_AAC16M22_176x144_15fps.3gp" - "f:\testing\data\80k_H264_AAC16M22_176x144_15fps.3gp" +"..\..\data\mmc\DivX_MP3_256x112_30fps_300Kbps.avi" - "f:\testing\data\DivX_MP3_256x112_30fps_300Kbps.avi" +"..\..\data\mmc\honey_im_home_horror_ad.avi" - "f:\testing\data\honey_im_home_horror_ad.avi" +"..\..\data\mmc\MPEG4_VBR_176x144_15fps.3gp" - "f:\testing\data\MPEG4_VBR_176x144_15fps.3gp" +"..\..\data\mmc\XVID_176x144_15fps_261Kbps.avi" - "f:\testing\data\XVID_176x144_15fps_261Kbps.avi" diff -r d240f0a77280 -r 780c925249c1 mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/inc/mpxplaybackutilitytest.h --- a/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/inc/mpxplaybackutilitytest.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/inc/mpxplaybackutilitytest.h Wed Mar 31 22:26:09 2010 +0300 @@ -27,11 +27,8 @@ #include #include #include -// CONSTANTS -//const ?type ?constant_var = ?constant; // MACROS -//#define ?macro ?macro_def #define TEST_CLASS_VERSION_MAJOR 0 #define TEST_CLASS_VERSION_MINOR 0 #define TEST_CLASS_VERSION_BUILD 0 @@ -45,26 +42,29 @@ // data file _LIT( KmpxplaybackutilityTestFilePath, "C:\\testing\\data\\" ); #else -_LIT( KmpxplaybackutilitytestLogPath, "\\logs\\testframework\\mpxplaybackutilitytest\\" ); +_LIT( KmpxplaybackutilitytestLogPath, "f:\\logs\\testframework\\mpxplaybackutilitytest\\" ); // Log file _LIT( KmpxplaybackutilitytestLogFile, "mpxplaybackutilitytest.txt" ); _LIT( KmpxplaybackutilitytestLogFileWithTitle, "mpxplaybackutilitytest_[%S].txt" ); // data file -_LIT( KmpxplaybackutilityTestFilePath, "e:\\testing\\data\\" ); +_LIT( KmpxplaybackutilityTestFilePath, "f:\\testing\\data\\" ); #endif + // FUNCTION PROTOTYPES //?type ?function_name(?arg_list); // FORWARD DECLARATIONS //class ?FORWARD_CLASSNAME; -class Cmpxplaybackutilitytest; -class MMPXPlaybackUtility; -class MMPXPlaybackObserver; // DATA TYPES -//enum ?declaration -//typedef ?declaration -//extern ?data_type; +typedef struct +{ + TInt iEvent; + TInt iType; + TInt iData; +} TMpxPlaybackTestEvent; + +typedef CArrayPtrFlat CMpxPlaybackTestEventArray; // CLASS DECLARATION @@ -76,82 +76,151 @@ * @since ?Series60_version */ NONSHARABLE_CLASS(Cmpxplaybackutilitytest) : public CScriptBase, - public MMPXPlaybackObserver + public MMPXPlaybackObserver, + public MMPXPlaybackCallback { - public: // Constructors and destructor +public: // Constructors and destructor - /** - * Two-phased constructor. - */ - static Cmpxplaybackutilitytest* NewL( CTestModuleIf& aTestModuleIf ); + /** + * Two-phased constructor. + */ + static Cmpxplaybackutilitytest* NewL( CTestModuleIf& aTestModuleIf ); - /** - * Destructor. - */ - virtual ~Cmpxplaybackutilitytest(); + /** + * Destructor. + */ + virtual ~Cmpxplaybackutilitytest(); - - public: // Functions from base classes +public: // Functions from base classes - /** - * From CScriptBase Runs a script line. - * @since ?Series60_version - * @param aItem Script line containing method name and parameters - * @return Symbian OS error code - */ - virtual TInt RunMethodL( CStifItemParser& aItem ); - - // From base class MMPXPlaybackObserver - /** - * Handle playback message - * - * @since 3.1 - * @param aMessage playback message - * @param aErr system error code. - */ - void HandlePlaybackMessage( - CMPXMessage* aMessage, TInt aError ); - private: + /** + * From CScriptBase Runs a script line. + * @since ?Series60_version + * @param aItem Script line containing method name and parameters + * @return Symbian OS error code + */ + virtual TInt RunMethodL( CStifItemParser& aItem ); + + // From base class MMPXPlaybackObserver + /** + * Handle playback message + * + * @since 3.1 + * @param aMessage playback message + * @param aErr system error code. + */ + void HandlePlaybackMessage( CMPXMessage* aMessage, TInt aError ); + + /** + * Handle playback property. + * + * @since S60 3.2.3 + * @param aProperty the property + * @param aValue the value of the property + * @param aError error code + */ + void HandlePropertyL(TMPXPlaybackProperty aProperty, TInt aValue, TInt aError); - /** - * C++ default constructor. - */ - Cmpxplaybackutilitytest( CTestModuleIf& aTestModuleIf ); - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - // Prohibit copy constructor if not deriving from CBase. - // ?classname( const ?classname& ); - // Prohibit assigment operator if not deriving from CBase. - // ?classname& operator=( const ?classname& ); - /** - * Frees all resources allocated from test methods. - * @since ?Series60_version - */ - void Delete(); - /** - * Test methods are listed below. - */ - TInt MMPXPlaybackUtilityNewL(CStifItemParser& /*aItem*/); - TInt MMPXPlaybackUtilityUtilityL(CStifItemParser& /*aItem*/); - TInt MMPXPlaybackUtilityInit64L(CStifItemParser& /*aItem*/); - TInt MMPXPlaybackUtilityInitStreaming64L(CStifItemParser& /*aItem*/); - TInt MMPXPlaybackUtilityFile64L(CStifItemParser& /*aItem*/); - - /** - * Method used to log version of test class - */ - void SendTestClassVersion(); - //ADD NEW METHOD DEC HERE - //[TestMethods] - Do not remove - private: // Friend classes - //From mpxplaybackutility.h - MMPXPlaybackUtility* iMPXPlaybackUtility; - RFs iFs; + /** + * Method is called continously until aComplete=ETrue, signifying that + * it is done and there will be no more callbacks. + * Only new items are passed each time. + * + * @since S60 3.2.3 + * @param aPlayer UID of the subplayer + * @param aSubPlayers a list of sub players + * @param aComplete ETrue no more sub players. EFalse more subplayer + * expected + * @param aError error code + */ + void HandleSubPlayerNamesL(TUid aPlayer, + const MDesCArray* aSubPlayers, + TBool aComplete, + TInt aError); + + /** + * Call back of media request. + * + * @since S60 3.2.3 + * @param aMedia media + * @param aError error code + */ + void HandleMediaL(const CMPXMedia& aProperties, TInt aError); + + /** + * Handle completion of a asynchronous command. + * Note: All clients should implement this callback. + * + * @since S60 3.2.3 + * @param aCommandResult result of the command, NULL if error + * @param aError error code + */ + void HandlePlaybackCommandComplete(CMPXCommand* aCommandResult, TInt aError); + +private: // functions + + /** + * C++ default constructor. + */ + Cmpxplaybackutilitytest( CTestModuleIf& aTestModuleIf ); + /** + * By default Symbian 2nd phase constructor is private. + */ + void ConstructL(); + // Prohibit copy constructor if not deriving from CBase. + // ?classname( const ?classname& ); + // Prohibit assigment operator if not deriving from CBase. + // ?classname& operator=( const ?classname& ); + /** + * Frees all resources allocated from test methods. + * @since ?Series60_version + */ + void Delete(); + + /* + * Create resources + */ + void CreateL(); + + void AddExpectedEventL(TInt aEvent, TInt aType, TInt aData); + void RemoveExpectedEventL(TInt aEvent, TInt aType, TInt aData); + + /** + * Test methods are listed below. + */ + TInt MMPXPlaybackUtilityNewL(CStifItemParser& /*aItem*/); + TInt MMPXPlaybackUtilityNewWithCatL(CStifItemParser& /*aItem*/); + TInt MMPXPlaybackUtilityUtilityL(CStifItemParser& /*aItem*/); + TInt MMPXPlaybackUtilityUtilityWithCatL(CStifItemParser& /*aItem*/); + TInt MMPXPlaybackUtilityInitWithPlaylistL(CStifItemParser& /*aItem*/); + TInt MMPXPlaybackUtilityInitWithUriL(CStifItemParser& /*aItem*/); + TInt MMPXPlaybackUtilityInitWithRFileL(CStifItemParser& /*aItem*/); + TInt MMPXPlaybackUtilityInitStreamingWithUriL(CStifItemParser& /*aItem*/); + TInt MMPXPlaybackUtilityInitStreamingWithRFileL(CStifItemParser& /*aItem*/); + TInt MMPXPlaybackUtilityInit64L(CStifItemParser& /*aItem*/); + TInt MMPXPlaybackUtilityInitStreaming64L(CStifItemParser& /*aItem*/); + TInt MMPXPlaybackUtilityFile64L(CStifItemParser& /*aItem*/); + TInt MMPXPlaybackUtilityAddObserverL(CStifItemParser& /*aItem*/); + TInt MMPXPlaybackUtilityRemoveObserverL(CStifItemParser& /*aItem*/); + TInt MMPXPlaybackUtilityPlayerManagerSelectPlayerL(CStifItemParser& /*aItem*/); + TInt EndTest(CStifItemParser& /*aItem*/); + + /** + * Method used to log version of test class + */ + void SendTestClassVersion(); + //ADD NEW METHOD DEC HERE + //[TestMethods] - Do not remove + +private: // data + MMPXPlaybackUtility* iMPXPlaybackUtility; + CMpxPlaybackTestEventArray* iExpectedEventArray; + RFs iFs; + TInt iCallbackError; + RFile iFile; #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API - RFile64 iFile64; + RFile64 iFile64; #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API }; diff -r d240f0a77280 -r 780c925249c1 mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/inc/mpxplaybackutilitytestdefs.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/inc/mpxplaybackutilitytestdefs.h Wed Mar 31 22:26:09 2010 +0300 @@ -0,0 +1,29 @@ +/* +* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: mpxplaybackutilitytestdefs header for STIF Test Framework TestScripter. +* +*/ + +#ifndef MPXPLAYBACKUTILITYTESTDEFS_H +#define MPXPLAYBACKUTILITYTESTDEFS_H + +const TInt KGeneralPlaybackMsgOffset = 0; +const TInt KVideoPlaybackMsgOffset = 100; +const TInt KStifPlaybackMsgOffset = 200; +const TInt KMPXMessageStif = 0x20011397; + + +#endif // MPXPLAYBACKUTILITYTESTDEFS_H + +// End of File diff -r d240f0a77280 -r 780c925249c1 mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/src/mpxplaybackutilitytest.cpp --- a/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/src/mpxplaybackutilitytest.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/src/mpxplaybackutilitytest.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -131,10 +131,8 @@ EFalse ); SendTestClassVersion(); - - - iFs.Connect(); - iFs.ShareProtected(); + + CreateL(); } // ----------------------------------------------------------------------------- diff -r d240f0a77280 -r 780c925249c1 mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/src/mpxplaybackutilitytestBlocks.cpp --- a/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/src/mpxplaybackutilitytestBlocks.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/src/mpxplaybackutilitytestBlocks.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -21,18 +21,105 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "mpxplaybackutilitytest.h" +#include "mpxplaybackutilitytestdefs.h" + // ============================ MEMBER FUNCTIONS =============================== // --------------------------------------------------------------------------- // From MMPXPlaybackObserver // Handle playback message. // --------------------------------------------------------------------------- // -void Cmpxplaybackutilitytest::HandlePlaybackMessage( - CMPXMessage* /*aMessage*/, TInt aError ) +void Cmpxplaybackutilitytest::HandlePlaybackMessage( CMPXMessage* aMessage, TInt aError ) { - iLog->Log(_L("Cmpxharvestertest::HandlePlaybackMessage: %d"), aError); + iLog->Log(_L("Cmpxharvestertest::HandlePlaybackMessage: Error %d"), aError); + if ( !aError ) + { + TMPXMessageId id( *(aMessage->Value(KMPXMessageGeneralId)) ); + TInt event( *aMessage->Value( KMPXMessageGeneralEvent ) ); + TInt type( *aMessage->Value( KMPXMessageGeneralType ) ); + TInt data( *aMessage->Value( KMPXMessageGeneralData ) ); + + if ( KMPXMessageGeneral == id ) + { + iLog->Log(_L("Cmpxplaybackutilitytest::HandlePlaybackMessage() General event = %d type = %d value = %d"), + event, type, data ); + RemoveExpectedEventL( KGeneralPlaybackMsgOffset + event, type, data ); + } + else if ( KMPXMediaIdVideoPlayback == id ) + { + iLog->Log(_L("Cmpxplaybackutilitytest::HandlePlaybackMessage() Video event = %d type = %d value = %d"), + event, type, data ); + RemoveExpectedEventL( KVideoPlaybackMsgOffset + event, type, data ); + } + else if ( KMPXMessageStif ) + { + iLog->Log(_L("Cmpxplaybackutilitytest::HandlePlaybackMessage() STIF event = %d type = %d value = %d"), + event, type, data ); + RemoveExpectedEventL( KStifPlaybackMsgOffset + event, type, data ); + } + } + else + { + if ( !iCallbackError ) + { + iCallbackError = aError; + } + } } + +// --------------------------------------------------------------------------- +// Handle playback property. +// --------------------------------------------------------------------------- +// +void Cmpxplaybackutilitytest::HandlePropertyL( TMPXPlaybackProperty aProperty, TInt aValue, TInt aError ) + { + iLog->Log(_L("Cmpxharvestertest::HandlePropertyL: Property %d, Value %d, Error %d"), + aProperty, aValue, aError); + } + +// --------------------------------------------------------------------------- +// Method is called continously until aComplete=ETrue, signifying that +// it is done and there will be no more callbacks. +// Only new items are passed each time. +// --------------------------------------------------------------------------- +// +void Cmpxplaybackutilitytest::HandleSubPlayerNamesL( TUid aPlayer, + const MDesCArray* aSubPlayers, + TBool aComplete, + TInt aError ) + { + iLog->Log(_L("Cmpxharvestertest::HandleSubPlayerNamesL: Complete %d, Error %d"), aComplete, aError); + } + +// --------------------------------------------------------------------------- +// Call back of media request. +// --------------------------------------------------------------------------- +// +void Cmpxplaybackutilitytest::HandleMediaL( const CMPXMedia& aProperties, TInt aError ) + { + iLog->Log(_L("Cmpxharvestertest::HandleMediaL: Error %d"), aError); + } + +// --------------------------------------------------------------------------- +// Handle completion of a asynchronous command. +// Note: All clients should implement this callback. +// --------------------------------------------------------------------------- +// +void Cmpxplaybackutilitytest::HandlePlaybackCommandComplete( CMPXCommand* aCommandResult, TInt aError ) + { + iLog->Log(_L("Cmpxharvestertest::HandlePlaybackCommandComplete: Error %d"), aError); + } + // ----------------------------------------------------------------------------- // Cmpxplaybackutilitytest::Delete // Delete here all resources allocated and opened from test methods. @@ -45,7 +132,58 @@ #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API iFile64.Close(); #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API + iFile.Close(); iFs.Close(); + iExpectedEventArray->ResetAndDestroy(); + } + +// ----------------------------------------------------------------------------- +// Cmpxplaybackutilitytest::CreateL +// Create here all resources needed for test methods. +// Called from ConstructL(). +// ----------------------------------------------------------------------------- +// +void Cmpxplaybackutilitytest::CreateL() + { + iFs.Connect(); + iFs.ShareProtected(); + + iExpectedEventArray = new (ELeave) CArrayPtrFlat( 1 ); + iCallbackError = KErrNone; + iMPXPlaybackUtility = NULL; + } + +// ----------------------------------------------------------------------------- +// Cmpxplaybackutilitytest::AddExpectedEventL +// ----------------------------------------------------------------------------- +// +void Cmpxplaybackutilitytest::AddExpectedEventL( TInt aEvent, TInt aType, TInt aData ) + { + iLog->Log(_L("Cmpxplaybackutilitytest::AddExpectedEventL() event = %d type = %d value = %d"), + aEvent, aType, aData ); + + TMpxPlaybackTestEvent* event = new (ELeave) TMpxPlaybackTestEvent; + event->iEvent = aEvent; + event->iType = aType; + event->iData = aData; + iExpectedEventArray->AppendL( event ); + } + +// ----------------------------------------------------------------------------- +// Cmpxplaybackutilitytest::RemoveExpectedEventL +// ----------------------------------------------------------------------------- +// +void Cmpxplaybackutilitytest::RemoveExpectedEventL( TInt aEvent, TInt aType, TInt aData ) + { + iLog->Log(_L("Cmpxplaybackutilitytest::RemoveExpectedEventL() event = %d type = %d value = %d"), + aEvent, aType, aData ); + + if ( (iExpectedEventArray->Count() > 0) && + ((*iExpectedEventArray)[0]->iEvent == aEvent) ) + { + iLog->Log(_L("Cmpxplaybackutilitytest::RemoveExpectedEventL() event = %d removed."), aEvent); + iExpectedEventArray->Delete( 0 ); + } } // ----------------------------------------------------------------------------- @@ -53,32 +191,38 @@ // Run specified method. Contains also table of test mothods and their names. // ----------------------------------------------------------------------------- // -TInt Cmpxplaybackutilitytest::RunMethodL( - CStifItemParser& aItem ) +TInt Cmpxplaybackutilitytest::RunMethodL( CStifItemParser& aItem ) { - static TStifFunctionInfo const KFunctions[] = { // Copy this line for every implemented function. // First string is the function name used in TestScripter script file. // Second is the actual implementation member function. - + + //ADD NEW ENTRY HERE + // [test cases entries] - Do not remove ENTRY( "MMPXPlaybackUtilityNewL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityNewL ), + ENTRY( "MMPXPlaybackUtilityNewWithCatL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityNewWithCatL ), ENTRY( "MMPXPlaybackUtilityUtilityL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityUtilityL ), + ENTRY( "MMPXPlaybackUtilityUtilityWithCatL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityUtilityWithCatL ), + ENTRY( "MMPXPlaybackUtilityInitWithPlaylistL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithPlaylistL ), + ENTRY( "MMPXPlaybackUtilityInitWithUriL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithUriL ), + ENTRY( "MMPXPlaybackUtilityInitWithRFileL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithRFileL ), + ENTRY( "MMPXPlaybackUtilityInitStreamingWithUriL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithUriL ), + ENTRY( "MMPXPlaybackUtilityInitStreamingWithRFileL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithRFileL ), ENTRY( "MMPXPlaybackUtilityInit64L", Cmpxplaybackutilitytest::MMPXPlaybackUtilityInit64L ), ENTRY( "MMPXPlaybackUtilityInitStreaming64L", Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreaming64L ), ENTRY( "MMPXPlaybackUtilityFile64L", Cmpxplaybackutilitytest::MMPXPlaybackUtilityFile64L ), - - //ADD NEW ENTRY HERE - // [test cases entries] - Do not remove - + ENTRY( "MMPXPlaybackUtilityAddObserverL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityAddObserverL ), + ENTRY( "MMPXPlaybackUtilityRemoveObserverL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityRemoveObserverL ), + ENTRY( "MMPXPlaybackUtilityPlayerManagerSelectPlayerL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityPlayerManagerSelectPlayerL ), + ENTRY( "EndTest", Cmpxplaybackutilitytest::EndTest ), }; const TInt count = sizeof( KFunctions ) / sizeof( TStifFunctionInfo ); return RunInternalL( KFunctions, count, aItem ); - } // ----------------------------------------------------------------------------- @@ -87,49 +231,325 @@ // (other items were commented in a header). // ----------------------------------------------------------------------------- // -TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityNewL(CStifItemParser& /*aItem*/) +TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityNewL( CStifItemParser& aItem ) { + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityNewL")); TInt err = KErrNone; - - TRAP( err,iMPXPlaybackUtility = MMPXPlaybackUtility::NewL(KPbModeDefault,this )); + TInt mode; + + if ( aItem.GetNextInt(mode) != KErrNone ) + { + iLog->Log(_L("MMPXPlaybackUtilityNewL - Missing playback mode.")); + err = KErrArgument; + return err; + } + + iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityNewL: mode %d"), mode); + TRAP( err,iMPXPlaybackUtility = MMPXPlaybackUtility::NewL(TUid::Uid(mode), this )); if (err!= KErrNone) { - iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityNewL: %d"), err); + iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityNewL: error %d"), err); } return err; } // ----------------------------------------------------------------------------- +// Cmpxplaybackutilitytest::MMPXPlaybackUtilityNewWithCatL +// NewL test method function. +// (other items were commented in a header). +// ----------------------------------------------------------------------------- +// +TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityNewWithCatL( CStifItemParser& aItem ) + { + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityNewWithCatL")); + TInt err = KErrNone; + TInt mode; + TInt category; + if ( aItem.GetNextInt(category) != KErrNone ) + { + iLog->Log(_L("MMPXPlaybackUtilityNewWithCatL - Missing category.")); + err = KErrArgument; + return err; + } + + if ( aItem.GetNextInt(mode) != KErrNone ) + { + iLog->Log(_L("MMPXPlaybackUtilityNewWithCatL - Missing playback mode.")); + err = KErrArgument; + return err; + } + + iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityNewWithCatL: category %d"), category); + iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityNewWithCatL: mode %d"), mode); + TRAP( err,iMPXPlaybackUtility = MMPXPlaybackUtility::NewL((TMPXCategory)category, TUid::Uid(mode), this )); + + if (err!= KErrNone) + { + iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityNewWithCatL: error %d"), err); + } + return err; + } + +// ----------------------------------------------------------------------------- // Cmpxplaybackutilitytest::MMPXPlaybackUtilityUtilityL // UtilityL test method function. // (other items were commented in a header). // ----------------------------------------------------------------------------- // -TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityUtilityL(CStifItemParser& /*aItem*/) +TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityUtilityL( CStifItemParser& aItem ) { + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityUtilityL")); TInt err = KErrNone; + TInt mode = 0; - TRAP(err,iMPXPlaybackUtility = MMPXPlaybackUtility::UtilityL()); + aItem.GetNextInt(mode); + iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityUtilityL: mode %d"), mode); + if ( mode ) + { + TRAP(err,iMPXPlaybackUtility = MMPXPlaybackUtility::UtilityL(TUid::Uid(mode))); + } + else + { + TRAP(err,iMPXPlaybackUtility = MMPXPlaybackUtility::UtilityL()); + } - if (err!= KErrNone) - { - iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityUtilityL: %d"), err); - } + iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityUtilityL: error %d"), err); return err; } // ----------------------------------------------------------------------------- +// Cmpxplaybackutilitytest::MMPXPlaybackUtilityUtilityWithCatL +// UtilityL test method function. +// (other items were commented in a header). +// ----------------------------------------------------------------------------- +// +TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityUtilityWithCatL( CStifItemParser& aItem ) + { + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityUtilityWithCatL")); + TInt err = KErrNone; + TInt category; + TInt mode = 0; + + if ( aItem.GetNextInt(category) != KErrNone ) + { + iLog->Log(_L("MMPXPlaybackUtilityNewWithCatL - Missing category.")); + err = KErrArgument; + return err; + } + + aItem.GetNextInt(mode); + iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityUtilityWithCatL: category %d"), category); + iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityUtilityWithCatL: mode %d"), mode); + if ( mode ) + { + TRAP(err,iMPXPlaybackUtility = MMPXPlaybackUtility::UtilityL((TMPXCategory)category, TUid::Uid(mode))); + } + else + { + TRAP(err,iMPXPlaybackUtility = MMPXPlaybackUtility::UtilityL((TMPXCategory)category)); + } + + iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityUtilityWithCatL: error %d"), err); + + return err; + } + +// ----------------------------------------------------------------------------- +// Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithPlaylistL +// InitL(CMPXCollectionPlaylist) test method function. +// (other items were commented in a header). +// ----------------------------------------------------------------------------- +// +TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithPlaylistL( CStifItemParser& /*aItem*/ ) + { + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithPlaylistL")); + TInt err = KErrNone; + CMPXCollectionPlaylist* playlist = CMPXCollectionPlaylist::NewL(); + CleanupStack::PushL(playlist); + TRAP(err,iMPXPlaybackUtility->InitL(*playlist)); + CleanupStack::PopAndDestroy(playlist); + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithPlaylistL - error=%d"),err); + return err; + } + +// ----------------------------------------------------------------------------- +// Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithUriL +// InitL(Uri) test method function. +// (other items were commented in a header). +// ----------------------------------------------------------------------------- +// +TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithUriL( CStifItemParser& aItem ) + { + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithUriL")); + TInt err = KErrNone; + TPtrC string; + + if( aItem.GetNextString( string ) == KErrNone ) + { + TBuf<120> uri; + uri.Append(KmpxplaybackutilityTestFilePath); + uri.Append(string); + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithUriL - uri = %S."), &uri); + TRAP(err,iMPXPlaybackUtility->InitL(uri)); + + if ( !err ) + { + TInt event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EPlayerChanged; + AddExpectedEventL(event, 0, 0); + event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EInitializeComplete; + AddExpectedEventL(event, 0, 0); + } + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithUriL - error=%d"),err); + } + else + { + iLog->Log(_L("MMPXPlaybackUtilityInitWithUriL - Missing file name.")); + err = KErrArgument; + } + return err; + } + +// ----------------------------------------------------------------------------- +// Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithRFileL +// Init64L test method function. +// (other items were commented in a header). +// ----------------------------------------------------------------------------- +// +TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithRFileL( CStifItemParser& aItem ) + { + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithRFileL")); + TInt err = KErrNone; + TPtrC string; + + if( aItem.GetNextString( string ) == KErrNone ) + { + TBuf<120> KFrom; + KFrom.Append(KmpxplaybackutilityTestFilePath); + KFrom.Append(string); + if ( iFile.SubSessionHandle() ) + { + iFile.Close(); + } + err = iFile.Open(iFs, KFrom, EFileRead | EFileShareReadersOrWriters); + if ( err == KErrNone ) + { + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithRFileL - Open passed.")); + TRAP(err,iMPXPlaybackUtility->InitL(iFile)); + + if ( !err ) + { + TInt event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EPlayerChanged; + AddExpectedEventL(event, 0, 0); + event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EInitializeComplete; + AddExpectedEventL(event, 0, 0); + } + } + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithRFileL - error=%d"),err); + } + else + { + iLog->Log(_L("MMPXPlaybackUtilityInitWithRFileL - Missing file name.")); + err = KErrArgument; + } + return err; + } + +// ----------------------------------------------------------------------------- +// Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithUriL +// InitStreamingL(Uri) test method function. +// (other items were commented in a header). +// ----------------------------------------------------------------------------- +// +TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithUriL( CStifItemParser& aItem ) + { + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithUriL")); + TInt err = KErrNone; + TPtrC string; + TInt accessPoint = 1; + + if( aItem.GetNextString( string ) == KErrNone ) + { + TBuf<120> uri; + uri.Append(KmpxplaybackutilityTestFilePath); + uri.Append(string); + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithUriL - uri = %S."), &uri); + TRAP(err,iMPXPlaybackUtility->InitStreamingL(uri, NULL, accessPoint)); + + if ( !err ) + { + TInt event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EPlayerChanged; + AddExpectedEventL(event, 0, 0); + event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EInitializeComplete; + AddExpectedEventL(event, 0, 0); + } + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithUriL - error=%d"),err); + } + else + { + iLog->Log(_L("MMPXPlaybackUtilityInitStreamingWithUriL - Missing file name.")); + err = KErrArgument; + } + return err; + } + +// ----------------------------------------------------------------------------- +// Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithRFileL +// InitStreamingL(RFile) test method function. +// (other items were commented in a header). +// ----------------------------------------------------------------------------- +// +TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithRFileL( CStifItemParser& aItem ) + { + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithRFileL")); + TInt err = KErrNone; + TPtrC string; + TInt accessPoint = 1; + + if( aItem.GetNextString( string ) == KErrNone ) + { + TBuf<120> KFrom; + KFrom.Append(KmpxplaybackutilityTestFilePath); + KFrom.Append(string); + if ( iFile.SubSessionHandle() ) + { + iFile.Close(); + } + err = iFile.Open(iFs, KFrom, EFileRead | EFileShareReadersOrWriters); + if ( err == KErrNone ) + { + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithRFileL - Open passed.")); + TRAP(err,iMPXPlaybackUtility->InitStreamingL(iFile, accessPoint)); + + if ( !err ) + { + TInt event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EPlayerChanged; + AddExpectedEventL(event, 0, 0); + event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EInitializeComplete; + AddExpectedEventL(event, 0, 0); + } + } + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithRFileL - error=%d"),err); + } + else + { + iLog->Log(_L("MMPXPlaybackUtilityInitStreamingWithRFileL - Missing file name.")); + err = KErrArgument; + } + return err; + } + +// ----------------------------------------------------------------------------- // Cmpxplaybackutilitytest::MMPXPlaybackUtilityInit64L // Init64L test method function. // (other items were commented in a header). // ----------------------------------------------------------------------------- // -TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityInit64L(CStifItemParser& aItem) +TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityInit64L( CStifItemParser& aItem ) { - iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInit64L testing Init64L() begin")); + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInit64L")); TInt err = KErrNone; #ifndef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API err = KErrNotSupported; @@ -149,10 +569,18 @@ err = iFile64.Open(iFs, KFrom, EFileRead | EFileShareReadersOrWriters); if ( err == KErrNone ) { - iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInit64L testing Init64L() Open passed.")); + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInit64L - Open passed.")); TRAP(err,iMPXPlaybackUtility->Init64L(iFile64)); + + if ( !err ) + { + TInt event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EPlayerChanged; + AddExpectedEventL(event, 0, 0); + event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EInitializeComplete; + AddExpectedEventL(event, 0, 0); + } } - iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInit64L testing Init64L() error=%d"),err); + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInit64L - error=%d"),err); } else { @@ -169,13 +597,13 @@ // (other items were commented in a header). // ----------------------------------------------------------------------------- // -TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreaming64L(CStifItemParser& aItem) +TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreaming64L( CStifItemParser& aItem ) { - iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreaming64L testing InitStreaming64L() begin")); + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreaming64L")); TInt err = KErrNone; #ifndef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API err = KErrNotSupported; - iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreaming64L testing InitStreaming64L() error=%d"),err); + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreaming64L - error=%d"),err); #else // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API TPtrC string; TInt accessPoint = 1; @@ -192,10 +620,18 @@ err = iFile64.Open(iFs, KFrom, EFileRead | EFileShareReadersOrWriters); if ( err == KErrNone ) { - iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreaming64L testing InitStreaming64L() Open passed.")); + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreaming64L - Open passed.")); TRAP(err,iMPXPlaybackUtility->InitStreaming64L(iFile64, accessPoint)); + + if ( !err ) + { + TInt event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EPlayerChanged; + AddExpectedEventL(event, 0, 0); + event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EInitializeComplete; + AddExpectedEventL(event, 0, 0); + } } - iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreaming64L testing InitStreaming64L() error=%d"),err); + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreaming64L - error=%d"),err); } else { @@ -212,22 +648,106 @@ // (other items were commented in a header). // ----------------------------------------------------------------------------- // -TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityFile64L(CStifItemParser& /*aItem*/) +TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityFile64L( CStifItemParser& /*aItem*/ ) { - iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityFile64L testing File64L() begin")); + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityFile64L")); TInt err = KErrNone; #ifndef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API err = KErrNotSupported; - iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityFile64L testing File64L() error=%d"),err); + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityFile64L - error=%d"),err); #else // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API - RFile64* file64Ptr; + RFile64* file64Ptr=NULL; TRAP(err, file64Ptr=iMPXPlaybackUtility->Source()->File64L()); if ( !file64Ptr->SubSessionHandle() ) { iLog->Log(_L("MMPXPlaybackUtilityFile64L - file64 = NULL.")); } - iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityFile64L testing File64L() error=%d"),err); + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityFile64L - error=%d"),err); #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API return err; } +// ----------------------------------------------------------------------------- +// Cmpxplaybackutilitytest::MMPXPlaybackUtilityAddObserverL +// AddObserverL test method function. +// (other items were commented in a header). +// ----------------------------------------------------------------------------- +// +TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityAddObserverL( CStifItemParser& /*aItem*/ ) + { + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityAddObserverL")); + TInt err = KErrNone; + TRAP(err, iMPXPlaybackUtility->AddObserverL(*this)); + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityAddObserverL - error=%d"),err); + return err; + } + +// ----------------------------------------------------------------------------- +// Cmpxplaybackutilitytest::MMPXPlaybackUtilityRemoveObserverL +// RemoveObserverL test method function. +// (other items were commented in a header). +// ----------------------------------------------------------------------------- +// +TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityRemoveObserverL( CStifItemParser& /*aItem*/ ) + { + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityRemoveObserverL")); + TInt err = KErrNone; + TRAP(err, iMPXPlaybackUtility->RemoveObserverL(*this)); + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityRemoveObserverL - error=%d"),err); + return err; + } + +// ----------------------------------------------------------------------------- +// Cmpxplaybackutilitytest::MMPXPlaybackUtilityPlayerManagerSelectPlayerL +// RemoveObserverL test method function. +// (other items were commented in a header). +// ----------------------------------------------------------------------------- +// +TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityPlayerManagerSelectPlayerL(CStifItemParser& aItem) + { + iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityPlayerManagerSelectPlayerL")); + TInt uidInt; + TInt err = KErrNone; + + // read in UID + if ( aItem.GetNextInt(uidInt) != KErrNone ) + { + iLog->Log(_L("MMPXPlaybackUtilityPlayerManagerSelectPlayerL - Missing UID.")); + err = KErrArgument; + return err; + } + + iLog->Log(_L("MMPXPlaybackUtilityPlayerManagerSelectPlayerL - UID = 0x%x."), uidInt); + if ( iMPXPlaybackUtility ) + { + MMPXPlayerManager& manager = iMPXPlaybackUtility->PlayerManager(); + TRAP( err, manager.SelectPlayerL( TUid::Uid(uidInt) ) ); + iLog->Log(_L("MMPXPlaybackUtilityPlayerManagerSelectPlayerL - SelectPlayer err = %d."), err); + } + else + { + iLog->Log(_L("MMPXPlaybackUtilityPlayerManagerSelectPlayerL - MPX Playback Utility not created.")); + err = KErrGeneral; + } + return err; + } + +// ----------------------------------------------------------------------------- +// Cmpxplaybackutilitytest::EndTest +// ----------------------------------------------------------------------------- +// +TInt Cmpxplaybackutilitytest::EndTest( CStifItemParser& /*aItem*/ ) + { + iLog->Log(_L("Cmpxplaybackutilitytest::EndTest")); + TInt err = iCallbackError; + + // check if event queue is empty + if ( !err && (iExpectedEventArray->Count() > 0 ) ) + { + iLog->Log(_L("Cmpxplaybackutilitytest::EndTest error = KErrTimedOut")); + err = KErrTimedOut; + } + return err; + } + +// end of file diff -r d240f0a77280 -r 780c925249c1 mmappfw_plat/mtp_keys_api/group/bld.inf --- a/mmappfw_plat/mtp_keys_api/group/bld.inf Mon Mar 15 12:42:31 2010 +0200 +++ b/mmappfw_plat/mtp_keys_api/group/bld.inf Wed Mar 31 22:26:09 2010 +0300 @@ -23,4 +23,4 @@ DEFAULT PRJ_EXPORTS -../inc/MtpPrivatePSKeys.h MW_LAYER_PLATFORM_EXPORT_PATH(MtpPrivatePSKeys.h) +../inc/mtpprivatepskeys.h MW_LAYER_PLATFORM_EXPORT_PATH(mtpprivatepskeys.h) diff -r d240f0a77280 -r 780c925249c1 mpx/playbackframework/playbackengine/inc/mpxautoresumehandler.h --- a/mpx/playbackframework/playbackengine/inc/mpxautoresumehandler.h Mon Mar 15 12:42:31 2010 +0200 +++ b/mpx/playbackframework/playbackengine/inc/mpxautoresumehandler.h Wed Mar 31 22:26:09 2010 +0300 @@ -136,6 +136,11 @@ * in that case */ TBool IsPlaybackRemote(); + + /** + * Handle change in voice command state. + */ + void DoHandleVoiceCmdChange(); private: // data CMPXPlaybackEngine& iEngine; @@ -148,6 +153,10 @@ // Timer for resume operation. Owned. CPeriodic* iResumeTimer; + + CMPXPSKeyWatcher* iVoiceCmdObserver; // owned + TBool iPausedForVoiceCmd; + TBool iVoiceCmdResumeOngoing; }; #endif // CMPXAUTORESUMEHANDLER_H diff -r d240f0a77280 -r 780c925249c1 mpx/playbackframework/playbackengine/src/mpxautoresumehandler.cpp --- a/mpx/playbackframework/playbackengine/src/mpxautoresumehandler.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mpx/playbackframework/playbackengine/src/mpxautoresumehandler.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -25,10 +25,23 @@ // CONSTANTS const TInt KMPXErrDiedTimeout = 2000000; - // Time to wait before resume after call has ended. const TInt KMPXResumeWaitTime = 3000000; // 3.0s +// TODO: the following constants and definitions are copied from nssvascoreconstant.h, which is not +// included directly because it is an App layer API. Way to fix this is to ask Speechsrv to move the header file to MW layer. +const TUid KSINDUID = {KUidSystemCategoryValue}; +const TInt ERecognitionState=0; + +// Recognition state values for the P&S key ERecognitionState +enum TRecognitionStateValues + { + ERecognitionStarted = 0, + ERecognitionSpeechEnd, + ERecognitionSuccess, + ERecognitionFail + }; +// End TODO // ================= MEMBER FUNCTIONS ======================= @@ -60,6 +73,9 @@ // Listen to call type changes iTypeObserver = CMPXPSKeyWatcher::NewL(KPSUidCtsyCallInformation, KCTsyCallType,this); + + iVoiceCmdObserver = CMPXPSKeyWatcher::NewL( KSINDUID, ERecognitionState, this ); + iResumeTimer = CPeriodic::NewL(CActive::EPriorityStandard); } @@ -88,6 +104,7 @@ // CMPXAutoResumeHandler::~CMPXAutoResumeHandler() { + delete iVoiceCmdObserver; delete iStateObserver; delete iTypeObserver; if ( iResumeTimer ) @@ -135,13 +152,15 @@ MPX_DEBUG2("CMPXAutoResumeHandler::HandlePlaybackComplete(%d) entering", aError); iPausedForCall = EFalse; if ( KErrDied == aError || - KErrAccessDenied == aError ) + KErrAccessDenied == aError || + KErrInUse == aError ) { iKErrDiedTime.HomeTime(); TInt callType = EPSCTsyCallTypeNone; TInt callState = EPSCTsyCallStateNone; - + TInt voiceCmdState(0); + if (!iTypeObserver->GetValue(callType) && !iStateObserver->GetValue(callState)) { @@ -155,8 +174,16 @@ iPausedForCall = ETrue; } } + + if ( !iPausedForCall && !iVoiceCmdObserver->GetValue( voiceCmdState ) ) // key exist if voice commanding is in progress + { + // Paused due voice command activity + iPausedForVoiceCmd = ETrue; + } } - MPX_DEBUG1("CMPXAutoResumeHandler::HandlePlaybackComplete() exiting"); + + MPX_DEBUG3("CMPXAutoResumeHandler::HandlePlaybackComplete() exiting: iPausedForCall=%d, iPausedForVoiceCmd=%d", + iPausedForCall, iPausedForVoiceCmd); } // ----------------------------------------------------------------------------- @@ -175,10 +202,18 @@ // CMPXAutoResumeHandler::HandlePSEvent // ----------------------------------------------------------------------------- // -void CMPXAutoResumeHandler::HandlePSEvent(TUid /*aUid*/, TInt /*aKey*/) +void CMPXAutoResumeHandler::HandlePSEvent(TUid aUid, TInt /*aKey*/) { MPX_FUNC("CMPXAutoResumeHandler::HandlePSEvent()"); - TRAP_IGNORE(DoHandleStateChangeL()); + + if ( aUid == KSINDUID ) + { + DoHandleVoiceCmdChange(); + } + else + { + TRAP_IGNORE(DoHandleStateChangeL()); + } } // ----------------------------------------------------------------------------- @@ -246,6 +281,19 @@ iPausedForCall = ETrue; } } + + if ( shouldPause && iVoiceCmdResumeOngoing ) + { + // Resume timer has been started after a voice command, cancel it now + // so that playback is not resumed while calling + if ( iResumeTimer->IsActive() ) + { + iResumeTimer->Cancel(); + } + iVoiceCmdResumeOngoing = EFalse; + iPausedForCall = ETrue; // resume playback once call has been ended + } + MPX_DEBUG2("CMPXAutoResumeHandler::DoHandleStateChangeL(): iPausedForCall = %d", iPausedForCall); } @@ -317,6 +365,8 @@ { MPX_FUNC("CMPXAutoResumeHandler::HandleResumeTimerCallback() entering"); + iVoiceCmdResumeOngoing = EFalse; + CancelResumeTimer(); TRAP_IGNORE( iEngine.HandleCommandL( EPbCmdPlayWithFadeIn )); } @@ -374,4 +424,39 @@ iAutoResume = aAutoResume; } +// ----------------------------------------------------------------------------- +// CMPXAutoResumeHandler::DoHandleVoiceCmdChange +// ----------------------------------------------------------------------------- +// +void CMPXAutoResumeHandler::DoHandleVoiceCmdChange() + { + MPX_FUNC("CMPXAutoResumeHandler::DoHandleVoiceCmdChange()"); + + TInt voiceCmdState( 0 ); + TInt err( iVoiceCmdObserver->GetValue( voiceCmdState ) ); + + MPX_DEBUG4("CMPXAutoResumeHandler::DoHandleVoiceCmdChange(): iPausedForVoiceCmd = %d, err=%d, state=%d", + iPausedForVoiceCmd, err, voiceCmdState); + + if ( iPausedForVoiceCmd && !iPausedForCall ) + { + if ( err == KErrNotFound ) // voice command has been finished once the P&S key is deleted + { + if ( iResumeTimer->IsActive() ) + iResumeTimer->Cancel(); + + iResumeTimer->Start( KMPXResumeWaitTime, KMPXResumeWaitTime, TCallBack(ResumeTimerCallback, this) ); + + iPausedForVoiceCmd = EFalse; + + iVoiceCmdResumeOngoing = ETrue; // flag for cancelling resume timer due to a call + } + } + + if ( iPausedForCall ) // ensure that not interfering with call handling in any circumstances + { + iPausedForVoiceCmd = EFalse; + } + } + // End of File diff -r d240f0a77280 -r 780c925249c1 mpx/playbackframework/playbackengine/src/mpxplaybackengine.cpp --- a/mpx/playbackframework/playbackengine/src/mpxplaybackengine.cpp Mon Mar 15 12:42:31 2010 +0200 +++ b/mpx/playbackframework/playbackengine/src/mpxplaybackengine.cpp Wed Mar 31 22:26:09 2010 +0300 @@ -984,7 +984,8 @@ TMPXPlaybackMessage( TMPXPlaybackMessage::EStateChanged, iState, aError )); if ( KErrDied == aError || - KErrAccessDenied == aError ) + KErrAccessDenied == aError || + KErrInUse == aError ) { iPluginState = EPbStateNotInitialised; // fixed diff -r d240f0a77280 -r 780c925249c1 package_definition.xml --- a/package_definition.xml Mon Mar 15 12:42:31 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -