CComposerPlugin Class Reference

class CComposerPlugin : public CBase

Composer Plug-in ECom interface definition. Composer plug-in implementation needs to inherit this class and implement the pure virtual methods which exist in this interface.

Example:

class CMyVideoComposerPlugin: public CComposerPlugin { protected: void SetObservers(); void RemoveObservers();

// Because CComposerPlugin inherits MMdEObjectObserver void HandleObjectNotification(CMdESession& aSession, TObserverNotificationType aType, const RArray<TItemId>& aObjectIdArray);

private: // Active object which does the actual binary writing // so that this interface and its observers remain responsive CMyVideoComposerAO* iVideoComposerAO; }

void SetObservers() { // We want to listen to changes in Video metadata objects // and setup an observer for this CMdENamespaceDef& defaultNamespace = iSession->GetDefaultNamespaceDefL(); CMdEObjectDef& videoDef = defaultNamespace.GetObjectDefL( MdeConstants::Video::KVideoObject ); CMdELogicCondition* condition = CMdELogicCondition::NewL( ELogicConditionOperatorAnd ); condition->AddObjectConditionL( videoDef );

// iSession is reference to CMdESession which is always set in CComposerPlugin::SetSession() iSession->AddObjectObserverL( *this, condition, ENotifyModify, &defaultNamespace ); }

void RemoveObservers() { iSession->RemoveObjectObserverL( *this ) }

void CComposerImagePlugin::HandleObjectNotification(CMdESession& aSession, TObserverNotificationType aType, const RArray<TItemId>& aObjectIdArray) { // We give ID-array of changed Video objects to our active object // which adds then to a its internal queue and processes them one-by-one // with different RunL-calls so that we don't stuck the thread by composing // for example 1000 binary files in a row. iVideoComposerAO->AddToQueue( aObjectIdArray ); }

Inherits from

Constructor & Destructor Documentation

~CComposerPlugin()

IMPORT_C~CComposerPlugin()[virtual]

Destructor.

Member Functions Documentation

IsComposingComplete()

TBool IsComposingComplete()[pure virtual]

Checks if composing is completed.

ListImplementationsL(RImplInfoPtrArray &)

IMPORT_C voidListImplementationsL(RImplInfoPtrArray &aImplInfoArray)[static]

Lists all available implementations which satisfy this given interface.

Parameters

RImplInfoPtrArray & aImplInfoArrayReference to a list which will be populated with plug-in implementation details.

NewL(const TUid &)

IMPORT_C CComposerPlugin *NewL(const TUid &aUid)[static]

Construction.

Parameters

const TUid & aUidImplementation UID which plug-in to invoke.

RemoveObservers()

voidRemoveObservers()[protected, pure virtual]

Unsets observers. Called by the interface itself when RemoveSession method is called from Harvester server side.

RemoveSession()

IMPORT_C voidRemoveSession()

Unsets Mde session.

SetObservers()

voidSetObservers()[protected, pure virtual]

Sets observers to be notified. Called by the interface itself when SetSession method is called from Harvester server side.

SetSession(CMdESession &)

IMPORT_C voidSetSession(CMdESession &aSession)

Sets Mde session to be used.

Parameters

CMdESession & aSessionOpen MdE session to utilize in the Composer plug-in

Member Data Documentation

TUid iDtor_ID_Key

TUid iDtor_ID_Key[private]

CMdESession * iSession

CMdESession *iSession[protected]