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()
voidCancelConnect()
IMPORT_C voidCompleteState(TInt)
IMPORT_C voidConnectionComplete(TInt, TInt)
IMPORT_C voidConnectionComplete(TInt)
IMPORT_C voidConnectionContinuation(TSMContinueConnectType)
IMPORT_C CCommsDbAccess *Db()
IMPORT_C voidDisconnectComplete()
IMPORT_C CDialogProcessor *DlgPrc()
TInt GetExcessData(TDes8 &)
IMPORT_C voidGetLastError(TInt &)
IMPORT_C TIntIncomingConnectionReceived()
TBool IsReconnect()
TInt Notification(TNifToAgentEventType, TAny *)
IMPORT_C TIntNotification(TAgentToNifEventType, TAny *)
IMPORT_C voidPreventConnectionRetries()
IMPORT_C voidServiceStarted()
voidStartConnect()
IMPORT_C voidUpdateProgress(TInt, TInt)
Private Member Functions
voidConnectCompleteReset()
IMPORT_C voidDoCancel()
voidProcessState()
IMPORT_C voidRunL()
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
enumTSMContinueConnectType { ECallBack, EReconnect, EDisconnect }
enumTSMPhase { 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_CCAgentSMBase(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()

voidCancelConnect()

CompleteState(TInt)

IMPORT_C voidCompleteState(TIntaError)[virtual]

Parameters

TInt aError

ConnectCompleteReset()

voidConnectCompleteReset()[private]

ConnectionComplete(TInt, TInt)

IMPORT_C voidConnectionComplete(TIntaProgress,
TIntaError
)[virtual]

Parameters

TInt aProgress
TInt aError

ConnectionComplete(TInt)

IMPORT_C voidConnectionComplete(TIntaError)[virtual]

Parameters

TInt aError

ConnectionContinuation(TSMContinueConnectType)

IMPORT_C voidConnectionContinuation(TSMContinueConnectTypeaConnectionAction)[virtual]

Parameters

TSMContinueConnectType aConnectionAction

Db()

IMPORT_C CCommsDbAccess *Db()[virtual]

DisconnectComplete()

IMPORT_C voidDisconnectComplete()[virtual]

DlgPrc()

IMPORT_C CDialogProcessor *DlgPrc()[virtual]

DoCancel()

IMPORT_C voidDoCancel()[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 & aBufferOn return, the buffer contains the excess data from the agent

GetLastError(TInt &)

IMPORT_C voidGetLastError(TInt &aError)[virtual]

Parameters

TInt & aError

IncomingConnectionReceived()

IMPORT_C TIntIncomingConnectionReceived()[virtual]

IsReconnect()

TBool IsReconnect()const [inline, virtual]

Notification(TNifToAgentEventType, TAny *)

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

Notification of an event from the nif

Parameters

TNifToAgentEventType aEventThe type of event that occured
TAny * aInfoAny data associated with the event

Notification(TAgentToNifEventType, TAny *)

IMPORT_C TIntNotification(TAgentToNifEventTypeaEvent,
TAny *aInfo
)[virtual]

Parameters

TAgentToNifEventType aEvent
TAny * aInfo

PreventConnectionRetries()

IMPORT_C voidPreventConnectionRetries()[virtual]

ProcessState()

voidProcessState()[private]

RunL()

IMPORT_C voidRunL()[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 voidServiceStarted()[virtual]

StartConnect()

voidStartConnect()

UpdateProgress(TInt, TInt)

IMPORT_C voidUpdateProgress(TIntaProgress,
TIntaError
)[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]