CNifAgentBase Class Reference

class CNifAgentBase : public CBase

Base class for agents. All agents derive from this base class; either directly or via another class that offers additional functionality. CAgentBase; CStateMachineAgentBase (for v6.1 agx porting)since v9.5. Use MCPRs/CPRs/SCPRs instead of agents.

Inherits from

Public Member Functions
CNifAgentBase()
voidAuthenticate(TDes &, TDes &)
voidCancelAuthenticate()
voidCancelConnect()
voidCancelReconnect()
voidCancelRequestNotificationOfServiceChange(MAgentSessionNotify *)
IMPORT_C TIntCheckReadCapability(const TDesC &, const RMessagePtr2 *)
IMPORT_C TIntCheckWriteCapability(const TDesC &, const RMessagePtr2 *)
voidConnect(TAgentConnectType)
voidConnect(TAgentConnectType, CStoreableOverrideSettings *)
TConnectionSettings &ConnectionSettingsL()
IMPORT_C TIntControl(TUint, TUint, TDes8 &)
IMPORT_C TIntControl(TUint, TUint, TDes8 &, const RProcess &)
voidDisconnect(TInt)
TInt GetExcessData(TDes8 &)
voidGetLastError(TInt &)
TInt IncomingConnectionReceived()
voidInfo(TNifAgentInfo &)
TBool IsActive()
TBool IsReconnect()
TInt Notification(TNifToAgentEventType, TAny *)
CStoreableOverrideSettings *OverridesL()
IMPORT_C TIntReadBool(const TDesC &, TBool &, const RMessagePtr2 *)
IMPORT_C TIntReadBool(const TDesC &, TBool &)
IMPORT_C TIntReadDes(const TDesC &, TDes8 &, const RMessagePtr2 *)
IMPORT_C TIntReadDes(const TDesC &, TDes8 &)
IMPORT_C TIntReadDes(const TDesC &, TDes16 &, const RMessagePtr2 *)
IMPORT_C TIntReadDes(const TDesC &, TDes16 &)
IMPORT_C TIntReadInt(const TDesC &, TUint32 &, const RMessagePtr2 *)
IMPORT_C TIntReadInt(const TDesC &, TUint32 &)
IMPORT_C HBufC *ReadLongDesLC(const TDesC &, const RMessagePtr2 *)
IMPORT_C HBufC *ReadLongDesLC(const TDesC &)
voidReconnect()
voidRequestNotificationOfServiceChangeL(MAgentSessionNotify *)
voidSetConnectionSettingsL(const TConnectionSettings &)
voidSetOverridesL(CStoreableOverrideSettings *)
IMPORT_C TIntWriteBool(const TDesC &, TBool, const RMessagePtr2 *)
IMPORT_C TIntWriteBool(const TDesC &, TBool)
IMPORT_C TIntWriteDes(const TDesC &, const TDesC8 &, const RMessagePtr2 *)
IMPORT_C TIntWriteDes(const TDesC &, const TDesC8 &)
IMPORT_C TIntWriteDes(const TDesC &, const TDesC16 &, const RMessagePtr2 *)
IMPORT_C TIntWriteDes(const TDesC &, const TDesC16 &)
IMPORT_C TIntWriteInt(const TDesC &, TUint32, const RMessagePtr2 *)
IMPORT_C TIntWriteInt(const TDesC &, TUint32)
Protected Member Functions
IMPORT_C TIntDoCheckReadCapability(const TDesC &, const RMessagePtr2 *)
IMPORT_C TIntDoCheckWriteCapability(const TDesC &, const RMessagePtr2 *)
TInt DoReadBool(const TDesC &, TBool &, const RMessagePtr2 *)
TInt DoReadDes(const TDesC &, TDes8 &, const RMessagePtr2 *)
TInt DoReadDes(const TDesC &, TDes16 &, const RMessagePtr2 *)
TInt DoReadInt(const TDesC &, TUint32 &, const RMessagePtr2 *)
HBufC *DoReadLongDesLC(const TDesC &, const RMessagePtr2 *)
TInt DoWriteBool(const TDesC &, TBool, const RMessagePtr2 *)
TInt DoWriteDes(const TDesC &, const TDesC8 &, const RMessagePtr2 *)
TInt DoWriteDes(const TDesC &, const TDesC16 &, const RMessagePtr2 *)
TInt DoWriteInt(const TDesC &, TUint32, const RMessagePtr2 *)
Private Member Functions
TBool CheckControlPolicy(TUint, TUint, const RProcess &)
Inherited Functions
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()
Protected Attributes
MNifAgentNotify *iNotify

Constructor & Destructor Documentation

CNifAgentBase()

IMPORT_CCNifAgentBase()

Constructor

Member Functions Documentation

Authenticate(TDes &, TDes &)

voidAuthenticate(TDes &aUsername,
TDes &aPassword
)[pure virtual]

Parameters

TDes & aUsername
TDes & aPassword

CancelAuthenticate()

voidCancelAuthenticate()[pure virtual]

CancelConnect()

voidCancelConnect()[pure virtual]

CancelReconnect()

voidCancelReconnect()[pure virtual]

CancelRequestNotificationOfServiceChange(MAgentSessionNotify *)

voidCancelRequestNotificationOfServiceChange(MAgentSessionNotify *aSession)[pure virtual]

Parameters

MAgentSessionNotify * aSession

CheckControlPolicy(TUint, TUint, const RProcess &)

TBool CheckControlPolicy(TUintaLevel,
TUintaOption,
const RProcess &aProcess
)[private]

Check that a client has the required capabilties

Parameters

TUint aLevel
TUint aOption
const RProcess & aProcess

CheckReadCapability(const TDesC &, const RMessagePtr2 *)

IMPORT_C TIntCheckReadCapability(const TDesC &aField,
const RMessagePtr2 *aMessage
)

Check that a client has the required capabilities to read a field Ensure that a client has the required capabilites to read a field

Parameters

const TDesC & aFieldField Name
const RMessagePtr2 * aMessageContains client capabilites to validate

CheckWriteCapability(const TDesC &, const RMessagePtr2 *)

IMPORT_C TIntCheckWriteCapability(const TDesC &aField,
const RMessagePtr2 *aMessage
)

Check that a client has the required capabilities to write a field Ensure that a client has the required capabilites to write a field

Parameters

const TDesC & aFieldField Name
const RMessagePtr2 * aMessageContains client capabilites to validate

Connect(TAgentConnectType)

voidConnect(TAgentConnectTypeaType)[pure virtual]

Parameters

TAgentConnectType aType

Connect(TAgentConnectType, CStoreableOverrideSettings *)

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

Parameters

TAgentConnectType aType
CStoreableOverrideSettings * aOverrideSettings

ConnectionSettingsL()

TConnectionSettings &ConnectionSettingsL()[pure virtual]

Control(TUint, TUint, TDes8 &)

IMPORT_C TIntControl(TUintaOptionLevel,
TUintaOptionName,
TDes8 &aOption
)[virtual]

This version of the Control(TUint, TUint, TDes8&) function is now deprecated. DO NOT Override Use the version of CNifAgentBase::Control(TUint, TUint, TDes8&, RProcess) that takes four parameters

This version of the Control() function is now deprecated. Use the version of CNifAgentBase::Control() that takes four parameters

Parameters

TUint aOptionLevel
TUint aOptionName
TDes8 & aOption

Control(TUint, TUint, TDes8 &, const RProcess &)

IMPORT_C TIntControl(TUintaOptionLevel,
TUintaOptionName,
TDes8 &aOption,
const RProcess &aProcess
)[virtual]

Control() with capability checking

Parameters

TUint aOptionLevel
TUint aOptionName
TDes8 & aOption
const RProcess & aProcess

Disconnect(TInt)

voidDisconnect(TIntaReason)[pure virtual]

Parameters

TInt aReason

DoCheckReadCapability(const TDesC &, const RMessagePtr2 *)

IMPORT_C TIntDoCheckReadCapability(const TDesC &aField,
const RMessagePtr2 *aMessage
)[protected, virtual]

Check that a client has the required capabilties to read a field Ensure that a client has the required capabilites to read a field

Parameters

const TDesC & aFieldField Name
const RMessagePtr2 * aMessageContains client capabilites to validate

DoCheckWriteCapability(const TDesC &, const RMessagePtr2 *)

IMPORT_C TIntDoCheckWriteCapability(const TDesC &aField,
const RMessagePtr2 *aMessage
)[protected, virtual]

Check that a client has the required capabilties to write a field Ensure that a client has the required capabilites to write a field

Parameters

const TDesC & aFieldField Name
const RMessagePtr2 * aMessageContains client capabilites to validate

DoReadBool(const TDesC &, TBool &, const RMessagePtr2 *)

TInt DoReadBool(const TDesC &aField,
TBool &aValue,
const RMessagePtr2 *aMessage
)[protected, pure virtual]

Read an boolean field from the connection settings provider

Parameters

const TDesC & aFieldThe name of the field to read
TBool & aValueOn return, contains the value of the field read
const RMessagePtr2 * aMessage

DoReadDes(const TDesC &, TDes8 &, const RMessagePtr2 *)

TInt DoReadDes(const TDesC &aField,
TDes8 &aValue,
const RMessagePtr2 *aMessage
)[protected, pure virtual]

Read a 8-bit descriptor field from the connection settings provider

Parameters

const TDesC & aFieldThe name of the field to read
TDes8 & aValueOn return, contains the value of the field read
const RMessagePtr2 * aMessage

DoReadDes(const TDesC &, TDes16 &, const RMessagePtr2 *)

TInt DoReadDes(const TDesC &aField,
TDes16 &aValue,
const RMessagePtr2 *aMessage
)[protected, pure virtual]

Write an 8-bit descriptor field to the connection settings provider

Parameters

const TDesC & aFieldThe name of the field to which to write
TDes16 & aValueThe value to be written to the field
const RMessagePtr2 * aMessage

DoReadInt(const TDesC &, TUint32 &, const RMessagePtr2 *)

TInt DoReadInt(const TDesC &aField,
TUint32 &aValue,
const RMessagePtr2 *aMessage
)[protected, pure virtual]

Read an integer field from the connection settings provider

Parameters

const TDesC & aFieldThe name of the field to read
TUint32 & aValueOn return, contains the value of the field read
const RMessagePtr2 * aMessage

DoReadLongDesLC(const TDesC &, const RMessagePtr2 *)

HBufC *DoReadLongDesLC(const TDesC &aField,
const RMessagePtr2 *aMessage
)[protected, pure virtual]
Read a 16-bit descriptor field of unknown size from the connection settings provider
Since
v7.0s

Parameters

const TDesC & aFieldThe name of the field to read
const RMessagePtr2 * aMessage

DoWriteBool(const TDesC &, TBool, const RMessagePtr2 *)

TInt DoWriteBool(const TDesC &aField,
TBoolaValue,
const RMessagePtr2 *aMessage
)[protected, pure virtual]

Write an boolean field to the connection settings provider

Parameters

const TDesC & aFieldThe name of the field to which to write
TBool aValueThe value to be written to the field
const RMessagePtr2 * aMessage

DoWriteDes(const TDesC &, const TDesC8 &, const RMessagePtr2 *)

TInt DoWriteDes(const TDesC &aField,
const TDesC8 &aValue,
const RMessagePtr2 *aMessage
)[protected, pure virtual]

Read a 16-bit descriptor field from the connection settings provider

Parameters

const TDesC & aFieldThe name of the field to read
const TDesC8 & aValueOn return, contains the value of the field read
const RMessagePtr2 * aMessage

DoWriteDes(const TDesC &, const TDesC16 &, const RMessagePtr2 *)

TInt DoWriteDes(const TDesC &aField,
const TDesC16 &aValue,
const RMessagePtr2 *aMessage
)[protected, pure virtual]

Write an 16-bit descriptor field to the connection settings provider

Parameters

const TDesC & aFieldThe name of the field to which to write
const TDesC16 & aValueThe value to be written to the field
const RMessagePtr2 * aMessage

DoWriteInt(const TDesC &, TUint32, const RMessagePtr2 *)

TInt DoWriteInt(const TDesC &aField,
TUint32aValue,
const RMessagePtr2 *aMessage
)[protected, pure virtual]

Write an integer field to the connection settings provider

Parameters

const TDesC & aFieldThe name of the field to which to write
TUint32 aValueThe value to be written to the field
const RMessagePtr2 * aMessage

GetExcessData(TDes8 &)

TInt GetExcessData(TDes8 &aBuffer)[pure virtual]

Return any excess data was received during connection setup

Parameters

TDes8 & aBufferOn return, the buffer contains the excess data from the agent

GetLastError(TInt &)

voidGetLastError(TInt &aError)[pure virtual]

Parameters

TInt & aError

IncomingConnectionReceived()

TInt IncomingConnectionReceived()[pure virtual]

Info(TNifAgentInfo &)

voidInfo(TNifAgentInfo &aInfo)const [pure virtual]

Parameters

TNifAgentInfo & aInfo

IsActive()

TBool IsActive()const [pure virtual]

IsReconnect()

TBool IsReconnect()const [pure virtual]

Notification(TNifToAgentEventType, TAny *)

TInt Notification(TNifToAgentEventTypeaEvent,
TAny *aInfo
)[pure virtual]
Notification of an event from the nif
Since
v6.1

Parameters

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

OverridesL()

CStoreableOverrideSettings *OverridesL()[pure virtual]

ReadBool(const TDesC &, TBool &, const RMessagePtr2 *)

IMPORT_C TIntReadBool(const TDesC &aField,
TBool &aValue,
const RMessagePtr2 *aMessage
)

Read an boolean field from the connection settings provider Read a boolean value

Parameters

const TDesC & aFieldField name
TBool & aValueReturned value
const RMessagePtr2 * aMessageFor capability checking

ReadBool(const TDesC &, TBool &)

IMPORT_C TIntReadBool(const TDesC &aField,
TBool &aValue
)

Read a boolean value

Parameters

const TDesC & aFieldField name
TBool & aValueReturned value

ReadDes(const TDesC &, TDes8 &, const RMessagePtr2 *)

IMPORT_C TIntReadDes(const TDesC &aField,
TDes8 &aValue,
const RMessagePtr2 *aMessage
)

Read a descriptor field from the connection settings provider Read a descriptor

Parameters

const TDesC & aFieldThe field name
TDes8 & aValueReturned value
const RMessagePtr2 * aMessageFor capability checking

ReadDes(const TDesC &, TDes8 &)

IMPORT_C TIntReadDes(const TDesC &aField,
TDes8 &aValue
)

Read a descriptor

Parameters

const TDesC & aFieldThe field name
TDes8 & aValueReturned value

ReadDes(const TDesC &, TDes16 &, const RMessagePtr2 *)

IMPORT_C TIntReadDes(const TDesC &aField,
TDes16 &aValue,
const RMessagePtr2 *aMessage
)

Read a descriptor field from the connection settings provider Read a descriptor

Parameters

const TDesC & aFieldThe field name
TDes16 & aValueReturned value
const RMessagePtr2 * aMessageFor capability checking

ReadDes(const TDesC &, TDes16 &)

IMPORT_C TIntReadDes(const TDesC &aField,
TDes16 &aValue
)

Read a descriptor

Parameters

const TDesC & aFieldThe field name
TDes16 & aValueReturned value

ReadInt(const TDesC &, TUint32 &, const RMessagePtr2 *)

IMPORT_C TIntReadInt(const TDesC &aField,
TUint32 &aValue,
const RMessagePtr2 *aMessage
)

Read an integer field from the connection settings provider Read an integer

Parameters

const TDesC & aFieldThe field name
TUint32 & aValueReturned value
const RMessagePtr2 * aMessageFor capability checking

ReadInt(const TDesC &, TUint32 &)

IMPORT_C TIntReadInt(const TDesC &aField,
TUint32 &aValue
)

Read an integer

Parameters

const TDesC & aFieldThe field name
TUint32 & aValueReturned value

ReadLongDesLC(const TDesC &, const RMessagePtr2 *)

IMPORT_C HBufC *ReadLongDesLC(const TDesC &aField,
const RMessagePtr2 *aMessage
)
Read a descriptor field of unknown size from the connection settings provider
Since
v7.0s
Read a long descriptor value

Parameters

const TDesC & aFieldField name
const RMessagePtr2 * aMessageFor capability checking

ReadLongDesLC(const TDesC &)

IMPORT_C HBufC *ReadLongDesLC(const TDesC &aField)

Read a long descriptor value

Parameters

const TDesC & aFieldField name

Reconnect()

voidReconnect()[pure virtual]

RequestNotificationOfServiceChangeL(MAgentSessionNotify *)

voidRequestNotificationOfServiceChangeL(MAgentSessionNotify *aSession)[pure virtual]

Parameters

MAgentSessionNotify * aSession

SetConnectionSettingsL(const TConnectionSettings &)

voidSetConnectionSettingsL(const TConnectionSettings &aSettings)[pure virtual]

Parameters

const TConnectionSettings & aSettings

SetOverridesL(CStoreableOverrideSettings *)

voidSetOverridesL(CStoreableOverrideSettings *aOverrideSettings)[pure virtual]

Parameters

CStoreableOverrideSettings * aOverrideSettings

WriteBool(const TDesC &, TBool, const RMessagePtr2 *)

IMPORT_C TIntWriteBool(const TDesC &aField,
TBoolaValue,
const RMessagePtr2 *aMessage
)

Write an boolean field to the connection settings provider Write a boolean value

Parameters

const TDesC & aFieldField name
TBool aValueValue to write
const RMessagePtr2 * aMessagefor capability checking

WriteBool(const TDesC &, TBool)

IMPORT_C TIntWriteBool(const TDesC &aField,
TBoolaValue
)

Write a boolean value

Parameters

const TDesC & aFieldField name
TBool aValueValue to write

WriteDes(const TDesC &, const TDesC8 &, const RMessagePtr2 *)

IMPORT_C TIntWriteDes(const TDesC &aField,
const TDesC8 &aValue,
const RMessagePtr2 *aMessage
)

Write a descriptor field to the connection settings provider Write a descriptor

Parameters

const TDesC & aFieldThe field name
const TDesC8 & aValuevalue to write
const RMessagePtr2 * aMessageFor capability checking

WriteDes(const TDesC &, const TDesC8 &)

IMPORT_C TIntWriteDes(const TDesC &aField,
const TDesC8 &aValue
)

Write a descriptor

Parameters

const TDesC & aFieldThe field name
const TDesC8 & aValuevalue to write

WriteDes(const TDesC &, const TDesC16 &, const RMessagePtr2 *)

IMPORT_C TIntWriteDes(const TDesC &aField,
const TDesC16 &aValue,
const RMessagePtr2 *aMessage
)

Write a descriptor field to the connection settings provider Write a descriptor

Parameters

const TDesC & aFieldThe field name
const TDesC16 & aValuevalue to write
const RMessagePtr2 * aMessageFor capability checking

WriteDes(const TDesC &, const TDesC16 &)

IMPORT_C TIntWriteDes(const TDesC &aField,
const TDesC16 &aValue
)

Write a descriptor

Parameters

const TDesC & aFieldThe field name
const TDesC16 & aValuevalue to write

WriteInt(const TDesC &, TUint32, const RMessagePtr2 *)

IMPORT_C TIntWriteInt(const TDesC &aField,
TUint32aValue,
const RMessagePtr2 *aMessage
)

Write an integer field to the connection settings provider Write an integer

Parameters

const TDesC & aFieldThe field name
TUint32 aValueThe value
const RMessagePtr2 * aMessageFor capability checking

WriteInt(const TDesC &, TUint32)

IMPORT_C TIntWriteInt(const TDesC &aField,
TUint32aValue
)

Write an integer

Parameters

const TDesC & aFieldThe field name
TUint32 aValueThe value

Member Data Documentation

MNifAgentNotify * iNotify

MNifAgentNotify *iNotify[protected]