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 TAgentState AgentState ()
void Authenticate ( TDes &, TDes &)
void CancelAuthenticate ()
void CancelServiceChangeNotification (const Messages::TNodeId &)
void ClientAttachControl ()
void ConnectAgent ( TAgentConnectType )
TInt Control ( TUint , TUint , TDes8 &, ESock::MPlatsecApiExt *)
void DisconnectAgent ( TInt )
CAgentAdapter * NewL ( CAgentSubConnectionProvider &, const TDesC &)
TInt NotificationToAgent ( TFlowToAgentEventType , TAny *)
void PromptForReconnect ()
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 &)
void RequestServiceChangeNotificationL (const Messages::TNodeId &, ESock::RLegacyResponseMsg &)
Protected Member Functions
CAgentAdapter ( CAgentSubConnectionProvider &)
CAgentSubConnectionProvider & AgentScpr ()
Private Member Functions
void AgentEvent ( TNetworkAdaptorEventType , TUint , const TDesC8 &, TAny *)
void AgentProgress ( TInt , TInt )
void AgentProgress ( TSubConnectionUniqueId , TInt , TInt )
void AuthenticateComplete ( TInt )
void ConnectComplete ( TInt )
void CreateAgentL (const TDesC &)
void DisconnectComplete ()
CNifFactory * FindOrCreateAgentFactoryL (const TDesC &)
TInt IncomingConnectionReceived ()
TInt Notification ( TAgentToNifEventType , TAny *)
void ReconnectComplete ( TInt )
void ServiceClosed ()
void ServiceStarted ()
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
enum TAgentState { 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 & aAgentScpr The 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 *)

void AgentEvent ( TNetworkAdaptorEventType aEventType,
TUint aEvent,
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)

void AgentProgress ( TInt aStage,
TInt aError
) [private, virtual]

Progress notifications from the Agent Connect()

Parameters

TInt aStage
TInt aError

AgentProgress(TSubConnectionUniqueId, TInt, TInt)

void AgentProgress ( TSubConnectionUniqueId aSubConnectionUniqueId,
TInt aStage,
TInt aError
) [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 TAgentState AgentState ( ) const [inline]

Authenticate(TDes &, TDes &)

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

void AuthenticateComplete ( TInt aStatus ) [private, virtual]

Authentication completed by Agent

Parameters

TInt aStatus

CancelAuthenticate()

void CancelAuthenticate ( )

Stops the process of obtaining authentication information via the Agent

CancelServiceChangeNotification(const Messages::TNodeId &)

void CancelServiceChangeNotification ( const Messages::TNodeId & aSender )

Routing the CancelServiceChangeNotification to the Agent

Parameters

const Messages::TNodeId & aSender

ClientAttachControl()

void ClientAttachControl ( )

ConnectAgent(TAgentConnectType)

void ConnectAgent ( TAgentConnectType aConnectType )

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

Parameters

TAgentConnectType aConnectType

ConnectComplete(TInt)

void ConnectComplete ( TInt aStatus ) [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 ( TUint aOptionLevel,
TUint aOptionName,
TDes8 & aOption,
ESock::MPlatsecApiExt * aPlatsecItf
)

Parameters

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

CreateAgentL(const TDesC &)

void CreateAgentL ( const TDesC & aAgentName ) [private]

Create an agent

Parameters

const TDesC & aAgentName

DisconnectAgent(TInt)

void DisconnectAgent ( TInt aReason )

Begins the disconnection of the Agent

Parameters

TInt aReason

DisconnectComplete()

void DisconnectComplete ( ) [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 & aAgentScpr The CAgentSubConnectionProvider that is to be called upon when notifications are received from the agent
const TDesC & aAgentName The name of the agent to load/create for this CAgentAdaptor

Notification(TAgentToNifEventType, TAny *)

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

Notification from the Agent to the Nif (Flow)

Parameters

TAgentToNifEventType aEvent
TAny * aInfo = NULL

NotificationToAgent(TFlowToAgentEventType, TAny *)

TInt NotificationToAgent ( TFlowToAgentEventType aEvent,
TAny * aInfo
)

Parameters

TFlowToAgentEventType aEvent
TAny * aInfo

PromptForReconnect()

void PromptForReconnect ( )

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)

void ReconnectComplete ( TInt aStatus ) [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 &)

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

Routing the RequestServiceChangeNotification to the Agent

Parameters

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

ServiceClosed()

void ServiceClosed ( ) [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()

void ServiceStarted ( ) [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]