--- a/mmappcomponents/collectionhelper/group/mpxcollectionhelper.mmp Fri Jul 09 17:03:16 2010 -0500
+++ b/mmappcomponents/collectionhelper/group/mpxcollectionhelper.mmp Fri Jul 23 17:48:16 2010 -0500
@@ -66,3 +66,6 @@
#elif defined(WINSCW)
deffile ../bwinscw/
#endif
+
+SMPSAFE
+
--- a/mmappcomponents/harvester/collectionmediator/group/mpxcollectionmediator.mmp Fri Jul 09 17:03:16 2010 -0500
+++ b/mmappcomponents/harvester/collectionmediator/group/mpxcollectionmediator.mmp Fri Jul 23 17:48:16 2010 -0500
@@ -53,4 +53,7 @@
deffile ../eabi/
#elif defined(WINSCW)
deffile ../bwinscw/
-#endif
\ No newline at end of file
+#endif
+
+SMPSAFE
+
--- a/mmappcomponents/harvester/filehandler/group/mpxfilehandler.mmp Fri Jul 09 17:03:16 2010 -0500
+++ b/mmappcomponents/harvester/filehandler/group/mpxfilehandler.mmp Fri Jul 23 17:48:16 2010 -0500
@@ -77,3 +77,5 @@
deffile ../bwinscw/
#endif
+SMPSAFE
+
--- a/mmappcomponents/harvester/metadataextractor/group/mpxmetadataextractor.mmp Fri Jul 09 17:03:16 2010 -0500
+++ b/mmappcomponents/harvester/metadataextractor/group/mpxmetadataextractor.mmp Fri Jul 23 17:48:16 2010 -0500
@@ -61,3 +61,6 @@
#elif defined(WINSCW)
deffile ../bwinscw/
#endif
+
+SMPSAFE
+
--- a/mmappcomponents/harvester/metadataextractor/src/mpxfileinfoutility.cpp Fri Jul 09 17:03:16 2010 -0500
+++ b/mmappcomponents/harvester/metadataextractor/src/mpxfileinfoutility.cpp Fri Jul 23 17:48:16 2010 -0500
@@ -12,7 +12,7 @@
* Contributors:
*
* Description: This class is responsible for reading file info
-* Version : %version: da1mmcf#5.1.3.1.6.2.2 % << Don't touch! Updated by Synergy at check-out.
+* Version : %version: e003sa33#5.1.3.1.6.2.3 % << Don't touch! Updated by Synergy at check-out.
*
* Copyright © 2005 Nokia. All rights reserved.
*/
@@ -81,8 +81,8 @@
iMMFControllers.ResetAndDestroy();
iMMFControllers.Close();
- // delete non cached controller
- if(iController)
+ //delete non cached Helix controller
+ if( iController && ( iCurrentControllerUid == 0x10207B65 ) )
{
iController->Close();
delete iController;
--- a/mmappcomponents/harvester/metadataextractor/src/mpxmetadataextractor.cpp Fri Jul 09 17:03:16 2010 -0500
+++ b/mmappcomponents/harvester/metadataextractor/src/mpxmetadataextractor.cpp Fri Jul 23 17:48:16 2010 -0500
@@ -12,7 +12,7 @@
* Contributors:
*
* Description: Extracts metadata from a file
-* Version : %version: da1mmcf#38.1.4.2.6.1.5.3.5 % << Don't touch! Updated by Synergy at check-out.
+* Version : %version: da1mmcf#38.1.4.2.6.1.5.3.6 % << Don't touch! Updated by Synergy at check-out.
*
*/
@@ -52,7 +52,7 @@
#ifdef RD_MPX_TNM_INTEGRATION
_LIT( KImageFileType, "image/jpeg" );
const TInt KMPXTimeoutTimer = 3000000; // 3 seconds
-const TInt KMPXMaxThumbnailRequest = 2;
+const TInt KMPXMaxThumbnailRequest = 2;
#endif //RD_MPX_TNM_INTEGRATION
#ifdef ABSTRACTAUDIOALBUM_INCLUDED
@@ -186,10 +186,10 @@
aNewProperty = NULL;
iFileName = aFile;
iMetadataOnly = aMetadataOnly;
-
+
// populate the task array
AddTasksL();
-
+
// execute all tasks in the array
while ( iArrayTasks.Count() )
{
@@ -211,10 +211,10 @@
}
break;
}
-
+
iArrayTasks.Remove( 0 );
}
-
+
aNewProperty = iMedia;
iMedia = NULL; // ownership transferred.
CleanUp();
@@ -236,9 +236,6 @@
// Album
aMediaProp.SetTextValueL( KMPXMediaMusicAlbum,
KNullDesC );
- // Year
- aMediaProp.SetTObjectValueL<TInt64>( KMPXMediaMusicYear,
- (TInt64) 0 );
// Track
aMediaProp.SetTextValueL( KMPXMediaMusicAlbumTrack,
KNullDesC );
@@ -267,20 +264,20 @@
const TDesC& mimeType = iMedia->ValueText( KMPXMediaGeneralMimeType );
HBufC8* mimeType8 = HBufC8::NewLC( mimeType.Length() );
mimeType8->Des().Append( mimeType );
-
+
// Continue to extract metadata even if fail.
MPX_TRAPD( metadataerror, iMetadataUtility->OpenFileL( iFile, *mimeType8 ) );
CleanupStack::PopAndDestroy( mimeType8 );
-
+
// Get MetadataUtility Container
const CMetaDataFieldContainer& metaCont = iMetadataUtility->MetaDataFieldsL();
// Get DRM data
// Need the protected flag from metadataUtility Container
MPX_TRAPD( drmerror, SetDrmMediaPropertiesL( metaCont ) );
- MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL, result=%d getting drm data",
+ MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL, result=%d getting drm data",
drmerror );
-
+
// Get metadata fields
TInt count( metaCont.Count() );
for( TInt i=0; i<count; ++i )
@@ -289,19 +286,19 @@
HBufC* value = NULL;
metaCont.FieldIdAt( i, fieldType ); // get the field type
-
+
// get the value, except for album art
if ( fieldType != EMetaDataJpeg )
{
MPX_TRAPD( err, value = metaCont.At( i, fieldType ).AllocL() );
if ( KErrNone != err )
{
- MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL - error = %i", err);
+ MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL - error = %i", err);
continue;
- }
+ }
CleanupStack::PushL( value );
}
-
+
switch( fieldType )
{
case EMetaDataSongTitle:
@@ -409,70 +406,70 @@
*value );
break;
}
- case EMetaDataDuration:
- {
+ case EMetaDataDuration:
+ {
const TDesC& mimeType = iMedia->ValueText( KMPXMediaGeneralMimeType );
- MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL, mimeType = %S", &mimeType);
-
+ MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL, mimeType = %S", &mimeType);
+
// Verify if WMA, get the duration
if( mimeType.Compare(KWmaMimeType) == 0 || mimeType.Compare(KWmaCafMimeType) == 0 )
{
- MPX_DEBUG1("CMPXMetadataExtractor::SetMediaPropertiesL- WMA");
+ MPX_DEBUG1("CMPXMetadataExtractor::SetMediaPropertiesL- WMA");
// Perform the duration conversion
TLex lexer( *value );
TInt32 duration ( 0 );
- lexer.Val( duration ); // [second]
+ lexer.Val( duration ); // [second]
duration *= 1000; // [msec]
-
+
iMedia->SetTObjectValueL<TInt32>( KMPXMediaGeneralDuration,
- duration );
-
- MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL- duration = %i", duration);
+ duration );
+
+ MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL- duration = %i", duration);
}
break;
}
- case EMetaDataSampleRate:
- {
+ case EMetaDataSampleRate:
+ {
const TDesC& mimeType = iMedia->ValueText( KMPXMediaGeneralMimeType );
- MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL, mimeType = %S", &mimeType);
-
+ MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL, mimeType = %S", &mimeType);
+
// Verify if WMA, get the sample rate
if( mimeType.Compare(KWmaMimeType) == 0 || mimeType.Compare(KWmaCafMimeType) == 0 )
{
- MPX_DEBUG1("CMPXMetadataExtractor::SetMediaPropertiesL- WMA");
+ MPX_DEBUG1("CMPXMetadataExtractor::SetMediaPropertiesL- WMA");
// Perform the sample rate conversion
TLex lexer( *value );
TInt32 sampleRate ( 0 );
- lexer.Val( sampleRate );
-
+ lexer.Val( sampleRate );
+
iMedia->SetTObjectValueL<TUint>( KMPXMediaAudioSamplerate,
sampleRate );
-
- MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL- sample rate = %i", sampleRate);
+
+ MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL- sample rate = %i", sampleRate);
}
break;
}
- case EMetaDataBitRate:
- {
+ case EMetaDataBitRate:
+ {
const TDesC& mimeType = iMedia->ValueText( KMPXMediaGeneralMimeType );
- MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL, mimeType = %S", &mimeType);
-
+ MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL, mimeType = %S", &mimeType);
+
// Verify if WMA, get the duration
if( mimeType.Compare(KWmaMimeType) == 0 || mimeType.Compare(KWmaCafMimeType) == 0 )
{
- MPX_DEBUG1("CMPXMetadataExtractor::SetMediaPropertiesL- WMA");
+ MPX_DEBUG1("CMPXMetadataExtractor::SetMediaPropertiesL- WMA");
// Perform the duration conversion
TLex lexer( *value );
TInt32 bitRate ( 0 );
- lexer.Val( bitRate );
-
+ lexer.Val( bitRate );
+
iMedia->SetTObjectValueL<TUint>( KMPXMediaAudioBitrate,
bitRate );
-
- MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL- duration = %i", bitRate);
+
+ MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL- duration = %i", bitRate);
}
break;
}
@@ -493,7 +490,7 @@
}
if (fieldType != EMetaDataJpeg)
{
- CleanupStack::PopAndDestroy( value );
+ CleanupStack::PopAndDestroy( value );
}
}
}
@@ -513,25 +510,25 @@
if( iFileOpenError == KErrNone )
{
const TDesC& mimeType = iMedia->ValueText( KMPXMediaGeneralMimeType );
- MPX_DEBUG2("CMPXMetadataExtractor::SetExtMediaPropertiesL, mimeType = %S", &mimeType);
+ MPX_DEBUG2("CMPXMetadataExtractor::SetExtMediaPropertiesL, mimeType = %S", &mimeType);
iFile.Size( size );
iMedia->SetTObjectValueL<TInt>( KMPXMediaGeneralSize, size );
-
+
// Verify if WMA, skip getting info from MMF
if( mimeType.Compare(KWmaMimeType) == 0 || mimeType.Compare(KWmaCafMimeType) == 0 )
{
// No need to get MMF support
- MPX_DEBUG1("CMPXMetadataExtractor::SetExtMediaPropertiesL, skip MMF ");
+ MPX_DEBUG1("CMPXMetadataExtractor::SetExtMediaPropertiesL, skip MMF ");
}
else
{
- MPX_DEBUG1("CMPXMetadataExtractor::SetExtMediaPropertiesL, get MMF controller");
+ MPX_DEBUG1("CMPXMetadataExtractor::SetExtMediaPropertiesL, get MMF controller");
// Duration, bitrate, samplerate, etc
//
if( !iMetadataOnly )
{
MPX_TRAPD(err2, iFileInfoUtil->OpenFileL(
- iFile,
+ iFile,
iMedia->ValueText(KMPXMediaGeneralMimeType)));
MPX_DEBUG2("CMPXMetadataExtractor::SetExtMediaPropertiesL, file info util error %i", err2);
if( KErrNone == err2 )
@@ -546,7 +543,7 @@
MPX_DEBUG2("CMPXMetadataExtractor::SetExtMediaPropertiesL -- duration %i", duration);
}
-
+
iFileInfoUtil->Reset();
}
}
@@ -582,22 +579,22 @@
// CMPXMetadataExtractor::ThumbnailPreviewReady
// Callback but not used here
// ---------------------------------------------------------------------------
-void CMPXMetadataExtractor::ThumbnailPreviewReady(
+void CMPXMetadataExtractor::ThumbnailPreviewReady(
MThumbnailData& /*aThumbnail*/, TThumbnailRequestId /*aId*/ )
{
MPX_FUNC("CMPXMetadataExtractor::ThumbnailPreviewReady()");
}
-
+
// ---------------------------------------------------------------------------
// CMPXMetadataExtractor::ThumbnailReady
// Callback but not used here
// ---------------------------------------------------------------------------
-void CMPXMetadataExtractor::ThumbnailReady( TInt /*aError*/,
+void CMPXMetadataExtractor::ThumbnailReady( TInt /*aError*/,
MThumbnailData& /*aThumbnail*/, TThumbnailRequestId aId )
{
MPX_FUNC("CMPXMetadataExtractor::ThumbnailReady()");
-
+
// Remove thumbnail id from array.
TInt index = iArrayTNRequestId.Find( aId );
if ( index >= 0 )
@@ -622,8 +619,8 @@
CMPXMetadataExtractor* ptr =
static_cast<CMPXMetadataExtractor*>(aPtr);
-
- // Timer expired before thumbnail callback occurred. Stop wait loop to unblock.
+
+ // Timer expired before thumbnail callback occurred. Stop wait loop to unblock.
ptr->StopWaitLoop();
return KErrNone;
}
@@ -636,7 +633,7 @@
MPX_FUNC("CMPXMetadataExtractor::StopWaitLoop()");
// Cancel timer
CancelTimeoutTimer();
-
+
// Stop wait loop to unblock.
if ( iTNSyncWait->IsStarted() )
{
@@ -646,12 +643,12 @@
}
// ----------------------------------------------------------------------------
-// Cancel timer.
+// Cancel timer.
// ----------------------------------------------------------------------------
void CMPXMetadataExtractor::CancelTimeoutTimer()
{
MPX_FUNC("CMPXMetadataExtractor::CancelTimeoutTimer()");
-
+
// Cancel timer.
if ( iTimer && iTimer->IsActive() )
{
@@ -668,12 +665,12 @@
MPX_FUNC("CMPXMetadataExtractor::ExtractAlbumArtL()");
TInt err = KErrNone;
iCancelled = EFalse;
-
+
if ( !aMedia->IsSupported(KMPXMediaGeneralUri) )
{
return KErrArgument;
}
-
+
// Get full file name.
const TDesC& path = aMedia->ValueText(KMPXMediaGeneralUri);
MPX_DEBUG2("CMPXMetadataExtractor::ExtractAlbumArtL Filename:%S ", &path );
@@ -695,7 +692,7 @@
HBufC8* value8 = ((HBufC8*)sampleData)->Des().AllocLC(); // make a local copy of sampleData
source = CThumbnailObjectSource::NewLC(
value8, mimeType, path ); // give up ownership of value8
-
+
MPX_DEBUG1("CMPXMetadataExtractor::ExtractAlbumArtL source created from buffer");
TThumbnailRequestId tnId = iTNManager->CreateThumbnails( *source );
iArrayTNRequestId.Append( tnId );
@@ -706,7 +703,7 @@
{
source = CThumbnailObjectSource::NewLC(
path, KImageFileType );
-
+
MPX_DEBUG1("CMPXMetadataExtractor::ExtractAlbumArtL source created from path");
TThumbnailRequestId tnId = iTNManager->CreateThumbnails( *source );
iArrayTNRequestId.Append( tnId );
@@ -721,7 +718,7 @@
RArray<TMetaDataFieldId> wantedFields;
CleanupClosePushL( wantedFields );
wantedFields.Append(EMetaDataJpeg);
-
+
// Open file
if ( aMedia->IsSupported(KMPXMediaGeneralMimeType) )
{
@@ -737,7 +734,7 @@
MPX_TRAP( err, iMetadataUtility->OpenFileL( path, wantedFields ) );
}
CleanupStack::PopAndDestroy( &wantedFields );
-
+
if ( !err )
{
//check if can send TN request, If thumbnail creation is ongoing, wait til it is done
@@ -756,28 +753,28 @@
// ----------------------------------------------------------------------------
// Add album art to media object.
// ----------------------------------------------------------------------------
-void CMPXMetadataExtractor::AddMediaAlbumArtL( CMPXMedia& aMedia,
+void CMPXMetadataExtractor::AddMediaAlbumArtL( CMPXMedia& aMedia,
const TDesC& aFile )
{
MPX_FUNC("CMPXMetadataExtractor::AddMediaAlbumArtL()");
-
+
// get metadata container.
const CMetaDataFieldContainer& metaCont = iMetadataUtility->MetaDataFieldsL();
TPtrC8 data8 = metaCont.Field8( EMetaDataJpeg );
-
+
if ( data8.Length() )
{
MPX_DEBUG1("CMPXMetadataExtractor::GetMediaAlbumArtL(): Album art exist.");
#ifdef RD_MPX_TNM_INTEGRATION
- HBufC8* value8 = NULL;
+ HBufC8* value8 = NULL;
MPX_TRAPD( err, value8 = data8.AllocL() );
if ( KErrNone != err )
{
MPX_DEBUG2("CMPXMetadataExtractor::GetMediaAlbumArtL - error jpeg = %i", err);
return;
- }
+ }
CleanupStack::PushL( value8 );
-
+
TBuf<256> mimeType;
mimeType.Copy( KImageFileType );
CThumbnailObjectSource* source = CThumbnailObjectSource::NewL(
@@ -786,9 +783,9 @@
iArrayTNRequestId.Append( tnId ); // add thumbnail id to array
CleanupStack::Pop( value8 );
delete source;
-
+
aMedia.SetTextValueL( KMPXMediaMusicOriginalAlbumArtFileName, aFile );
-#endif // RD_MPX_TNM_INTEGRATION
+#endif // RD_MPX_TNM_INTEGRATION
aMedia.SetTextValueL( KMPXMediaMusicAlbumArtFileName, aFile );
}
}
@@ -929,7 +926,7 @@
iAppArc.AppForDocument(iFileName, dummyUid, dataType);
iMedia->SetTextValueL( KMPXMediaGeneralMimeType,dataType.Des() );
}
-
+
// Initially set default tags.
SetDefaultL( *iMedia );
}
@@ -981,23 +978,23 @@
MPX_DEBUG1("CMPXMetadataExtractor::CreateMediaAsyncL Request ongoing. Abort!" );
User::Leave( KErrAbort );
}
-
+
iCancelled = EFalse;
iFileOpenError = KErrNone;
iFileName = aFile;
iObs = aObs;
iMetadataOnly = aMetadataOnly;
-
+
// populate the task array
AddTasksL();
-
+
// Start task timer to execute task
if ( iArrayTasks.Count() )
{
if ( iTaskTimer->IsActive() )
{
iTaskTimer->Cancel();
- }
+ }
iTaskTimer->Start( 0, 0, TCallBack(TaskTimerCallback, this ));
}
}
@@ -1009,7 +1006,7 @@
TInt CMPXMetadataExtractor::OpenFile()
{
MPX_FUNC("CMPXMetadataExtractor::OpenFile()");
-
+
// Open the file
iFile.Close();
TInt error = iFile.Open( iFs, iFileName, EFileRead | EFileShareReadersOrWriters );
@@ -1025,7 +1022,7 @@
{
MPX_FUNC("CMPXMetadataExtractor::AddTasks()");
iFileOpenError = OpenFile();
-
+
// Do not change the order of the task below.
iArrayTasks.Reset();
if ( iFileOpenError == KErrNone )
@@ -1066,7 +1063,7 @@
void CMPXMetadataExtractor::HandleTaskTimerExpired()
{
MPX_FUNC("CMPXMetadataExtractor::HandleTaskTimerExpired()");
-
+
if ( iTaskTimer && iTaskTimer->IsActive() )
{
iTaskTimer->Cancel();
@@ -1083,13 +1080,13 @@
}
iArrayTasks.Reset();
}
-
+
// Remove task at index 0.
if ( iArrayTasks.Count() )
{
iArrayTasks.Remove( 0 );
}
-
+
// check if we have any more task to run
if ( iArrayTasks.Count() )
{
@@ -1104,7 +1101,7 @@
iObs->HandleCreateMediaComplete( iMedia, error );
iMedia = NULL; // ownership transferred.
}
-
+
CleanUp();
}
}
@@ -1135,7 +1132,7 @@
// Validate the objects to be used
MPX_ASSERT(iMedia);
MPX_ASSERT(iDrmMediaUtility);
-
+
// File Path
TParsePtrC parse( iFileName );
iMedia->SetTextValueL( KMPXMediaGeneralUri, iFileName );
@@ -1143,7 +1140,7 @@
MPX_DEBUG2("CMPXMetadataExtractor::SetDrmMediaPropertiesL - Filename=%S", &iFileName);
// get the protected flag from MetadataUtility Container
- TPtrC ptr = aMetaCont.Field( EMetaDataProtected );
+ TPtrC ptr = aMetaCont.Field( EMetaDataProtected );
MPX_DEBUG2("CMPXMetadataExtractor::SetDrmMediaPropertiesL -- status=%S", &ptr);
_LIT( KNonProtected, "0" );
if ( ptr.Compare( KNonProtected ) == 0 )
@@ -1154,7 +1151,7 @@
iMedia->SetTObjectValueL<TBool>( KMPXMediaDrmProtected, prot );
iMedia->SetTObjectValueL<TUint16>( KMPXMediaMTPDrmStatus, (TUint16)prot );
}
- else
+ else
{ // DRM file
// DRM Rights
@@ -1206,20 +1203,20 @@
iMedia->SetTObjectValueL<TBool>( KMPXMediaDrmProtected, prot );
iMedia->SetTObjectValueL<TUint16>( KMPXMediaMTPDrmStatus, (TUint16)prot );
-
+
iDrmMediaUtility->Close();
-
+
} // DRM file
-
+
// verify the file open status
if( iFileOpenError == KErrNotFound || iFileOpenError == KErrPathNotFound )
{
dbFlags |= KMPXMediaGeneralFlagsIsInvalid;
}
-
+
// Finally set the db flag
//
iMedia->SetTObjectValueL( KMPXMediaGeneralFlags, dbFlags );
-
+
}
--- a/mmappcomponents/harvester/server/group/mpxharvester.mmp Fri Jul 09 17:03:16 2010 -0500
+++ b/mmappcomponents/harvester/server/group/mpxharvester.mmp Fri Jul 23 17:48:16 2010 -0500
@@ -62,3 +62,6 @@
LIBRARY usbman.lib
LIBRARY PlatformEnv.lib
LIBRARY disknotifyhandler.lib
+
+SMPSAFE
+
--- a/mmappcomponents/harvester/utility/group/mpxharvesterutility.mmp Fri Jul 09 17:03:16 2010 -0500
+++ b/mmappcomponents/harvester/utility/group/mpxharvesterutility.mmp Fri Jul 23 17:48:16 2010 -0500
@@ -45,4 +45,7 @@
deffile ../eabi/
#elif defined(WINSCW)
deffile ../bwinscw/
-#endif
\ No newline at end of file
+#endif
+
+SMPSAFE
+
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovider.cpp Fri Jul 09 17:03:16 2010 -0500
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovider.cpp Fri Jul 23 17:48:16 2010 -0500
@@ -670,12 +670,14 @@
//
void CAbstractMediaMtpDataProvider::InsertL( RArray<TUint>& aArray, const TUint aProperCode ) const
{
+ CleanupClosePushL( aArray );
TInt err = KErrNone;
err = aArray.Find( aProperCode );
if ( err == KErrNotFound )
err = aArray.Append( aProperCode );
User::LeaveIfError( err );
+ CleanupStack::Pop();
}
// end of file
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovider.cpp Fri Jul 09 17:03:16 2010 -0500
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovider.cpp Fri Jul 23 17:48:16 2010 -0500
@@ -777,12 +777,14 @@
//
void CMediaMtpDataProvider::InsertL( RArray<TUint>& aArray, const TUint aProperCode ) const
{
+ CleanupClosePushL( aArray );
TInt err = KErrNone;
err = aArray.Find( aProperCode );
if ( err == KErrNotFound )
err = aArray.Append( aProperCode );
User::LeaveIfError( err );
+ CleanupStack::Pop();
}
// end of file
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectinfo.cpp Fri Jul 09 17:03:16 2010 -0500
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectinfo.cpp Fri Jul 23 17:48:16 2010 -0500
@@ -174,8 +174,13 @@
// Image Bit Depth
iObjectInfo->SetUint32L( CMTPTypeObjectInfo::EImageBitDepth, 0 );
// Parent Object
- iObjectInfo->SetUint32L( CMTPTypeObjectInfo::EParentObject,
- object->Uint( CMTPObjectMetaData::EParentHandle ) );
+ TUint32 parentHandle = object->Uint( CMTPObjectMetaData::EParentHandle );
+ // refer to 5.3.1.9 of MTP Spec 1.0
+ if ( parentHandle == KMTPHandleNoParent )
+ {
+ parentHandle = KMTPHandleNone;
+ }
+ iObjectInfo->SetUint32L( CMTPTypeObjectInfo::EParentObject, parentHandle );
// Association Type
iObjectInfo->SetUint16L( CMTPTypeObjectInfo::EAssociationType, 0 );
// Association Description
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectproplist.cpp Fri Jul 09 17:03:16 2010 -0500
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectproplist.cpp Fri Jul 23 17:48:16 2010 -0500
@@ -644,7 +644,13 @@
case EMTPObjectPropCodeParentObject:
{
iPropertyElement = &( iPropertyList->ReservePropElemL( aHandle, aPropCode ) );
- iPropertyElement->SetUint32L( CMTPTypeObjectPropListElement::EValue, iObject->Uint( CMTPObjectMetaData::EParentHandle ) );
+ TUint32 parentHandle = iObject->Uint( CMTPObjectMetaData::EParentHandle );
+ // refer to 5.3.1.9 of MTP Spec 1.0
+ if ( parentHandle == KMTPHandleNoParent )
+ {
+ parentHandle = KMTPHandleNone;
+ }
+ iPropertyElement->SetUint32L( CMTPTypeObjectPropListElement::EValue, parentHandle );
}
break;
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectpropvalue.cpp Fri Jul 09 17:03:16 2010 -0500
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectpropvalue.cpp Fri Jul 23 17:48:16 2010 -0500
@@ -205,8 +205,15 @@
// Parent
case EMTPObjectPropCodeParentObject:
{
- iMTPTypeUint32.Set( 0 );
- iMTPTypeUint32 = iObjectInfo->Uint( CMTPObjectMetaData::EParentHandle );
+ iMTPTypeUint32.Set( KMTPHandleNone );
+
+ TUint32 parentHandle = iObjectInfo->Uint( CMTPObjectMetaData::EParentHandle );
+ // refer to 5.3.1.9 of MTP Spec 1.0
+ if ( parentHandle != KMTPHandleNoParent )
+ {
+ iMTPTypeUint32.Set( parentHandle );
+ }
+
SendDataL( iMTPTypeUint32 );
}
break;
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csendobject.cpp Fri Jul 09 17:03:16 2010 -0500
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csendobject.cpp Fri Jul 23 17:48:16 2010 -0500
@@ -607,6 +607,8 @@
SendResponseL( EMTPRespCodeOK );
}
+ iCancelled = EFalse;
+
PRINT1( _L( "MM MTP <= CSendObject::DoHandleResponsePhaseObjectL result = %d" ), result );
return result;
@@ -1067,6 +1069,17 @@
// might happen if function is called before physical file arrives
// do nothing
}
+ else if ( iObjectFormat == EMTPFormatCodeASF )
+ {
+ // happens on some buggy PC implementation, default formatcode to WMA or WMV if extension matches
+ PRINT( _L( "MM MTP <> happens on some buggy PC implementation, default formatcode to WMA or WMV if extension matches" ) );
+ if ( parser.Ext().CompareF( KTxtExtensionWMA ) == 0 )
+ iObjectFormat = EMTPFormatCodeWMA;
+ else if ( parser.Ext().CompareF( KTxtExtensionWMV ) == 0 )
+ iObjectFormat = EMTPFormatCodeWMV;
+ else
+ result = EFalse;
+ }
else
{
PRINT2( _L( "MM MTP <> %S does not match 0x%x" ), &iFullPath, iObjectFormat );
--- a/mmappcomponents/mmmtpdataprovider/tsrc/mtpdataprovidertestmodule/src/ctestobjectmanager.cpp Fri Jul 09 17:03:16 2010 -0500
+++ b/mmappcomponents/mmmtpdataprovider/tsrc/mtpdataprovidertestmodule/src/ctestobjectmanager.cpp Fri Jul 23 17:48:16 2010 -0500
@@ -84,6 +84,7 @@
const TMTPObjectMgrQueryParams& aParams,
RMTPObjectMgrQueryContext& aContext, RArray<TUint>& aHandles ) const
{
+ CleanupClosePushL( aHandles );
PRINTF3( ">CTestObjectManager::GetObjectHandlesL storage = 0x%x parent = 0x%x format = 0x%x", aParams.iStorageId, aParams.iParentHandle, aParams.iFormatCode );
for ( TInt i = 0; i < iMTPObjects.Count(); i++ )
{
@@ -103,6 +104,7 @@
}
aContext.Close();
PRINTF0( "<CTestObjectManager::GetObjectHandlesL" );
+ CleanupStack::Pop();
}
void CTestObjectManager::GetObjectSuidsL(
--- a/mmappcomponents/mmmtpdataprovider/tsrc/mtpdataprovidertestmodule/src/ctestobserver.cpp Fri Jul 09 17:03:16 2010 -0500
+++ b/mmappcomponents/mmmtpdataprovider/tsrc/mtpdataprovidertestmodule/src/ctestobserver.cpp Fri Jul 23 17:48:16 2010 -0500
@@ -737,6 +737,7 @@
void CTestObserver::GetArrayValue( MMTPDataProviderConfig::TParameter aParam, RArray<TUint>& aArray ) const
{
+ CleanupClosePushL( aArray );
PRINTF1( ">CTestObserver::GetArrayValue aParam = %d", aParam );
switch (aParam)
{
@@ -751,4 +752,5 @@
User::Leave( KErrArgument );
}
PRINTF0( "<CTestObserver::GetArrayValue" );
+ CleanupStack::Pop();
}
--- a/mmappcomponents/mmmtpdataprovider/tsrc/mtpdataprovidertestmodule/src/cteststoragemgr.cpp Fri Jul 09 17:03:16 2010 -0500
+++ b/mmappcomponents/mmmtpdataprovider/tsrc/mtpdataprovidertestmodule/src/cteststoragemgr.cpp Fri Jul 23 17:48:16 2010 -0500
@@ -432,6 +432,7 @@
void CTestStorageMgr::GetAvailableDrivesL(
RArray<TDriveNumber>& aDrives ) const
{
+ CleanupClosePushL( aDrives );
PRINTF0( ">CTestStorageMgr::GetAvailableDrivesL" );
aDrives.Reset();
for ( TUint i = 0; ( i < iMapDriveToStorage.Count() ); i++ )
@@ -443,6 +444,7 @@
}
}
PRINTF0( "<CTestStorageMgr::GetAvailableDrivesL" );
+ CleanupStack::Pop();
}
void CTestStorageMgr::GetLogicalStoragesL(
--- a/mmappcomponents/playlistengine/group/mpxplaylistengine.mmp Fri Jul 09 17:03:16 2010 -0500
+++ b/mmappcomponents/playlistengine/group/mpxplaylistengine.mmp Fri Jul 23 17:48:16 2010 -0500
@@ -51,4 +51,6 @@
LIBRARY charconv.lib
LIBRARY mpxcommon.lib
+SMPSAFE
+
// End of File
--- a/mmappcomponents/playlistengine/group/mpxplaylistrecognizer.mmp Fri Jul 09 17:03:16 2010 -0500
+++ b/mmappcomponents/playlistengine/group/mpxplaylistrecognizer.mmp Fri Jul 23 17:48:16 2010 -0500
@@ -46,5 +46,6 @@
LIBRARY bafl.lib
LIBRARY mpxcommon.lib
+SMPSAFE
// End of File
--- a/mpx/collectionframework/collectionengine/group/mpxcollectionengine.mmp Fri Jul 09 17:03:16 2010 -0500
+++ b/mpx/collectionframework/collectionengine/group/mpxcollectionengine.mmp Fri Jul 23 17:48:16 2010 -0500
@@ -48,3 +48,5 @@
deffile ../bwinscw/
#endif
+SMPSAFE
+
--- a/mpx/collectionframework/collectionengine/src/mpxcollectioncache.cpp Fri Jul 09 17:03:16 2010 -0500
+++ b/mpx/collectionframework/collectionengine/src/mpxcollectioncache.cpp Fri Jul 23 17:48:16 2010 -0500
@@ -28,6 +28,7 @@
#include <mpxcollectionopenlresultdef.h>
#include <mpxlog.h>
#include "mpxcollectioncache.h"
+#include <mmf/common/mmfcontrollerpluginresolver.h>
// CONSTANTS
const TInt KMPXRootNodeId = 0;
@@ -589,6 +590,7 @@
void CMPXCollectionCacheNode::HandleChangeL( TMPXItemId aChangeItemId,
RPointerArray<CMPXCollectionCacheNode>& aArray )
{
+ CleanupResetAndDestroyPushL(aArray);
// This node is affected
// All child nodes are invalid!
//
@@ -647,6 +649,7 @@
} // for
} // if iResults
} // if no children
+ CleanupStack::Pop(&aArray);
}
// ----------------------------------------------------------------------------
@@ -827,6 +830,7 @@
// O(n^2) complexity here is OK, Merging keeps the number of items
// very small. Less than 3 items are alive at a time
//
+ CleanupClosePushL( aArray );
RArray<TMPXOpenDataBlock> newArray;
CleanupClosePushL( newArray );
@@ -869,6 +873,7 @@
MPX_DEBUG3("Order: %i %i", newArray[i].iOffset, newArray[i].iSize );
}
CleanupStack::PopAndDestroy( &newArray );
+ CleanupStack::Pop();
}
#ifdef _DEBUG
--- a/mpx/collectionframework/collectionengine/src/mpxcollectionengine.cpp Fri Jul 09 17:03:16 2010 -0500
+++ b/mpx/collectionframework/collectionengine/src/mpxcollectionengine.cpp Fri Jul 23 17:48:16 2010 -0500
@@ -36,6 +36,7 @@
#include <mpxmessagegeneraldefs.h>
#include <mpxmessagecontainerdefs.h>
#include <mpxmessagepluginupdatedefs.h>
+#include <mmf/common/mmfcontrollerpluginresolver.h>
#include "mpxcollectionpluginhandler.h"
#include "mpxcollectioncache.h"
@@ -316,6 +317,7 @@
EXPORT_C void CMPXCollectionEngine::GetSupportedTypesL(
RPointerArray<CMPXCollectionType>& aArray )
{
+ CleanupResetAndDestroyPushL(aArray);
RArray<TUid> uids;
CleanupClosePushL(uids);
iPluginHandler->GetPluginUids(uids);
@@ -340,6 +342,7 @@
CleanupStack::Pop(type);
}
CleanupStack::PopAndDestroy(&uids);
+ CleanupStack::Pop(&aArray);
}
// ----------------------------------------------------------------------------
--- a/mpx/collectionframework/collectionserver/group/mpxcollectionserver.mmp Fri Jul 09 17:03:16 2010 -0500
+++ b/mpx/collectionframework/collectionserver/group/mpxcollectionserver.mmp Fri Jul 23 17:48:16 2010 -0500
@@ -49,3 +49,5 @@
LIBRARY mpxcollectionengine.lib
LIBRARY mpxcommon.lib
+SMPSAFE
+
--- a/mpx/collectionframework/collectionutility/group/mpxcollectionutility.mmp Fri Jul 09 17:03:16 2010 -0500
+++ b/mpx/collectionframework/collectionutility/group/mpxcollectionutility.mmp Fri Jul 23 17:48:16 2010 -0500
@@ -47,3 +47,5 @@
deffile ../bwinscw/
#endif
+SMPSAFE
+
--- a/mpx/commonframework/common/group/mpxcommon.mmp Fri Jul 09 17:03:16 2010 -0500
+++ b/mpx/commonframework/common/group/mpxcommon.mmp Fri Jul 23 17:48:16 2010 -0500
@@ -92,4 +92,6 @@
deffile ../bwinscw/
#endif
+SMPSAFE
+
// End of file
--- a/mpx/commonframework/common/src/mpxcollectionpath.cpp Fri Jul 09 17:03:16 2010 -0500
+++ b/mpx/commonframework/common/src/mpxcollectionpath.cpp Fri Jul 23 17:48:16 2010 -0500
@@ -606,6 +606,7 @@
//
EXPORT_C void CMPXCollectionPath::SelectionL(RArray<TMPXItemId>& aIds) const
{
+ CleanupClosePushL(aIds);
aIds.Reset();
TInt idCount(iIds.Count());
TInt selCount(iSelection.Count());
@@ -617,6 +618,7 @@
aIds.AppendL(iIds[idIndex]);
}
}
+ CleanupStack::Pop();
}
// -----------------------------------------------------------------------------
--- a/mpx/commonframework/common/src/mpxplugininfo.cpp Fri Jul 09 17:03:16 2010 -0500
+++ b/mpx/commonframework/common/src/mpxplugininfo.cpp Fri Jul 23 17:48:16 2010 -0500
@@ -427,6 +427,7 @@
EXPORT_C void CMPXPluginInfo::ExtractUidsFromTextL( const TDesC8& aData,
RArray<TUid>& aArray )
{
+ CleanupClosePushL(aArray);
aArray.Reset();
const TUint8* p = aData.Ptr();
TInt startPos(0);
@@ -461,6 +462,7 @@
TaggedDataParser::ConvertText8ToTIntL(element, val);
aArray.AppendL(TUid::Uid(val));
}
+ CleanupStack::Pop();
}
// ---------------------------------------------------------------------------
--- a/mpx/commonframework/common/src/mpxuser.cpp Fri Jul 09 17:03:16 2010 -0500
+++ b/mpx/commonframework/common/src/mpxuser.cpp Fri Jul 23 17:48:16 2010 -0500
@@ -256,6 +256,7 @@
const TArray<TMPXAttribute>& aSrc,
RArray<TMPXAttribute>& aDest)
{
+ CleanupClosePushL(aDest);
aDest.Reset();
for (TInt i = 0; i < aSrc.Count(); i++)
{
@@ -271,6 +272,7 @@
d = TMPXAttribute(d.ContentId(), d.AttributeId() | s.AttributeId());
}
}
+ CleanupStack::Pop();
}
// ----------------------------------------------------------------------------
@@ -384,6 +386,7 @@
//
EXPORT_C void MPXUser::InternalizeL(RArray<TMPXItemId>& aArray, RReadStream& aStream)
{
+ CleanupClosePushL(aArray);
TInt n=aStream.ReadInt32L();
for (TInt i=0;i<n;++i)
{
@@ -391,6 +394,7 @@
TUint32 id2(aStream.ReadUint32L());
aArray.AppendL(TMPXItemId(id1,id2));
}
+ CleanupStack::Pop();
}
// ----------------------------------------------------------------------------
--- a/mpx/playbackframework/playbackengine/group/mpxplaybackengine.mmp Fri Jul 09 17:03:16 2010 -0500
+++ b/mpx/playbackframework/playbackengine/group/mpxplaybackengine.mmp Fri Jul 23 17:48:16 2010 -0500
@@ -60,4 +60,6 @@
deffile ../bwinscw/
#endif
+SMPSAFE
+
// End of file
--- a/mpx/playbackframework/playbackserver/group/mpxplaybackserver.mmp Fri Jul 09 17:03:16 2010 -0500
+++ b/mpx/playbackframework/playbackserver/group/mpxplaybackserver.mmp Fri Jul 23 17:48:16 2010 -0500
@@ -49,5 +49,8 @@
#ifdef RD_TSP_CLIENT_MAPPER
LIBRARY tspclientmapper.lib
#endif
+
+SMPSAFE
+
// End of file
--- a/mpx/playbackframework/playbackutility/group/mpxplaybackutility.mmp Fri Jul 09 17:03:16 2010 -0500
+++ b/mpx/playbackframework/playbackutility/group/mpxplaybackutility.mmp Fri Jul 23 17:48:16 2010 -0500
@@ -49,3 +49,5 @@
deffile ../bwinscw/
#endif
+SMPSAFE
+
--- a/mpx/viewframework/baseviewplugins/group/mpxviewplugin.mmp Fri Jul 09 17:03:16 2010 -0500
+++ b/mpx/viewframework/baseviewplugins/group/mpxviewplugin.mmp Fri Jul 23 17:48:16 2010 -0500
@@ -50,4 +50,6 @@
deffile ../bwinscw/
#endif
+SMPSAFE
+
// End of File
--- a/mpx/viewframework/viewutility/group/mpxviewutility.mmp Fri Jul 09 17:03:16 2010 -0500
+++ b/mpx/viewframework/viewutility/group/mpxviewutility.mmp Fri Jul 23 17:48:16 2010 -0500
@@ -55,4 +55,6 @@
deffile ../bwinscw/
#endif
+SMPSAFE
+
// End of File
--- a/mpx/viewframework/viewutility/src/mpxviewplugininfo.cpp Fri Jul 09 17:03:16 2010 -0500
+++ b/mpx/viewframework/viewutility/src/mpxviewplugininfo.cpp Fri Jul 23 17:48:16 2010 -0500
@@ -189,6 +189,7 @@
const TDesC8& aData,
RArray<TUid>& aArray )
{
+ CleanupClosePushL(aArray);
aArray.Reset();
TInt nextPos( 0 );
@@ -205,6 +206,7 @@
aArray.AppendL( TUid::Uid( pluginUid ) );
}
} while ( KErrNotFound != nextPos );
+ CleanupStack::Pop();
}
// ---------------------------------------------------------------------------