mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csetobjectreferences.cpp
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csetobjectreferences.cpp Wed Jun 16 16:05:08 2010 +0100
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csetobjectreferences.cpp Thu Jul 22 16:38:21 2010 +0100
@@ -70,7 +70,6 @@
//
void CSetObjectReferences::ConstructL()
{
- SetPSStatus();
}
// -----------------------------------------------------------------------------
@@ -89,7 +88,7 @@
// Standard c++ constructor
// -----------------------------------------------------------------------------
//
-EXPORT_C CSetObjectReferences::CSetObjectReferences( MMTPDataProviderFramework& aFramework,
+CSetObjectReferences::CSetObjectReferences( MMTPDataProviderFramework& aFramework,
MMTPConnection& aConnection,
MMmMtpDpConfig& aDpConfig ) :
CRequestProcessor( aFramework,
@@ -106,7 +105,7 @@
// set references to DB
// -----------------------------------------------------------------------------
//
-EXPORT_C void CSetObjectReferences::DoSetObjectReferencesL( const CMTPObjectMetaData& aObject )
+void CSetObjectReferences::DoSetObjectReferencesL( const CMTPObjectMetaData& aObject )
{
TUint formatCode = aObject.Uint( CMTPObjectMetaData::EFormatCode );
TBool hasReference = MmMtpDpUtility::HasReference( formatCode );
@@ -126,6 +125,9 @@
EXPORT_C void CSetObjectReferences::ServiceL()
{
PRINT( _L( "MM MTP => CSetObjectReferences::ServiceL" ) );
+
+ MmMtpDpUtility::SetPSStatus(EMtpPSStatusActive);
+
delete iReferences;
iReferences = NULL;
iReferences = CMTPTypeArray::NewL( EMTPTypeAUINT32 );
@@ -162,6 +164,10 @@
iFramework.ObjectMgr().ObjectL( objectHandle, *object );
PRINT1( _L( "MM MTP <> object file name is %S" ), &(object->DesC( CMTPObjectMetaData::ESuid ) ) );
DoSetObjectReferencesL( *object );
+
+ // set it to something else other than EMTPSubFormatCodeUnknown to prevent being queried from MPX later in the same session
+ object->SetUint( CMTPObjectMetaData::EFormatSubCode, EMTPSubFormatCodeUndefined );
+ iFramework.ObjectMgr().ModifyObjectL( *object );
CleanupStack::PopAndDestroy( object ); // - object