CStateMachineAgentBase Class Reference

class CStateMachineAgentBase : public CAgentBase
An agent that owns a state machine
Note:

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
~CStateMachineAgentBase()
IMPORT_C voidCancelConnect()
IMPORT_C voidConnect(TAgentConnectType)
IMPORT_C voidConnect(TAgentConnectType, CStoreableOverrideSettings *)
IMPORT_C voidConnectionComplete(TInt, TInt)
IMPORT_C voidConnectionComplete(TInt)
IMPORT_C voidDisconnect(TInt)
IMPORT_C voidDisconnectComplete()
IMPORT_C TIntGetExcessData(TDes8 &)
IMPORT_C voidGetLastError(TInt &)
IMPORT_C TIntIncomingConnectionReceived()
IMPORT_C TBoolIsReconnect()
IMPORT_C TIntNotification(TNifToAgentEventType, TAny *)
IMPORT_C TIntNotification(TAgentToNifEventType, TAny *)
IMPORT_C voidPreventConnectionRetries()
IMPORT_C voidServiceStarted()
IMPORT_C voidUpdateProgress(TInt, TInt)
Protected Member Functions
CStateMachineAgentBase()
voidCallNotifyCb(TNotifyOperation, TInt)
IMPORT_C voidConstructL()
CAgentSMBase *CreateAgentSML(MAgentNotify &, CDialogProcessor *, CCommsDbAccess &, TCommDbConnectionDirection)
voidCreateAndStartStateMachineL()
voidDoNotify()
TInt NotifyCbComplete(TAny *)
Inherited Functions
CAgentBase::Authenticate(TDes &,TDes &)
CAgentBase::CAgentBase()
CAgentBase::CancelAuthenticate()
CAgentBase::CancelReconnect()
CAgentBase::CancelRequestNotificationOfServiceChange(MAgentSessionNotify *)
CAgentBase::ConnectionSettingsL()
CAgentBase::DoCheckReadCapability(const TDesC &,const RMessagePtr2 *)
CAgentBase::DoCheckWriteCapability(const TDesC &,const RMessagePtr2 *)
CAgentBase::DoReadBool(const TDesC &,TBool &,const RMessagePtr2 *)
CAgentBase::DoReadDes(const TDesC &,TDes16 &,const RMessagePtr2 *)
CAgentBase::DoReadDes(const TDesC &,TDes8 &,const RMessagePtr2 *)
CAgentBase::DoReadInt(const TDesC &,TUint32 &,const RMessagePtr2 *)
CAgentBase::DoReadLongDesLC(const TDesC &,const RMessagePtr2 *)
CAgentBase::DoWriteBool(const TDesC &,TBool,const RMessagePtr2 *)
CAgentBase::DoWriteDes(const TDesC &,const TDesC16 &,const RMessagePtr2 *)
CAgentBase::DoWriteDes(const TDesC &,const TDesC8 &,const RMessagePtr2 *)
CAgentBase::DoWriteInt(const TDesC &,TUint32,const RMessagePtr2 *)
CAgentBase::IsActive()const
CAgentBase::MDPOAuthenticateComplete(TInt)
CAgentBase::OverridesL()
CAgentBase::Reconnect()
CAgentBase::ReconnectComplete(TInt)
CAgentBase::RequestNotificationOfServiceChangeL(MAgentSessionNotify *)
CAgentBase::SelectComplete(TInt)
CAgentBase::SelectComplete(const TDesC &)
CAgentBase::ServiceChangeNotification(TUint32,const TDesC &)
CAgentBase::SetConnectionSettingsL(const TConnectionSettings &)
CAgentBase::SetOverridesL(CStoreableOverrideSettings *)
CAgentBase::~CAgentBase()
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
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()
CNifAgentBase::CNifAgentBase()
CNifAgentBase::CheckReadCapability(const TDesC &,const RMessagePtr2 *)
CNifAgentBase::CheckWriteCapability(const TDesC &,const RMessagePtr2 *)
CNifAgentBase::Control(TUint,TUint,TDes8 &)
CNifAgentBase::Control(TUint,TUint,TDes8 &,const RProcess &)
CNifAgentBase::Info(TNifAgentInfo &)const
CNifAgentBase::ReadBool(const TDesC &,TBool &)
CNifAgentBase::ReadBool(const TDesC &,TBool &,const RMessagePtr2 *)
CNifAgentBase::ReadDes(const TDesC &,TDes16 &)
CNifAgentBase::ReadDes(const TDesC &,TDes16 &,const RMessagePtr2 *)
CNifAgentBase::ReadDes(const TDesC &,TDes8 &)
CNifAgentBase::ReadDes(const TDesC &,TDes8 &,const RMessagePtr2 *)
CNifAgentBase::ReadInt(const TDesC &,TUint32 &)
CNifAgentBase::ReadInt(const TDesC &,TUint32 &,const RMessagePtr2 *)
CNifAgentBase::ReadLongDesLC(const TDesC &)
CNifAgentBase::ReadLongDesLC(const TDesC &,const RMessagePtr2 *)
CNifAgentBase::WriteBool(const TDesC &,TBool)
CNifAgentBase::WriteBool(const TDesC &,TBool,const RMessagePtr2 *)
CNifAgentBase::WriteDes(const TDesC &,const TDesC16 &)
CNifAgentBase::WriteDes(const TDesC &,const TDesC16 &,const RMessagePtr2 *)
CNifAgentBase::WriteDes(const TDesC &,const TDesC8 &)
CNifAgentBase::WriteDes(const TDesC &,const TDesC8 &,const RMessagePtr2 *)
CNifAgentBase::WriteInt(const TDesC &,TUint32)
CNifAgentBase::WriteInt(const TDesC &,TUint32,const RMessagePtr2 *)
Protected Member Enumerations
enumTNotifyOperation { EUndefined, EServiceStarted, EConnectComplete, EDisconnectComplete }
Protected Attributes
TInt iDisconnectReason
CAsyncCallBack *iNotifyCb
TInt iNotifyCbError
TNotifyOperation iNotifyCbOp
CAgentSMBase *iStateMachine
Inherited Attributes
CAgentBase::iAuthenticateCallback
CAgentBase::iAuthenticateError
CAgentBase::iDatabase
CAgentBase::iDlgPrc
CAgentBase::iOverrides
CAgentBase::iServiceChangeNotification
CAgentBase::iSettings
CNifAgentBase::iNotify

Constructor & Destructor Documentation

CStateMachineAgentBase()

IMPORT_CCStateMachineAgentBase()[protected]

Default Constructor

~CStateMachineAgentBase()

IMPORT_C~CStateMachineAgentBase()[virtual]

Destructor. Deletes objects used by CStateMachineAgentBase

Member Functions Documentation

CallNotifyCb(TNotifyOperation, TInt)

voidCallNotifyCb(TNotifyOperationaOperation,
TIntaError
)[protected]

CallNotifyCb

Parameters

TNotifyOperation aOperationthe MNifAgtNotify function to call
TInt aErrorthe error to pass to Nifman

CancelConnect()

IMPORT_C voidCancelConnect()[virtual]

Cancel a previous request to Connect.

Connect(TAgentConnectType)

IMPORT_C voidConnect(TAgentConnectTypeaType)[virtual]

Request that the State Machine establish a connection.

Parameters

TAgentConnectType aTypethe type of connection to make (Outgoing, Reconnect, Callback, None, Incoming)

Connect(TAgentConnectType, CStoreableOverrideSettings *)

IMPORT_C voidConnect(TAgentConnectTypeaType,
CStoreableOverrideSettings *aOverrideSettings
)[virtual]

Request that the State Machine establish a connection using Overrides.

Parameters

TAgentConnectType aTypethe type of connection to make (Outgoing, Reconnect, Callback, None, Incoming)
CStoreableOverrideSettings * aOverrideSettingsthe database overrides to use for this connection

ConnectionComplete(TInt, TInt)

IMPORT_C voidConnectionComplete(TIntaProgress,
TIntaError
)[virtual]

ConnectionComplete upcall from the state machine

Parameters

TInt aProgress
TInt aErroron return contains the error

ConnectionComplete(TInt)

IMPORT_C voidConnectionComplete(TIntaError)[virtual]

ConnectionComplete upcall from the state machine

Parameters

TInt aErroron return contains the error

ConstructL()

IMPORT_C voidConstructL()[protected]

2nd Phase of construction. Calls CAgentBase::ConstructL().

iStateMachine should be instantiated by the derived class.

Leaves if memory allocation fails or the base class constructor leaves.

CAgentBase::ConstructL()

CreateAgentSML(MAgentNotify &, CDialogProcessor *, CCommsDbAccess &, TCommDbConnectionDirection)

CAgentSMBase *CreateAgentSML(MAgentNotify &aObserver,
CDialogProcessor *aDlgPrc,
CCommsDbAccess &aDb,
TCommDbConnectionDirectionaDir
)[protected, pure virtual]

Parameters

MAgentNotify & aObserver
CDialogProcessor * aDlgPrc
CCommsDbAccess & aDb
TCommDbConnectionDirection aDir

CreateAndStartStateMachineL()

voidCreateAndStartStateMachineL()[protected]

Create the appropriate state machine and start the connection

Exceptions
leaves

if one of the database access or the creation of the state machine leaves

Disconnect(TInt)

IMPORT_C voidDisconnect(TIntaReason)[virtual]

Request that the State Machine tears down a connection.

Parameters

TInt aReasonthe reason for the request to disconnect

DisconnectComplete()

IMPORT_C voidDisconnectComplete()[virtual]

DisconnectComplete upcall from the state machine

DoNotify()

voidDoNotify()[protected]

Notify NIFMAN that part of the connection process has completed

GetExcessData(TDes8 &)

IMPORT_C TIntGetExcessData(TDes8 &aBuffer)[virtual]

Get Excess Data from the State Machine.

TodoIs this used?

Parameters

TDes8 & aBufferthe buffer in which to store the excess data

GetLastError(TInt &)

IMPORT_C voidGetLastError(TInt &aError)[virtual]

Return the last error from the State Machine.

Parameters

TInt & aErroron return contains the error

IncomingConnectionReceived()

IMPORT_C TIntIncomingConnectionReceived()[virtual]

IncomingConnectionReceived upcall from the state machine

IsReconnect()

IMPORT_C TBoolIsReconnect()const [virtual]

Is this a reconnection? - required for Authenticate()

Notification(TNifToAgentEventType, TAny *)

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

Notification from the NIF to the State Machine.

NIFMAN does not interpret this message

Parameters

TNifToAgentEventType aEvent
TAny * aInfo

Notification(TAgentToNifEventType, TAny *)

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

Notification upcall from the state machine

Parameters

TAgentToNifEventType aEvent
TAny * aInfo

NotifyCbComplete(TAny *)

TInt NotifyCbComplete(TAny *aThisPtr)[protected, static]

NotifyCbComplete

Parameters

TAny * aThisPtrpointer to the instance object that triggered the callback

PreventConnectionRetries()

IMPORT_C voidPreventConnectionRetries()[virtual]

ServiceStarted()

IMPORT_C voidServiceStarted()[virtual]

ServiceStarted.

UpdateProgress(TInt, TInt)

IMPORT_C voidUpdateProgress(TIntaProgress,
TIntaError
)[virtual]

UpdateProgress upcall from the state machine

Parameters

TInt aProgress
TInt aErroron return contains the error

Member Enumerations Documentation

Enum TNotifyOperation

Enumerators

EUndefined
EServiceStarted
EConnectComplete
EDisconnectComplete

Member Data Documentation

TInt iDisconnectReason

TInt iDisconnectReason[protected]

CAsyncCallBack * iNotifyCb

CAsyncCallBack *iNotifyCb[protected]

TInt iNotifyCbError

TInt iNotifyCbError[protected]

TNotifyOperation iNotifyCbOp

TNotifyOperation iNotifyCbOp[protected]

CAgentSMBase * iStateMachine

CAgentSMBase *iStateMachine[protected]