--- a/harvester/harvesterplugins/RTPPlugin/src/harvesterrtpplugin.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/harvesterplugins/RTPPlugin/src/harvesterrtpplugin.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -35,24 +35,11 @@
// Enough size to recognize file and read metaheader
const TInt KFileBufferSize( KMaxMetaHeaderLength );
-CHarvesterRtpPluginPropertyDefs::CHarvesterRtpPluginPropertyDefs() : CBase(),
- iCreationDatePropertyDef( NULL )
+CHarvesterRtpPluginPropertyDefs::CHarvesterRtpPluginPropertyDefs() : CBase()
{
}
-void CHarvesterRtpPluginPropertyDefs::ConstructL( CMdEObjectDef& aObjectDef )
- {
- SetByObjectDefL( aObjectDef );
- }
-
-CHarvesterRtpPluginPropertyDefs* CHarvesterRtpPluginPropertyDefs::NewL()
- {
- CHarvesterRtpPluginPropertyDefs* self =
- new (ELeave) CHarvesterRtpPluginPropertyDefs();
- return self;
- }
-
-void CHarvesterRtpPluginPropertyDefs::SetByObjectDefL( CMdEObjectDef& aObjectDef )
+void CHarvesterRtpPluginPropertyDefs::ConstructL(CMdEObjectDef& aObjectDef)
{
CMdENamespaceDef& nsDef = aObjectDef.NamespaceDef();
@@ -74,6 +61,16 @@
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 ========
// ---------------------------------------------------------------------------
@@ -92,7 +89,6 @@
{
WRITELOG( "CHarvesterRtpPlugin::ConstructL()" );
SetPriority( KHarvesterPriorityHarvestingPlugin - 1 );
- iPropDefs = CHarvesterRtpPluginPropertyDefs::NewL();
}
// ---------------------------------------------------------------------------
@@ -266,8 +262,12 @@
WRITELOG( "CHarvesterRtpPlugin::HandleObjectPropertiesL()" );
CMdEObject& mdeObject = aHD.MdeObject();
-
- InitPropDefsL( mdeObject.Def() );
+
+ if( !iPropDefs )
+ {
+ CMdEObjectDef& objectDef = mdeObject.Def();
+ iPropDefs = CHarvesterRtpPluginPropertyDefs::NewL( objectDef );
+ }
TTimeIntervalSeconds timeOffset = User::UTCOffset();
TTime localModifiedTime = aClipDetails.iModifiedDate + timeOffset;
@@ -340,13 +340,3 @@
CMdeObjectWrapper::HandleObjectPropertyL(mdeObject,
*iPropDefs->iRecordingFlagsPropertyDef, &flags, aIsAdd );
}
-
-void CHarvesterRtpPlugin::InitPropDefsL( CMdEObjectDef& aObjectDef )
- {
- if( !iPropDefs->iCreationDatePropertyDef )
- {
- iPropDefs->SetByObjectDefL( aObjectDef );
- }
- }
-
-