CAgentSMBase Class Reference

class CAgentSMBase : public CActive
Base class for agent state machine
Note:

Typically this class is owned by CStateMachineAgentBase

This class is part of a compatibility layer for porting agent extensions (.agx) from v6.1

since v9.5. Use MCPRs/CPRs/SCPRs instead of agents.
Base class for agent state machine
Note:

Typically this class is owned by CStateMachineAgentBase

This class is part of a compatibility layer for porting agent extensions (.agx) from v6.1

since v9.5. Use MCPRs/CPRs/SCPRs instead of agents.

Inherits from

Public Member Functions
CAgentSMBase ( MAgentNotify &, CDialogProcessor *, CCommsDbAccess &)
~CAgentSMBase ()
TBool CallBack ()
void CancelConnect ()
IMPORT_C void CompleteState ( TInt )
IMPORT_C void ConnectionComplete ( TInt , TInt )
IMPORT_C void ConnectionComplete ( TInt )
IMPORT_C void ConnectionContinuation ( TSMContinueConnectType )
IMPORT_C CCommsDbAccess * Db ()
IMPORT_C void DisconnectComplete ()
IMPORT_C CDialogProcessor * DlgPrc ()
TInt GetExcessData ( TDes8 &)
IMPORT_C void GetLastError ( TInt &)
IMPORT_C TInt IncomingConnectionReceived ()
TBool IsReconnect ()
TInt Notification ( TNifToAgentEventType , TAny *)
IMPORT_C TInt Notification ( TAgentToNifEventType , TAny *)
IMPORT_C void PreventConnectionRetries ()
IMPORT_C void ServiceStarted ()
void StartConnect ()
IMPORT_C void UpdateProgress ( TInt , TInt )
Private Member Functions
void ConnectCompleteReset ()
IMPORT_C void DoCancel ()
void ProcessState ()
IMPORT_C void RunL ()
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::Extension_(TUint,TAny *&,TAny *)
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::RunError(TInt)
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()
Public Member Enumerations
enum TSMContinueConnectType { ECallBack , EReconnect , EDisconnect }
enum TSMPhase { EConnecting , EConnected , EDisconnecting , EDisconnected }
Inherited Enumerations
CActive:TPriority
Protected Attributes
TBool iCallBack
TBool iContinueConnection
MAgentNotify * iControllerObserver
CCommsDbAccess * iDb
CDialogProcessor * iDlgPrc
TBool iIsReconnect
TSMPhase iSMPhase
CAgentStateBase * iState
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

CAgentSMBase(MAgentNotify &, CDialogProcessor *, CCommsDbAccess &)

IMPORT_C CAgentSMBase ( MAgentNotify & aControllerObserver,
CDialogProcessor * aDlgPrc,
CCommsDbAccess & aDbAccess
)

Parameters

MAgentNotify & aControllerObserver
CDialogProcessor * aDlgPrc
CCommsDbAccess & aDbAccess

~CAgentSMBase()

IMPORT_C ~CAgentSMBase ( ) [virtual]

Member Functions Documentation

CallBack()

TBool CallBack ( ) const [inline, virtual]

CancelConnect()

void CancelConnect ( )

CompleteState(TInt)

IMPORT_C void CompleteState ( TInt aError ) [virtual]

Parameters

TInt aError

ConnectCompleteReset()

void ConnectCompleteReset ( ) [private]

ConnectionComplete(TInt, TInt)

IMPORT_C void ConnectionComplete ( TInt aProgress,
TInt aError
) [virtual]

Parameters

TInt aProgress
TInt aError

ConnectionComplete(TInt)

IMPORT_C void ConnectionComplete ( TInt aError ) [virtual]

Parameters

TInt aError

ConnectionContinuation(TSMContinueConnectType)

IMPORT_C void ConnectionContinuation ( TSMContinueConnectType aConnectionAction ) [virtual]

Parameters

TSMContinueConnectType aConnectionAction

Db()

IMPORT_C CCommsDbAccess * Db ( ) [virtual]

DisconnectComplete()

IMPORT_C void DisconnectComplete ( ) [virtual]

DlgPrc()

IMPORT_C CDialogProcessor * DlgPrc ( ) [virtual]

DoCancel()

IMPORT_C void DoCancel ( ) [private, virtual]

Implements cancellation of an outstanding request.

This function is called as part of the active object's Cancel() .

It must call the appropriate cancel function offered by the active object's asynchronous service provider. The asynchronous service provider's cancel is expected to act immediately.

DoCancel() must not wait for event completion; this is handled by Cancel() .

CActive::Cancel

GetExcessData(TDes8 &)

TInt GetExcessData ( TDes8 & aBuffer ) [pure virtual]
Return any excess data was received during connection setup
Note:

For example, after a script has run, there may be additional data received that is intended for the nif, which will retrieve it via this method

Parameters

TDes8 & aBuffer On return, the buffer contains the excess data from the agent

GetLastError(TInt &)

IMPORT_C void GetLastError ( TInt & aError ) [virtual]

Parameters

TInt & aError

IncomingConnectionReceived()

IMPORT_C TInt IncomingConnectionReceived ( ) [virtual]

IsReconnect()

TBool IsReconnect ( ) const [inline, virtual]

Notification(TNifToAgentEventType, TAny *)

TInt Notification ( TNifToAgentEventType aEvent,
TAny * aInfo
) [pure virtual]

Notification of an event from the nif

Parameters

TNifToAgentEventType aEvent The type of event that occured
TAny * aInfo Any data associated with the event

Notification(TAgentToNifEventType, TAny *)

IMPORT_C TInt Notification ( TAgentToNifEventType aEvent,
TAny * aInfo
) [virtual]

Parameters

TAgentToNifEventType aEvent
TAny * aInfo

PreventConnectionRetries()

IMPORT_C void PreventConnectionRetries ( ) [virtual]

ProcessState()

void ProcessState ( ) [private]

RunL()

IMPORT_C void RunL ( ) [private, virtual]

Handles an active object's request completion event.

A derived class must provide an implementation to handle the completed request. If appropriate, it may issue another request.

The function is called by the active scheduler when a request completion event occurs, i.e. after the active scheduler's WaitForAnyRequest() function completes.

Before calling this active object's RunL() function, the active scheduler has:

1. decided that this is the highest priority active object with a completed request

2. marked this active object's request as complete (i.e. the request is no longer outstanding)

RunL() runs under a trap harness in the active scheduler. If it leaves, then the active scheduler calls RunError() to handle the leave.

Note that once the active scheduler's Start() function has been called, all user code is run under one of the program's active object's RunL() or RunError() functions.

CActiveScheduler::Start CActiveScheduler::Error CActiveScheduler::WaitForAnyRequest TRAPD

ServiceStarted()

IMPORT_C void ServiceStarted ( ) [virtual]

StartConnect()

void StartConnect ( )

UpdateProgress(TInt, TInt)

IMPORT_C void UpdateProgress ( TInt aProgress,
TInt aError
) [virtual]

Parameters

TInt aProgress
TInt aError

Member Enumerations Documentation

Enum TSMContinueConnectType

The action to be taken by the connection code since v9.5. Use MCPRs/CPRs/SCPRs instead of agents.

Enumerators

ECallBack
EReconnect
EDisconnect

Enum TSMPhase

The current state of the agent state machine since v9.5. Use MCPRs/CPRs/SCPRs instead of agents.

Enumerators

EConnecting
EConnected
EDisconnecting
EDisconnected

Member Data Documentation

TBool iCallBack

TBool iCallBack [protected]

TBool iContinueConnection

TBool iContinueConnection [protected]

MAgentNotify * iControllerObserver

MAgentNotify * iControllerObserver [protected]

CCommsDbAccess * iDb

CCommsDbAccess * iDb [protected]

CDialogProcessor * iDlgPrc

CDialogProcessor * iDlgPrc [protected]

TBool iIsReconnect

TBool iIsReconnect [protected]

TSMPhase iSMPhase

TSMPhase iSMPhase [protected]

CAgentStateBase * iState

CAgentStateBase * iState [protected]