Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
Loading...
Searching...
No Matches
RConnection Class Reference

The management interface for a network connection or subconnection. More...

#include <es_sock.h>

Inheritance diagram for RConnection:

Public Types

enum  TConnAttachType { EAttachTypeNormal , EAttachTypeMonitor }
 Identifies the intended use of the connection. More...
 
enum  TConnStopType { EStopNormal , EStopAuthoritative }
 Identifies the type of requirement for stopping the connection. More...
 

Public Member Functions

IMPORT_C RConnection ()
 Connection Management Interface.
 
virtual IMPORT_C ~RConnection ()
 Empty destructor.
 
IMPORT_C TInt Open (RSocketServ &aSocketServer, TUint aConnectionType=KConnectionTypeDefault)
 Opens a new RConnection instance.
 
IMPORT_C TInt Open (RSocketServ &aSocketServer, TName &aName)
 Opens a new RConnection instance cloned from an existing RConnection instance.
 
IMPORT_C void Close ()
 Closes the connection.
 
IMPORT_C void Start (TRequestStatus &aStatus)
 Start a connection asynchonously using the default connection preferences.
 
IMPORT_C void Start (TConnPref &aPref, TRequestStatus &aStatus)
 Start a connection asynchonously using the connection preferences specified.
 
IMPORT_C TInt Start ()
 Start a connection synchonously using the default connection preferences.
 
IMPORT_C TInt Start (TConnPref &aPref)
 Start a connection synchonously using the connection preferences specified.
 
IMPORT_C TInt Stop ()
 Stops the entire connection by disconnecting the underlying network interface immediately, regardless of whether other clients are using it or not.
 
IMPORT_C TInt Stop (TConnStopType aStopType)
 Stops the entire connection by disconnecting the underlying network interface immediately, regardless of whether other clients are using it or not.
 
IMPORT_C TInt Stop (TSubConnectionUniqueId aSubConnectionUniqueId)
 Stops a subconnection.
 
IMPORT_C TInt Stop (TSubConnectionUniqueId aSubConnectionUniqueId, TConnStopType aStopType)
 Stop a subconnection on an interface.
 
IMPORT_C void WaitForIncoming (RSubConnection &aIncomingSubConnection, TRequestStatus &aStatus)
 Subscribe for an incoming session on this connection.
 
IMPORT_C TInt WaitForIncoming (RSubConnection &aIncomingSubConnection)
 Synchronously wait for an incoming session on this connection.
 
IMPORT_C void CancelWaitForIncoming ()
 Cancel the previous subscription for an incoming session.
 
IMPORT_C void ProgressNotification (TNifProgressBuf &aProgress, TRequestStatus &aStatus, TUint aSelectedProgress=KConnProgressDefault)
 Requests asynchronous progress notification for the connection.
 
IMPORT_C void ProgressNotification (TSubConnectionUniqueId aSubConnectionUniqueId, TNifProgressBuf &aProgress, TRequestStatus &aStatus, TUint aSelectedProgress=KConnProgressDefault)
 Requests asynchronous progress notification for a subconnection.
 
IMPORT_C void CancelProgressNotification ()
 Cancels a request for progress notification for the connection, as issued by ProgressNotification().
 
IMPORT_C void CancelProgressNotification (TSubConnectionUniqueId aSubConnectionUniqueId)
 Cancels a request for progress notification for a specified subconnection, as issued by ProgressNotification().
 
IMPORT_C TInt Progress (TNifProgress &aProgress)
 Obtains the current progress information for the connection.
 
IMPORT_C TInt Progress (TSubConnectionUniqueId aSubConnectionUniqueId, TNifProgress &aProgress)
 Obtains the current progress information on a specified subconnection.
 
IMPORT_C TInt LastProgressError (TNifProgress &aProgress)
 Obtains information about the last Progress() call which failed with an error.
 
IMPORT_C void ServiceChangeNotification (TUint32 &aNewISPId, TDes &aNewServiceType, TRequestStatus &aStatus)
 Requests service change notification from the agent.
 
IMPORT_C void CancelServiceChangeNotification ()
 Cancels a request for notification of change of service for the connection, as issued by ServiceChangeNotification().
 
IMPORT_C TInt GetIntSetting (const TDesC &aSettingName, TUint32 &aValue)
 
IMPORT_C TInt GetBoolSetting (const TDesC &aSettingName, TBool &aValue)
 
IMPORT_C TInt GetDesSetting (const TDesC &aSettingName, TDes8 &aValue)
 
IMPORT_C TInt GetDesSetting (const TDesC &aSettingName, TDes16 &aValue)
 
IMPORT_C TInt GetLongDesSetting (const TDesC &aSettingName, TDes &aValue)
 
IMPORT_C TInt GetParameters (ESock::CCommsDataObjectBase &aDataObject)
 
IMPORT_C TInt SetParameters (ESock::CCommsDataObjectBase &aDataObject)
 Speculative method - Not yet supported Do not call this function, it has ony been introduced for symmetry with RConnection::GetParameters and will be completed at a later date.
 
IMPORT_C TInt Name (TName &aName)
 Gets the unique name of an RConnection.
 
IMPORT_C TInt EnumerateConnections (TUint &aCount)
 Enumerates the number of currently active interfaces.
 
IMPORT_C TInt GetConnectionInfo (TUint aIndex, TDes8 &aConnectionInfo)
 Gets information about one of the currently active connections.
 
IMPORT_C void AllInterfaceNotification (TDes8 &aNotification, TRequestStatus &aStatus)
 Requests asynchronous change notification for all interfaces.
 
IMPORT_C void CancelAllInterfaceNotification ()
 Cancels a change notification request previously issued by a call to AllInterfaceNotification().
 
IMPORT_C void Ioctl (TUint aOptionLevel, TUint aOptionName, TRequestStatus &aStatus, TDes8 *aDesc)
 Get information on the connection in an asynchronous manner.
 
IMPORT_C void Ioctl (TUint aOptionLevel, TUint aOptionName, TRequestStatus &aStatus)
 Get information on the connection in an asynchronous manner.
 
IMPORT_C void CancelIoctl ()
 Cancel any outstanding Ioctl request.
 
IMPORT_C TInt Control (TUint aOptionLevel, TUint aOptionName, TDes8 &aOption)
 Gets detailed information on connection clients and sockets.
 
IMPORT_C TInt GetOpt (TUint aOptionLevel, TUint aOptionName, TInt &aOption)
 Gets an option.
 
IMPORT_C TInt SetOpt (TUint aOptionLevel, TUint aOptionName, TInt aOption=0)
 Sets an option.
 
IMPORT_C TInt Attach (const TDesC8 &aConnectionInfo, TConnAttachType aAttachType)
 Attaches the RConnection object to an existing interface.
 
IMPORT_C TInt EnumerateSubConnections (TUint &aCount)
 Asks the server to gather information on the currently active subconnections.
 
IMPORT_C TInt GetSubConnectionInfo (TDes8 &aSubConnectionInfo)
 Gets information about one of the currently active subconnections.
 
IMPORT_C TInt GetSubConnectionInfo (TUint aIndex, TDes8 &aSubConnectionInfo)
 Gets information about one of the currently active subconnections.
 
IMPORT_C void AllSubConnectionNotification (TSubConnectionNotificationBuf &aSubConnectionEvent, TRequestStatus &aStatus)
 Requests notification of any change in the state of any of the subconnections belonging to this RConnection.
 
IMPORT_C void CancelAllSubConnectionNotification ()
 Cancels the request for notification to changes to the state of subconnections, made using the AllSubConnectionNotification().
 
IMPORT_C void DataTransferredRequest (TPckg< TUint > &aUplinkVolume, TPckg< TUint > &aDownlinkVolume, TRequestStatus &aStatus)
 Gets the amount of data that has been transferred by the entire connection.
 
IMPORT_C void DataTransferredRequest (TSubConnectionUniqueId aSubConnectionUniqueId, TPckg< TUint > &aUplinkVolume, TPckg< TUint > &aDownlinkVolume, TRequestStatus &aStatus)
 Gets the amount of data that has been transferred by the specified subconnection.
 
IMPORT_C void DataTransferredCancel ()
 Cancels a request for the amount of data transferred on the entire connection, issued by DataTransferredRequest().
 
IMPORT_C void DataTransferredCancel (TSubConnectionUniqueId aSubConnectionUniqueId)
 Cancels a request for the amount of data transferred on a specified subconnection, issued by DataTransferredRequest().
 
IMPORT_C void DataSentNotificationRequest (TUint aThreshold, TPckg< TUint > &aUplinkVolume, TRequestStatus &aStatus)
 Requests a notification after an additional aThreshold bytes have been sent by the entire connection.
 
IMPORT_C void DataSentNotificationRequest (TSubConnectionUniqueId aSubConnectionUniqueId, TUint aThreshold, TPckg< TUint > &aUplinkVolume, TRequestStatus &aStatus)
 Requests a notification after an additional aThreshold bytes have been sent on a specified subconnection.
 
IMPORT_C void DataSentNotificationCancel ()
 Cancels a request for the amount of data sent on this connection, as issued by DataSentNotificationRequest().
 
IMPORT_C void DataSentNotificationCancel (TSubConnectionUniqueId aSubConnectionUniqueId)
 Cancels a request for the amount of data sent by the specified subconnection.
 
IMPORT_C void DataReceivedNotificationRequest (TUint aThreshold, TPckg< TUint > &aDownlinkVolume, TRequestStatus &aStatus)
 Requests a notification after an additional aThreshold bytes have been received by this connection.
 
IMPORT_C void DataReceivedNotificationRequest (TSubConnectionUniqueId aSubConnectionUniqueId, TUint aThreshold, TPckg< TUint > &aDownlinkVolume, TRequestStatus &aStatus)
 Requests notification after an additional aThreshold bytes have been received by a specified subconnection.
 
IMPORT_C void DataReceivedNotificationCancel ()
 Cancels a request (issued by DataReceivedNotificationRequest ()) for the amount of data received by the entire connection.
 
IMPORT_C void DataReceivedNotificationCancel (TSubConnectionUniqueId aSubConnectionUniqueId)
 Cancels a request (issued by DataReceivedNotificationRequest ()) for the amount of data received by the specified subconnection.
 
IMPORT_C void IsConnectionActiveRequest (TUint aSecs, TPckg< TBool > &aState, TRequestStatus &aStatus)
 Checks whether the connection is active or inactive.
 
IMPORT_C void IsConnectionActiveCancel ()
 
IMPORT_C void IsSubConnectionActiveRequest (TSubConnectionUniqueId aSubConnectionUniqueId, TUint aSecs, TPckg< TBool > &aState, TRequestStatus &aStatus)
 Checks whether the subconnection is active or has changed state (active/inactive)
 
IMPORT_C void IsSubConnectionActiveCancel (TSubConnectionUniqueId aSubConnectionUniqueId)
 
TBool SameSession (TInt aSessionHandle)
 Checks that the Session Handle passed is the same as that of this RConnection.
 

Detailed Description

The management interface for a network connection or subconnection.

Provides clients with the following functionality:

Opening and closing the connection

Starting a connection, which means associating it with a new underlying interface

Attaching the RConnection instance to an existing interface

Stopping the connection, which means disassociating it from the underlying interface

Obtaining progress information and notification during connection start-up

Notifying when subconnections come up and go down

Notifying when there is a service change for the connection

Notifying when a given amount of data has been sent or received on a connection or subconnection

Reading CommDB fields specific to an active connection

Collecting statistical information on the network connection and subconnections. A UI component can display the collected statistical information in order to allow the user to examine the status of connections. The information that can be gathered is the following:

All available internet access point names and internet access point 'friendly' names as appropriate for each network (GPRS/UMTS) connection

Enumerating the currently active connections and subconnections

The current status of all network connections e.g. active/suspended

The amount of data (in bytes) transferred uplink and downlink by the network connection and subconnections

The amount of time each network connection has been active (in seconds)

The current status of the connection and subconnections with respect to data transfer, i.e. active/inactive

The Quality of Service profile associated with each Packet Data Protocol (GPRS/UMTS) context, e.g. low/medium/high

Note that several of the new functions are asynchronous. It is essential for these calls that the client ensures that the parameters they pass to the RConnection API remain in scope for the duration of the asynchronous call.

API status
Published to all clients. Released API. since v7.0s

Definition at line 1106 of file es_sock.h.

Member Enumeration Documentation

◆ TConnAttachType

Identifies the intended use of the connection.

Enumerator
EAttachTypeNormal 

The application wishes to use the connection for normal data transfer, and the idle timers will take that into account.

EAttachTypeMonitor 

The system control type of application wishes to monitor the state of the connection without otherwise affecting it.

In particular, the interface idle timers will not be affected.

Definition at line 1167 of file es_sock.h.

◆ TConnStopType

Identifies the type of requirement for stopping the connection.

Enumerator
EStopNormal 

Any sockets or host/service resolvers associated with this interface will be errored with KErrCancel.

EStopAuthoritative 

Any sockets or host/service resolvers associated with this interface will be errored with KErrConnectionTerminated and should clean up quietly without prompting the user.

Definition at line 1178 of file es_sock.h.

Constructor & Destructor Documentation

◆ RConnection()

IMPORT_C RConnection::RConnection ( )

Connection Management Interface.

◆ ~RConnection()

IMPORT_C RConnection::~RConnection ( )
virtual

Empty destructor.

(generated from Symbian Developer Library)

Member Function Documentation

◆ AllInterfaceNotification()

IMPORT_C void RConnection::AllInterfaceNotification ( TDes8 &  aNotification,
TRequestStatus &  aStatus 
)

Requests asynchronous change notification for all interfaces.

This allows a client to receive a notification whenever a connection in the system goes up or down.

This allows the automatic update of the list of active network connections.

Parameters
aNotificationOn return, a wrapped interface change notification (TInterfaceNotification).
aStatusOn return, the status of the request.

(generated from Symbian Developer Library)

◆ AllSubConnectionNotification()

IMPORT_C void RConnection::AllSubConnectionNotification ( TSubConnectionNotificationBuf &  aSubConnectionEvent,
TRequestStatus &  aStatus 
)

Requests notification of any change in the state of any of the subconnections belonging to this RConnection.

Parameters
aStatusOn return, the status of the request.
Pre-condition
An attached connection: as a result of performing either a Start() or an Attach() No outstanding request for subconnection notifications for this subconnection on this RConnection

(generated from Symbian Developer Library)

◆ Attach()

IMPORT_C TInt RConnection::Attach ( const TDesC8 &  aConnectionInfo,
TConnAttachType  aAttachType 
)

Attaches the RConnection object to an existing interface.

This operation will not start an interface, as Start() does, but attaches to an existing interface if it exists.

Parameters
aConnectionInfoIdentity of the connection to attach to. This is a TPckg<TConnectionInfo>& (possibly obtained from a call to GetConnectionInfo()).
aAttachTypeIdentifies the intended use of the connection.
capability
dependent on the type of connection so deferred to PRT

(generated from Symbian Developer Library)

◆ CancelAllInterfaceNotification()

IMPORT_C void RConnection::CancelAllInterfaceNotification ( )

Cancels a change notification request previously issued by a call to AllInterfaceNotification().

(generated from Symbian Developer Library)

◆ CancelAllSubConnectionNotification()

IMPORT_C void RConnection::CancelAllSubConnectionNotification ( )

Cancels the request for notification to changes to the state of subconnections, made using the AllSubConnectionNotification().

Pre-condition
An attached connection: as a result of performing either a Start() or an Attach() An outstanding request for notification about changes to the state of subconnections.

(generated from Symbian Developer Library)

◆ CancelIoctl()

IMPORT_C void RConnection::CancelIoctl ( )

Cancel any outstanding Ioctl request.

(generated from Symbian Developer Library)

◆ CancelProgressNotification() [1/2]

IMPORT_C void RConnection::CancelProgressNotification ( )

Cancels a request for progress notification for the connection, as issued by ProgressNotification().

(generated from Symbian Developer Library)

◆ CancelProgressNotification() [2/2]

IMPORT_C void RConnection::CancelProgressNotification ( TSubConnectionUniqueId  aSubConnectionUniqueId)

Cancels a request for progress notification for a specified subconnection, as issued by ProgressNotification().

Parameters
aSubConnectionUniqueIdThe identifier for the subconnection used to make the request.
Pre-condition
An attached connection: as a result of performing either a Start() or an Attach() An outstanding request for a progress notification on the subconnection on this RConnection

(generated from Symbian Developer Library)

◆ CancelServiceChangeNotification()

IMPORT_C void RConnection::CancelServiceChangeNotification ( )

Cancels a request for notification of change of service for the connection, as issued by ServiceChangeNotification().

Nothing happens if called without having called "RConnection::ServiceChangeNotification(...)" before. Important: It Panics if used BEFORE "RConnecion::Open(...)" being called.

(generated from Symbian Developer Library)

◆ CancelWaitForIncoming()

IMPORT_C void RConnection::CancelWaitForIncoming ( )

Cancel the previous subscription for an incoming session.

Pre-condition
Must be attached to a connection by performing a Start().

(generated from Symbian Developer Library)

◆ Close()

IMPORT_C void RConnection::Close ( )

Closes the connection.

The connection will not be dropped immediately: it will be dropped when there is no more data traffic on the connection. So if a client needs to graciously shutdown the connection, Close(), not Stop(), needs to be used after shutting down the socket.

(generated from Symbian Developer Library)

◆ Control()

IMPORT_C TInt RConnection::Control ( TUint  aOptionLevel,
TUint  aOptionName,
TDes8 &  aOption 
)

Gets detailed information on connection clients and sockets.

More likely to be used by system control type applications.

Parameters
aOptionLevelOption level to be used.
aOptionNameOption name to be used.
aOptionOn return, the option value.
capability
Dependent on the type of operation so deferred to PRT. See documentation of constant values used in aOptionName and aOptionLevel for more information

(generated from Symbian Developer Library)

◆ DataReceivedNotificationCancel() [1/2]

IMPORT_C void RConnection::DataReceivedNotificationCancel ( )

Cancels a request (issued by DataReceivedNotificationRequest ()) for the amount of data received by the entire connection.

Pre-condition
An attached connection, as a result of performing either a Start() or an Attach() An outstanding request for the amount of data received on this connection made using DataReceivedNotificationRequest()

(generated from Symbian Developer Library)

◆ DataReceivedNotificationCancel() [2/2]

IMPORT_C void RConnection::DataReceivedNotificationCancel ( TSubConnectionUniqueId  aSubConnectionUniqueId)

Cancels a request (issued by DataReceivedNotificationRequest ()) for the amount of data received by the specified subconnection.

Parameters
aSubConnectionUniqueIdThe identifier for the subconnection used to make the request.
Pre-condition
An attached connection, as a result of performing either a Start() or an Attach() An outstanding request for the amount of data received on this subconnection made using DataReceivedNotificationRequest()

(generated from Symbian Developer Library)

◆ DataReceivedNotificationRequest() [1/2]

IMPORT_C void RConnection::DataReceivedNotificationRequest ( TSubConnectionUniqueId  aSubConnectionUniqueId,
TUint  aThreshold,
TPckg< TUint > &  aDownlinkVolume,
TRequestStatus &  aStatus 
)

Requests notification after an additional aThreshold bytes have been received by a specified subconnection.

Completes when an amount of data equal to aThreshold has been received, starting from when the request is posted.

Making this request with an aThreshold of zero will result in the server reading the value in aDownlinkVolume, and producing a notification when the absolute amount of data specified here has been sent.

Parameters
aSubConnectionUniqueIdA valid identifier for a subconnection.
aThresholdThe number of additional bytes to be received by this connection before the request completes.
aDownlinkVolumeOn return, the total number of bytes received by this connection so far.
aStatusOn return, the status of the request.
Pre-condition
An attached connection, as a result of performing either a Start() or an Attach() No outstanding request for data received notifications for this subconnection on this RConnection

(generated from Symbian Developer Library)

◆ DataReceivedNotificationRequest() [2/2]

IMPORT_C void RConnection::DataReceivedNotificationRequest ( TUint  aThreshold,
TPckg< TUint > &  aDownlinkVolume,
TRequestStatus &  aStatus 
)

Requests a notification after an additional aThreshold bytes have been received by this connection.

Completes when an amount of data equal to aThreshold has been received, starting from when the request is posted.

Making this request with an aThreshold of zero will result in the server reading the value in aDownlinkVolume, and producing a notification when the absolute amount of data specified here has been sent.

Parameters
aThresholdThe number of additional bytes to be received by this connection before the request completes.
aDownlinkVolumeThe total number of bytes received by this connection so far
aStatusOn return, the status of the request.
Pre-condition
An attached connection, as a result of performing either a Start() or an Attach() No outstanding request for data received notifications for this connection on this RConnection

(generated from Symbian Developer Library)

◆ DataSentNotificationCancel() [1/2]

IMPORT_C void RConnection::DataSentNotificationCancel ( )

Cancels a request for the amount of data sent on this connection, as issued by DataSentNotificationRequest().

Pre-condition
An attached connection, as a result of performing either a Start() or an Attach() An outstanding request for the amount of data transferred on this connection, made using DataSentNotificationRequest()

(generated from Symbian Developer Library)

◆ DataSentNotificationCancel() [2/2]

IMPORT_C void RConnection::DataSentNotificationCancel ( TSubConnectionUniqueId  aSubConnectionUniqueId)

Cancels a request for the amount of data sent by the specified subconnection.

Parameters
aSubConnectionUniqueIdThe identifier for the subconnection used to make the request.
Pre-condition
An attached connection, as a result of performing either a Start() or an Attach() An outstanding request for the amount of data transferred on this subconnection, made using DataSentNotificationRequest()

(generated from Symbian Developer Library)

◆ DataSentNotificationRequest() [1/2]

IMPORT_C void RConnection::DataSentNotificationRequest ( TSubConnectionUniqueId  aSubConnectionUniqueId,
TUint  aThreshold,
TPckg< TUint > &  aUplinkVolume,
TRequestStatus &  aStatus 
)

Requests a notification after an additional aThreshold bytes have been sent on a specified subconnection.

Making this request with an aThreshold of zero will result in the server reading the value in aUplinkVolume and producing a notification when the absolute amount of data specified here has been sent.

Parameters
aSubConnectionUniqueIdA valid identifier for the subconnection of interest.
aThresholdThe number of additional bytes to be sent by this connection before the request completes.
aUplinkVolumeThe total number of bytes sent by this connection so far.
aStatusOn return, the status of the request.
Pre-condition
An attached connection, as a result of performing either a Start() or an Attach() No outstanding request for data sent notifications for this subconnection on this RConnection

(generated from Symbian Developer Library)

◆ DataSentNotificationRequest() [2/2]

IMPORT_C void RConnection::DataSentNotificationRequest ( TUint  aThreshold,
TPckg< TUint > &  aUplinkVolume,
TRequestStatus &  aStatus 
)

Requests a notification after an additional aThreshold bytes have been sent by the entire connection.

Making this request with an aThreshold of zero will result in the server reading the value in aUplinkVolume and producing a notification when the absolute amount of data specified here has been sent.

Parameters
aThresholdThe number of additional bytes to be sent by this connection before the request completes.
aUplinkVolumeThe total number of bytes sent by this connection so far.
aStatusOn return, the status of the request.
Pre-condition
An attached connection, as a result of performing either a Start() or an Attach() No outstanding request for data sent notifications on this RConnection

(generated from Symbian Developer Library)

◆ DataTransferredCancel() [1/2]

IMPORT_C void RConnection::DataTransferredCancel ( )

Cancels a request for the amount of data transferred on the entire connection, issued by DataTransferredRequest().

Pre-condition
An attached connection; either as a result of performing a Start() or an Attach() An outstanding request for the amount of data transferred on this connection made using GetDataTransferred()

(generated from Symbian Developer Library)

◆ DataTransferredCancel() [2/2]

IMPORT_C void RConnection::DataTransferredCancel ( TSubConnectionUniqueId  aSubConnectionUniqueId)

Cancels a request for the amount of data transferred on a specified subconnection, issued by DataTransferredRequest().

Parameters
aSubConnectionUniqueIdThe identifier for the subconnection used to make the request.
Pre-condition
An attached connection; either as a result of performing a Start() or an Attach() An outstanding request for the amount of data transferred on this connection made using GetDataTransferred()

(generated from Symbian Developer Library)

◆ DataTransferredRequest() [1/2]

IMPORT_C void RConnection::DataTransferredRequest ( TPckg< TUint > &  aUplinkVolume,
TPckg< TUint > &  aDownlinkVolume,
TRequestStatus &  aStatus 
)

Gets the amount of data that has been transferred by the entire connection.

since v7.0s

Parameters
aUplinkVolumeOn return, contains the amount of data in bytes transferred by this connection to the remote endpoint.
aDownlinkVolumeOn return, contains the amount of data in bytes transferred by this connection from the remote endpoint.
aStatusOn return, the status of the request.
Pre-condition
An attached connection, as a result of performing either a Start() or an Attach()

(generated from Symbian Developer Library)

◆ DataTransferredRequest() [2/2]

IMPORT_C void RConnection::DataTransferredRequest ( TSubConnectionUniqueId  aSubConnectionUniqueId,
TPckg< TUint > &  aUplinkVolume,
TPckg< TUint > &  aDownlinkVolume,
TRequestStatus &  aStatus 
)

Gets the amount of data that has been transferred by the specified subconnection.

Parameters
aSubConnectionUniqueIdA valid identifier for the subconnection being queried.
aUplinkVolumeOn return, contains the amount of data in bytes transferred by this connection to the remote endpoint.
aDownlinkVolumeOn return, contains the amount of data in bytes transferred by this connection from the remote endpoint.
aStatusOn return, the status of the request.
Pre-condition
An attached connection, as a result of performing either a Start() or an Attach()

(generated from Symbian Developer Library)

◆ EnumerateConnections()

IMPORT_C TInt RConnection::EnumerateConnections ( TUint &  aCount)

Enumerates the number of currently active interfaces.

This does not count the number of RConnections but the number of underlying interfaces. These may be attached to by varying numbers of RConnections, RSockets etc.

Parameters
aCountOn return, contains the number of currently active interfaces on the server.

(generated from Symbian Developer Library)

◆ EnumerateSubConnections()

IMPORT_C TInt RConnection::EnumerateSubConnections ( TUint &  aCount)

Asks the server to gather information on the currently active subconnections.

Unlike EnumerateConnections(), EnumerateSubConnections() does not cache the information about subconnections, so it is possible for a greater or fewer number of records to be returned through GetSubConnectionInfo()

Parameters
aCountOn return, contains the number of currently active connections.
Pre-condition
An attached connection: as a result of performing either a Start() or an Attach()

(generated from Symbian Developer Library)

◆ GetBoolSetting()

IMPORT_C TInt RConnection::GetBoolSetting ( const TDesC &  aSettingName,
TBool &  aValue 
)
Deprecated:
Since SymbianOS v9.5
Parameters
aSettingNameThe CommDb table name and field name to be accessed. Of the form "<table name>\<field name>". (for example "IAP\Id" or "ModemBearer\PortName").
aValueOn return, the value of the table/field pair.

(generated from Symbian Developer Library)

◆ GetConnectionInfo()

IMPORT_C TInt RConnection::GetConnectionInfo ( TUint  aIndex,
TDes8 &  aConnectionInfo 
)

Gets information about one of the currently active connections.

Note that the actual connection information is gathered on a call to EnumerateConnections() and GetConnectionInfo() is simply used to return the information to the client. Therefore, if the state of the connections change after the EnumerateConnections() call, then the information returned by GetConnectionInfo() may be out of date.

Parameters
aIndexThe index of the connection - must be between 1 and the value of aCount returned in EnumerateConnections().
aConnectionInfoOn return, contains a TPckg<TConnectionInfo> containing information about the connection.

(generated from Symbian Developer Library)

◆ GetDesSetting() [1/2]

IMPORT_C TInt RConnection::GetDesSetting ( const TDesC &  aSettingName,
TDes16 &  aValue 
)
Deprecated:
Since SymbianOS v9.5
Parameters
aSettingNameThe CommDb table name and field name to be accessed. Of the form "<table name>\<field name>" (for example "IAP\Id" or "ModemBearer\PortName").
aValueOn return, the value of the table/field pair.

(generated from Symbian Developer Library)

◆ GetDesSetting() [2/2]

IMPORT_C TInt RConnection::GetDesSetting ( const TDesC &  aSettingName,
TDes8 &  aValue 
)
Deprecated:
Since SymbianOS v9.5
Parameters
aSettingNameThe CommDb table name and field name to be accessed. Of the form "<table name>\<field name>" (for example "IAP\Id" or "ModemBearer\PortName").
aValueOn return, the value of the table/field pair.

(generated from Symbian Developer Library)

◆ GetIntSetting()

IMPORT_C TInt RConnection::GetIntSetting ( const TDesC &  aSettingName,
TUint32 &  aValue 
)
Deprecated:
Since SymbianOS v9.5
Parameters
aSettingNameThe CommDb table name and field name to be accessed. Of the form "<table name>\<field name>" (for example "IAP\Id" or "ModemBearer\PortName").
aValueOn return, the value of the table/field pair.

(generated from Symbian Developer Library)

◆ GetLongDesSetting()

IMPORT_C TInt RConnection::GetLongDesSetting ( const TDesC &  aSettingName,
TDes &  aValue 
)
Deprecated:
Since SymbianOS v9.5
Parameters
aSettingNameThe CommDb table name and field name to be accessed. Of the form "<table name>\<field name>". (for example "IAP\Id" or "ModemBearer\PortName").
aValueOn return, the value of the table/field pair.

(generated from Symbian Developer Library)

◆ GetOpt()

IMPORT_C TInt RConnection::GetOpt ( TUint  aOptionLevel,
TUint  aOptionName,
TInt &  aOption 
)

Gets an option.

Parameters
aOptionLevelOption level to be queried.
aOptionNameOption name to be queried.
aOptionOn return, the option value.
capability
Dependent on the type of operation so deferred to PRT. See documentation of constant values used in aOptionName and aOptionLevel for more information

(generated from Symbian Developer Library)

◆ GetParameters()

IMPORT_C TInt RConnection::GetParameters ( ESock::CCommsDataObjectBase &  aDataObject)

◆ GetSubConnectionInfo() [1/2]

IMPORT_C TInt RConnection::GetSubConnectionInfo ( TDes8 &  aSubConnectionInfo)

Gets information about one of the currently active subconnections.

This function is used when a valid TSubConnectionUniqueId has been discovered using the alternative form of GetSubConnectionInfo(), and the client wishes to update its TSubConnectionInfo-derived structure with the latest subconnection information.

Parameters
aSubConnectionInfoA TPckg<TSubConnectionInfo-derived class>: the actual class depends upon the type of subconnection, eg. GPRS context, PPP, NCP. On entry, must contain a valid TSubConnectionUniqueId to indicate which of the subconnections it wishes to gather information about. On return, contains information about the subconnection.
Pre-condition
An attached connection: as a result of performing either a Start() or an Attach()

(generated from Symbian Developer Library)

◆ GetSubConnectionInfo() [2/2]

IMPORT_C TInt RConnection::GetSubConnectionInfo ( TUint  aIndex,
TDes8 &  aSubConnectionInfo 
)

Gets information about one of the currently active subconnections.

This function is intended for the initial enumeration of connections, when no TSubConnectionUniqueIds are available, so the client must iterate through the list of subconnections.

Parameters
aIndexThe index of the connection - must be between 1 and the value of aCount returned in EnumerateSubConnections().
aSubConnectionInfoOn return, contains a TPckg<TSubConnectionInfo-derived class> containing information about the subconnection; the actual class depends upon the type of subconnection, eg. GPRS context, PPP NCP.
Pre-condition
An attached connection: as a result of performing either a Start() or an Attach()

(generated from Symbian Developer Library)

◆ Ioctl() [1/2]

IMPORT_C void RConnection::Ioctl ( TUint  aOptionLevel,
TUint  aOptionName,
TRequestStatus &  aStatus 
)

Get information on the connection in an asynchronous manner.

Parameters
aOptionLevelOption level to be used.
aOptionNameOption name to be used.
capability
Dependent on the type of operation so deferred to PRT. See documentation of constant values used in aOptionName and aOptionLevel for more information

(generated from Symbian Developer Library)

◆ Ioctl() [2/2]

IMPORT_C void RConnection::Ioctl ( TUint  aOptionLevel,
TUint  aOptionName,
TRequestStatus &  aStatus,
TDes8 *  aDesc 
)

Get information on the connection in an asynchronous manner.

Parameters
aOptionLevelOption level to be used.
aOptionNameOption name to be used.
capability
Dependent on the type of operation so deferred to PRT. See documentation of constant values used in aOptionName and aOptionLevel for more information

(generated from Symbian Developer Library)

◆ IsConnectionActiveCancel()

IMPORT_C void RConnection::IsConnectionActiveCancel ( )
Pre-condition
An attached connection, as a result of performing either a Start() or an Attach() An outstanding request for activity notification on this connection made using IsConnectionActiveRequest()

(generated from Symbian Developer Library)

◆ IsConnectionActiveRequest()

IMPORT_C void RConnection::IsConnectionActiveRequest ( TUint  aSecs,
TPckg< TBool > &  aState,
TRequestStatus &  aStatus 
)

Checks whether the connection is active or inactive.

Notes whether any data is passed for aSecs after the time of call before responding. If data is passed the connection is considered active; otherwise it is considered inactive.

Parameters
aSecsThe period for checking whether the connection is active. The maximum period allowed is approximately 35 mins.
aStateOn entry, the state the client believes the subconnection is currently in; on return, contains the current state of the subconnection.
aStatusOn return, the status of the request
Pre-condition
An attached connection, as a result of performing either a Start() or an Attach() No outstanding request for activity notifications for this connection on this RConnection

(generated from Symbian Developer Library)

◆ IsSubConnectionActiveCancel()

IMPORT_C void RConnection::IsSubConnectionActiveCancel ( TSubConnectionUniqueId  aSubConnectionUniqueId)
Parameters
aSubConnectionUniqueIdThe identifier for the subconnection used to make the request
Pre-condition
An attached connection, as a result of performing either a Start() or an Attach() An outstanding request for an activity notification on this subconnection made using IsSubConnectionActiveRequest()

(generated from Symbian Developer Library)

◆ IsSubConnectionActiveRequest()

IMPORT_C void RConnection::IsSubConnectionActiveRequest ( TSubConnectionUniqueId  aSubConnectionUniqueId,
TUint  aSecs,
TPckg< TBool > &  aState,
TRequestStatus &  aStatus 
)

Checks whether the subconnection is active or has changed state (active/inactive)

The request will be completed when the aState passed in by the client is not the same as the current state, but this transition can only occur in quantised periods of aSecs

The maximum period allowed is approximately 35 mins

Parameters
aSubConnectionUniqueIdA valid identifier for a subconnection
aSecsThe quantisation period for checking whether the subconnection is active
aStateThe state the client believes the subconnection is currently in; on return, contains the current state of the subconnection
aStatusOn return, the status of the request
Pre-condition
An attached connection, as a result of performing either a Start() or an Attach() No outstanding request for activity notifications for this subconnection on this RConnection

(generated from Symbian Developer Library)

◆ LastProgressError()

IMPORT_C TInt RConnection::LastProgressError ( TNifProgress &  aProgress)

Obtains information about the last Progress() call which failed with an error.

Parameters
aProgressA buffer to receive progress information.

(generated from Symbian Developer Library)

◆ Name()

IMPORT_C TInt RConnection::Name ( TName &  aName)

Gets the unique name of an RConnection.

Used to create an RConnection which is a clone of an existing RConnection (possibly in a different process).

Parameters
aNameOn return, the unique name of the RConnection.

(generated from Symbian Developer Library)

◆ Open() [1/2]

IMPORT_C TInt RConnection::Open ( RSocketServ &  aSocketServer,
TName &  aName 
)

Opens a new RConnection instance cloned from an existing RConnection instance.

Parameters
aSocketServerSocket Server session.
aNameName of an existing RConnection (obtainable via Name() method).
capability
Dependent on the type of connection so deferred to PRT

(generated from Symbian Developer Library)

◆ Open() [2/2]

IMPORT_C TInt RConnection::Open ( RSocketServ &  aSocketServer,
TUint  aConnectionType = KConnectionTypeDefault 
)

Opens a new RConnection instance.

Parameters
aSocketServerSocket Server session.
aConnectionTypeReserved.

(generated from Symbian Developer Library)

◆ Progress() [1/2]

IMPORT_C TInt RConnection::Progress ( TNifProgress &  aProgress)

Obtains the current progress information for the connection.

Parameters
aProgressA buffer to receive progress information.

(generated from Symbian Developer Library)

◆ Progress() [2/2]

IMPORT_C TInt RConnection::Progress ( TSubConnectionUniqueId  aSubConnectionUniqueId,
TNifProgress &  aProgress 
)

Obtains the current progress information on a specified subconnection.

Parameters
aSubConnectionUniqueIdA valid identifier for the subconnection of interest.
aProgressOn return, progress information.
Pre-condition
An attached connection: as a result of performing either a Start() or an Attach()

(generated from Symbian Developer Library)

◆ ProgressNotification() [1/2]

IMPORT_C void RConnection::ProgressNotification ( TNifProgressBuf &  aProgress,
TRequestStatus &  aStatus,
TUint  aSelectedProgress = KConnProgressDefault 
)

Requests asynchronous progress notification for the connection.

Parameters
aProgressA buffer to receive progress notification.
aStatusOn return, the status of the request.
aSelectedProgressThe type of progress to report. If set, report only the particular progress specified and any progress in error. If not set, report all progress normally.

(generated from Symbian Developer Library)

◆ ProgressNotification() [2/2]

IMPORT_C void RConnection::ProgressNotification ( TSubConnectionUniqueId  aSubConnectionUniqueId,
TNifProgressBuf &  aProgress,
TRequestStatus &  aStatus,
TUint  aSelectedProgress = KConnProgressDefault 
)

Requests asynchronous progress notification for a subconnection.

NOTE: This function is not supported and will correctly return KErrNotSupported.

Parameters
aSubConnectionUniqueIdA valid identifier for a subconnection.
aProgressA buffer to receive progress notification.
aStatusOn return, the status of the request.
aSelectedProgressThe type of progress to report. If set, report only the particular progress specified and any progress in error. If not set, report all progress normally.
Pre-condition
An attached connection: as a result of performing either a Start() or an Attach() No outstanding request for progress notifications for this subconnection on this RConnection

(generated from Symbian Developer Library)

◆ SameSession()

TBool RConnection::SameSession ( TInt  aSessionHandle)

Checks that the Session Handle passed is the same as that of this RConnection.

Use to verify the RConnection argument passed to the RSocket and RHostResolver Open(..., RConnection& aConnection) methods.

Parameters
aSessionHandleThe handle which is to be checked against that of this RConnection

(generated from Symbian Developer Library)

◆ ServiceChangeNotification()

IMPORT_C void RConnection::ServiceChangeNotification ( TUint32 &  aNewISPId,
TDes &  aNewServiceType,
TRequestStatus &  aStatus 
)

Requests service change notification from the agent.

This call completes if the underlying service changes (i.e. ISP, GPRS APN or LAN Service). Important: It Panics if used BEFORE "RConnecion::Open(...)" being called.

Parameters
aNewISPIdOn completion, the new ISP Id.
aNewServiceTypeOn completion, the new service type.
aStatusOn completion, "KErrNone" if succesful, "KErrNotReady" if called before "RConnection::Start(...)" being called, "KErrInUse" if called twice. Otherwise another of the system wide error codes.

(generated from Symbian Developer Library)

◆ SetOpt()

IMPORT_C TInt RConnection::SetOpt ( TUint  aOptionLevel,
TUint  aOptionName,
TInt  aOption = 0 
)

Sets an option.

Parameters
aOptionLevelOption level to be set.
aOptionNameOption name to be set
aOptionOption value.
capability
Dependent on the type of operation so deferred to PRT. See documentation of constant values used in aOptionName and aOptionLevel for more information

(generated from Symbian Developer Library)

◆ SetParameters()

IMPORT_C TInt RConnection::SetParameters ( ESock::CCommsDataObjectBase &  aDataObject)

Speculative method - Not yet supported Do not call this function, it has ony been introduced for symmetry with RConnection::GetParameters and will be completed at a later date.

(generated from Symbian Developer Library)

◆ Start() [1/4]

IMPORT_C TInt RConnection::Start ( )

Start a connection synchonously using the default connection preferences.

The request completes once the connection is fully up or an error has occurred. Successful completion will be accompanied by a KConnectionUp progress.

If an RConnection has been stopped or has gone down, any subsequent start will act in the same way as a start with a new RConnection. i.e. The preferences from previous starts will not be used.

capability
Dependent on the access point implementation

(generated from Symbian Developer Library)

◆ Start() [2/4]

IMPORT_C TInt RConnection::Start ( TConnPref &  aPref)

Start a connection synchonously using the connection preferences specified.

The connection preferences can be of type TConnSnapPref, TCommDbConnPref, TCommDbMultiConnPref or TConnPrefList. See the definitions of these classes to see their usage.

The request completes once the connection is fully up or an error has occurred. Successful completion will be accompanied by a KConnectionUp progress.

If an RConnection has been stopped or has gone down, any subsequent start will act in the same way as a start with a new RConnection. i.e. The preferences from previous starts will not be used.

Parameters
aPrefConnection preferences.
capability
Dependent on the access point implementation

(generated from Symbian Developer Library)

◆ Start() [3/4]

IMPORT_C void RConnection::Start ( TConnPref &  aPref,
TRequestStatus &  aStatus 
)

Start a connection asynchonously using the connection preferences specified.

The connection preferences can be of type TConnSnapPref, TCommDbConnPref, TCommDbMultiConnPref or TConnPrefList. See the definitions of these classes to see their usage.

The request completes once the connection is fully up or an error has occurred. Successful completion will be accompanied by a KConnectionUp progress.

If an RConnection has been stopped or has gone down, any subsequent start will act in the same way as a start with a new RConnection. i.e. The preferences from previous starts will not be used.

Parameters
aPrefConnection preferences.
aStatusOn return, the status of the request, e.g. KErrNone, KErrAlreadyExists.
capability
Dependent on the access point implementation

(generated from Symbian Developer Library)

◆ Start() [4/4]

IMPORT_C void RConnection::Start ( TRequestStatus &  aStatus)

Start a connection asynchonously using the default connection preferences.

The request completes once the connection is fully up or an error has occurred. Successful completion will be accompanied by a KConnectionUp progress.

If an RConnection has been stopped or has gone down, any subsequent start will act in the same way as a start with a new RConnection. i.e. The preferences from previous starts will not be used.

Parameters
aStatusOn return, the status of the request, e.g. KErrNone, KErrAlreadyExists.
capability
Dependent on the access point implementation

(generated from Symbian Developer Library)

◆ Stop() [1/4]

IMPORT_C TInt RConnection::Stop ( )

Stops the entire connection by disconnecting the underlying network interface immediately, regardless of whether other clients are using it or not.

Applications using the connection will be sent the socket error code KErrCancel. The application generally responds with clean up operations and pop-up boxes alerting the user to the termination of the application.

(generated from Symbian Developer Library)

◆ Stop() [2/4]

IMPORT_C TInt RConnection::Stop ( TConnStopType  aStopType)

Stops the entire connection by disconnecting the underlying network interface immediately, regardless of whether other clients are using it or not.

If the argument is EStopNormal this is identical to calling Stop() with no argument. If it is EStopAuthoritative then applications using the connection will be sent the socket error code KErrConnectionTerminated, which generally results in the applications closing quietly (without pop-up boxes).

Parameters
aStopTypeThe type of stop which is being requested.

(generated from Symbian Developer Library)

◆ Stop() [3/4]

IMPORT_C TInt RConnection::Stop ( TSubConnectionUniqueId  aSubConnectionUniqueId)

Stops a subconnection.

Applications will be sent a socket error code to indicate that they must perform clean up operations.

Parameters
aSubConnectionUniqueIdA valid identifier for a subconnection.
Pre-condition
An attached connection: as a result of performing either a Start() or an Attach()

(generated from Symbian Developer Library)

◆ Stop() [4/4]

IMPORT_C TInt RConnection::Stop ( TSubConnectionUniqueId  aSubConnectionUniqueId,
TConnStopType  aStopType 
)

Stop a subconnection on an interface.

Parameters
aSubConnectionUniqueIdA valid identifier for a subconnection
aStopTypeThe kind of stop to do (controls what error code is reported to interface clients)
Pre-condition
Must be attached to a connection; either by performing a Start(), or using Attach()

(generated from Symbian Developer Library)

◆ WaitForIncoming() [1/2]

IMPORT_C TInt RConnection::WaitForIncoming ( RSubConnection &  aIncomingSubConnection)

Synchronously wait for an incoming session on this connection.

Parameters
aIncomingSubConnectionOn completion, the subconnection representing the incoming session. The incoming session can be accepted (by calling RSubConnection::Accept) or rejected (by calling RSubConnection::Stop) The subconnection is implicitly started (no need to call RSubConnection::Start). aIncomingSubConnection must not be open prior to calling this method.
Pre-condition
Must be attached to a connection by performing a Start().

(generated from Symbian Developer Library)

◆ WaitForIncoming() [2/2]

IMPORT_C void RConnection::WaitForIncoming ( RSubConnection &  aIncomingSubConnection,
TRequestStatus &  aStatus 
)

Subscribe for an incoming session on this connection.

Parameters
aIncomingSubConnectionOn completion, the subconnection representing the incoming session. The incoming session can be accepted (by calling RSubConnection::Accept) or rejected (by calling RSubConnection::Stop) The subconnection is implicitly started (no need to call RSubConnection::Start). aIncomingSubConnection must not be open prior to calling this method.
aStatusOn completion, the status of the request, e.g. KErrNone or another of the system wide error codes.
Pre-condition
Must be attached to a connection by performing a Start().

(generated from Symbian Developer Library)


The documentation for this class was generated from the following files: