Location:
AgentClient.h
Link against: GenConn.lib
RGenericAgent
Supported from 6.1
The generic agent interfaces with NifMan.
From v6.1 onwards, this replaces the NetDial API.
The Network Interface Manager (NifMan) provides a generic framework for controlling network interfaces, and defines a plug-in architecture. The Generic Agent is such a plug-in for handling dial-up networking. TCP/IP uses the Generic Agent to establish a connection, before setting up the PPP connection.
The Generic Agent gets comms settings, such as modem and ISP configuration, from the communications database (CommDb). It uses the Telephony subsystem to make the dial-up connection.
|
Defined in RGenericAgent
:
AcceptIncomingRequests()
, AcceptIncomingRequestsCancel()
, CancelOutgoingErrorNotification()
, CancelServiceChangeNotification()
, DebugMarkEnd()
, DebugMarkStart()
, DebugSetAllocFail()
, DoAcceptIncomingRequestsL()
, DoStartOutgoingL()
, GetActiveBoolSetting()
, GetActiveDesSetting()
, GetActiveIntSetting()
, GetActiveLongDesSetting()
, Open()
, PackageOverridesArray()
, RGenericAgent()
, ResolveError()
, ServiceChangeNotification()
, StartOutgoing()
, iNewISPId
, ~RGenericAgent()
Inherited from RHandleBase
:
Close()
,
Duplicate()
,
Handle()
,
SetHandle()
Inherited from RNif
:
AgentInfo()
,
CancelProgressNotification()
,
DisableTimers()
,
LastProgressError()
,
NetworkActive()
,
Progress()
,
ProgressNotification()
,
Start()
,
Stop()
,
Version()
Inherited from RSessionBase
:
Attach()
,
CreateSession()
,
EAutoAttach
,
EExplicitAttach
,
Send()
,
SendReceive()
,
SetRetry()
,
Share()
,
TAttachMode
RGenericAgent();
Default empty constructor, and is present only to support virtual function table export.
TInt Open();
Open the network interface.
|
TInt StartOutgoing();
Starts the agent making an outgoing connection and signals to NifMan that a connection has been started. The function will start the agent using the settings from the CommDB. If the setting in the database is to prompt the user for connection parameters, then the agent will automatically start up the dialog server to get information from the user. This function will return without waiting to find out if setting up the connection was successful. There is a asynchronous version of this function available that will wait for the connection set up to complete.
|
TInt StartOutgoing(CStoreableOverrideSettings& aOverrides);
Starts the agent making an outgoing connection and signals to NifMan that a connection has been started. The function will start the agent using the database override settings specified in the parameter, rather than (or in addition to) using the database settings from the comms database. This function will return without waiting to find out if setting up the connection was successful. There is a asynchronous version of this function available that will wait for the connection set up to complete.
|
|
void StartOutgoing(TRequestStatus& aStatus);
This is the asynchronous version of
StartOutgoing()
. This function waits for the connection setup to
complete.
|
void StartOutgoing(CStoreableOverrideSettings& aOverrides, TRequestStatus& aStatus);
This is the asynchronous version of
StartOutgoing()
. This function waits for the connection setup to
complete.
|
void CancelOutgoingErrorNotification();
This does not cancel the connection attempt itself (this may be
done using the
RNif::Stop()
function), but cancels the
outstanding request for the error to be returned when the connection is
complete.
TInt AcceptIncomingRequests(TRequestStatus& aStatus);
Tells the agent to begin waiting for incoming requests for connection establishment.
Notes:
In this version, the only currently supported bearer for incoming requests for connection is GPRS.
It is possible to interrupt the agent's waiting, by a
StartOutgoing()
request. When that
connection has terminated, though, the agent will revert to waiting for
incoming connections.
AcceptIncomingRequests()
will not complete
when the connection has been established. It will only complete if an error
occurred in processing the request, or if
AcceptIncomingRequestsCancel()
has been
called.
|
|
TInt AcceptIncomingRequests(CStoreableOverrideSettings& aOverrides, TRequestStatus& aStatus);
This function is the same as
AcceptIncomingRequests(TRequestStatus& aStatus)
but allows the
caller to override the CommDB settings by providing the aOverrides
parameter.
|
|
void AcceptIncomingRequestsCancel();
Cancels a previous call to accept an incoming request made by
AcceptIncomingRequests()
.
Notes:
The
RNif::Stop()
can not be used to cancel a
AcceptIncomingRequests()
because NifMan will be unaware of the
waiting state of an agent.
When a mobile-terminated connection is already in progress,
AcceptIncomingRequestsCancel()
will not terminate the connection.
Use RNif::Stop()
to do that.
void ServiceChangeNotification(TRequestStatus& aStatus, TUint32& aNewISPId, TDes& aNewServiceType);
This asynchronous function allows the user to be notified of a change to the ISP/GPRS AP to which the agent is connected.
|
void CancelServiceChangeNotification();
Cancels a previously posted
ServiceChangeNotification()
call.
TInt GetActiveIntSetting(const TDesC& aTableName, const TDesC& aColumnName, TUint32& aValue);
Gets the "active setting", i.e. the current default or override
as a TUint32
, for the specified database field.
|
|
TInt GetActiveBoolSetting(const TDesC& aTableName, const TDesC& aColumnName, TBool& aValue);
Gets the "active setting", i.e. the current default or override
as a TBool
, for the specified database field.
|
|
TInt GetActiveDesSetting(const TDesC& aTableName, const TDesC& aColumnName, TDes8& aValue);
Gets the "active setting", i.e. the current default or override
as a TDes8
, for the specified database field.
|
|
TInt GetActiveDesSetting(const TDesC& aTableName, const TDesC& aColumnName, TDes16& aValue);
Gets the "active setting", i.e. the current default or override
as a TDes16
, for the specified database field.
This function has one extra use. If the value of
aTableName
is TPtrC(SERVICE_TYPE)
and
aColumnName
is an empty descriptor, the function will return in
the aValue
the name of the table that is currently in use. This
indicates the bearer (GPRS/CSD) that is currently in use.
|
|
TInt GetActiveLongDesSetting(const TDesC& aTableName, const TDesC& aColumnName, TDes& aValue);
Gets the "active setting", i.e. the current default or override
as a TDes
, for the specified database field.
|
|
static void ResolveError(TInt& aError);
Resolves all agent-specific errors to standard Symbian OS
errors. All errors are resolved to KErrGeneral
apart from
KErrScriptComplete
, which is resolved to
KErrNone
.
|
private: void DoStartOutgoingL(CStoreableOverrideSettings& aOverrides);
This member is internal and not intended for use.
|
void DebugMarkStart();
The body of this function is only defined for debug builds and is not intended for use.
void DebugMarkEnd(TInt aCount=0);
The body of this function is only defined for debug builds and is not intended for use.
|
void DebugSetAllocFail(TInt aValue=0);
The body of this function is only defined for debug builds and is not intended for use.
|
private: void DoAcceptIncomingRequestsL(CStoreableOverrideSettings& aOverrides, TRequestStatus& aStatus);
This member is internal and not intended for use.
|
private: void PackageOverridesArray(TAny* aPtr, TInt aPtrNum, CStoreableOverrideSettings& aOverrides);
This member is internal and not intended for use.
|