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 ); }
Public Member Functions | |
---|---|
~CComposerPlugin () | |
TBool | IsComposingComplete () |
IMPORT_C void | ListImplementationsL ( RImplInfoPtrArray &) |
IMPORT_C CComposerPlugin * | NewL (const TUid &) |
IMPORT_C void | RemoveSession () |
IMPORT_C void | SetSession (CMdESession &) |
Protected Member Functions | |
---|---|
void | RemoveObservers () |
void | SetObservers () |
Protected Attributes | |
---|---|
CMdESession * | iSession |
Private Attributes | |
---|---|
TUid | iDtor_ID_Key |
TBool | IsComposingComplete | ( | ) | [pure virtual] |
Checks if composing is completed.
IMPORT_C void | ListImplementationsL | ( | RImplInfoPtrArray & | aImplInfoArray | ) | [static] |
Lists all available implementations which satisfy this given interface.
RImplInfoPtrArray & aImplInfoArray | Reference to a list which will be populated with plug-in implementation details. |
IMPORT_C CComposerPlugin * | NewL | ( | const TUid & | aUid | ) | [static] |
Construction.
const TUid & aUid | Implementation UID which plug-in to invoke. |
void | RemoveObservers | ( | ) | [protected, pure virtual] |
Unsets observers. Called by the interface itself when RemoveSession method is called from Harvester server side.
void | SetObservers | ( | ) | [protected, pure virtual] |
Sets observers to be notified. Called by the interface itself when SetSession method is called from Harvester server side.
IMPORT_C void | SetSession | ( | CMdESession & | aSession | ) |
Sets Mde session to be used.
CMdESession & aSession | Open MdE session to utilize in the Composer plug-in |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.