diff -r 63c982fb92f2 -r b73252188534 harvester/harvesterplugins/RTPPlugin/src/harvesterrtpplugin.cpp --- a/harvester/harvesterplugins/RTPPlugin/src/harvesterrtpplugin.cpp Thu Jul 15 19:07:24 2010 +0300 +++ b/harvester/harvesterplugins/RTPPlugin/src/harvesterrtpplugin.cpp Thu Aug 19 10:20:41 2010 +0300 @@ -35,11 +35,24 @@ // Enough size to recognize file and read metaheader const TInt KFileBufferSize( KMaxMetaHeaderLength ); -CHarvesterRtpPluginPropertyDefs::CHarvesterRtpPluginPropertyDefs() : CBase() +CHarvesterRtpPluginPropertyDefs::CHarvesterRtpPluginPropertyDefs() : CBase(), + iCreationDatePropertyDef( NULL ) { } -void CHarvesterRtpPluginPropertyDefs::ConstructL(CMdEObjectDef& aObjectDef) +void CHarvesterRtpPluginPropertyDefs::ConstructL( CMdEObjectDef& aObjectDef ) + { + SetByObjectDefL( aObjectDef ); + } + +CHarvesterRtpPluginPropertyDefs* CHarvesterRtpPluginPropertyDefs::NewL() + { + CHarvesterRtpPluginPropertyDefs* self = + new (ELeave) CHarvesterRtpPluginPropertyDefs(); + return self; + } + +void CHarvesterRtpPluginPropertyDefs::SetByObjectDefL( CMdEObjectDef& aObjectDef ) { CMdENamespaceDef& nsDef = aObjectDef.NamespaceDef(); @@ -61,16 +74,6 @@ iRecordingFlagsPropertyDef = &videoDef.GetPropertyDefL( MdeConstants::Video::KRecordingFlagsProperty ); } -CHarvesterRtpPluginPropertyDefs* CHarvesterRtpPluginPropertyDefs::NewL(CMdEObjectDef& aObjectDef) - { - CHarvesterRtpPluginPropertyDefs* self = - new (ELeave) CHarvesterRtpPluginPropertyDefs(); - CleanupStack::PushL( self ); - self->ConstructL( aObjectDef ); - CleanupStack::Pop( self ); - return self; - } - // ======== MEMBER FUNCTIONS ======== // --------------------------------------------------------------------------- @@ -89,6 +92,7 @@ { WRITELOG( "CHarvesterRtpPlugin::ConstructL()" ); SetPriority( KHarvesterPriorityHarvestingPlugin - 1 ); + iPropDefs = CHarvesterRtpPluginPropertyDefs::NewL(); } // --------------------------------------------------------------------------- @@ -262,12 +266,8 @@ WRITELOG( "CHarvesterRtpPlugin::HandleObjectPropertiesL()" ); CMdEObject& mdeObject = aHD.MdeObject(); - - if( !iPropDefs ) - { - CMdEObjectDef& objectDef = mdeObject.Def(); - iPropDefs = CHarvesterRtpPluginPropertyDefs::NewL( objectDef ); - } + + InitPropDefsL( mdeObject.Def() ); TTimeIntervalSeconds timeOffset = User::UTCOffset(); TTime localModifiedTime = aClipDetails.iModifiedDate + timeOffset; @@ -340,3 +340,13 @@ CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, *iPropDefs->iRecordingFlagsPropertyDef, &flags, aIsAdd ); } + +void CHarvesterRtpPlugin::InitPropDefsL( CMdEObjectDef& aObjectDef ) + { + if( !iPropDefs->iCreationDatePropertyDef ) + { + iPropDefs->SetByObjectDefL( aObjectDef ); + } + } + +