# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1268401476 -7200 # Node ID 05b0d23237684f2d0c142b74e56aab98a53e0345 # Parent bee149131e4b27bcf8fe428c1d09e043b67291fb Revision: 201007 Kit: 201008 diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/audiofetcher/inc/audiofetcherdialog.h --- a/mmappcomponents/audiofetcher/inc/audiofetcherdialog.h Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/audiofetcher/inc/audiofetcherdialog.h Fri Mar 12 15:44:36 2010 +0200 @@ -133,6 +133,13 @@ CGulIcon* IconL(TAknsItemID aId, const TDesC& aFileName, TInt aFileIndex, TInt aFileMaskIndex); + CGulIcon* ColorIconL( const TAknsItemID& aId, + const TDesC& aFileName, + TInt aFilexIndex, + TInt aFileMaskIndex, + const TAknsItemID& aColorId, + TInt aColorIndex ); + void UpdateListBoxL(); /** diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/audiofetcher/src/audiofetcherdialog.cpp --- a/mmappcomponents/audiofetcher/src/audiofetcherdialog.cpp Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/audiofetcher/src/audiofetcherdialog.cpp Fri Mar 12 15:44:36 2010 +0200 @@ -388,14 +388,18 @@ EMbmAudiofetcherQgn_prop_sml_sync_off_mask ) ); // memory card icon - icons->AppendL( IconL( KAknsIIDQgnIndiMmcAdd, iIconFileName, + icons->AppendL( ColorIconL( KAknsIIDQgnIndiMmcAdd, iIconFileName, EMbmAudiofetcherQgn_indi_mmc_add, - EMbmAudiofetcherQgn_indi_mmc_add_mask ) ); + EMbmAudiofetcherQgn_indi_mmc_add_mask, + KAknsIIDQsnIconColors, + EAknsCIQsnIconColorsCG26 ) ); // mass storage icon - icons->AppendL( IconL( KAknsIIDQgnPropLinkEmbdSmall, iIconFileName, + icons->AppendL( ColorIconL( KAknsIIDQgnPropLinkEmbdSmall, iIconFileName, EMbmAudiofetcherQgn_indi_fmgr_ms_add, - EMbmAudiofetcherQgn_indi_fmgr_ms_add_mask ) ); + EMbmAudiofetcherQgn_indi_fmgr_ms_add_mask, + KAknsIIDQsnIconColors, + EAknsCIQsnIconColorsCG26 ) ); // empty icon icons->AppendL( IconL( KAknsIIDQgnPropEmpty, KAvkonBitmapFile, @@ -455,6 +459,45 @@ return icon; } +// ----------------------------------------------------------------------------- +// CMediaFileDialog::ColorIconL +// +// ----------------------------------------------------------------------------- +// +CGulIcon* CAudioFetcherDialog::ColorIconL( const TAknsItemID& aId, + const TDesC& aFileName, + TInt aFilexIndex, + TInt aFileMaskIndex, + const TAknsItemID& aColorId, + TInt aColorIndex ) + { + WLOG("CAudioFetcherDialog::ColorIconL"); + + CFbsBitmap* bitmap( NULL ); + CFbsBitmap* mask( NULL ); + + if ( aColorId == KAknsIIDNone ) + { + // do not use theme color, use the default color from the file + AknsUtils::CreateIconLC( AknsUtils::SkinInstance(), aId, + bitmap, mask, aFileName, aFilexIndex, aFileMaskIndex ); + } + else + { + // use theme color + AknsUtils::CreateColorIconLC( AknsUtils::SkinInstance(), aId, aColorId, aColorIndex, + bitmap, mask, aFileName, aFilexIndex, aFileMaskIndex, KRgbBlack ); + } + + CGulIcon* icon = CGulIcon::NewL( bitmap, mask ); + icon->SetBitmapsOwnedExternally( EFalse ); + + // icon now owns the bitmaps, no need to keep on cleanup stack. + CleanupStack::Pop( 2 ); // mask, bitmap + + return icon; + } + // ----------------------------------------------------------------------------- // CMediaFileDialog::UpdateListBoxL diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/harvester/server/inc/mpxusbeventhandler.h --- a/mmappcomponents/harvester/server/inc/mpxusbeventhandler.h Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/harvester/server/inc/mpxusbeventhandler.h Fri Mar 12 15:44:36 2010 +0200 @@ -113,7 +113,6 @@ */ MMPXSystemEventObserver& iObserver; TInt iState; - TBool iMTPActive; RUsb iUsbMan; TUsbDeviceState iDeviceState; diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/harvester/server/src/mpxusbeventhandler.cpp --- a/mmappcomponents/harvester/server/src/mpxusbeventhandler.cpp Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/harvester/server/src/mpxusbeventhandler.cpp Fri Mar 12 15:44:36 2010 +0200 @@ -41,7 +41,6 @@ CActive( EPriorityStandard ), iWasMtp ( EFalse ), iObserver( aObserver ), - iMTPActive ( EFalse ), iUsbManConnected( EFalse ) { CActiveScheduler::Add( this ); @@ -175,7 +174,6 @@ { MPX_DEBUG1("CMPXUsbEventHandler::DoHandlePSEvent - MTP End"); iObserver.HandleSystemEventL( EUSBMTPEndEvent, removableDrive ); - iMTPActive = EFalse; } MPX_DEBUG1("CMPXUsbEventHandler::DoHandlePSEvent - USB Start"); #ifdef RD_MULTIPLE_DRIVE @@ -199,20 +197,15 @@ if (value == EMtpPSStatusActive) { - if( !iMTPActive ) - { MPX_DEBUG1("CMPXUsbEventHandler::DoHandlePSEvent - MTP Start"); iObserver.HandleSystemEventL( EUSBMTPStartEvent, removableDrive ); iState = KUsbPersonalityIdMTP; - iMTPActive = ETrue; - } } else if( value != EMtpPSStatusReadyToSync ) { MPX_DEBUG1("CMPXUsbEventHandler::DoHandlePSEvent - MTP Not Active"); iObserver.HandleSystemEventL( EUSBMTPNotActiveEvent, removableDrive ); iState = KUsbPersonalityIdMTP; - iMTPActive = EFalse; } } // Make sure MTP and MS flags are OFF @@ -231,7 +224,6 @@ { MPX_DEBUG1("CMPXUsbEventHandler::DoHandlePSEvent - MTP End"); iObserver.HandleSystemEventL( EUSBMTPEndEvent, removableDrive ); - iMTPActive = EFalse; } iState = KUsbWatcherSelectedPersonalityNone; } diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpmetadatampxaccess.h --- a/mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpmetadatampxaccess.h Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpmetadatampxaccess.h Fri Mar 12 15:44:36 2010 +0200 @@ -80,7 +80,7 @@ * @param aCategory, specify the category * @return, name of the source, ownership transferred */ - HBufC* CMmMtpDpMetadataMpxAccess::GetAbstractMediaNameL( CMPXMedia* aAbstractMedia, + HBufC* GetAbstractMediaNameL( CMPXMedia* aAbstractMedia, TMPXGeneralCategory aCategory ); /** diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpperflog.inl --- a/mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpperflog.inl Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpperflog.inl Fri Mar 12 15:44:36 2010 +0200 @@ -187,9 +187,11 @@ if (totalTimeValue <= 0xFFFFFFFF) { + //Define the ptr on stack to avoid compiling warnning for wiscw udeb + TPtrC ptr( iDescription[index] ); WriteFormat( _L( "%S-%S, usage = %u, last time = %u.%S ms, total time = %u.%S ms, average time = %u.%S ms" ), iTitle, - &iDescription[index], + &ptr, iTotalUsage[index], lastTimeValue, &lastTimeDecimal, @@ -200,9 +202,11 @@ } else { + //Define the ptr on stack to avoid compiling warnning for wiscw udeb + TPtrC ptr( iDescription[index] ); WriteFormat( _L( "%S-%S, usage = %u, last time = %u.%S ms, total time = %u%u.%S ms, average time = %u.%S ms" ), iTitle, - &iDescription[index], + &ptr, iTotalUsage[index], lastTimeValue, &lastTimeDecimal, diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/inc/mmmtpdpfiledefs.h --- a/mmappcomponents/mmmtpdataprovider/inc/mmmtpdpfiledefs.h Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/inc/mmmtpdpfiledefs.h Fri Mar 12 15:44:36 2010 +0200 @@ -29,6 +29,7 @@ //-------------------------------------------------------------------------------------------- _LIT( KTxtExtension3GP, ".3gp" ); +_LIT( KTxtExtension3G2, ".3g2" ); _LIT( KTxtExtensionAAC, ".aac" ); _LIT( KTxtExtensionASF, ".asf" ); _LIT( KTxtExtensionM4A, ".m4a" ); @@ -49,6 +50,7 @@ _LIT(KFormatExtensionWMA, "0xb901:wma"); _LIT(KFormatExtensionMP4, "0xb982:mp4"); _LIT(KFormatExtension3GP, "0xb984:3gp"); +_LIT(KFormatExtension3G2, "0xb984:3g2"); _LIT(KFormatExtensionAAC, "0xb903:aac"); _LIT(KFormatExtensionWAV, "0x3008:wav"); _LIT(KFormatExtensionWMV, "0xb981:wmv"); diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/inc/mmmtpdputility.h --- a/mmappcomponents/mmmtpdataprovider/inc/mmmtpdputility.h Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/inc/mmmtpdputility.h Fri Mar 12 15:44:36 2010 +0200 @@ -56,7 +56,7 @@ * @param aFullFileName, the full file name * @return TBool for decide if the file is video */ - IMPORT_C static TBool IsVideoL( const TDesC& aFullFileName ); + IMPORT_C static TBool IsVideo( const TDesC& aFullFileName ); /** * Utility function to decide if the file is video. diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/inc/mmmtpvideodbdefs.h --- a/mmappcomponents/mmmtpdataprovider/inc/mmmtpvideodbdefs.h Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/inc/mmmtpvideodbdefs.h Fri Mar 12 15:44:36 2010 +0200 @@ -59,7 +59,7 @@ _LIT( KMtpVideoDeleted, "Deleted" ); // field type -_LIT( KMtpVideoLocationType, " CHAR (255) NOT NULL" ); +_LIT( KMtpVideoLocationType, " LONG VARCHAR NOT NULL" ); _LIT( KMtpVideoNameType, " LONG VARCHAR" ); _LIT( KMtpVideoArtistType, " LONG VARCHAR" ); _LIT( KMtpVideoTrackType, " UNSIGNED SMALLINT" ); diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/inc/tobjectdescription.h --- a/mmappcomponents/mmmtpdataprovider/inc/tobjectdescription.h Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/inc/tobjectdescription.h Fri Mar 12 15:44:36 2010 +0200 @@ -23,6 +23,11 @@ // vendor extended property code const TUint16 EMTPExtObjectPropCodeOmaDrmStatus = 0xDB01; +const TUint32 KMTPMaxDescriptionLen = 0x00000100; // 256 +const TInt KMtpMaxStringLength = 255; +const TInt KMtpMaxDateTimeStringLength = 15; +_LIT( KMtpDateTimeFormat, "%F%Y%M%DT%H%T%S" ); + struct TObjectDescription { diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovider.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovider.cpp Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovider.cpp Fri Mar 12 15:44:36 2010 +0200 @@ -248,7 +248,7 @@ if ( ( sessionId == aSession.iMTPId ) && ( processor->Connection().ConnectionId() - == aSession.iConnection.ConnectionId() ) ) + == aSession.iConnection.ConnectionId() ) ) { processor->UsbDisconnect(); // Rollback diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataproviderenumerator.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataproviderenumerator.cpp Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataproviderenumerator.cpp Fri Mar 12 15:44:36 2010 +0200 @@ -314,7 +314,7 @@ // Increase the index first in case of leave iCurrentIndex++; - + HBufC* abstractMedia = iDataProvider.GetWrapperL().GetAbstractMediaNameL( media, EMPXPlaylist ); CleanupStack::PushL( abstractMedia ); // + abstractMedia AddEntryL( *abstractMedia ); @@ -427,13 +427,13 @@ for ( TInt i = 0; i < count; i++ ) { TInt index = i - removeCount; - PRINT2( _L( "MM MTP <> CAbstractMediaMtpDataProviderEnumerator::AddReferencesL ref[%d]'s name = %S" ), index, &( aReferences[index] ) ); + TPtrC temp( aReferences[index] ); + PRINT2( _L( "MM MTP <> CAbstractMediaMtpDataProviderEnumerator::AddReferencesL ref[%d]'s name = %S" ), index, &temp ); PERFLOGSTART( KObjectManagerHandle ); - TUint32 handle = iFramework.ObjectMgr().HandleL( aReferences[index] ); + TUint32 handle = iFramework.ObjectMgr().HandleL( temp ); PERFLOGSTOP( KObjectManagerHandle ); if ( handle == KMTPHandleNone ) // object doesn't exist { - TPtrC temp( aReferences[index] ); PRINT1( _L( "MM MTP <> CAbstractMediaMtpDataProviderEnumerator::AddReferencesL, [%S] doesn't existed in handle db, remove this from reference array" ), &temp ); // if handle is invalid, remove from reference array diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/inc/cmediamtpdataprovider.h --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/inc/cmediamtpdataprovider.h Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/inc/cmediamtpdataprovider.h Fri Mar 12 15:44:36 2010 +0200 @@ -189,8 +189,6 @@ RArray iSupportedPropVideo; RArray iSupportedPropAll; - TUint32 iDefaultStorageId; - CPropertySettingUtility* iPropSettingUtility; CDescriptionUtility* iDescriptionUtility; diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/inc/mediamtpdataproviderconst.h --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/inc/mediamtpdataproviderconst.h Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/inc/mediamtpdataproviderconst.h Fri Mar 12 15:44:36 2010 +0200 @@ -25,8 +25,6 @@ _LIT( KMTPTxtColon, ":" ); -/** Granularity of the drive list*/ -const TInt KMtpMaxStringLength = 255; enum TMmMtpNumberOfChannels { diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovider.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovider.cpp Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovider.cpp Fri Mar 12 15:44:36 2010 +0200 @@ -417,6 +417,7 @@ //EMTPFormatCode3GPContainer, aStrings.AppendL(KFormatExtension3GP); + aStrings.AppendL(KFormatExtension3G2); //EMTPFormatCodeAAC, aStrings.AppendL(KFormatExtensionAAC); diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidercopyobject.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidercopyobject.cpp Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidercopyobject.cpp Fri Mar 12 15:44:36 2010 +0200 @@ -217,13 +217,9 @@ break; } - // centralize logic to handle error, doing so, that's on need to trap the - // leave for KErrNotSupported in base class like previous version. - if ( ( err == KErrNotFound ) - || ( ( err == KErrNotSupported ) - && ( ( aObject.Uint( CMTPObjectMetaData::EFormatCode ) == EMTPFormatCodeASF ) - || ( aObject.Uint( CMTPObjectMetaData::EFormatCode ) == EMTPFormatCodeMP4Container ) - || ( aObject.Uint( CMTPObjectMetaData::EFormatCode ) == EMTPFormatCode3GPContainer ) ) ) ) + // Ignore all errors came from mpx db. + // It's enough that only file copied successfully no matter metadata got whatever failure. + if ( err != KErrNone ) { iPropertyElement = NULL; } diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataproviderdescriptionutility.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataproviderdescriptionutility.cpp Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataproviderdescriptionutility.cpp Fri Mar 12 15:44:36 2010 +0200 @@ -21,10 +21,10 @@ #include "cmediamtpdataproviderdescriptionutility.h" #include "mediamtpdataproviderconst.h" +#include "tobjectdescription.h" #include "mmmtpdpconfig.h" #include "mmmtpdplogger.h" -const TUint32 KMTPDescriptionLen = 0x00000200; // ----------------------------------------------------------------------------- // CMediaMtpDataProviderDescriptionUtility::NewL @@ -474,7 +474,7 @@ { PRINT( _L( "MM MTP => CMediaMtpDataProviderDescriptionUtility::NewDescriptionPropDescL" ) ); - TMTPTypeUint32 uint32Data( KMTPDescriptionLen ); + TMTPTypeUint32 uint32Data( KMTPMaxDescriptionLen ); CMTPTypeObjectPropDesc* propertyDesc = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeDescription, CMTPTypeObjectPropDesc::ELongStringForm, &uint32Data ); diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataproviderenumerator.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataproviderenumerator.cpp Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataproviderenumerator.cpp Fri Mar 12 15:44:36 2010 +0200 @@ -219,7 +219,11 @@ const CMTPStorageMetaData& storage( iFramework.StorageMgr().StorageL( iStorages[0] ) ); TFileName root( storage.DesC( CMTPStorageMetaData::EStorageSuid ) ); GetModifiedContentL( root ); - iDataProvider.GetWrapperL().UpdateMusicCollectionL(); + TRAPD( err, iDataProvider.GetWrapperL().UpdateMusicCollectionL() ); + if ( err != KErrNone ) + { + PRINT1( _L("MM MTP <> ScanNextStorageL, UpdateMusicCollectionL err =%d "), err ); + } iStorages.Remove( 0 ); ScanStorageL( iStorages[0] ); @@ -419,7 +423,8 @@ // TInt CMediaMtpDataProviderEnumerator::RunError( TInt aError ) { - PRINT1( _L( "MM MTP <> CMediaMtpDataProviderEnumerator::RunError with error %d" ), aError ); + if ( aError != KErrNone ) + PRINT1( _L( "MM MTP <> CMediaMtpDataProviderEnumerator::RunError with error %d" ), aError ); TRAP_IGNORE( SignalCompleteL( iDataProvider ) ); @@ -468,34 +473,39 @@ { PRINT( _L( "MM MTP => CMediaMtpDataProviderEnumerator::ProcessEntriesL" ) ); - TBuf path = iPath.DriveAndPath(); + TFileName path = iPath.DriveAndPath(); while ( !IsOverThreshold() && iFirstUnprocessed < iEntries.Count() ) { const TEntry& entry = iEntries[iFirstUnprocessed]; - path.Append( entry.iName ); - PRINT1( _L( "MM MTP <> path = %S" ), &path ); TInt len = entry.iName.Length(); - if ( entry.IsDir() ) + // Skip object with too long name + if ( KMaxFileName >= path.Length() + len ) { - path.Append( '\\' ); - ++len; + path.Append( entry.iName ); + PRINT1( _L( "MM MTP <> path = %S" ), &path ); + + if ( entry.IsDir() ) + { + path.Append( '\\' ); + ++len; - // we don't need to process folder, just remember - // the folder - TEntry* dirEntry = new TEntry( entry ); - User::LeaveIfNull( dirEntry ); - iDirStack.AppendL( dirEntry ); + // we don't need to process folder, just remember + // the folder + TEntry* dirEntry = new TEntry( entry ); + User::LeaveIfNull( dirEntry ); + iDirStack.AppendL( dirEntry ); + } + else if ( IsFileAccepted( path ) ) + { + AddEntryL( path ); + } + + // Remove filename part + path.SetLength( path.Length() - len ); } - else if ( IsFileAccepted( path ) ) - { - AddEntryL( path ); - } - - // Remove filename part - path.SetLength( path.Length() - len ); iFirstUnprocessed++; } @@ -619,7 +629,9 @@ CDesCArray* modifiedContents = new ( ELeave ) CDesCArrayFlat( KMTPDriveGranularity ); CleanupStack::PushL( modifiedContents ); // + modifiedContents - iDataProvider.GetWrapperL().GetModifiedContentL( aStorageRoot, arrayCount, *modifiedContents ); + TRAPD( err, iDataProvider.GetWrapperL().GetModifiedContentL( aStorageRoot, arrayCount, *modifiedContents ) ); + if ( err != KErrNone ) + PRINT1( _L("MM MTP <> GetModifiedContentL err =%d "), err ); if ( arrayCount > 0 ) { diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidergetobjectproplist.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidergetobjectproplist.cpp Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidergetobjectproplist.cpp Fri Mar 12 15:44:36 2010 +0200 @@ -97,7 +97,6 @@ switch ( aPropCode ) { - //case EMTPObjectPropCodeName: case EMTPObjectPropCodeArtist: case EMTPObjectPropCodeGenre: case EMTPObjectPropCodeComposer: @@ -114,11 +113,8 @@ PRINT1( _L( "MM MTP <> CMediaMtpDataProviderGetObjectPropList::ServiceSpecificObjectPropertyL err = %d" ), err ); - if ( err == KErrNone ) - { - iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode)); - iPropertyElement->SetStringL( CMTPTypeObjectPropListElement::EValue, textData->StringChars()); - } + iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode)); + iPropertyElement->SetStringL( CMTPTypeObjectPropListElement::EValue, textData->StringChars()); CleanupStack::PopAndDestroy( textData ); // - textData } @@ -134,12 +130,9 @@ PRINT1( _L( "MM MTP <> CMediaMtpDataProviderGetObjectPropList::ServiceSpecificObjectPropertyL err = %d" ), err ); - if ( err == KErrNone ) - { - iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode)); - iPropertyElement->SetArrayL( CMTPTypeObjectPropListElement::EValue, *desData); - } - + iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode)); + iPropertyElement->SetArrayL( CMTPTypeObjectPropListElement::EValue, *desData); + CleanupStack::PopAndDestroy( desData ); // - desData } break; @@ -155,11 +148,8 @@ *iObject ) ); PRINT1( _L( "MM MTP <> CMediaMtpDataProviderGetObjectPropList::ServiceSpecificObjectPropertyL err = %d" ), err ); - if ( err == KErrNone ) - { - iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode)); - iPropertyElement->SetUint16L( CMTPTypeObjectPropListElement::EValue, uint16.Value()); - } + iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode)); + iPropertyElement->SetUint16L( CMTPTypeObjectPropListElement::EValue, uint16.Value()); } break; @@ -181,11 +171,8 @@ *iObject ) ); PRINT1( _L( "MM MTP <> CMediaMtpDataProviderGetObjectPropList::ServiceSpecificObjectPropertyL err = %d" ), err ); - if ( err == KErrNone ) - { - iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode)); - iPropertyElement->SetUint32L( CMTPTypeObjectPropListElement::EValue, uint32.Value()); - } + iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode)); + iPropertyElement->SetUint32L( CMTPTypeObjectPropListElement::EValue, uint32.Value()); } break; @@ -193,10 +180,10 @@ { TInt drmStatus = MmMtpDpUtility::GetDrmStatus( iObject->DesC( CMTPObjectMetaData::ESuid ) ); TMTPTypeUint8 result; - result.Set( 0 ); + result.Set( EMTPDrmStatusNotProtected ); if ( drmStatus == EMTPDrmStatusProtected ) - result.Set( 1 ); + result.Set( EMTPDrmStatusProtected ); iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode)); iPropertyElement->SetUint16L( CMTPTypeObjectPropListElement::EDatatype, EMTPTypeUINT8); diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidergetobjectpropvalue.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidergetobjectpropvalue.cpp Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidergetobjectpropvalue.cpp Fri Mar 12 15:44:36 2010 +0200 @@ -80,7 +80,7 @@ // Do nothing } -void CMediaMtpDataProviderGetObjectPropValue::ServiceSpecificObjectPropertyL(TUint16 aPropCode) +void CMediaMtpDataProviderGetObjectPropValue::ServiceSpecificObjectPropertyL( TUint16 aPropCode ) { PRINT( _L( "MM MTP => CMediaMtpDataProviderGetObjectPropValue::ServiceSpecificObjectPropertyL" ) ); switch ( aPropCode ) @@ -151,7 +151,7 @@ TInt drmStatus = MmMtpDpUtility::GetDrmStatus( iObjectInfo->DesC( CMTPObjectMetaData::ESuid ) ); iMTPTypeUint8.Set( 0 ); - if (drmStatus == EMTPDrmStatusProtected) + if ( drmStatus == EMTPDrmStatusProtected ) iMTPTypeUint8.Set( 1 ); SendDataL( iMTPTypeUint8 ); diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidermoveobject.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidermoveobject.cpp Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidermoveobject.cpp Fri Mar 12 15:44:36 2010 +0200 @@ -125,14 +125,10 @@ iPropertyElement = &( iPropertyList->ReservePropElemL( aHandle, aPropCode ) ); iPropertyElement->SetStringL( CMTPTypeObjectPropListElement::EValue, textData->StringChars() ); } - else if ( err == KErrNotFound ) + else { iPropertyElement = NULL; } - else - { - User::Leave( err ); - } CleanupStack::PopAndDestroy( textData ); // - textData } @@ -150,18 +146,13 @@ if ( err == KErrNone ) { - iPropertyElement = &( iPropertyList->ReservePropElemL( aHandle, aPropCode ) ); iPropertyElement->SetArrayL( CMTPTypeObjectPropListElement::EValue, *desData ); } - else if ( err == KErrNotFound ) + else { iPropertyElement = NULL; } - else - { - User::Leave( err ); - } CleanupStack::PopAndDestroy( desData ); // - desData } @@ -183,14 +174,10 @@ iPropertyElement = &( iPropertyList->ReservePropElemL( aHandle, aPropCode ) ); iPropertyElement->SetUint16L( CMTPTypeObjectPropListElement::EValue, uint16.Value() ); } - else if ( err == KErrNotFound ) + else { iPropertyElement = NULL; } - else - { - User::Leave( err ); - } } break; @@ -217,14 +204,10 @@ iPropertyElement = &( iPropertyList->ReservePropElemL( aHandle, aPropCode ) ); iPropertyElement->SetUint32L( CMTPTypeObjectPropListElement::EValue, uint32.Value() ); } - else if ( err == KErrNotFound ) + else { iPropertyElement = NULL; } - else - { - User::Leave( err ); - } } break; diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataproviderpropertysettingutility.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataproviderpropertysettingutility.cpp Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataproviderpropertysettingutility.cpp Fri Mar 12 15:44:36 2010 +0200 @@ -85,7 +85,7 @@ CMTPTypeString* stringData = CMTPTypeString::NewLC( aElement.StringL( CMTPTypeObjectPropListElement::EValue ) );// + stringData - responseCode = SetMetaDataToWrapperL( aDpConfig, + responseCode = SetMetaDataToWrapper( aDpConfig, aPropCode, *stringData, aObject ); @@ -107,7 +107,7 @@ { CMTPTypeArray* desData = CMTPTypeArray::NewLC( EMTPTypeAUINT16 ); // + desData desData->SetByDesL( aElement.ArrayL( CMTPTypeObjectPropListElement::EValue ) ); - responseCode = SetMetaDataToWrapperL( aDpConfig, + responseCode = SetMetaDataToWrapper( aDpConfig, aPropCode, *desData, aObject ); @@ -127,7 +127,7 @@ case EMTPObjectPropCodeKeyFrameDistance: { TMTPTypeUint32 uint32( aElement.Uint32L( CMTPTypeObjectPropListElement::EValue ) ); - responseCode = SetMetaDataToWrapperL( aDpConfig, + responseCode = SetMetaDataToWrapper( aDpConfig, aPropCode, uint32, aObject ); @@ -140,7 +140,7 @@ case EMTPObjectPropCodeDRMStatus: { TMTPTypeUint16 uint16( aElement.Uint16L( CMTPTypeObjectPropListElement::EValue ) ); - responseCode = SetMetaDataToWrapperL( aDpConfig, + responseCode = SetMetaDataToWrapper( aDpConfig, aPropCode, uint16, aObject ); diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/bwins/mmmtpdprequestprocessoru.def --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/bwins/mmmtpdprequestprocessoru.def Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/bwins/mmmtpdprequestprocessoru.def Fri Mar 12 15:44:36 2010 +0200 @@ -15,87 +15,87 @@ ??0CGetObjectPropValue@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 14 NONAME ; CGetObjectPropValue::CGetObjectPropValue(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) ?CheckRequestL@CSetObjectPropList@@MAE?AW4TMTPResponseCode@@XZ @ 15 NONAME ; enum TMTPResponseCode CSetObjectPropList::CheckRequestL(void) ?RunL@CRequestProcessor@@MAEXXZ @ 16 NONAME ; void CRequestProcessor::RunL(void) - ?SetMetaDataToWrapperL@CPropertySettingUtility@@QAE?AW4TMTPResponseCode@@AAVMMmMtpDpConfig@@GAAVMMTPType@@ABVCMTPObjectMetaData@@@Z @ 17 NONAME ; enum TMTPResponseCode CPropertySettingUtility::SetMetaDataToWrapperL(class MMmMtpDpConfig &, unsigned short, class MMTPType &, class CMTPObjectMetaData const &) - ?ServiceL@CDeleteObject@@MAEXXZ @ 18 NONAME ; void CDeleteObject::ServiceL(void) - ?DoCancel@CSetObjectPropList@@MAEXXZ @ 19 NONAME ; void CSetObjectPropList::DoCancel(void) - ?CleanupDatabaseL@CMmMtpDpMetadataAccessWrapper@@QAEXXZ @ 20 NONAME ; void CMmMtpDpMetadataAccessWrapper::CleanupDatabaseL(void) - ?ServiceL@CGetObjectPropsSupported@@MAEXXZ @ 21 NONAME ; void CGetObjectPropsSupported::ServiceL(void) - ?NewL@CSetObjectReferences@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 22 NONAME ; class MMmRequestProcessor * CSetObjectReferences::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) - ?Release@CMmMtpDpAccessSingleton@@SAXXZ @ 23 NONAME ; void CMmMtpDpAccessSingleton::Release(void) - ?UsbDisconnect@CSendObject@@MAEXXZ @ 24 NONAME ; void CSendObject::UsbDisconnect(void) - ?DoSetObjectReferencesL@CSetObjectReferences@@MAEXAAVCMmMtpDpMetadataAccessWrapper@@GABVTDesC16@@AAVCDesC16Array@@@Z @ 25 NONAME ; void CSetObjectReferences::DoSetObjectReferencesL(class CMmMtpDpMetadataAccessWrapper &, unsigned short, class TDesC16 const &, class CDesC16Array &) - ?ServiceL@CGetFormatCapabilities@@MAEXXZ @ 26 NONAME ; void CGetFormatCapabilities::ServiceL(void) - ?GetAllReferenceL@CMmMtpDpMetadataAccessWrapper@@QAEXPAVCMPXMedia@@AAVCDesC16Array@@@Z @ 27 NONAME ; void CMmMtpDpMetadataAccessWrapper::GetAllReferenceL(class CMPXMedia *, class CDesC16Array &) - ??1CSetObjectPropList@@UAE@XZ @ 28 NONAME ; CSetObjectPropList::~CSetObjectPropList(void) - ?ServiceL@CSetObjectPropList@@MAEXXZ @ 29 NONAME ; void CSetObjectPropList::ServiceL(void) - ??0CMoveObject@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 30 NONAME ; CMoveObject::CMoveObject(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) - ??0CRequestUnknown@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@@Z @ 31 NONAME ; CRequestUnknown::CRequestUnknown(class MMTPDataProviderFramework &, class MMTPConnection &) - ?ConstructL@CGetObjectPropList@@IAEXXZ @ 32 NONAME ; void CGetObjectPropList::ConstructL(void) - ??1CSendObject@@UAE@XZ @ 33 NONAME ; CSendObject::~CSendObject(void) - ?ServiceMetaDataFromWrapperL@CGetObjectPropValue@@IAEXGAAVMMTPType@@ABVCMTPObjectMetaData@@@Z @ 34 NONAME ; void CGetObjectPropValue::ServiceMetaDataFromWrapperL(unsigned short, class MMTPType &, class CMTPObjectMetaData const &) - ?NewL@CGetObject@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 35 NONAME ; class MMmRequestProcessor * CGetObject::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) - ??1CGetObjectPropValue@@UAE@XZ @ 36 NONAME ; CGetObjectPropValue::~CGetObjectPropValue(void) - ??1CGetFormatCapabilities@@UAE@XZ @ 37 NONAME ; CGetFormatCapabilities::~CGetFormatCapabilities(void) - ?ServiceL@CSetObjectReferences@@EAEXXZ @ 38 NONAME ; void CSetObjectReferences::ServiceL(void) - ?DoHandleDataIToRPhaseL@CRequestProcessor@@MAEHXZ @ 39 NONAME ; int CRequestProcessor::DoHandleDataIToRPhaseL(void) - ??0CGetObjectPropList@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 40 NONAME ; CGetObjectPropList::CGetObjectPropList(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) - ?ConstructL@CCopyObject@@IAEXXZ @ 41 NONAME ; void CCopyObject::ConstructL(void) + ?ServiceL@CDeleteObject@@MAEXXZ @ 17 NONAME ; void CDeleteObject::ServiceL(void) + ?DoCancel@CSetObjectPropList@@MAEXXZ @ 18 NONAME ; void CSetObjectPropList::DoCancel(void) + ?CleanupDatabaseL@CMmMtpDpMetadataAccessWrapper@@QAEXXZ @ 19 NONAME ; void CMmMtpDpMetadataAccessWrapper::CleanupDatabaseL(void) + ?ServiceL@CGetObjectPropsSupported@@MAEXXZ @ 20 NONAME ; void CGetObjectPropsSupported::ServiceL(void) + ?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) + ??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) + ??0CGetObjectPropList@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 39 NONAME ; CGetObjectPropList::CGetObjectPropList(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) + ?ConstructL@CCopyObject@@IAEXXZ @ 40 NONAME ; void CCopyObject::ConstructL(void) + ?SetMetaDataToWrapper@CPropertySettingUtility@@QAE?AW4TMTPResponseCode@@AAVMMmMtpDpConfig@@GAAVMMTPType@@ABVCMTPObjectMetaData@@@Z @ 41 NONAME ; enum TMTPResponseCode CPropertySettingUtility::SetMetaDataToWrapper(class MMmMtpDpConfig &, unsigned short, class MMTPType &, class CMTPObjectMetaData const &) ?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 - ?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 - ?CreateL@CMmMtpDpAccessSingleton@@SAXAAVRFs@@AAVMMTPDataProviderFramework@@@Z @ 52 NONAME ; void CMmMtpDpAccessSingleton::CreateL(class RFs &, class MMTPDataProviderFramework &) - ?DoCancel@CRequestProcessor@@MAEXXZ @ 53 NONAME ; void CRequestProcessor::DoCancel(void) - ?CheckRequestL@CGetPartialObject@@MAE?AW4TMTPResponseCode@@XZ @ 54 NONAME ; enum TMTPResponseCode CGetPartialObject::CheckRequestL(void) - ?NewL@CRequestUnknown@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@@Z @ 55 NONAME ; class MMmRequestProcessor * CRequestUnknown::NewL(class MMTPDataProviderFramework &, class MMTPConnection &) - ??0CGetFormatCapabilities@@AAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 56 NONAME ; CGetFormatCapabilities::CGetFormatCapabilities(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) - ?ConstructL@CGetObjectInfo@@AAEXXZ @ 57 NONAME ; void CGetObjectInfo::ConstructL(void) - ?UsbDisconnect@CRequestProcessor@@MAEXXZ @ 58 NONAME ; void CRequestProcessor::UsbDisconnect(void) - ?UpdateMusicCollectionL@CMmMtpDpMetadataAccessWrapper@@QAEXXZ @ 59 NONAME ; void CMmMtpDpMetadataAccessWrapper::UpdateMusicCollectionL(void) - ??1CMoveObject@@UAE@XZ @ 60 NONAME ; CMoveObject::~CMoveObject(void) - ?CheckRequestL@CSendObject@@MAE?AW4TMTPResponseCode@@XZ @ 61 NONAME ; enum TMTPResponseCode CSendObject::CheckRequestL(void) - ??1CRequestProcessor@@MAE@XZ @ 62 NONAME ; CRequestProcessor::~CRequestProcessor(void) - ?SetAbstractMediaL@CMmMtpDpMetadataAccessWrapper@@QAEXABVTDesC16@@AAVCDesC16Array@@W4TMPXGeneralCategory@@@Z @ 63 NONAME ; void CMmMtpDpMetadataAccessWrapper::SetAbstractMediaL(class TDesC16 const &, class CDesC16Array &, enum TMPXGeneralCategory) - ?DoCancel@CDeleteObject@@MAEXXZ @ 64 NONAME ; void CDeleteObject::DoCancel(void) - ??1CGetObject@@UAE@XZ @ 65 NONAME ; CGetObject::~CGetObject(void) - ?NewL@CGetInterdependentPropDesc@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 66 NONAME ; class MMmRequestProcessor * CGetInterdependentPropDesc::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) - ?DoHandleResponsePhaseL@CSetObjectReferences@@EAEHXZ @ 67 NONAME ; int CSetObjectReferences::DoHandleResponsePhaseL(void) - ?GetAccessWrapperL@CMmMtpDpAccessSingleton@@SAAAVCMmMtpDpMetadataAccessWrapper@@XZ @ 68 NONAME ; class CMmMtpDpMetadataAccessWrapper & CMmMtpDpAccessSingleton::GetAccessWrapperL(void) - ??1CGetObjectPropsSupported@@UAE@XZ @ 69 NONAME ; CGetObjectPropsSupported::~CGetObjectPropsSupported(void) - ?CheckRequestL@CGetObjectPropList@@MAE?AW4TMTPResponseCode@@XZ @ 70 NONAME ; enum TMTPResponseCode CGetObjectPropList::CheckRequestL(void) - ?HasDataphase@CRequestProcessor@@MBEHXZ @ 71 NONAME ; int CRequestProcessor::HasDataphase(void) const - ?NewL@CGetObjectPropsSupported@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 72 NONAME ; class MMmRequestProcessor * CGetObjectPropsSupported::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) - ?Connection@CRequestProcessor@@MBEAAVMMTPConnection@@XZ @ 73 NONAME ; class MMTPConnection & CRequestProcessor::Connection(void) const - ?ConstructL@CGetFormatCapabilities@@AAEXXZ @ 74 NONAME ; void CGetFormatCapabilities::ConstructL(void) - ??1CPropertySettingUtility@@UAE@XZ @ 75 NONAME ; CPropertySettingUtility::~CPropertySettingUtility(void) - ??1CGetPartialObject@@UAE@XZ @ 76 NONAME ; CGetPartialObject::~CGetPartialObject(void) - ?NewL@CGetObjectInfo@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 77 NONAME ; class MMmRequestProcessor * CGetObjectInfo::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) - ?RunError@CSetObjectPropList@@MAEHH@Z @ 78 NONAME ; int CSetObjectPropList::RunError(int) - ?CheckRequestL@CGetInterdependentPropDesc@@MAE?AW4TMTPResponseCode@@XZ @ 79 NONAME ; enum TMTPResponseCode CGetInterdependentPropDesc::CheckRequestL(void) - ?Match@CRequestUnknown@@MBEHABVTMTPTypeRequest@@AAVMMTPConnection@@@Z @ 80 NONAME ; int CRequestUnknown::Match(class TMTPTypeRequest const &, class MMTPConnection &) const - ?ServiceL@CMoveObject@@MAEXXZ @ 81 NONAME ; void CMoveObject::ServiceL(void) - ?CreateDummyFile@CMmMtpDpMetadataAccessWrapper@@QAEXABVTDesC16@@@Z @ 82 NONAME ; void CMmMtpDpMetadataAccessWrapper::CreateDummyFile(class TDesC16 const &) - ?CheckRequestL@CGetObjectPropDesc@@MAE?AW4TMTPResponseCode@@XZ @ 83 NONAME ; enum TMTPResponseCode CGetObjectPropDesc::CheckRequestL(void) - ?DoHandleRToIPhaseL@CRequestProcessor@@MAEHXZ @ 84 NONAME ; int CRequestProcessor::DoHandleRToIPhaseL(void) - ?ServiceMetaDataToWrapperL@CSetObjectPropValue@@IAE?AW4TMTPResponseCode@@GAAVMMTPType@@ABVCMTPObjectMetaData@@@Z @ 85 NONAME ; enum TMTPResponseCode CSetObjectPropValue::ServiceMetaDataToWrapperL(unsigned short, class MMTPType &, class CMTPObjectMetaData const &) - ?NewCommonObjectPropertyL@CDescriptionUtility@@QAEPAVCMTPTypeObjectPropDesc@@G@Z @ 86 NONAME ; class CMTPTypeObjectPropDesc * CDescriptionUtility::NewCommonObjectPropertyL(unsigned short) - ?FormatFromFilename@MmMtpDpUtility@@SA?AW4TMTPFormatCode@@ABVTDesC16@@@Z @ 87 NONAME ; enum TMTPFormatCode MmMtpDpUtility::FormatFromFilename(class TDesC16 const &) - ?CheckRequestL@CSetObjectPropValue@@MAE?AW4TMTPResponseCode@@XZ @ 88 NONAME ; enum TMTPResponseCode CSetObjectPropValue::CheckRequestL(void) - ??0CPropertySettingUtility@@IAE@XZ @ 89 NONAME ; CPropertySettingUtility::CPropertySettingUtility(void) - ?Match@CRequestProcessor@@MBEHABVTMTPTypeRequest@@AAVMMTPConnection@@@Z @ 90 NONAME ; int CRequestProcessor::Match(class TMTPTypeRequest const &, class MMTPConnection &) const - ??0CCopyObject@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 91 NONAME ; CCopyObject::CCopyObject(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &) - ?CheckRequestL@CRequestProcessor@@MAE?AW4TMTPResponseCode@@XZ @ 92 NONAME ; enum TMTPResponseCode CRequestProcessor::CheckRequestL(void) - ?SendResponseL@CRequestProcessor@@IAEXW4TMTPResponseCode@@HPAK@Z @ 93 NONAME ; void CRequestProcessor::SendResponseL(enum TMTPResponseCode, int, unsigned long *) - ??0CGetPartialObject@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@@Z @ 94 NONAME ; CGetPartialObject::CGetPartialObject(class MMTPDataProviderFramework &, class MMTPConnection &) - ?DoHandleCompletingPhaseL@CRequestProcessor@@MAEHXZ @ 95 NONAME ; int CRequestProcessor::DoHandleCompletingPhaseL(void) - ?DeleteDummyFile@CMmMtpDpMetadataAccessWrapper@@QAEXABVTDesC16@@@Z @ 96 NONAME ; void CMmMtpDpMetadataAccessWrapper::DeleteDummyFile(class TDesC16 const &) - ?IsVideoL@MmMtpDpUtility@@SAHABVTDesC16@@@Z @ 97 NONAME ; int MmMtpDpUtility::IsVideoL(class TDesC16 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 diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/eabi/mmmtpdprequestprocessoru.def --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/eabi/mmmtpdprequestprocessoru.def Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/eabi/mmmtpdprequestprocessoru.def Fri Mar 12 15:44:36 2010 +0200 @@ -49,7 +49,7 @@ _ZN14CGetObjectInfoD2Ev @ 48 NONAME _ZN14MmMtpDpUtility12GetDrmStatusERK7TDesC16 @ 49 NONAME _ZN14MmMtpDpUtility18FormatFromFilenameERK7TDesC16 @ 50 NONAME - _ZN14MmMtpDpUtility8IsVideoLERK7TDesC16 @ 51 NONAME + _ZN14MmMtpDpUtility7IsVideoERK7TDesC16 @ 51 NONAME _ZN15CRequestUnknown4NewLER25MMTPDataProviderFrameworkR14MMTPConnection @ 52 NONAME _ZN15CRequestUnknown8ServiceLEv @ 53 NONAME _ZN15CRequestUnknownC1ER25MMTPDataProviderFrameworkR14MMTPConnection @ 54 NONAME @@ -164,7 +164,7 @@ _ZN23CMmMtpDpAccessSingleton17GetAccessWrapperLEv @ 163 NONAME _ZN23CMmMtpDpAccessSingleton7CreateLER3RFsR25MMTPDataProviderFramework @ 164 NONAME _ZN23CMmMtpDpAccessSingleton7ReleaseEv @ 165 NONAME - _ZN23CPropertySettingUtility21SetMetaDataToWrapperLER14MMmMtpDpConfigtR8MMTPTypeRK18CMTPObjectMetaData @ 166 NONAME + _ZN23CPropertySettingUtility20SetMetaDataToWrapperER14MMmMtpDpConfigtR8MMTPTypeRK18CMTPObjectMetaData @ 166 NONAME _ZN23CPropertySettingUtilityC2Ev @ 167 NONAME _ZN23CPropertySettingUtilityD0Ev @ 168 NONAME _ZN23CPropertySettingUtilityD1Ev @ 169 NONAME diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetobjectproplist.h --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetobjectproplist.h Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetobjectproplist.h Fri Mar 12 15:44:36 2010 +0200 @@ -161,8 +161,6 @@ void GetPropertiesL( RArray& aPropArray, TUint32 aGroupCode, TUint16 aFormatCode ) const; - void SetSubFormatCodeL(); - protected: CMTPTypeObjectPropListElement* iPropertyElement; // used by media DP directly diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cpropertysettingutility.h --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cpropertysettingutility.h Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cpropertysettingutility.h Fri Mar 12 15:44:36 2010 +0200 @@ -44,7 +44,7 @@ * inserted or updated into database * @return response code */ - IMPORT_C TMTPResponseCode SetMetaDataToWrapperL( MMmMtpDpConfig& aDpConfig, + IMPORT_C TMTPResponseCode SetMetaDataToWrapper( MMmMtpDpConfig& aDpConfig, const TUint16 aPropCode, MMTPType& aNewData, const CMTPObjectMetaData& aObjectMetaData ); diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/csendobject.h --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/csendobject.h Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/csendobject.h Fri Mar 12 15:44:36 2010 +0200 @@ -173,7 +173,7 @@ /* * Handle response phase of SetObjectPropListL operation */ - TMTPResponseCode SetObjectPropListL( const CMTPTypeObjectPropList& aPropList ); + TMTPResponseCode SetObjectPropListL(); /** * @@ -213,7 +213,7 @@ /** * Set protection status of object which could be read/write-only */ - void SetProtectionStatusL(); + void SetProtectionStatus(); /** * Save object information of object whose size is zero diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/ccopyobject.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/ccopyobject.cpp Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/ccopyobject.cpp Fri Mar 12 15:44:36 2010 +0200 @@ -150,22 +150,25 @@ <= newObjectName.MaxLength() ) { newObjectName.Append( fileNameParser.NameAndExt() ); - } - responseCode = CanCopyObjectL( suid, newObjectName ); + responseCode = CanCopyObjectL( suid, newObjectName ); - TUint32 newHandle = KMTPHandleNone; - if ( responseCode == EMTPRespCodeOK ) - { - newHandle = CopyFileL( newObjectName ); - SendResponseL( EMTPRespCodeOK, 1, &newHandle ); + TUint32 newHandle = KMTPHandleNone; + if ( responseCode == EMTPRespCodeOK ) + { + newHandle = CopyFileL( newObjectName ); + SendResponseL( EMTPRespCodeOK, 1, &newHandle ); + PRINT2( _L( "MM MTP <= CCopyObject::CopyObjectL responseCode = 0x%x, aNewHandle = 0x%x" ), + responseCode, + newHandle ); + } + else + SendResponseL( responseCode ); } else - SendResponseL( responseCode ); + // Destination is not appropriate for the full path name shouldn't be longer than 255 + SendResponseL( EMTPRespCodeInvalidDataset ); CleanupStack::PopAndDestroy( &newObjectName ); // - newObjectName - PRINT2( _L( "MM MTP <= CCopyObject::CopyObjectL responseCode = 0x%x, aNewHandle = 0x%x" ), - responseCode, - newHandle ); } // ----------------------------------------------------------------------------- @@ -302,8 +305,12 @@ GetPreviousPropertiesL( *iObjectInfo ); + // 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 ); + // 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 ); CFileMan* fileMan = CFileMan::NewL( iFramework.Fs() ); @@ -388,14 +395,10 @@ iPropertyElement->SetStringL( CMTPTypeObjectPropListElement::EValue, textData->StringChars() ); } - else if ( err == KErrNotFound ) + else { iPropertyElement = NULL; } - else - { - User::Leave( err ); - } CleanupStack::PopAndDestroy( textData ); // - textData } @@ -470,7 +473,7 @@ { CMTPTypeString *stringData = CMTPTypeString::NewLC( element.StringL( CMTPTypeObjectPropListElement::EValue ) ); // + stringData - respcode = iDpConfig.PropSettingUtility()->SetMetaDataToWrapperL( iDpConfig, + respcode = iDpConfig.PropSettingUtility()->SetMetaDataToWrapper( iDpConfig, propertyCode, *stringData, aObject ); @@ -491,6 +494,10 @@ } // end of for loop // ignore errors + if ( respcode == EMTPRespCodeOK ) + { + // do nothing, just to get rid of build warning + } PRINT1( _L( "MM MTP <= CCopyObject::SetPreviousPropertiesL respcode = 0x%x" ), respcode ); } diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cdeleteobject.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cdeleteobject.cpp Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cdeleteobject.cpp Fri Mar 12 15:44:36 2010 +0200 @@ -27,7 +27,8 @@ #include "cmmmtpdpmetadataaccesswrapper.h" #include "mmmtpdputility.h" -// static const TInt KMTPDriveGranularity = 5; +static const TInt KMaxDeletionTimes = 10; +const TInt KDeletionThreshold = 100 * 1000; // (100 millisec) // ----------------------------------------------------------------------------- // Verification data for the DeleteObject request @@ -227,8 +228,7 @@ TFileName fileName( aObjectInfo.DesC( CMTPObjectMetaData::ESuid ) ); PRINT1( _L( "MM MTP <> CDeleteObject::DeleteObjectL fileName = %S" ), &fileName ); - TParsePtrC parse( fileName ); - iDpConfig.GetWrapperL().SetStorageRootL( parse.Drive() ); + iDpConfig.GetWrapperL().SetStorageRootL( fileName ); // To capture special situation: After copy, move, rename playlist folder name, // record in MPX is not inlined with framework db, playlist should not be deleted @@ -252,11 +252,26 @@ PRINT1( _L( "MM MTP <= CDeleteObject::DeleteObjectL, \"%S\" is a read-only file"), &fileName ); return; } - iDeleteError = iFs.Delete( fileName ); - if ( iDeleteError != KErrNone && iDeleteError != KErrNotFound ) + // 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 = KMaxDeletionTimes; + while ( count > 0 ) { - PRINT1( _L( "MM MTP <= CDeleteObject::DeleteObjectL, Delete from file system failed, err = %d" ), iDeleteError ); - return; + iDeleteError = iFs.Delete( fileName ); + if ( iDeleteError == KErrNone || iDeleteError == KErrNotFound ) + { + break; + } + else if ( ( iDeleteError == KErrInUse ) && ( count > 1 ) ) + { + User::After( KDeletionThreshold ); + count--; + } + else + { + PRINT1( _L( "MM MTP <= CDeleteObject::DeleteObjectL, Delete from file system failed, err = %d" ), iDeleteError ); + return; + } } // 2. Delete object from metadata db diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectinfo.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectinfo.cpp Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectinfo.cpp Fri Mar 12 15:44:36 2010 +0200 @@ -26,9 +26,8 @@ #include "tmmmtpdppanic.h" #include "mmmtpdplogger.h" #include "mmmtpdpconfig.h" +#include "tobjectdescription.h" -_LIT( KMtpDateTimeFormat, "%F%Y%M%DT%H%T%S" ); -const TInt KMtpMaxDateTimeStringLength = 15; // ----------------------------------------------------------------------------- // Verification data for GetObjectInfo request diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectproplist.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectproplist.cpp Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectproplist.cpp Fri Mar 12 15:44:36 2010 +0200 @@ -34,12 +34,7 @@ #include "cmmmtpdpmetadataaccesswrapper.h" static const TUint32 KMTPAll = 0xffffffff; -_LIT( KMtpDateTimeFormat, "%F%Y%M%DT%H%T%S" ); -const TInt KMtpMaxDateTimeStringLength = 15; -#if defined(_DEBUG) || defined(MMMTPDP_PERFLOG) -_LIT( KSubFormatParse, "SubFormatParse" ); -#endif // Verification data for the getObjectPropList request const TMTPRequestElementInfo KMTPGetObjectPropListPolicy[] = @@ -178,8 +173,6 @@ if ( iFramework.ObjectMgr().ObjectL( handle, *iObject ) ) // Populate the object meta data { - SetSubFormatCodeL(); - err = ServiceOneObjectPropertyL( handle, iPropCode ); if ( err != KErrNone && err != KErrNotSupported ) break; @@ -268,7 +261,7 @@ TInt i = 0; for ( ; i < count; i++ ) { - if ( groupCode == KSupportedGroupCode[i ] ) + if ( groupCode == KSupportedGroupCode[i] ) break; } if ( i == count ) @@ -363,8 +356,7 @@ { CMTPObjectMetaData* meta( iRequestChecker->GetObjectInfo( iHandle ) ); TPtrC suid( meta->DesC( CMTPObjectMetaData::ESuid ) ); - TParsePtrC parse( suid ); - iDpConfig.GetWrapperL().SetStorageRootL( parse.Drive() ); + iDpConfig.GetWrapperL().SetStorageRootL( suid ); __ASSERT_DEBUG( meta, Panic( EMmMTPDpObjectNull ) ); @@ -389,7 +381,7 @@ // void CGetObjectPropList::GetObjectHandlesL( TUint32 aStorageId, TUint32 aParentHandle, - TUint16 aFormat /*= 0x0000*/) + TUint16 aFormat /*= 0x0000*/ ) { PRINT2( _L( "MM MTP => CGetObjectPropList::GetObjectHandlesL, aStorageId = 0x%x, aParentHandle = 0x%x" ), aStorageId, @@ -691,11 +683,8 @@ PRINT1( _L( "MM MTP <> CGetObjectPropList::ServiceOneObjectPropertyL err = %d" ), err ); - if ( err == KErrNone ) - { - iPropertyElement = &(iPropertyList->ReservePropElemL( aHandle, aPropCode ) ); - iPropertyElement->SetStringL( CMTPTypeObjectPropListElement::EValue, textData->StringChars() ); - } + iPropertyElement = &(iPropertyList->ReservePropElemL( aHandle, aPropCode ) ); + iPropertyElement->SetStringL( CMTPTypeObjectPropListElement::EValue, textData->StringChars() ); CleanupStack::PopAndDestroy( textData ); // - textData break; @@ -773,8 +762,6 @@ if ( iFramework.ObjectMgr().ObjectL( handle, *iObject ) ) // Populate the object meta data { - SetSubFormatCodeL(); - if ( iPropCode == KMTPAll ) err = ServiceAllPropertiesL( handle ); else if ( iPropCode == EMTPObjectPropCodeUndefined ) @@ -815,8 +802,10 @@ // EXPORT_C TInt CGetObjectPropList::RunError( TInt aError ) { - PRINT1( _L( "MM MTP <> CGetObjectPropList::RunError aError = %d" ), aError ); - TRAP_IGNORE( SendResponseL( EMTPRespCodeGeneralError ) ); + if ( aError != KErrNone ) + PRINT1( _L( "MM MTP <> CGetObjectPropList::RunError aError = %d" ), aError ); + + TRAP_IGNORE( SendResponseL( EMTPRespCodeGeneralError ) ); return KErrNone; } @@ -847,7 +836,7 @@ { for ( TInt j = 0; j < count; j++ ) { - if( KPropGroupMapTable[j].iPropCode == (*properties)[i] + if( KPropGroupMapTable[j].iPropCode == ( *properties )[i] && KPropGroupMapTable[j].iGroupCode == aGroupCode ) { aPropArray.Append( (*properties)[i] ); @@ -857,35 +846,4 @@ } } -void CGetObjectPropList::SetSubFormatCodeL() - { - __ASSERT_DEBUG( iObject, Panic( EMmMTPDpObjectNull ) ); - - // Note: Parsing out subformat code in external enumeration phase. - // This process was delayed in internal phase to avoid time-out. - TUint16 formatCode = iObject->Uint( CMTPObjectMetaData::EFormatCode ); - TUint subFormatCode = iObject->Uint( CMTPObjectMetaData::EFormatSubCode ); - PRINT2( _L( "MM MTP <> CGetObjectPropList::SetSubFormatCode, formatCode = 0x%x, subFormatCode = 0x%x" ), - formatCode, - subFormatCode ); - - TBool ifNeedParse = ( ( formatCode == EMTPFormatCodeMP4Container ) - || ( formatCode == EMTPFormatCode3GPContainer ) - || ( formatCode== EMTPFormatCodeASF ) ) - && ( subFormatCode == EMTPSubFormatCodeUnknown ); - if ( ifNeedParse ) - { - PERFLOGSTART( KSubFormatParse ); - - if ( MmMtpDpUtility::IsVideoL( iObject->DesC( CMTPObjectMetaData::ESuid ) ) ) - subFormatCode = EMTPSubFormatCodeVideo; - else - subFormatCode = EMTPSubFormatCodeAudio; - - PERFLOGSTOP( KSubFormatParse ); - - iObject->SetUint( CMTPObjectMetaData::EFormatSubCode, subFormatCode ); - } - } - // end of file diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectpropvalue.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectpropvalue.cpp Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectpropvalue.cpp Fri Mar 12 15:44:36 2010 +0200 @@ -28,9 +28,8 @@ #include "cmmmtpdpmetadataaccesswrapper.h" #include "mmmtpdplogger.h" #include "mmmtpdpconfig.h" +#include "tobjectdescription.h" -_LIT( KMtpDateTimeFormat, "%F%Y%M%DT%H%T%S" ); -const TInt KMtpMaxDateTimeStringLength = 15; // ----------------------------------------------------------------------------- // Verification data for the GetObjectPropValue request @@ -138,7 +137,7 @@ TUint32 objectHandle = Request().Uint32( TMTPTypeRequest::ERequestParameter1 ); TUint32 propCode = Request().Uint32( TMTPTypeRequest::ERequestParameter2 ); PRINT2( _L( "MM MTP <> CGetObjectPropValue::ServiceL objectHandle = 0x%x, propCode = 0x%x" ), - objectHandle, propCode ); + objectHandle, propCode ); // don't have the ownship of the object iObjectInfo = iRequestChecker->GetObjectInfo( objectHandle ); @@ -146,8 +145,6 @@ PRINT1( _L( "MM MTP <> CGetObjectPropValue::ServiceL object file name is %S" ), &suid ); TParsePtrC parse( suid ); - iDpConfig.GetWrapperL().SetStorageRootL( parse.Drive() ); - if ( iMTPTypeString != NULL ) { delete iMTPTypeString; @@ -182,7 +179,7 @@ { iMTPTypeUint16.Set( 0 ); iMTPTypeUint16 = MmMtpDpUtility::GetProtectionStatusL( iFramework.Fs(), - iObjectInfo->DesC( CMTPObjectMetaData::ESuid ) ); + iObjectInfo->DesC( CMTPObjectMetaData::ESuid ) ); SendDataL( iMTPTypeUint16 ); } break; @@ -232,9 +229,9 @@ case EMTPObjectPropCodeName: // 0xDC44 case EMTPObjectPropCodeDateAdded: // 0xDC4E { - if ( ( propCode == EMTPObjectPropCodeName) + if ( ( propCode == EMTPObjectPropCodeName ) || ( ( !MmMtpDpUtility::IsVideoL(iObjectInfo->DesC( CMTPObjectMetaData::ESuid ), iFramework ) ) - && ( propCode == EMTPObjectPropCodeDateAdded ) ) ) + && ( propCode == EMTPObjectPropCodeDateAdded ) ) ) { iMTPTypeString = CMTPTypeString::NewL(); ServiceMetaDataFromWrapperL( propCode, *iMTPTypeString, *iObjectInfo ); diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetpartialobject.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetpartialobject.cpp Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetpartialobject.cpp Fri Mar 12 15:44:36 2010 +0200 @@ -153,7 +153,8 @@ // Get file information CMTPObjectMetaData* objectInfo = iRequestChecker->GetObjectInfo( iObjectHandle ); __ASSERT_DEBUG( objectInfo, Panic( EMmMTPDpObjectNull ) ); - TBuf fileSuid; + + TFileName fileSuid; fileSuid.Append( objectInfo->DesC( CMTPObjectMetaData::ESuid ) ); iFileObject = CMTPTypeFile::NewL( iFramework.Fs(), diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cmoveobject.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cmoveobject.cpp Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cmoveobject.cpp Fri Mar 12 15:44:36 2010 +0200 @@ -149,11 +149,14 @@ <= newObjectName.MaxLength() ) { newObjectName.Append( fileNameParser.NameAndExt() ); - } - responseCode = CanMoveObjectL( suid, newObjectName ); + responseCode = CanMoveObjectL( suid, newObjectName ); - if ( responseCode == EMTPRespCodeOK ) - MoveFileL( newObjectName ); + if ( responseCode == EMTPRespCodeOK ) + MoveFileL( newObjectName ); + } + else + // Destination is not appropriate for the full path name shouldn't be longer than 255 + responseCode = EMTPRespCodeInvalidDataset; SendResponseL( responseCode ); @@ -289,16 +292,17 @@ iSameStorage = ETrue; else iSameStorage = EFalse; + + // Move the file first no matter if it will fail in Get/SetPreviousPropertiesL + // Already trapped inside GetPreviousPropertiesL( *iObjectInfo ); - SetPropertiesL( oldFileName, aNewFileName ); + TRAPD( err, SetPropertiesL( oldFileName, aNewFileName ) ); CFileMan* fileMan = CFileMan::NewL( iFramework.Fs() ); - CleanupStack::PushL( fileMan ); - User::LeaveIfError( fileMan->Move( oldFileName, aNewFileName ) ); - CleanupStack::PopAndDestroy( fileMan ); + err = fileMan->Move( oldFileName, aNewFileName ); - User::LeaveIfError( iFramework.Fs().SetModified( aNewFileName, - iPreviousModifiedTime ) ); + if ( err != KErrNone ) + PRINT1( _L( "MM MTP <> CMoveObject::MoveFileL err = %d" ), err ); PRINT( _L( "MM MTP <= CMoveObject::MoveFileL" ) ); } @@ -313,7 +317,6 @@ PRINT( _L( "MM MTP => CMoveObject::GetPreviousPropertiesL" ) ); const TDesC& suid( aObject.DesC( CMTPObjectMetaData::ESuid ) ); - User::LeaveIfError( iFramework.Fs().Modified( suid, iPreviousModifiedTime ) ); // same storage, not necessary to get the properties if ( iSameStorage ) @@ -375,14 +378,10 @@ iPropertyElement->SetStringL( CMTPTypeObjectPropListElement::EValue, textData->StringChars() ); } - else if ( err == KErrNotFound ) + else { iPropertyElement = NULL; } - else - { - User::Leave( err ); - } CleanupStack::PopAndDestroy( textData ); // - textData } @@ -447,13 +446,14 @@ case EMTPObjectPropCodeNonConsumable: iObjectInfo->SetUint( CMTPObjectMetaData::ENonConsumable, element.Uint8L( CMTPTypeObjectPropListElement::EValue ) ); + iFramework.ObjectMgr().ModifyObjectL( *iObjectInfo ); break; case EMTPObjectPropCodeName: { CMTPTypeString *stringData = CMTPTypeString::NewLC( element.StringL( CMTPTypeObjectPropListElement::EValue ) ); // + stringData - respcode = iDpConfig.PropSettingUtility()->SetMetaDataToWrapperL( iDpConfig, + respcode = iDpConfig.PropSettingUtility()->SetMetaDataToWrapper( iDpConfig, propertyCode, *stringData, *iObjectInfo ); @@ -474,6 +474,10 @@ } // end of for loop // ignore errors + if (respcode == EMTPRespCodeOK) + { + // do nothing, just to get rid of build warning + } PRINT1( _L( "MM MTP <= CMoveObject::SetPreviousPropertiesL respcode = 0x%x" ), respcode ); } @@ -489,10 +493,11 @@ 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 ); TUint32 formatCode = iObjectInfo->Uint( CMTPObjectMetaData::EFormatCode ); if ( formatCode == EMTPFormatCodeAbstractAudioVideoPlaylist ) @@ -501,11 +506,14 @@ PRINT( _L( "MM MTP <> CMoveObject::SetPropertiesL Playlist file do not update the MPX DB" ) ); } else + // TODO: Need rollback mechanism for consistant with image dp in fw. + // Not sure if it should be trap if something wrong with MPX db. { if ( iSameStorage ) + { iDpConfig.GetWrapperL().RenameObjectL( aOldFileName, aNewFileName ); - // if the two object in different storage, we should delete the old one and insert new one - else + } + else // if the two object in different storage, we should delete the old one and insert new one { iDpConfig.GetWrapperL().DeleteObjectL( aOldFileName, formatCode ); @@ -514,12 +522,12 @@ formatCode, subFormatCode ); + // 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(); } } - 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 bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cpropertysettingutility.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cpropertysettingutility.cpp Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cpropertysettingutility.cpp Fri Mar 12 15:44:36 2010 +0200 @@ -40,11 +40,11 @@ } // ----------------------------------------------------------------------------- -// CPropertySettingUtility::SetMetaDataToWrapperL +// CPropertySettingUtility::SetMetaDataToWrapper // // ----------------------------------------------------------------------------- // -EXPORT_C TMTPResponseCode CPropertySettingUtility::SetMetaDataToWrapperL( MMmMtpDpConfig& aDpConfig, +EXPORT_C TMTPResponseCode CPropertySettingUtility::SetMetaDataToWrapper( MMmMtpDpConfig& aDpConfig, const TUint16 aPropCode, MMTPType& aNewData, const CMTPObjectMetaData& aObjectMetaData ) @@ -54,14 +54,14 @@ aNewData, aObjectMetaData ) ); - PRINT1( _L("MM MTP <> CPropertySettingUtility::SetMetaDataToWrapperL err = %d"), err); + PRINT1( _L("MM MTP <> CPropertySettingUtility::SetMetaDataToWrapper err = %d"), err); if ( err == KErrNone ) responseCode = EMTPRespCodeOK; - else // Other errors are not SetMetaDataToWrapperL related, should be respond before this calling + else // Other errors are not SetMetaDataToWrapper related, should be respond before this calling responseCode = EMTPRespCodeGeneralError; - PRINT1( _L( "MM MTP <= CPropertySettingUtility::SetMetaDataToWrapperL resCode = 0x%x" ), responseCode ); + PRINT1( _L( "MM MTP <= CPropertySettingUtility::SetMetaDataToWrapper resCode = 0x%x" ), responseCode ); return responseCode; } diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/crequestchecker.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/crequestchecker.cpp Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/crequestchecker.cpp Fri Mar 12 15:44:36 2010 +0200 @@ -80,7 +80,7 @@ // ----------------------------------------------------------------------------- // CRequestChecker::VerifyRequestL -// Verfiy the request +// Verify the request // ----------------------------------------------------------------------------- // TMTPResponseCode CRequestChecker::VerifyRequestL( const TMTPTypeRequest& aRequest, @@ -286,7 +286,7 @@ // moveObject can be either a file or a directory. // Other cases. - if ( ( EMTPRespCodeOK == ret ) && ( aElementInfo.iElementAttr & EMTPElementAttrFile) ) + if ( ( EMTPRespCodeOK == ret ) && ( aElementInfo.iElementAttr & EMTPElementAttrFile ) ) { if ( entry.IsDir() ) { diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/crequestprocessor.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/crequestprocessor.cpp Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/crequestprocessor.cpp Fri Mar 12 15:44:36 2010 +0200 @@ -414,8 +414,11 @@ // EXPORT_C TInt CRequestProcessor::RunError( TInt aError ) { - PRINT1( _L( "MM MTP <> CRequestProcessor RunError = %d" ), aError ); + if ( aError != KErrNone ) + PRINT1( _L( "MM MTP <> CRequestProcessor RunError = %d" ), aError ); + TRAP_IGNORE( SendResponseL( EMTPRespCodeGeneralError ) ); + return KErrNone; } diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csendobject.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csendobject.cpp Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csendobject.cpp Fri Mar 12 15:44:36 2010 +0200 @@ -109,7 +109,7 @@ CSendObject::CSendObject( MMTPDataProviderFramework& aFramework, MMTPConnection& aConnection, MMmMtpDpConfig& aDpConfig ) : - CRequestProcessor( aFramework, aConnection, 0, NULL), + CRequestProcessor( aFramework, aConnection, 0, NULL ), iFs( iFramework.Fs() ), iObjectMgr( iFramework.ObjectMgr() ), iDpConfig( aDpConfig ) @@ -581,9 +581,6 @@ TBool result = ETrue; - delete iFileReceived; - iFileReceived = NULL; - TEntry fileEntry; User::LeaveIfError( iFs.Entry( iFullPath, fileEntry ) ); if ( fileEntry.FileSize() != iObjectSize ) @@ -611,11 +608,15 @@ { if ( iObjectSize > 0 ) // media file { - AddMediaToStoreL(); + TRAPD( err, AddMediaToStoreL() ); + PRINT1( _L( "MM MTP <= CSendObject::DoHandleResponsePhaseObjectL err = %d" ), err ); - if( iPreviousOperation == EMTPOpCodeSendObjectPropList ) + if ( ( iPreviousOperation == EMTPOpCodeSendObjectPropList ) + && ( err == KErrNone ) ) { - SetObjectPropListL( *iObjectPropList ); + // 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 @@ -888,7 +889,7 @@ // Reserve object proplist into database // ----------------------------------------------------------------------------- // -TMTPResponseCode CSendObject::SetObjectPropListL( const CMTPTypeObjectPropList& aPropList ) +TMTPResponseCode CSendObject::SetObjectPropListL() { PRINT( _L( "MM MTP => CSendObject::SetObjectPropListL" ) ); @@ -903,7 +904,8 @@ TUint16 propertyCode = element.Uint16L( CMTPTypeObjectPropListElement::EPropertyCode ); TUint16 dataType = element.Uint16L( CMTPTypeObjectPropListElement::EDatatype ); PRINT2( _L( "MM MTP <> SetObjectPropListL propertyCode = 0x%x, dataType = 0x%x" ), - propertyCode, dataType ); + propertyCode, + dataType ); switch ( propertyCode ) { @@ -924,7 +926,7 @@ case EMTPObjectPropCodeDateCreated: case EMTPObjectPropCodeDateModified: case EMTPObjectPropCodeObjectFileName: - // TODO: Does anything need to be done on these read-only properties? + // Do nothing for read-only properties /* spec: * Object properties that are get-only (0x00 GET) * should accept values during object creation by @@ -933,14 +935,15 @@ break; case EMTPObjectPropCodeProtectionStatus: - SetProtectionStatusL(); + // Already done in AddMediaToStore, it's not necessary to set it again. + // SetProtectionStatus(); break; case EMTPObjectPropCodeName: { CMTPTypeString* stringData = CMTPTypeString::NewLC( element.StringL( CMTPTypeObjectPropListElement::EValue ) );// + stringData - responseCode = iDpConfig.PropSettingUtility()->SetMetaDataToWrapperL( iDpConfig, + responseCode = iDpConfig.PropSettingUtility()->SetMetaDataToWrapper( iDpConfig, propertyCode, *stringData, *iReceivedObjectInfo ); @@ -1156,15 +1159,22 @@ // Reserves space for and assigns an object handle to the object described // by the specified object information record. TRAP( err, iObjectMgr.ReserveObjectHandleL( *iReceivedObjectInfo, - iObjectSize ) ); + iObjectSize ) ); PRINT2( _L( "MM MTP => CSendObject::ReserveObjectL iObjectsize = %Lu, Operation: 0x%x" ), iObjectSize, iOperationCode ); if ( err != KErrNone ) PRINT1( _L( "MM MTP <> CSendObject::ReserveObjectL err = %d" ), err ); if ( iObjectSize == 0 ) { + // Already trapped inside SaveEmptyFileL. SaveEmptyFileL(); - SetObjectPropListL( *iObjectPropList ); + if( iOperationCode == EMTPOpCodeSendObjectPropList ) + { + // 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(); + } + iObjectMgr.CommitReservedObjectHandleL( *iReceivedObjectInfo ); } @@ -1182,29 +1192,40 @@ } // ----------------------------------------------------------------------------- -// CSendObject::SetProtectionStatusL +// CSendObject::SetProtectionStatus // ----------------------------------------------------------------------------- // -void CSendObject::SetProtectionStatusL() +void CSendObject::SetProtectionStatus() { - PRINT1( _L( "MM MTP => CSendObject::SetProtectionStatusL iProtectionStatus = %d" ), iProtectionStatus ); + PRINT1( _L( "MM MTP => CSendObject::SetProtectionStatus iProtectionStatus = %d" ), iProtectionStatus ); - if ( iProtectionStatus == EMTPProtectionNoProtection - || iProtectionStatus == EMTPProtectionReadOnly ) + if ( iFileReceived != NULL ) { - // TODO: wait for review - TInt err = KErrNone; - if ( iProtectionStatus == EMTPProtectionNoProtection ) + if ( iProtectionStatus == EMTPProtectionNoProtection + || iProtectionStatus == EMTPProtectionReadOnly ) { - err = iFs.SetAtt( iFullPath, KEntryAttNormal, KEntryAttReadOnly ); + TInt err = KErrNone; + if ( iProtectionStatus == EMTPProtectionNoProtection ) + { + err = iFileReceived->File().SetAtt( KEntryAttNormal, KEntryAttReadOnly ); + } + else + { + err = iFileReceived->File().SetAtt( KEntryAttReadOnly, KEntryAttNormal ); + } + + if ( err != KErrNone ) + { + PRINT1( _L("MM MTP <> CSendObject::SetProtectionStatus err = %d" ), err ); + } } - else - { - err = iFs.SetAtt( iFullPath, KEntryAttReadOnly, KEntryAttNormal ); - } - User::LeaveIfError( err ); + // Close the file after SetProtectionStatus to make sure other process won't open + // the file successfully right at the time calling RFile::SetAtt. + delete iFileReceived; + iFileReceived = NULL; } - PRINT( _L( "MM MTP <= CSendObject::SetProtectionStatusL" ) ); + + PRINT( _L( "MM MTP <= CSendObject::SetProtectionStatus" ) ); } // ----------------------------------------------------------------------------- @@ -1217,28 +1238,28 @@ RFile file; User::LeaveIfError( file.Create( iFs, iFullPath, EFileWrite ) ); - file.Close(); - - // set entry protection status and modified date - SetProtectionStatusL(); - - // add playlist to MPX DB - TParsePtrC parse( iFullPath ); - iDpConfig.GetWrapperL().SetStorageRootL( parse.Drive() ); - iDpConfig.GetWrapperL().AddObjectL( iFullPath, iObjectFormat, EMTPSubFormatCodeUnknown ); + CleanupClosePushL( file ); // + file if ( EMTPFormatCodeAbstractAudioVideoPlaylist == iObjectFormat ) { TInt err = KErrNone; - err = iFs.SetAtt( iFullPath, - KEntryAttSystem | KEntryAttHidden, + err = file.SetAtt( KEntryAttSystem | KEntryAttHidden, KEntryAttReadOnly | KEntryAttNormal ); if ( err != KErrNone ) PRINT1( _L( "MM MTP <> CSendObject::SaveEmptyFileL err = %d" ), err ); iDpConfig.GetWrapperL().AddDummyFileL( iFullPath ); } + CleanupStack::PopAndDestroy( &file ); // - file - PRINT( _L( "MM MTP <= CSendObject::SaveEmptyFileL" ) ); + // add playlist to MPX DB + TRAPD( err, AddMediaToStoreL() ); + + if ( err != KErrNone ) + { + // Ignore err even add into MPX get failed. + } + + PRINT1( _L( "MM MTP <= CSendObject::SaveEmptyFileLerr = %d" ), err ); } // ----------------------------------------------------------------------------- @@ -1250,16 +1271,20 @@ { PRINT( _L( "MM MTP => CSendObject::AddMediaToStoreL" ) ); + // SetProtectionStatus here make sure no matter the previous operation is SendObjectInfo + // or SendObjectPropList + // Might need to set dateadded and datemodify for further extension. + SetProtectionStatus(); + TBool isVideo = EFalse; - TMmMtpSubFormatCode subFormatCode; + TMmMtpSubFormatCode subFormatCode = EMTPSubFormatCodeUnknown; switch ( iObjectFormat ) { case EMTPFormatCode3GPContainer: case EMTPFormatCodeMP4Container: case EMTPFormatCodeASF: { - - if ( MmMtpDpUtility::IsVideoL( iFullPath ) ) + if ( MmMtpDpUtility::IsVideo( iFullPath ) ) { subFormatCode = EMTPSubFormatCodeVideo; isVideo = ETrue; @@ -1287,18 +1312,13 @@ break; } - TPtrC suid( iReceivedObjectInfo->DesC( CMTPObjectMetaData::ESuid ) ); - PRINT1( _L( "MM MTP <> CSendObject::AddMediaToStoreL suid = %S" ), &suid ); - TParsePtrC parse( suid ); - iDpConfig.GetWrapperL().SetStorageRootL( parse.Drive() ); + iDpConfig.GetWrapperL().SetStorageRootL( iFullPath ); + PRINT1( _L( "MM MTP <> CSendObject::AddMediaToStoreL iFullPath = %S" ), &iFullPath ); iDpConfig.GetWrapperL().AddObjectL( iFullPath, iObjectFormat, subFormatCode ); if ( isVideo ) { - TInt err = KErrNone; - TRAP( err, iDpConfig.GetWrapperL().SetImageObjPropL( iFullPath, iWidth, iHeight ) ); - - PRINT1( _L( "MM MTP <= CSendObject::AddVideoToStoreL err = %d" ), err ); + iDpConfig.GetWrapperL().SetImageObjPropL( iFullPath, iWidth, iHeight ); } PRINT( _L( "MM MTP <= CSendObject::AddMediaToStoreL" ) ); diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csetobjectproplist.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csetobjectproplist.cpp Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csetobjectproplist.cpp Fri Mar 12 15:44:36 2010 +0200 @@ -219,35 +219,40 @@ case EMTPObjectPropCodeObjectFileName: { TPtrC suid( object->DesC( CMTPObjectMetaData::ESuid ) ); - TBuf newSuid( aPropListElement.StringL( - CMTPTypeObjectPropListElement::EValue ) ); - TInt err = MmMtpDpUtility::UpdateObjectFileName( iFramework.Fs(), suid, newSuid ); - PRINT1( _L( "MM MTP <> Update object file name err = %d" ), err ); - if ( KErrOverflow == err ) // full path name is too long - { + TPtrC ptr( aPropListElement.StringL( CMTPTypeObjectPropListElement::EValue ) ); + if ( KMaxFileName < ptr.Length() ) responseCode = EMTPRespCodeInvalidDataset; - } - else if ( ( KErrNone == err ) || ( KErrAlreadyExists == err ) ) + else { - TRAP( err, iDpConfig.GetWrapperL().RenameObjectL( suid, newSuid ) ); //Update MPX DB - PRINT1( _L( "MM MTP <> Rename Object err = %d" ), err ); - // it is ok if file is not found in DB, following S60 solution - if ( KErrNotFound == err ) + TFileName newSuid( ptr ); + TInt err = MmMtpDpUtility::UpdateObjectFileName( iFramework.Fs(), suid, newSuid ); + 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 ) ) { - 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().RenameObjectL( suid, newSuid ) ); //Update MPX DB + PRINT1( _L( "MM MTP <> Rename Object 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 ); + } - if ( KErrNone == err ) - { - object->SetDesCL( CMTPObjectMetaData::ESuid, newSuid ); - iFramework.ObjectMgr().ModifyObjectL( *object ); - } - else - { - responseCode = EMTPRespCodeGeneralError; + if ( KErrNone == err ) + { + object->SetDesCL( CMTPObjectMetaData::ESuid, newSuid ); + iFramework.ObjectMgr().ModifyObjectL( *object ); + } + else + { + responseCode = EMTPRespCodeGeneralError; + } } } } @@ -258,7 +263,7 @@ CMTPTypeString* stringData = CMTPTypeString::NewLC( aPropListElement.StringL( CMTPTypeObjectPropListElement::EValue ) );// + stringData - responseCode = iDpConfig.PropSettingUtility()->SetMetaDataToWrapperL( iDpConfig, + responseCode = iDpConfig.PropSettingUtility()->SetMetaDataToWrapper( iDpConfig, propertyCode, *stringData, *object ); @@ -332,7 +337,8 @@ // EXPORT_C TInt CSetObjectPropList::RunError( TInt aError ) { - PRINT1( _L( "MM MTP <> CGetObjectPropList::RunError aError = %d" ), aError ); + if ( aError != KErrNone ) + PRINT1( _L( "MM MTP <> CGetObjectPropList::RunError aError = %d" ), aError ); TRAP_IGNORE( SendResponseL( EMTPRespCodeGeneralError ) ); diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csetobjectpropvalue.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csetobjectpropvalue.cpp Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csetobjectpropvalue.cpp Fri Mar 12 15:44:36 2010 +0200 @@ -152,13 +152,13 @@ CMTPObjectMetaData* objectInfo = iRequestChecker->GetObjectInfo( objectHandle ); if ( objectInfo == NULL ) { - PRINT( _L("MM MTP <> CGetObjectPropValue::CheckRequestL, objectInfo is NULL" ) ); + PRINT( _L("MM MTP <> CSetObjectPropValue::CheckRequestL, objectInfo is NULL" ) ); return EMTPRespCodeInvalidObjectHandle; } TFileName fileName = objectInfo->DesC( CMTPObjectMetaData::ESuid ); TUint32 formatCode = objectInfo->Uint( CMTPObjectMetaData::EFormatCode ); - PRINT3( _L( "MM MTP <> CGetObjectPropValue::CheckRequestL, handle = 0x%x, filename = %S, formatCode = 0x%x" ), + PRINT3( _L( "MM MTP <> CSetObjectPropValue::CheckRequestL, handle = 0x%x, filename = %S, formatCode = 0x%x" ), objectHandle, &fileName, formatCode ); @@ -269,38 +269,43 @@ case EMTPObjectPropCodeObjectFileName: { TPtrC suid( iObjectInfo->DesC( CMTPObjectMetaData::ESuid ) ); - TBuf newSuid( iMTPTypeString->StringChars() ); - PRINT2( _L( "MM MTP <> old name = %S, new name = %S" ), &suid, &newSuid ); - TInt err = KErrNone; - err = MmMtpDpUtility::UpdateObjectFileName( iFramework.Fs(), - suid, - newSuid ); - PRINT1( _L( "MM MTP <> Update object file name err = %d" ), err ); - if ( KErrOverflow == err ) // full path name is too long - { + TPtrC ptr ( iMTPTypeString->StringChars() ); + if ( KMaxFileName < ptr.Length() ) responseCode = EMTPRespCodeInvalidDataset; - } - else if ( ( KErrNone == err ) || ( KErrAlreadyExists == err ) ) + else { - TRAP( err, iDpConfig.GetWrapperL().RenameObjectL( suid, 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 ) + TFileName newSuid( ptr ); + PRINT2( _L( "MM MTP <> old name = %S, new name = %S" ), &suid, &newSuid ); + TInt err = KErrNone; + err = MmMtpDpUtility::UpdateObjectFileName( iFramework.Fs(), + suid, + newSuid ); + PRINT1( _L( "MM MTP <> Update object file name err = %d" ), err ); + if ( KErrOverflow == err ) // full path name is too long { - TUint formatCode = iObjectInfo->Uint( CMTPObjectMetaData::EFormatCode ); - TUint subFormatCode = iObjectInfo->Uint( CMTPObjectMetaData::EFormatSubCode ); - TRAP( err, iDpConfig.GetWrapperL().AddObjectL( newSuid, formatCode, subFormatCode ) ); - PRINT1( _L( "MM MTP <> Add MPX object file name err = %d" ), err ); + responseCode = EMTPRespCodeInvalidDataset; } - - if ( KErrNone == err ) + else if ( ( KErrNone == err ) || ( KErrAlreadyExists == err ) ) { - iObjectInfo->SetDesCL( CMTPObjectMetaData::ESuid, newSuid ); - iFramework.ObjectMgr().ModifyObjectL( *iObjectInfo ); - } - else - { - responseCode = EMTPRespCodeGeneralError; + TRAP( err, iDpConfig.GetWrapperL().RenameObjectL( suid, 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 ) ); + 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; + } } } } diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csetobjectreferences.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csetobjectreferences.cpp Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csetobjectreferences.cpp Fri Mar 12 15:44:36 2010 +0200 @@ -107,10 +107,10 @@ // set references to DB // ----------------------------------------------------------------------------- // -EXPORT_C void CSetObjectReferences::DoSetObjectReferencesL( CMmMtpDpMetadataAccessWrapper& aWrapper, - TUint16 aObjectFormat, - const TDesC& aSrcFileName, - CDesCArray& aRefFileArray ) +EXPORT_C void CSetObjectReferences::DoSetObjectReferencesL( CMmMtpDpMetadataAccessWrapper& /*aWrapper*/, + TUint16 /*aObjectFormat*/, + const TDesC& /*aSrcFileName*/, + CDesCArray& /*aRefFileArray*/ ) { // do nothing, do special thing by inheriting } diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/src/cmmmtpdpmetadataaccesswrapper.cpp --- a/mmappcomponents/mmmtpdataprovider/src/cmmmtpdpmetadataaccesswrapper.cpp Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/src/cmmmtpdpmetadataaccesswrapper.cpp Fri Mar 12 15:44:36 2010 +0200 @@ -284,11 +284,10 @@ const TUint32 aWidth, const TUint32 aHeight ) { - if ( MmMtpDpUtility::IsVideoL( aFullFileName, iFramework ) ) - { - iMmMtpDpMetadataVideoAccess->SetStorageRootL( aFullFileName ); - iMmMtpDpMetadataVideoAccess->SetImageObjPropL( aFullFileName, aWidth, aHeight ); - } + iMmMtpDpMetadataVideoAccess->SetStorageRootL( aFullFileName ); + iMmMtpDpMetadataVideoAccess->SetImageObjPropL( aFullFileName, + aWidth, + aHeight ); } // ----------------------------------------------------------------------------- @@ -551,7 +550,8 @@ // Check if playlist file is a dummy file or an imported file for ( TInt i = 0; i < count; i++ ) { - if ( MmMtpDpUtility::FormatFromFilename( (*iAbstractMediaArray)[i] ) != + TPtrC dummyFileName( (*iAbstractMediaArray)[i] ); + if ( MmMtpDpUtility::FormatFromFilename( dummyFileName ) != EMTPFormatCodeM3UPlaylist ) { // delete the virtual playlist @@ -559,13 +559,13 @@ TInt err = iRfs.Delete( ( *iAbstractMediaArray )[i] ); PRINT2( _L( "MM MTP <> CMmMtpDpMetadataAccessWrapper::RemoveDummyFile filename = %S, err %d" ), - &( (*iAbstractMediaArray)[i] ), + &dummyFileName, err ); } else { // leave the Imported playlist in the file system - PRINT1( _L( "MM MTP <> CMmMtpDpMetadataAccessWrapper::RemoveDummyFile, Don't delete m3u file [%S]" ), &( (*iAbstractMediaArray)[i] ) ); + PRINT1( _L( "MM MTP <> CMmMtpDpMetadataAccessWrapper::RemoveDummyFile, Don't delete m3u file [%S]" ), &dummyFileName ); } } PRINT( _L( "MM MTP <= CMmMtpDpMetadataAccessWrapper::RemoveDummyFiles" ) ); diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/src/cmmmtpdpmetadatampxaccess.cpp --- a/mmappcomponents/mmmtpdataprovider/src/cmmmtpdpmetadatampxaccess.cpp Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/src/cmmmtpdpmetadatampxaccess.cpp Fri Mar 12 15:44:36 2010 +0200 @@ -44,15 +44,13 @@ #include "mmmtpdplogger.h" #include "mmmtpdputility.h" #include "tmmmtpdppanic.h" +#include "tobjectdescription.h" static const TInt KMtpInvalidSongID = 0x1FFFFFFF; static const TInt KMtpChannelMono = 1; static const TInt KMtpChannelStereo = 2; -static const TInt KMtpDateTimeStringLength = 15; -static const TInt KMtpMaxStringLength = 255; -static const TInt KMtpMaxDescriptionLength = 0x200; -_LIT( KMtpDateTimeFormat, "%F%Y%M%DT%H%T%S" ); + _LIT( KMtpDateTimeConnector, "T" ); _LIT( KEmptyText, "" ); @@ -206,7 +204,7 @@ case EMTPObjectPropCodeDateCreated: { TTime time( *media.Value ( attrib ) ); - TBuf timeStr; + TBuf timeStr; time.FormatL( timeStr, KMtpDateTimeFormat ); if ( EMTPTypeString == aNewData.Type() ) @@ -258,7 +256,7 @@ case EMTPObjectPropCodeOriginalReleaseDate: { // Compose DateTime string in format YYYYMMDDTHHMMSS - TBuf dateTime; + TBuf dateTime; dateTime.Zero(); // NOTE: Handled specially, shouldn't leave like other property, following S60 @@ -431,7 +429,6 @@ searchMedia->SetTObjectValueL( KMPXMediaGeneralType, EMPXGroup ); searchMedia->SetTObjectValueL( KMPXMediaGeneralCategory, EMPXSong ); searchMedia->SetTObjectValueL( aWMPMediaID, aFlag ); - searchMedia->SetTextValueL( KMPXMediaGeneralDrive, iStoreRoot ); RArray songAttributes; @@ -440,8 +437,7 @@ PRINT( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::FindWMPMediaLC searchMedia setup with no problems" ) ); - CMPXMedia* foundMedia = CollectionHelperL()->FindAllL( - *searchMedia, + CMPXMedia* foundMedia = CollectionHelperL()->FindAllL( *searchMedia, songAttributes.Array() ); PRINT( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::FindWMPMediaLC foundMedia assigned from FindAllL" ) ); @@ -842,10 +838,10 @@ MMTPType::CopyL( aNewData, *textData ); TBuf data; - data.Copy( textData->StringChars().Left( KMtpDateTimeStringLength ) ); + data.Copy( textData->StringChars().Left( KMtpMaxDateTimeStringLength ) ); PRINT1( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::SetMetadataValueL 0xDC99 date = %S" ), &data ); - if ( data.Length() < KMtpDateTimeStringLength ) + if ( data.Length() < KMtpMaxDateTimeStringLength ) { PRINT( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::SetMetadataValueL 0xDC99 date string is too short" ) ); break; @@ -927,13 +923,16 @@ length ); if ( length != 0 ) { - TBuf text; - text.Zero(); + length = ( length < KMTPMaxDescriptionLen ) ? length : KMTPMaxDescriptionLen; + HBufC* text = HBufC::NewLC( length ); // + text + TPtr ptr = text->Des(); + for ( TUint i = 0; i < length; i++ ) - text.Append( desData->ElementUint( i ) ); + ptr.Append( desData->ElementUint( i ) ); PRINT1( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::SetMetadataValueL text = %S" ), - &text ); - aMediaProp.SetTextValueL( KMPXMediaGeneralComment, text ); + text ); + aMediaProp.SetTextValueL( KMPXMediaGeneralComment, *text ); + CleanupStack::PopAndDestroy( text ); // - text } else { @@ -984,6 +983,7 @@ searchMedia->SetTObjectValueL( KMPXMediaGeneralType, EMPXItem ); searchMedia->SetTObjectValueL( KMPXMediaGeneralCategory, EMPXSong ); searchMedia->SetTextValueL( KMPXMediaGeneralUri, aFullFileName ); + searchMedia->SetTextValueL( KMPXMediaGeneralDrive, iStoreRoot ); RArray songAttributes; CleanupClosePushL( songAttributes ); // + songAttributes @@ -1274,8 +1274,7 @@ PRINT1( _L( "MM MTP => CMmMtpDpMetadataMpxAccess::SetStorageRoot aStoreRoot = %S" ), &aStorageRoot ); // get the drive number - TParse pathParser; - User::LeaveIfError( pathParser.Set( aStorageRoot, NULL, NULL ) ); + TParsePtrC pathParser( aStorageRoot ); TChar driveChar( pathParser.Drive()[0] ); TInt driveNumber; @@ -1638,6 +1637,7 @@ searchMedia->SetTObjectValueL( KMPXMediaGeneralType, EMPXItem ); searchMedia->SetTObjectValueL( KMPXMediaGeneralCategory, EMPXPlaylist ); searchMedia->SetTextValueL( KMPXMediaGeneralUri, aSuid ); + searchMedia->SetTextValueL( KMPXMediaGeneralDrive, iStoreRoot ); RArray playlistAttributes; CleanupClosePushL( playlistAttributes ); // + playlistAttributes diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/src/cmmmtpdpmetadatavideoaccess.cpp --- a/mmappcomponents/mmmtpdataprovider/src/cmmmtpdpmetadatavideoaccess.cpp Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/src/cmmmtpdpmetadatavideoaccess.cpp Fri Mar 12 15:44:36 2010 +0200 @@ -38,9 +38,8 @@ #include "mmmtpdputility.h" #include "tmmmtpdppanic.h" #include "mmmtpvideodbdefs.h" +#include "tobjectdescription.h" -static const TInt KMtpMaxStringLength = 255; -static const TInt KMtpMaxDescriptionLength = 0x200; const TInt KStorageRootMaxLength = 10; #ifdef _DEBUG @@ -1087,18 +1086,8 @@ // Get file path TPtrC suid( aObjectMetaData.DesC( CMTPObjectMetaData::ESuid ) ); - TParsePtrC parse( suid ); SetRecordL( suid, ERecordWrite ); - TRAPD( err, SetMetadataL( aPropCode, aNewData ) ); - - if ( err < KErrNone ) // EPOC error condition - { - PRINT1( _L( "MM MTP <> Metadata write failed, with error %d" ), err ); - SetRecordL( suid, EFailedWrite ); - } - - if ( err != KErrNone ) - User::Leave( err ); + SetMetadataL( aPropCode, aNewData ); PRINT( _L( "MM MTP <= CMmMtpDpMetadataVideoAccess::SetObjectMetadataValueL" ) ); } @@ -1150,18 +1139,21 @@ desData = CMTPTypeArray::NewLC( EMTPTypeAUINT16 ); // + desData MMTPType::CopyL( aNewData, *desData ); TUint length = desData->NumElements(); - PRINT1( _L( "MM MTP <> CMmMtpDpMetadataVideoAccess::SetMetadataL length = %d" ), length ); + PRINT1( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::SetMetadataValueL length = %d" ), + length ); if ( length != 0 ) { - TBuf text; - text.Zero(); + length = ( length < KMTPMaxDescriptionLen ) ? length : KMTPMaxDescriptionLen; + HBufC* text = HBufC::NewLC( length ); // + text + TPtr ptr = text->Des(); + for ( TUint i = 0; i < length; i++ ) - { - text.Append( desData->ElementUint( i ) ); - } - PRINT1( _L( "MM MTP <> CMmMtpDpMetadataVideoAccess::SetMetadataL text = %S" ), - &text ); - WriteLongTextL( KMtpVideoComment, text ); + ptr.Append( desData->ElementUint( i ) ); + PRINT1( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::SetMetadataValueL text = %S" ), + text ); + + WriteLongTextL( KMtpVideoComment, *text ); + CleanupStack::PopAndDestroy( text ); // - text } else { @@ -1533,8 +1525,7 @@ PRINT1( _L( "MM MTP => CMmMtpDpMetadataVideoAccess::SetStorageRoot aStoreRoot = %S" ), &aStorageRoot ); // get the drive number - TParse pathParser; - User::LeaveIfError( pathParser.Set( aStorageRoot, NULL, NULL ) ); + TParsePtrC pathParser( aStorageRoot ); TChar driveChar( pathParser.Drive()[0] ); User::LeaveIfError( RFs::CharToDrive( driveChar, iStoreNum ) ); diff -r bee149131e4b -r 05b0d2323768 mmappcomponents/mmmtpdataprovider/src/mmmtpdputility.cpp --- a/mmappcomponents/mmmtpdataprovider/src/mmmtpdputility.cpp Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/src/mmmtpdputility.cpp Fri Mar 12 15:44:36 2010 +0200 @@ -75,6 +75,7 @@ return EMTPFormatCodeMP4Container; if ( ( file.Ext().CompareF( KTxtExtension3GP ) == 0 ) + || ( file.Ext().CompareF( KTxtExtension3G2 ) == 0 ) || ( file.Ext().CompareF( KTxtExtensionO4A ) == 0 ) || ( file.Ext().CompareF( KTxtExtensionO4V ) == 0 ) ) return EMTPFormatCode3GPContainer; @@ -163,17 +164,15 @@ } // ----------------------------------------------------------------------------- -// MmMtpDpUtility::IsVideoL (Slow Version) +// MmMtpDpUtility::IsVideo (Slow Version) // Utility function to determine whether a format is Video or not // ----------------------------------------------------------------------------- // -EXPORT_C TBool MmMtpDpUtility::IsVideoL( const TDesC& aFullFileName ) +EXPORT_C TBool MmMtpDpUtility::IsVideo( const TDesC& aFullFileName ) { PRINT1( _L( "MM MTP => MmMtpDpUtility::IsVideoL (Slow Version) aFullFileName = %S" ), &aFullFileName ); - TParse pathParser; - User::LeaveIfError( pathParser.Set( aFullFileName, NULL, NULL ) ); - + TParsePtrC pathParser( aFullFileName ); TPtrC ext( pathParser.Ext() ); if ( ext.Length() <= 0 ) @@ -189,32 +188,30 @@ } 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 ); - User::LeaveIfNull( mimetype ); - - CleanupStack::PushL( mimetype ); // + mimetype - - TMmMtpSubFormatCode subFormatCode; + if ( mimetype != NULL ) + { + TMmMtpSubFormatCode subFormatCode; - User::LeaveIfError( SubFormatCodeFromMime( *mimetype, subFormatCode ) ); - CleanupStack::PopAndDestroy( mimetype ); // - mimetype - - if ( subFormatCode == EMTPSubFormatCodeVideo ) - { - return ETrue; - } - else - { - return EFalse; + 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; - // other format, as audio + // 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; } @@ -233,10 +230,27 @@ 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 MmMtpDpUtility::IsVideoL( formatCode, subFormatCode ); + return isVideo; } // ----------------------------------------------------------------------------- @@ -492,13 +506,7 @@ PRINT( _L( "MM MTP => MmMtpDpUtility::ContainerMimeType" ) ); // parse the file path - TParse pathParser; - TInt retCode = pathParser.Set( aFullPath, NULL, NULL ); - if ( retCode != KErrNone ) - { - PRINT( _L( "MM MTP <> MmMtpDpUtility::ContainerMimeType parse path failed" ) ); - return NULL; - } + TParsePtrC pathParser( aFullPath ); // get the extension of file TPtrC ext( pathParser.Ext() ); @@ -513,14 +521,15 @@ // MP4/3GP if ( ext.CompareF( KTxtExtensionMP4 ) == 0 - || ext.CompareF( KTxtExtension3GP ) == 0 ) + || ext.CompareF( KTxtExtension3GP ) == 0 + || ext.CompareF( KTxtExtension3G2 ) == 0 ) { TRAP( err, mimebuf = Mp4MimeTypeL( aFullPath ) ); PRINT1( _L("MM MTP <> MmMtpDpUtility::ContainerMimeType, Mp4MimeTypeL err = %d"), err ); } else if ( ext.CompareF( KTxtExtensionODF ) == 0 ) { - TRAP( err, mimebuf = Mp4MimeTypeL( aFullPath ) ); + TRAP( err, mimebuf = OdfMimeTypeL( aFullPath ) ); PRINT1( _L("MM MTP <> MmMtpDpUtility::ContainerMimeType, OdfMimeTypeL err = %d"), err ); } #ifdef __WINDOWS_MEDIA @@ -547,7 +556,8 @@ TParsePtrC file( aFullPath ); if ( file.Ext().CompareF( KTxtExtensionMP4 ) == 0 - || file.Ext().CompareF( KTxtExtension3GP ) == 0 ) + || file.Ext().CompareF( KTxtExtension3GP ) == 0 + || file.Ext().CompareF( KTxtExtension3G2 ) == 0 ) { // get mime from file MP4Handle mp4Handle = NULL; @@ -583,7 +593,8 @@ if ( mp4err == MP4_OK ) { - if ( file.Ext().CompareF( KTxtExtension3GP ) == 0 ) + if ( file.Ext().CompareF( KTxtExtension3GP ) == 0 + || file.Ext().CompareF( KTxtExtension3G2 ) == 0 ) { mimebuf = KMimeTypeAudio3gpp().Alloc(); } @@ -596,7 +607,8 @@ // is video file else if ( mp4err == MP4_OK ) { - if ( file.Ext().CompareF( KTxtExtension3GP ) == 0 ) + if ( file.Ext().CompareF( KTxtExtension3GP ) == 0 + || file.Ext().CompareF( KTxtExtension3G2 ) == 0 ) { mimebuf = KMimeTypeVideo3gpp().Alloc(); } @@ -688,7 +700,7 @@ // HBufC8* MmMtpDpUtility::AsfMimeTypeL( const TDesC& aFullPath ) { - PRINT( _L( "MM MTP => MmMtpDpUtility::AsfMimeTypeL" ) ); + PRINT1( _L( "MM MTP => MmMtpDpUtility::AsfMimeTypeL, aFullPath = %S" ), &aFullPath ); HBufC8* mimebuf = NULL; @@ -701,6 +713,7 @@ CleanupStack::PushL( hxUtility ); hxUtility->OpenFileL( aFullPath ); + PRINT( _L( "MM MTP <> MmMtpDpUtility::AsfMimeTypeL OpenFileL" ) ); HXMetaDataKeys::EHXMetaDataId id; TUint count = 0; diff -r bee149131e4b -r 05b0d2323768 mmappfw_plat/collection_helper_api/tsrc/group/bld.inf --- a/mmappfw_plat/collection_helper_api/tsrc/group/bld.inf Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappfw_plat/collection_helper_api/tsrc/group/bld.inf Fri Mar 12 15:44:36 2010 +0200 @@ -28,5 +28,3 @@ PRJ_TESTMMPFILES #include "../CollectionHelperTestClass/group/bld.inf" - -PRJ_TESTMMPFILES diff -r bee149131e4b -r 05b0d2323768 mmappfw_plat/harvester_collection_mediator_api/tsrc/group/bld.inf --- a/mmappfw_plat/harvester_collection_mediator_api/tsrc/group/bld.inf Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappfw_plat/harvester_collection_mediator_api/tsrc/group/bld.inf Fri Mar 12 15:44:36 2010 +0200 @@ -29,4 +29,4 @@ PRJ_TESTMMPFILES #include "../HarvesterCollectionMediatorTest/group/bld.inf" -PRJ_TESTMMPFILES + diff -r bee149131e4b -r 05b0d2323768 mmappfw_plat/mpx_common_api/inc/mpxmediamusicdefs.h --- a/mmappfw_plat/mpx_common_api/inc/mpxmediamusicdefs.h Fri Feb 19 23:18:32 2010 +0200 +++ b/mmappfw_plat/mpx_common_api/inc/mpxmediamusicdefs.h Fri Mar 12 15:44:36 2010 +0200 @@ -44,6 +44,7 @@ const TMPXAttributeData KMPXMediaMusicOriginalAlbumArtFileName={KMPXMediaIdMusic,0x200}; // Text const TMPXAttributeData KMPXMediaMusicAlbumArtThumbnail={KMPXMediaIdMusic,0x400}; // CFbsImage const TMPXAttributeData KMPXMediaMusicAlbumArtThumbnailSize={KMPXMediaIdMusic,0x800}; // TSint +const TMPXAttributeData KMPXMediaMusicAlbumArtChanged={KMPXMediaIdMusic,0x1000}; // TInt const TMPXAttributeData KMPXMediaMusicAll={KMPXMediaIdMusic,0xffffffff}; // Text /** diff -r bee149131e4b -r 05b0d2323768 mpx/playbackframework/playbackserver/src/mpxplaybackserversession.cpp --- a/mpx/playbackframework/playbackserver/src/mpxplaybackserversession.cpp Fri Feb 19 23:18:32 2010 +0200 +++ b/mpx/playbackframework/playbackserver/src/mpxplaybackserversession.cpp Fri Mar 12 15:44:36 2010 +0200 @@ -517,9 +517,7 @@ #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API case EPbsSetPrimaryClient: { - TInt error = iPlayer->ClientList()->SetPrimaryClient(*iMessageQueue); - TPckgC handle(error); - aMessage.Write(0, handle); + aMsgHandleResult = iPlayer->ClientList()->SetPrimaryClient(*iMessageQueue); break; } default: