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 voidAddChildL(MDiagPlugin *)
IMPORT_C CGulIcon *CreateIconL()
IMPORT_C TAny *CustomOperationL(TUid, TAny *)
IMPORT_C voidExecutionStopL(TStopReason)
IMPORT_C voidFinalizeChildrenExecutionL(TDiagSuiteExecParam *, TBool, TBool)
IMPORT_C voidGetChildrenL(RPointerArray< MDiagPlugin > &, TSortOrder)
IMPORT_C voidGetChildrenUidsL(RArray< TUid > &, TSortOrder)
IMPORT_C TAny *GetCustomL(TUid, TAny *)
IMPORT_C HBufC *GetDescriptionL()
IMPORT_C voidGetLogicalDependenciesL(CPtrCArray &)
IMPORT_C HBufC *GetTitleL()
IMPORT_C TBoolIsSupported()
IMPORT_C TUintOrder()
IMPORT_C TUidParentUid()
IMPORT_C voidPrepareChildrenExecutionL(TDiagSuiteExecParam *, TBool, TBool)
IMPORT_C const TDesC &ServiceLogicalName()
IMPORT_C voidSetDtorIdKey(TUid)
IMPORT_C voidTestSessionBeginL(MDiagEngineCommon &, TBool, TAny *)
IMPORT_C voidTestSessionEndL(MDiagEngineCommon &, TBool, TAny *)
IMPORT_C TPluginTypeType()
Protected Member Functions
CDiagSuitePluginBase(CDiagPluginConstructionParam *)
IMPORT_C voidBaseConstructL(const TDesC &)
IMPORT_C CCoeEnv &CoeEnv()
IMPORT_C voidDismissWaitingDialog()
IMPORT_C TBoolRunWaitingDialogL(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_CCDiagSuitePluginBase(CDiagPluginConstructionParam *aParam)[protected]

C++ constructor

Parameters

CDiagPluginConstructionParam * aParam

~CDiagSuitePluginBase()

IMPORT_C~CDiagSuitePluginBase()[virtual]

Destructor.

Member Functions Documentation

AddChildL(MDiagPlugin *)

IMPORT_C voidAddChildL(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 voidBaseConstructL(const TDesC &aResourceFileName)[protected]

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

Parameters

const TDesC & aResourceFileNameDrive 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(TUidaUid,
TAny *aParam
)[virtual]

Reserved for future use/plugin's custom functionality.

Parameters

TUid aUidUnique identifier of the operation.
TAny * aParamCustom parameter.

DismissWaitingDialog()

IMPORT_C voidDismissWaitingDialog()[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 voidExecutionStopL(TStopReasonaReason)[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 voidFinalizeChildrenExecutionL(TDiagSuiteExecParam *aParam,
TBoolaSkipDependencyCheck,
TBoolaDependencyExecution
)[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 voidGetChildrenL(RPointerArray< MDiagPlugin > &aChildren,
TSortOrderaOrder
)const [virtual]

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

Parameters

RPointerArray< MDiagPlugin > & aChildrenChildren are appended into this array.
TSortOrder aOrderSorting algorithm.

GetChildrenUidsL(RArray< TUid > &, TSortOrder)

IMPORT_C voidGetChildrenUidsL(RArray< TUid > &aUids,
TSortOrderaOrder
)const [virtual]

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

Parameters

RArray< TUid > & aUidsAn UID array.
TSortOrder aOrderSorting algorithm.

GetCustomL(TUid, TAny *)

IMPORT_C TAny *GetCustomL(TUidaUid,
TAny *aParam
)[virtual]

Reserved for future use/plugin's custom functionality.

Parameters

TUid aUidUnique identifier of the property
TAny * aParamCustom 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 voidGetLogicalDependenciesL(CPtrCArray &aArray)const [virtual]

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

ServiceLogicalName.

Parameters

CPtrCArray & aArrayAn 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 TBoolIsSupported()const [virtual]

Order()

IMPORT_C TUintOrder()const [virtual]

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

ParentUid()

IMPORT_C TUidParentUid()const [virtual]

Get UID of the parent.

PrepareChildrenExecutionL(TDiagSuiteExecParam *, TBool, TBool)

IMPORT_C voidPrepareChildrenExecutionL(TDiagSuiteExecParam *aParam,
TBoolaSkipDependencyCheck,
TBoolaDependencyExecution
)[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 TBoolRunWaitingDialogL(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 voidSetDtorIdKey(TUidaDtorIdKey)[virtual]

MDiagPlugin::SetDTorIdKey()

Parameters

TUid aDtorIdKey

TestSessionBeginL(MDiagEngineCommon &, TBool, TAny *)

IMPORT_C voidTestSessionBeginL(MDiagEngineCommon &aEngine,
TBoolaSkipDependencyCheck,
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 * aCustomParamsCustom 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 voidTestSessionEndL(MDiagEngineCommon &aEngine,
TBoolaSkipDependencyCheck,
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 * aCustomParamsCustom 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 TPluginTypeType()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