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 void CancelConnect ()
IMPORT_C void Connect ( TAgentConnectType )
IMPORT_C void Connect ( TAgentConnectType , CStoreableOverrideSettings *)
IMPORT_C void ConnectionComplete ( TInt , TInt )
IMPORT_C void ConnectionComplete ( TInt )
IMPORT_C void Disconnect ( TInt )
IMPORT_C void DisconnectComplete ()
IMPORT_C TInt GetExcessData ( TDes8 &)
IMPORT_C void GetLastError ( TInt &)
IMPORT_C TInt IncomingConnectionReceived ()
IMPORT_C TBool IsReconnect ()
IMPORT_C TInt Notification ( TNifToAgentEventType , TAny *)
IMPORT_C TInt Notification ( TAgentToNifEventType , TAny *)
IMPORT_C void PreventConnectionRetries ()
IMPORT_C void ServiceStarted ()
IMPORT_C void UpdateProgress ( TInt , TInt )
Protected Member Functions
CStateMachineAgentBase ()
void CallNotifyCb ( TNotifyOperation , TInt )
IMPORT_C void ConstructL ()
CAgentSMBase * CreateAgentSML ( MAgentNotify &, CDialogProcessor *, CCommsDbAccess &, TCommDbConnectionDirection )
void CreateAndStartStateMachineL ()
void DoNotify ()
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
enum TNotifyOperation { 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_C CStateMachineAgentBase ( ) [protected]

Default Constructor

~CStateMachineAgentBase()

IMPORT_C ~CStateMachineAgentBase ( ) [virtual]

Destructor. Deletes objects used by CStateMachineAgentBase

Member Functions Documentation

CallNotifyCb(TNotifyOperation, TInt)

void CallNotifyCb ( TNotifyOperation aOperation,
TInt aError
) [protected]

CallNotifyCb

Parameters

TNotifyOperation aOperation the MNifAgtNotify function to call
TInt aError the error to pass to Nifman

CancelConnect()

IMPORT_C void CancelConnect ( ) [virtual]

Cancel a previous request to Connect.

Connect(TAgentConnectType)

IMPORT_C void Connect ( TAgentConnectType aType ) [virtual]

Request that the State Machine establish a connection.

Parameters

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

Connect(TAgentConnectType, CStoreableOverrideSettings *)

IMPORT_C void Connect ( TAgentConnectType aType,
CStoreableOverrideSettings * aOverrideSettings
) [virtual]

Request that the State Machine establish a connection using Overrides.

Parameters

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

ConnectionComplete(TInt, TInt)

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

ConnectionComplete upcall from the state machine

Parameters

TInt aProgress
TInt aError on return contains the error

ConnectionComplete(TInt)

IMPORT_C void ConnectionComplete ( TInt aError ) [virtual]

ConnectionComplete upcall from the state machine

Parameters

TInt aError on return contains the error

ConstructL()

IMPORT_C void ConstructL ( ) [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,
TCommDbConnectionDirection aDir
) [protected, pure virtual]

CreateAndStartStateMachineL()

void CreateAndStartStateMachineL ( ) [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 void Disconnect ( TInt aReason ) [virtual]

Request that the State Machine tears down a connection.

Parameters

TInt aReason the reason for the request to disconnect

DisconnectComplete()

IMPORT_C void DisconnectComplete ( ) [virtual]

DisconnectComplete upcall from the state machine

DoNotify()

void DoNotify ( ) [protected]

Notify NIFMAN that part of the connection process has completed

GetExcessData(TDes8 &)

IMPORT_C TInt GetExcessData ( TDes8 & aBuffer ) [virtual]

Get Excess Data from the State Machine.

TodoIs this used?

Parameters

TDes8 & aBuffer the buffer in which to store the excess data

GetLastError(TInt &)

IMPORT_C void GetLastError ( TInt & aError ) [virtual]

Return the last error from the State Machine.

Parameters

TInt & aError on return contains the error

IncomingConnectionReceived()

IMPORT_C TInt IncomingConnectionReceived ( ) [virtual]

IncomingConnectionReceived upcall from the state machine

IsReconnect()

IMPORT_C TBool IsReconnect ( ) const [virtual]

Is this a reconnection? - required for Authenticate()

Notification(TNifToAgentEventType, TAny *)

IMPORT_C TInt Notification ( TNifToAgentEventType aEvent,
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 TInt Notification ( TAgentToNifEventType aEvent,
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 * aThisPtr pointer to the instance object that triggered the callback

PreventConnectionRetries()

IMPORT_C void PreventConnectionRetries ( ) [virtual]

ServiceStarted()

IMPORT_C void ServiceStarted ( ) [virtual]

ServiceStarted.

UpdateProgress(TInt, TInt)

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

UpdateProgress upcall from the state machine

Parameters

TInt aProgress
TInt aError on 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]