CAgentAdapter Class Reference

class CAgentAdapter : public CBase

This is the Agent Adapter for new style NIFs/SCPRs/CPRs It is created and owned by Link Layer MCPRs and passed to the left in the BindTo messages. It is controlled ONLY by the SCPR.

Inherits from

Public Member Functions
~CAgentAdapter()
const TAgentStateAgentState()
voidAuthenticate(TDes &, TDes &)
voidCancelAuthenticate()
voidCancelServiceChangeNotification(const Messages::TNodeId &)
voidClientAttachControl()
voidConnectAgent(TAgentConnectType)
TInt Control(TUint, TUint, TDes8 &, ESock::MPlatsecApiExt *)
voidDisconnectAgent(TInt)
CAgentAdapter *NewL(CAgentSubConnectionProvider &, const TDesC &)
TInt NotificationToAgent(TFlowToAgentEventType, TAny *)
voidPromptForReconnect()
TInt QueryIsDialIn()
TInt ReadExcessData(TDes8 &)
TInt ReadIfNetworks(TDes8 &)
TInt ReadIfNetworks(TDes16 &)
TInt ReadIfParams(TDes8 &)
TInt ReadIfParams(TDes16 &)
TInt ReadNifName(TDes8 &)
TInt ReadNifName(TDes16 &)
TInt ReadPortName(TDes8 &)
TInt ReadPortName(TDes16 &)
voidRequestServiceChangeNotificationL(const Messages::TNodeId &, ESock::RLegacyResponseMsg &)
Protected Member Functions
CAgentAdapter(CAgentSubConnectionProvider &)
CAgentSubConnectionProvider &AgentScpr()
Private Member Functions
voidAgentEvent(TNetworkAdaptorEventType, TUint, const TDesC8 &, TAny *)
voidAgentProgress(TInt, TInt)
voidAgentProgress(TSubConnectionUniqueId, TInt, TInt)
voidAuthenticateComplete(TInt)
voidConnectComplete(TInt)
voidCreateAgentL(const TDesC &)
voidDisconnectComplete()
CNifFactory *FindOrCreateAgentFactoryL(const TDesC &)
TInt IncomingConnectionReceived()
TInt Notification(TAgentToNifEventType, TAny *)
voidReconnectComplete(TInt)
voidServiceClosed()
voidServiceStarted()
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()
Public Member Enumerations
enumTAgentState { EDisconnected, EConnecting, EConnected, EDisconnecting, EReconnecting }
Private Attributes
CNifAgentBase *iAgent
RPointerArray< CAgentAdapterSessionNotifier >iAgentAdapterSessionNotifiers
TAgentConnectType iAgentConnectType
CAgentSubConnectionProvider &iAgentScpr
TAgentState iAgentState
CNifAgentFactory *iFactory
Elements::TStateChange iLastProgress

Constructor & Destructor Documentation

CAgentAdapter(CAgentSubConnectionProvider &)

CAgentAdapter(CAgentSubConnectionProvider &aAgentScpr)[protected]

Parameters

CAgentSubConnectionProvider & aAgentScprThe CAgentSubConnectionProvider that is to be called upon when notifications are received from the agent

~CAgentAdapter()

~CAgentAdapter()

Member Functions Documentation

AgentEvent(TNetworkAdaptorEventType, TUint, const TDesC8 &, TAny *)

voidAgentEvent(TNetworkAdaptorEventTypeaEventType,
TUintaEvent,
const TDesC8 &aEventData,
TAny *aSource = 0
)[private, virtual]

Event notification from the Agent (Only known use of this is in bluetooth panagt.cpp)

Parameters

TNetworkAdaptorEventType aEventType
TUint aEvent
const TDesC8 & aEventData
TAny * aSource = 0

AgentProgress(TInt, TInt)

voidAgentProgress(TIntaStage,
TIntaError
)[private, virtual]

Progress notifications from the Agent Connect()

Parameters

TInt aStage
TInt aError

AgentProgress(TSubConnectionUniqueId, TInt, TInt)

voidAgentProgress(TSubConnectionUniqueIdaSubConnectionUniqueId,
TIntaStage,
TIntaError
)[private, virtual]

The functionality provided by this method has never been used.

Parameters

TSubConnectionUniqueId aSubConnectionUniqueId
TInt aStage
TInt aError

AgentScpr()

CAgentSubConnectionProvider &AgentScpr()const [protected, inline]

AgentState()

const TAgentStateAgentState()const [inline]

Authenticate(TDes &, TDes &)

voidAuthenticate(TDes &aUsername,
TDes &aPassword
)

Starts the process of obtaining authentication information via the Agent (called after the SCPr receives an Authentication request from the SCF)

Parameters

TDes & aUsername
TDes & aPassword

AuthenticateComplete(TInt)

voidAuthenticateComplete(TIntaStatus)[private, virtual]

Authentication completed by Agent

Parameters

TInt aStatus

CancelAuthenticate()

voidCancelAuthenticate()

Stops the process of obtaining authentication information via the Agent

CancelServiceChangeNotification(const Messages::TNodeId &)

voidCancelServiceChangeNotification(const Messages::TNodeId &aSender)

Routing the CancelServiceChangeNotification to the Agent

Parameters

const Messages::TNodeId & aSender

ClientAttachControl()

voidClientAttachControl()

ConnectAgent(TAgentConnectType)

voidConnectAgent(TAgentConnectTypeaConnectType)

Begins connection of the Agent (called after SCPr receives BindTo and has Joined the CAgentAdapter)

Parameters

TAgentConnectType aConnectType

ConnectComplete(TInt)

voidConnectComplete(TIntaStatus)[private, virtual]

Agent has started - The SCPR should send BindTo information to the SCF

Parameters

TInt aStatus

Control(TUint, TUint, TDes8 &, ESock::MPlatsecApiExt *)

TInt Control(TUintaOptionLevel,
TUintaOptionName,
TDes8 &aOption,
ESock::MPlatsecApiExt *aPlatsecItf
)

Parameters

TUint aOptionLevel
TUint aOptionName
TDes8 & aOption
ESock::MPlatsecApiExt * aPlatsecItf

CreateAgentL(const TDesC &)

voidCreateAgentL(const TDesC &aAgentName)[private]

Create an agent

Parameters

const TDesC & aAgentName

DisconnectAgent(TInt)

voidDisconnectAgent(TIntaReason)

Begins the disconnection of the Agent

Parameters

TInt aReason

DisconnectComplete()

voidDisconnectComplete()[private, virtual]

Agent has stopped

FindOrCreateAgentFactoryL(const TDesC &)

CNifFactory *FindOrCreateAgentFactoryL(const TDesC &aFilename)[private]

Load a factory and check the Uid etc function always opens factory CObject if successful

Parameters

const TDesC & aFilename

IncomingConnectionReceived()

TInt IncomingConnectionReceived()[private, virtual]

Incoming connections not supported?

NewL(CAgentSubConnectionProvider &, const TDesC &)

CAgentAdapter *NewL(CAgentSubConnectionProvider &aAgentScpr,
const TDesC &aAgentName
)[static]

Create a CAgentAdapter and Agent (loading the .agt library if necessary)

Parameters

CAgentSubConnectionProvider & aAgentScprThe CAgentSubConnectionProvider that is to be called upon when notifications are received from the agent
const TDesC & aAgentNameThe name of the agent to load/create for this CAgentAdaptor

Notification(TAgentToNifEventType, TAny *)

TInt Notification(TAgentToNifEventTypeaEvent,
TAny *aInfo = NULL
)[private, virtual]

Notification from the Agent to the Nif (Flow)

Parameters

TAgentToNifEventType aEvent
TAny * aInfo = NULL

NotificationToAgent(TFlowToAgentEventType, TAny *)

TInt NotificationToAgent(TFlowToAgentEventTypeaEvent,
TAny *aInfo
)

Parameters

TFlowToAgentEventType aEvent
TAny * aInfo

PromptForReconnect()

voidPromptForReconnect()

QueryIsDialIn()

TInt QueryIsDialIn()

ReadExcessData(TDes8 &)

TInt ReadExcessData(TDes8 &aBuffer)

Gets excess data for NIFs such as the PPP NIF.

Parameters

TDes8 & aBuffer- After a successful call contains excess data from the agent

ReadIfNetworks(TDes8 &)

TInt ReadIfNetworks(TDes8 &aIfNetworks)

Gets the Interface Networks for NIFs.

Parameters

TDes8 & aIfNetworks

ReadIfNetworks(TDes16 &)

TInt ReadIfNetworks(TDes16 &aIfNetworks)

Gets the Interface Networks for NIFs.

Parameters

TDes16 & aIfNetworks

ReadIfParams(TDes8 &)

TInt ReadIfParams(TDes8 &aIfParams)

Gets the Interface Parameters for NIFs.

Parameters

TDes8 & aIfParams- After a successful call contains interface parameters from the agent

ReadIfParams(TDes16 &)

TInt ReadIfParams(TDes16 &aIfParams)

Gets the Interface Parameters for NIFs.

Parameters

TDes16 & aIfParams- After a successful call contains interface parameters from the agent

ReadNifName(TDes8 &)

TInt ReadNifName(TDes8 &aNifName)

Gets the name of the NIF (Flow)

Parameters

TDes8 & aNifName- After a successful call contains the NIF (Flow) Name

ReadNifName(TDes16 &)

TInt ReadNifName(TDes16 &aNifName)

Gets the name of the NIF (Flow)

Parameters

TDes16 & aNifName- After a successful call contains the NIF (Flow) Name

ReadPortName(TDes8 &)

TInt ReadPortName(TDes8 &aPortName)

Get the port name for NIFs such as the PPP NIF.

Parameters

TDes8 & aPortName- After a successful call contains the port name from the agent

ReadPortName(TDes16 &)

TInt ReadPortName(TDes16 &aPortName)

Get the port name for NIFs such as the PPP NIF.

Parameters

TDes16 & aPortName- After a successful call contains the port name from the agent

ReconnectComplete(TInt)

voidReconnectComplete(TIntaStatus)[private, virtual]

Traditionally reconnection would be initiated from the CNifAgentRef and handled by NetCon. NetCon would call this method via the ReconnectComplete() in the CAgentBase. This represents the completion of the prompting of the user for a decision to be made on whether or not to reconnect, not the actual reconnection

Parameters

TInt aStatus

RequestServiceChangeNotificationL(const Messages::TNodeId &, ESock::RLegacyResponseMsg &)

voidRequestServiceChangeNotificationL(const Messages::TNodeId &aSender,
ESock::RLegacyResponseMsg &aResponse
)

Routing the RequestServiceChangeNotification to the Agent

Parameters

const Messages::TNodeId & aSender
ESock::RLegacyResponseMsg & aResponse

ServiceClosed()

voidServiceClosed()[private, virtual]

Traditionally called by the CNifAgentRef as a result of a DisconnectComplete, deletion of the the object, or failure to bind. The method would have deleted the NIF. We do nothing here.

ServiceStarted()

voidServiceStarted()[private, virtual]

Agent service started (message from agent) Traditionally the CNifAgentRef implementation would load the NIF here.

Member Enumerations Documentation

Enum TAgentState

Enumerators

EDisconnected
EConnecting
EConnected
EDisconnecting
EReconnecting

Member Data Documentation

CNifAgentBase * iAgent

CNifAgentBase *iAgent[private]

RPointerArray< CAgentAdapterSessionNotifier > iAgentAdapterSessionNotifiers

RPointerArray< CAgentAdapterSessionNotifier >iAgentAdapterSessionNotifiers[private]

TAgentConnectType iAgentConnectType

TAgentConnectType iAgentConnectType[private]

CAgentSubConnectionProvider & iAgentScpr

CAgentSubConnectionProvider &iAgentScpr[private]

TAgentState iAgentState

TAgentState iAgentState[private]

CNifAgentFactory * iFactory

CNifAgentFactory *iFactory[private]

Elements::TStateChange iLastProgress

Elements::TStateChange iLastProgress[private]