equal
deleted
inserted
replaced
33 _LIT( KRtpClipMimetype, "application/x-nokia-teh-rtp" ); |
33 _LIT( KRtpClipMimetype, "application/x-nokia-teh-rtp" ); |
34 |
34 |
35 // Enough size to recognize file and read metaheader |
35 // Enough size to recognize file and read metaheader |
36 const TInt KFileBufferSize( KMaxMetaHeaderLength ); |
36 const TInt KFileBufferSize( KMaxMetaHeaderLength ); |
37 |
37 |
38 CHarvesterRtpPluginPropertyDefs::CHarvesterRtpPluginPropertyDefs() : CBase() |
38 CHarvesterRtpPluginPropertyDefs::CHarvesterRtpPluginPropertyDefs() : CBase(), |
|
39 iCreationDatePropertyDef( NULL ) |
39 { |
40 { |
40 } |
41 } |
41 |
42 |
42 void CHarvesterRtpPluginPropertyDefs::ConstructL(CMdEObjectDef& aObjectDef) |
43 void CHarvesterRtpPluginPropertyDefs::ConstructL( CMdEObjectDef& aObjectDef ) |
|
44 { |
|
45 SetByObjectDefL( aObjectDef ); |
|
46 } |
|
47 |
|
48 CHarvesterRtpPluginPropertyDefs* CHarvesterRtpPluginPropertyDefs::NewL() |
|
49 { |
|
50 CHarvesterRtpPluginPropertyDefs* self = |
|
51 new (ELeave) CHarvesterRtpPluginPropertyDefs(); |
|
52 return self; |
|
53 } |
|
54 |
|
55 void CHarvesterRtpPluginPropertyDefs::SetByObjectDefL( CMdEObjectDef& aObjectDef ) |
43 { |
56 { |
44 CMdENamespaceDef& nsDef = aObjectDef.NamespaceDef(); |
57 CMdENamespaceDef& nsDef = aObjectDef.NamespaceDef(); |
45 |
58 |
46 // Common property definitions |
59 // Common property definitions |
47 CMdEObjectDef& objectDef = nsDef.GetObjectDefL( MdeConstants::Object::KBaseObject ); |
60 CMdEObjectDef& objectDef = nsDef.GetObjectDefL( MdeConstants::Object::KBaseObject ); |
59 CMdEObjectDef& videoDef = nsDef.GetObjectDefL( MdeConstants::Video::KVideoObject ); |
72 CMdEObjectDef& videoDef = nsDef.GetObjectDefL( MdeConstants::Video::KVideoObject ); |
60 iAgeProfilePropertyDef = &videoDef.GetPropertyDefL( MdeConstants::Video::KAgeProfileProperty ); |
73 iAgeProfilePropertyDef = &videoDef.GetPropertyDefL( MdeConstants::Video::KAgeProfileProperty ); |
61 iRecordingFlagsPropertyDef = &videoDef.GetPropertyDefL( MdeConstants::Video::KRecordingFlagsProperty ); |
74 iRecordingFlagsPropertyDef = &videoDef.GetPropertyDefL( MdeConstants::Video::KRecordingFlagsProperty ); |
62 } |
75 } |
63 |
76 |
64 CHarvesterRtpPluginPropertyDefs* CHarvesterRtpPluginPropertyDefs::NewL(CMdEObjectDef& aObjectDef) |
|
65 { |
|
66 CHarvesterRtpPluginPropertyDefs* self = |
|
67 new (ELeave) CHarvesterRtpPluginPropertyDefs(); |
|
68 CleanupStack::PushL( self ); |
|
69 self->ConstructL( aObjectDef ); |
|
70 CleanupStack::Pop( self ); |
|
71 return self; |
|
72 } |
|
73 |
|
74 // ======== MEMBER FUNCTIONS ======== |
77 // ======== MEMBER FUNCTIONS ======== |
75 |
78 |
76 // --------------------------------------------------------------------------- |
79 // --------------------------------------------------------------------------- |
77 // Default constructor |
80 // Default constructor |
78 // --------------------------------------------------------------------------- |
81 // --------------------------------------------------------------------------- |
87 // |
90 // |
88 void CHarvesterRtpPlugin::ConstructL() |
91 void CHarvesterRtpPlugin::ConstructL() |
89 { |
92 { |
90 WRITELOG( "CHarvesterRtpPlugin::ConstructL()" ); |
93 WRITELOG( "CHarvesterRtpPlugin::ConstructL()" ); |
91 SetPriority( KHarvesterPriorityHarvestingPlugin - 1 ); |
94 SetPriority( KHarvesterPriorityHarvestingPlugin - 1 ); |
|
95 iPropDefs = CHarvesterRtpPluginPropertyDefs::NewL(); |
92 } |
96 } |
93 |
97 |
94 // --------------------------------------------------------------------------- |
98 // --------------------------------------------------------------------------- |
95 // Constructor |
99 // Constructor |
96 // --------------------------------------------------------------------------- |
100 // --------------------------------------------------------------------------- |
260 TBool aIsAdd) |
264 TBool aIsAdd) |
261 { |
265 { |
262 WRITELOG( "CHarvesterRtpPlugin::HandleObjectPropertiesL()" ); |
266 WRITELOG( "CHarvesterRtpPlugin::HandleObjectPropertiesL()" ); |
263 |
267 |
264 CMdEObject& mdeObject = aHD.MdeObject(); |
268 CMdEObject& mdeObject = aHD.MdeObject(); |
265 |
269 |
266 if( !iPropDefs ) |
270 InitPropDefsL( mdeObject.Def() ); |
267 { |
|
268 CMdEObjectDef& objectDef = mdeObject.Def(); |
|
269 iPropDefs = CHarvesterRtpPluginPropertyDefs::NewL( objectDef ); |
|
270 } |
|
271 |
271 |
272 TTimeIntervalSeconds timeOffset = User::UTCOffset(); |
272 TTimeIntervalSeconds timeOffset = User::UTCOffset(); |
273 TTime localModifiedTime = aClipDetails.iModifiedDate + timeOffset; |
273 TTime localModifiedTime = aClipDetails.iModifiedDate + timeOffset; |
274 |
274 |
275 if( ! mdeObject.Placeholder() ) |
275 if( ! mdeObject.Placeholder() ) |
338 } |
338 } |
339 |
339 |
340 CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, |
340 CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, |
341 *iPropDefs->iRecordingFlagsPropertyDef, &flags, aIsAdd ); |
341 *iPropDefs->iRecordingFlagsPropertyDef, &flags, aIsAdd ); |
342 } |
342 } |
|
343 |
|
344 void CHarvesterRtpPlugin::InitPropDefsL( CMdEObjectDef& aObjectDef ) |
|
345 { |
|
346 if( !iPropDefs->iCreationDatePropertyDef ) |
|
347 { |
|
348 iPropDefs->SetByObjectDefL( aObjectDef ); |
|
349 } |
|
350 } |
|
351 |
|
352 |