class RConnection : public RCommsSubSession |
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. since v7.0s
Public Member Enumerations | |
---|---|
enum | TConnAttachType { EAttachTypeNormal, EAttachTypeMonitor } |
enum | TConnStopType { EStopNormal, EStopAuthoritative } |
Private Attributes | |
---|---|
TPckg< TUint32 > | iNewISPId |
TUint32 | iReserved |
IMPORT_C void | AllInterfaceNotification | ( | TDes8 & | aNotification, |
TRequestStatus & | aStatus | |||
) |
TDes8 & aNotification | |
TRequestStatus & aStatus |
IMPORT_C void | AllSubConnectionNotification | ( | TSubConnectionNotificationBuf & | aSubConnectionEvent, |
TRequestStatus & | aStatus | |||
) |
TSubConnectionNotificationBuf & aSubConnectionEvent | |
TRequestStatus & aStatus |
IMPORT_C TInt | Attach | ( | const TDesC8 & | aConnectionInfo, |
TConnAttachType | aAttachType | |||
) |
const TDesC8 & aConnectionInfo | |
TConnAttachType aAttachType |
IMPORT_C void | CancelProgressNotification | ( | TSubConnectionUniqueId | aSubConnectionUniqueId | ) |
TSubConnectionUniqueId aSubConnectionUniqueId |
IMPORT_C TInt | Control | ( | TUint | aOptionLevel, |
TUint | aOptionName, | |||
TDes8 & | aOption | |||
) |
IMPORT_C void | DataReceivedNotificationCancel | ( | TSubConnectionUniqueId | aSubConnectionUniqueId | ) |
TSubConnectionUniqueId aSubConnectionUniqueId |
IMPORT_C void | DataReceivedNotificationRequest | ( | TUint | aThreshold, |
TPckg< TUint > & | aDownlinkVolume, | |||
TRequestStatus & | aStatus | |||
) |
TUint aThreshold | |
TPckg< TUint > & aDownlinkVolume | |
TRequestStatus & aStatus |
IMPORT_C void | DataReceivedNotificationRequest | ( | TSubConnectionUniqueId | aSubConnectionUniqueId, |
TUint | aThreshold, | |||
TPckg< TUint > & | aDownlinkVolume, | |||
TRequestStatus & | aStatus | |||
) |
TSubConnectionUniqueId aSubConnectionUniqueId | |
TUint aThreshold | |
TPckg< TUint > & aDownlinkVolume | |
TRequestStatus & aStatus |
IMPORT_C void | DataSentNotificationCancel | ( | TSubConnectionUniqueId | aSubConnectionUniqueId | ) |
TSubConnectionUniqueId aSubConnectionUniqueId |
IMPORT_C void | DataSentNotificationRequest | ( | TUint | aThreshold, |
TPckg< TUint > & | aUplinkVolume, | |||
TRequestStatus & | aStatus | |||
) |
TUint aThreshold | |
TPckg< TUint > & aUplinkVolume | |
TRequestStatus & aStatus |
IMPORT_C void | DataSentNotificationRequest | ( | TSubConnectionUniqueId | aSubConnectionUniqueId, |
TUint | aThreshold, | |||
TPckg< TUint > & | aUplinkVolume, | |||
TRequestStatus & | aStatus | |||
) |
TSubConnectionUniqueId aSubConnectionUniqueId | |
TUint aThreshold | |
TPckg< TUint > & aUplinkVolume | |
TRequestStatus & aStatus |
IMPORT_C void | DataTransferredCancel | ( | TSubConnectionUniqueId | aSubConnectionUniqueId | ) |
TSubConnectionUniqueId aSubConnectionUniqueId |
IMPORT_C void | DataTransferredRequest | ( | TPckg< TUint > & | aUplinkVolume, |
TPckg< TUint > & | aDownlinkVolume, | |||
TRequestStatus & | aStatus | |||
) |
TPckg< TUint > & aUplinkVolume | |
TPckg< TUint > & aDownlinkVolume | |
TRequestStatus & aStatus |
IMPORT_C void | DataTransferredRequest | ( | TSubConnectionUniqueId | aSubConnectionUniqueId, |
TPckg< TUint > & | aUplinkVolume, | |||
TPckg< TUint > & | aDownlinkVolume, | |||
TRequestStatus & | aStatus | |||
) |
TSubConnectionUniqueId aSubConnectionUniqueId | |
TPckg< TUint > & aUplinkVolume | |
TPckg< TUint > & aDownlinkVolume | |
TRequestStatus & aStatus |
IMPORT_C TInt | EnumerateConnections | ( | TUint & | aCount | ) |
TUint & aCount |
IMPORT_C TInt | EnumerateSubConnections | ( | TUint & | aCount | ) |
TUint & aCount |
IMPORT_C TInt | GetBoolSetting | ( | const TDesC & | aSettingName, |
TBool & | aValue | |||
) |
Since SymbianOS v9.5
IMPORT_C TInt | GetConnectionInfo | ( | TUint | aIndex, |
TDes8 & | aConnectionInfo | |||
) |
IMPORT_C TInt | GetDesSetting | ( | const TDesC & | aSettingName, |
TDes8 & | aValue | |||
) |
Since SymbianOS v9.5
IMPORT_C TInt | GetDesSetting | ( | const TDesC & | aSettingName, |
TDes16 & | aValue | |||
) |
Since SymbianOS v9.5
IMPORT_C TInt | GetIntSetting | ( | const TDesC & | aSettingName, |
TUint32 & | aValue | |||
) |
Since SymbianOS v9.5
IMPORT_C TInt | GetLongDesSetting | ( | const TDesC & | aSettingName, |
TDes & | aValue | |||
) |
Since SymbianOS v9.5
IMPORT_C TInt | GetOpt | ( | TUint | aOptionLevel, |
TUint | aOptionName, | |||
TInt & | aOption | |||
) |
IMPORT_C TInt | GetParameters | ( | ESock::CCommsDataObjectBase & | aDataObject | ) |
ESock::CCommsDataObjectBase & aDataObject |
IMPORT_C TInt | GetSubConnectionInfo | ( | TDes8 & | aSubConnectionInfo | ) |
TDes8 & aSubConnectionInfo |
IMPORT_C TInt | GetSubConnectionInfo | ( | TUint | aIndex, |
TDes8 & | aSubConnectionInfo | |||
) |
IMPORT_C void | Ioctl | ( | TUint | aOptionLevel, |
TUint | aOptionName, | |||
TRequestStatus & | aStatus, | |||
TDes8 * | aDesc | |||
) |
TUint aOptionLevel | |
TUint aOptionName | |
TRequestStatus & aStatus | |
TDes8 * aDesc |
IMPORT_C void | Ioctl | ( | TUint | aOptionLevel, |
TUint | aOptionName, | |||
TRequestStatus & | aStatus | |||
) |
TUint aOptionLevel | |
TUint aOptionName | |
TRequestStatus & aStatus |
IMPORT_C void | IsConnectionActiveRequest | ( | TUint | aSecs, |
TPckg< TBool > & | aState, | |||
TRequestStatus & | aStatus | |||
) |
TUint aSecs | |
TPckg< TBool > & aState | |
TRequestStatus & aStatus |
IMPORT_C void | IsSubConnectionActiveCancel | ( | TSubConnectionUniqueId | aSubConnectionUniqueId | ) |
TSubConnectionUniqueId aSubConnectionUniqueId |
IMPORT_C void | IsSubConnectionActiveRequest | ( | TSubConnectionUniqueId | aSubConnectionUniqueId, |
TUint | aSecs, | |||
TPckg< TBool > & | aState, | |||
TRequestStatus & | aStatus | |||
) |
TSubConnectionUniqueId aSubConnectionUniqueId | |
TUint aSecs | |
TPckg< TBool > & aState | |
TRequestStatus & aStatus |
IMPORT_C TInt | LastProgressError | ( | TNifProgress & | aProgress | ) |
TNifProgress & aProgress |
IMPORT_C TInt | Open | ( | RSocketServ & | aSocketServer, |
TUint | aConnectionType = KConnectionTypeDefault | |||
) |
RSocketServ & aSocketServer | |
TUint aConnectionType = KConnectionTypeDefault |
IMPORT_C TInt | Open | ( | RSocketServ & | aSocketServer, |
TName & | aName | |||
) |
RSocketServ & aSocketServer | |
TName & aName |
IMPORT_C TInt | Progress | ( | TNifProgress & | aProgress | ) |
TNifProgress & aProgress |
IMPORT_C TInt | Progress | ( | TSubConnectionUniqueId | aSubConnectionUniqueId, |
TNifProgress & | aProgress | |||
) |
TSubConnectionUniqueId aSubConnectionUniqueId | |
TNifProgress & aProgress |
IMPORT_C void | ProgressNotification | ( | TNifProgressBuf & | aProgress, |
TRequestStatus & | aStatus, | |||
TUint | aSelectedProgress = KConnProgressDefault | |||
) |
TNifProgressBuf & aProgress | |
TRequestStatus & aStatus | |
TUint aSelectedProgress = KConnProgressDefault |
IMPORT_C void | ProgressNotification | ( | TSubConnectionUniqueId | aSubConnectionUniqueId, |
TNifProgressBuf & | aProgress, | |||
TRequestStatus & | aStatus, | |||
TUint | aSelectedProgress = KConnProgressDefault | |||
) |
TSubConnectionUniqueId aSubConnectionUniqueId | |
TNifProgressBuf & aProgress | |
TRequestStatus & aStatus | |
TUint aSelectedProgress = KConnProgressDefault |
IMPORT_C void | ServiceChangeNotification | ( | TUint32 & | aNewISPId, |
TDes & | aNewServiceType, | |||
TRequestStatus & | aStatus | |||
) |
TUint32 & aNewISPId | |
TDes & aNewServiceType | |
TRequestStatus & aStatus |
IMPORT_C TInt | SetOpt | ( | TUint | aOptionLevel, |
TUint | aOptionName, | |||
TInt | aOption = 0 | |||
) |
IMPORT_C TInt | SetParameters | ( | ESock::CCommsDataObjectBase & | aDataObject | ) |
ESock::CCommsDataObjectBase & aDataObject |
IMPORT_C void | Start | ( | TRequestStatus & | aStatus | ) |
TRequestStatus & aStatus |
IMPORT_C void | Start | ( | TConnPref & | aPref, |
TRequestStatus & | aStatus | |||
) |
TConnPref & aPref | |
TRequestStatus & aStatus |
IMPORT_C TInt | Stop | ( | TSubConnectionUniqueId | aSubConnectionUniqueId | ) |
TSubConnectionUniqueId aSubConnectionUniqueId |
IMPORT_C TInt | Stop | ( | TSubConnectionUniqueId | aSubConnectionUniqueId, |
TConnStopType | aStopType | |||
) |
TSubConnectionUniqueId aSubConnectionUniqueId | |
TConnStopType aStopType |
IMPORT_C void | WaitForIncoming | ( | RSubConnection & | aIncomingSubConnection, |
TRequestStatus & | aStatus | |||
) |
RSubConnection & aIncomingSubConnection | |
TRequestStatus & aStatus |
IMPORT_C TInt | WaitForIncoming | ( | RSubConnection & | aIncomingSubConnection | ) |
RSubConnection & aIncomingSubConnection |
Identifies the intended use of the connection.
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. |
Identifies the type of requirement for stopping the connection.
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. |