CDiagSuitePluginBase Class Reference

class CDiagSuitePluginBase : public CActive

Diagnostics Framework Suite Plugin Base Class

This base class provides common implementation of Suite Plugin.

Since
S60 v5.0

Inherits from

Nested Classes and Structures

Public Member Functions
~CDiagSuitePluginBase ()
IMPORT_C void AddChildL ( MDiagPlugin *)
IMPORT_C CGulIcon * CreateIconL ()
IMPORT_C TAny * CustomOperationL ( TUid , TAny *)
IMPORT_C void ExecutionStopL (TStopReason)
IMPORT_C void FinalizeChildrenExecutionL (TDiagSuiteExecParam *, TBool , TBool )
IMPORT_C void GetChildrenL ( RPointerArray < MDiagPlugin > &, TSortOrder)
IMPORT_C void GetChildrenUidsL ( RArray < TUid > &, TSortOrder)
IMPORT_C TAny * GetCustomL ( TUid , TAny *)
IMPORT_C HBufC * GetDescriptionL ()
IMPORT_C void GetLogicalDependenciesL ( CPtrCArray &)
IMPORT_C HBufC * GetTitleL ()
IMPORT_C TBool IsSupported ()
IMPORT_C TUint Order ()
IMPORT_C TUid ParentUid ()
IMPORT_C void PrepareChildrenExecutionL (TDiagSuiteExecParam *, TBool , TBool )
IMPORT_C const TDesC & ServiceLogicalName ()
IMPORT_C void SetDtorIdKey ( TUid )
IMPORT_C void TestSessionBeginL (MDiagEngineCommon &, TBool , TAny *)
IMPORT_C void TestSessionEndL (MDiagEngineCommon &, TBool , TAny *)
IMPORT_C TPluginType Type ()
Protected Member Functions
CDiagSuitePluginBase (CDiagPluginConstructionParam *)
IMPORT_C void BaseConstructL (const TDesC &)
IMPORT_C CCoeEnv & CoeEnv ()
IMPORT_C void DismissWaitingDialog ()
IMPORT_C TBool RunWaitingDialogL ( CAknDialog *, TInt &)
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::DoCancel()
CActive::Extension_(TUint,TAny *&,TAny *)
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::RunError(TInt)
CActive::RunL()
CActive::SetActive()
CActive::SetPriority(TInt)
CActive::~CActive()
CBase::CBase()
CBase::Delete(CBase *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Inherited Enumerations
CActive:TPriority
Private Attributes
CCoeEnv & iCoeEnv
CDiagPluginConstructionParam * iConstructionParam
TPrivateData * iData
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

CDiagSuitePluginBase(CDiagPluginConstructionParam *)

IMPORT_C CDiagSuitePluginBase ( CDiagPluginConstructionParam * aParam ) [protected]

C++ constructor

Parameters

CDiagPluginConstructionParam * aParam

~CDiagSuitePluginBase()

IMPORT_C ~CDiagSuitePluginBase ( ) [virtual]

Destructor.

Member Functions Documentation

AddChildL(MDiagPlugin *)

IMPORT_C void AddChildL ( MDiagPlugin * aChild ) [virtual]

Add one child. Child can be either a test suite or a test plug-in.

Parameters

MDiagPlugin * aChild - Child to be added. However, ownership is not transferred here.

BaseConstructL(const TDesC &)

IMPORT_C void BaseConstructL ( const TDesC & aResourceFileName ) [protected]

Base class constructor This initializes CDiagSuitePluginBase class. Derived class must call this method in its ConstructL() method.

Parameters

const TDesC & aResourceFileName Drive and name of resource file in format <path>:<rsc_file_name>

CoeEnv()

IMPORT_C CCoeEnv & CoeEnv ( ) [protected]

CreateIconL()

IMPORT_C CGulIcon * CreateIconL ( ) const [virtual]

Create an icon that represents the plug-in.

CustomOperationL(TUid, TAny *)

IMPORT_C TAny * CustomOperationL ( TUid aUid,
TAny * aParam
) [virtual]

Reserved for future use/plugin's custom functionality.

Parameters

TUid aUid Unique identifier of the operation.
TAny * aParam Custom parameter.

DismissWaitingDialog()

IMPORT_C void DismissWaitingDialog ( ) [protected]

Dismiss the waiting dialog. This will cause the RunDialogLD() function to return with aIsUserResponse = Efalse. If nothing is being displayed, this function does nothing.

ExecutionStopL(TStopReason)

IMPORT_C void ExecutionStopL ( TStopReason aReason ) [virtual]

Cancels pre/post execution. Cancellation is expected to be synchronous. Suite plug-in must not call ContinueExecutionL().

Parameters

TStopReason aReason - Reason why ExecutionStopL() is being called.

FinalizeChildrenExecutionL(TDiagSuiteExecParam *, TBool, TBool)

IMPORT_C void FinalizeChildrenExecutionL ( TDiagSuiteExecParam * aParam,
TBool aSkipDependencyCheck,
TBool aDependencyExecution
) [virtual]

Called before test execution switches to another test suite.

Parameters

TDiagSuiteExecParam * aParam
TBool aSkipDependencyCheck - If ETrue dependency is disabled for this test session.
TBool aDependencyExecution - If ETrue, this suite is being executed to satisfy dependency.

GetChildrenL(RPointerArray< MDiagPlugin > &, TSortOrder)

IMPORT_C void GetChildrenL ( RPointerArray < MDiagPlugin > & aChildren,
TSortOrder aOrder
) const [virtual]

Get children of this plug-in. The pointer array is guaranteed to be sorted defined by TSortOrder.

Parameters

RPointerArray < MDiagPlugin > & aChildren Children are appended into this array.
TSortOrder aOrder Sorting algorithm.

GetChildrenUidsL(RArray< TUid > &, TSortOrder)

IMPORT_C void GetChildrenUidsL ( RArray < TUid > & aUids,
TSortOrder aOrder
) const [virtual]

Get the Uids. The uid is used for database access. Test suites return a list of their childrens' uids.

Parameters

RArray < TUid > & aUids An UID array.
TSortOrder aOrder Sorting algorithm.

GetCustomL(TUid, TAny *)

IMPORT_C TAny * GetCustomL ( TUid aUid,
TAny * aParam
) [virtual]

Reserved for future use/plugin's custom functionality.

Parameters

TUid aUid Unique identifier of the property
TAny * aParam Custom parameter.

GetDescriptionL()

IMPORT_C HBufC * GetDescriptionL ( ) const [virtual]

Get description of the plugin. Default implementation in CDiagSuitePluginBase will leave with KErrNotSupported. If plug-in has a description, plug-ins must override this method. MDiagPlugin::GetDescriptionL()

GetLogicalDependenciesL(CPtrCArray &)

IMPORT_C void GetLogicalDependenciesL ( CPtrCArray & aArray ) const [virtual]

Get logical dependencies. One plug-in can have multiple dependencies to other plug-ins.

ServiceLogicalName .

Parameters

CPtrCArray & aArray An array of logical names.

GetTitleL()

IMPORT_C HBufC * GetTitleL ( ) const [virtual]

Get title of the plugin. Default implementation in CDiagSuitePluginBase will leave with KErrNotSupported. If plug-in has a title, plug-ins must override this method. MDiagPlugin::GetTitleL()

IsSupported()

IMPORT_C TBool IsSupported ( ) const [virtual]

Order()

IMPORT_C TUint Order ( ) const [virtual]

Get the order number that this plug-in should appear in its parent list.

ParentUid()

IMPORT_C TUid ParentUid ( ) const [virtual]

Get UID of the parent.

PrepareChildrenExecutionL(TDiagSuiteExecParam *, TBool, TBool)

IMPORT_C void PrepareChildrenExecutionL ( TDiagSuiteExecParam * aParam,
TBool aSkipDependencyCheck,
TBool aDependencyExecution
) [virtual]

Called before one of its test plug-in is executed. Note that it will not be called if two of its children plug-ins are executed in sequence.

Parameters

TDiagSuiteExecParam * aParam
TBool aSkipDependencyCheck - If ETrue dependency is disabled for this test session.
TBool aDependencyExecution - If ETrue, this suite is being executed to satisfy dependency.

RunWaitingDialogL(CAknDialog *, TInt &)

IMPORT_C TBool RunWaitingDialogL ( CAknDialog * aDialog,
TInt & aDialogResponse
) [protected]

Run a dialog that waits for response. It is highly recommended that all plug-ins use this function to display dialogs since it can detect deletion of dialogs.

The difference from normal dialog RunLD is that this function returns ETrue if dialog exited due to user response and EFalse if it was by other means, such as object deletion or by DismissWaitingDialog() method.

!!!! NOTE THAT PLUG-IN MUST RETURN IMMEDIATELY WITHOUT ACCESSING !!!! !!!! LOCAL VARIABLE OR LOCAL FUNCITONS WHEN THIS FUNCTION RETURNS !!!! !!!! EFalse VALUE BECAUSE "THIS" POINTER MAY BE FREED ALREADY. !!!!

The normal dialog response is returned via aDialogResponse reference. This function can only display one dialog at a time. Calling it again while it has not been returned will cause panic.

avkon.hrh "CBA constants". E.g. EAknSoftkeyYes The only exception is that if cancel is pressed, it will be 0.

Parameters

CAknDialog * aDialog - Pointer to dialog to run. If the dialog does not have EEikDialogFlagWait flag set, it will panic with EDiagPluginBasePanicBadArgument
TInt & aDialogResponse - Response from the dialog. For detailed values

ServiceLogicalName()

IMPORT_C const TDesC & ServiceLogicalName ( ) const [virtual]

Get the name of the service that the plug-in provides.

SetDtorIdKey(TUid)

IMPORT_C void SetDtorIdKey ( TUid aDtorIdKey ) [virtual]

MDiagPlugin::SetDTorIdKey()

Parameters

TUid aDtorIdKey

TestSessionBeginL(MDiagEngineCommon &, TBool, TAny *)

IMPORT_C void TestSessionBeginL ( MDiagEngineCommon & aEngine,
TBool aSkipDependencyCheck,
TAny * aCustomParams
) [virtual]

Initialization Step. This method is called before any plugin are executed. This can be used to clean up any left over data from previous execution sessions. All plug-ins in execution plan will have a chance to clean up before any plug-ins are run. This is a synchrouns method.

Parameters

MDiagEngineCommon & aEngine - Reference to engine.
TBool aSkipDependencyCheck - If ETrue, plug-in will be executed even if dependencies are not executed.
TAny * aCustomParams Custom parameters for plug-ins. It can used to pass arbitrary data from application to the plug-ins. Owership is not transferred and plug-in must not delete this parameter.

TestSessionEndL(MDiagEngineCommon &, TBool, TAny *)

IMPORT_C void TestSessionEndL ( MDiagEngineCommon & aEngine,
TBool aSkipDependencyCheck,
TAny * aCustomParams
) [virtual]

Cleanup Step. This method is called after all plug-ins in the execution plan is completed to clean up any left over data from current sesison. This can be used to clean up any data that provides dependent service created for its dependencies. This is a synchrouns method.

Parameters

MDiagEngineCommon & aEngine - Reference to engine.
TBool aSkipDependencyCheck - If ETrue, plug-in as executed even if dependencies are not executed.
TAny * aCustomParams Custom parameters for plug-ins. It can used to pass arbitrary data from application to the plug-ins. Owership is not transferred and plug-in must not delete this parameter.

Type()

IMPORT_C TPluginType Type ( ) const [virtual]

Return the type of the plug-in.

TPluginType.

Member Data Documentation

CCoeEnv & iCoeEnv

CCoeEnv & iCoeEnv [private]

CCoeEnv . This is needed for handling resources.

CDiagPluginConstructionParam * iConstructionParam

CDiagPluginConstructionParam * iConstructionParam [private]

Plug-in constructor parameter. Ownership: this

TPrivateData * iData

TPrivateData * iData [private]

Plug-in base's private data