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()

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 KErrNone, if the client has the required capabilites, otherwise one of the standard Symbian OS error codes

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 one of the system-wide error codes

Parameters

const TDesC & aFieldThe field to check
const RMessagePtr2 * aMessageMessage containing client capabilites

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 one of the system-wide error codes

Parameters

const TDesC & aFieldThe field to check
const RMessagePtr2 * aMessageMessage containing client capabilites

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

Parameters

TUint aOptionLevel
TUint aOptionName
TDes8 & aOption

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

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

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 KErrNone, if the client has the required capabilites, otherwise one of the standard Symbian OS error codes

Parameters

const TDesC & aFieldthe name of the field to read
const RMessagePtr2 * aMessageMessage containing the capabilities of the client

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 KErrNone, if the client has the required capabilites, otherwise one of the standard Symbian OS error codes

Parameters

const TDesC & aFieldthe name of the field to write
const RMessagePtr2 * aMessageMessage containing the capabilities of the client

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 KErrNone, if successful; otherwise one of the standard Symbian OS error codes

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 KErrNone, if successful; otherwise one of the standard Symbian OS error codes

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 KErrNone, if successful; otherwise one of the standard Symbian OS error codes

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 KErrNone, if successful; otherwise one of the standard Symbian OS error codes

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 The value of the field read

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 KErrNone, if successful; otherwise one of the standard Symbian OS error codes

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 KErrNone, if successful; otherwise one of the standard Symbian OS error codes

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 KErrNone, if successful; otherwise one of the standard Symbian OS error codes

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 KErrNone, if successful; otherwise one of the standard Symbian OS error codes

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 KErrNone, if successful; otherwise, one of the standard Symbian OS error codes

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 KErrNone if successful, otherwise one of the system-wide error codes

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 KErrNone, if successful; otherwise one of the standard Symbian OS error codes

Parameters

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

ReadBool(const TDesC &, TBool &)

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

Parameters

const TDesC & aField
TBool & aValue

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 KErrNone, if successful; otherwise one of the standard Symbian OS error codes

Parameters

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

ReadDes(const TDesC &, TDes8 &)

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

Parameters

const TDesC & aField
TDes8 & aValue

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 KErrNone, if successful; otherwise one of the standard Symbian OS error codes

Parameters

const TDesC & aFieldThe name of the field to read
TDes16 & aValueOn return, contains the value of the field read
const RMessagePtr2 * aMessageFor capability checking

ReadDes(const TDesC &, TDes16 &)

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

Parameters

const TDesC & aField
TDes16 & aValue

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 KErrNone, if successful; otherwise one of the standard Symbian OS error codes

Parameters

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

ReadInt(const TDesC &, TUint32 &)

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

Parameters

const TDesC & aField
TUint32 & aValue

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 The value of the field read

v7.0s

Parameters

const TDesC & aFieldThe name of the field to read
const RMessagePtr2 * aMessageFor capability checking

ReadLongDesLC(const TDesC &)

IMPORT_C HBufC *ReadLongDesLC(const TDesC &aField)

Parameters

const TDesC & aField

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 KErrNone, if successful; otherwise one of the standard Symbian OS error codes

Parameters

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

WriteBool(const TDesC &, TBool)

IMPORT_C TIntWriteBool(const TDesC &aField,
TBoolaValue
)

Parameters

const TDesC & aField
TBool aValue

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 KErrNone, if successful; otherwise one of the standard Symbian OS error codes

Parameters

const TDesC & aFieldThe name of the field to which to write
const TDesC8 & aValueThe value to be written to the field
const RMessagePtr2 * aMessageFor capability checking

WriteDes(const TDesC &, const TDesC8 &)

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

Parameters

const TDesC & aField
const TDesC8 & aValue

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 KErrNone, if successful; otherwise one of the standard Symbian OS error codes

Parameters

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

WriteDes(const TDesC &, const TDesC16 &)

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

Parameters

const TDesC & aField
const TDesC16 & aValue

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 KErrNone, if successful; otherwise one of the standard Symbian OS error codes

Parameters

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

WriteInt(const TDesC &, TUint32)

IMPORT_C TIntWriteInt(const TDesC &aField,
TUint32aValue
)

Parameters

const TDesC & aField
TUint32 aValue

Member Data Documentation

MNifAgentNotify * iNotify

MNifAgentNotify *iNotify[protected]