CCFActionPlugIn Class Reference

class CCFActionPlugIn : public CBase

Base class for all Action plugins.

For every action plug-in implementation there will be also an action execution thread. Action execution thread uses shared heap with Context Framework Server main thread. Cleanup stack and active scheduler will be created for Action execution thread.

Actions are exeucted in three phase:
  • PrepareExecutionL

  • ExecuteL (Mandatory)

  • FinishedExecution Implementation needs to return correct TExecutionTime from ExecuteL if the action being performed is asynchronous an will not be completed when ExecuteL returns.

NOTE: It is crucial to only return ENone from ExecuteL if the action is really completed. Any active objects, timers or asynchronous requests won't be run since the action execution thread starts to wait in semaphore for a new action signalation when ExecuteL returns with ENone. In other cases action execution thread starts to wait for action to be completed. When the action is completed call AsyncExecutionCompleted to stop the wait.

CFActivatorEngine.lib
Since
S60 5.0

Inherits from

Constructor & Destructor Documentation

CCFActionPlugIn()

IMPORT_CCCFActionPlugIn()[protected]

~CCFActionPlugIn()

IMPORT_C~CCFActionPlugIn()

Destructor.

Member Functions Documentation

AppendQueue(CCFActionIndication *)

TBool AppendQueue(CCFActionIndication *aAction)[private]

Parameters

CCFActionIndication * aAction

AsyncExecutionCompleted()

IMPORT_C voidAsyncExecutionCompleted()
Notifies the base implementation that async request has been completed. All errors will be ignored. If the operation executed is not async then this method is not needed to be called. Note:
  • If this method is not called scheduler is blocked maximum of 30 seconds before it will be automatically stopped.

Since
S60 5.0

ConstructL()

voidConstructL()[private]

ExecuteAction()

voidExecuteAction()[private]

ExecuteL(CCFActionIndication *)

TExecutionTime ExecuteL(CCFActionIndication *aActionIndication)[pure virtual]
Executes action. If ExecuteL leaves, FinishedExecution won't be called. Note:
  • Do not delete aActionIndication. aActionIndication will be deleted automatically after the execution is ended.

Since
S60 5.0

Parameters

CCFActionIndication * aActionIndicationAction indication.

Extension(const TUid &)

IMPORT_C TAny *Extension(const TUid &aExtensionUid)const [virtual]

Returns an extension interface. The extension interface is mapped with the extension UID.

The default implemementation returns NULL.

Since
S60 5.0

Parameters

const TUid & aExtensionUid

FinishedExecution()

IMPORT_C voidFinishedExecution()[virtual]

Finishes execution. Default implementation is empty.

Since
S60 5.0

GetActionsL(CDesCArray &)

voidGetActionsL(CDesCArray &aActionList)const [pure virtual]

Get actions the plugin can perform. Activator Engine calls this when it wants to know which actions the module supports.

Since
S60 5.0

Parameters

CDesCArray & aActionListSupported actions by the plug-in.

InitializeL()

voidInitializeL()[pure virtual]

Plug-in is allowed to reserve memory. It is nessecary that no memory is allocated before InitializeL is called.

Since
S60 5.0

NewL(const TUid &)

IMPORT_C CCFActionPlugIn *NewL(const TUid &aImplementationUid)[static]

Symbian two phased contrstuctors.

Since
S60 5.0

Parameters

const TUid & aImplementationUidImplementation to create.

NewLC(const TUid &)

IMPORT_C CCFActionPlugIn *NewLC(const TUid &aImplementationUid)[static]

Parameters

const TUid & aImplementationUid

PrepareExecutionL()

IMPORT_C voidPrepareExecutionL()[virtual]

Prepares execution. If PrepareExecutionL leaves, ExecuteL and FinishedExecution won't be called. Default implementation is empty.

Since
S60 5.0

SecurityPolicy()

const TSecurityPolicy &SecurityPolicy()const [pure virtual]

Returns the security policy assigned with the plugin.

Since
S60 5.0

Member Enumerations Documentation

Enum TExecutionTime

Enumerators

ENone
ESmall
EMedium
ELong

Member Data Documentation

TUid iDtorKey

TUid iDtorKey[private]

Destructor Id

CCFActionPlugInImpl * iImpl

CCFActionPlugInImpl *iImpl[private]

Plug-in logic

TAny * iReserved1

TAny *iReserved1[private]

Reserved

TAny * iReserved2

TAny *iReserved2[private]

TAny * iReserved3

TAny *iReserved3[private]