RConnection Class Reference

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

Inherits from

Public Member Functions
RConnection()
~RConnection()
IMPORT_C voidAllInterfaceNotification(TDes8 &, TRequestStatus &)
IMPORT_C voidAllSubConnectionNotification(TSubConnectionNotificationBuf &, TRequestStatus &)
IMPORT_C TIntAttach(const TDesC8 &, TConnAttachType)
IMPORT_C voidCancelAllInterfaceNotification()
IMPORT_C voidCancelAllSubConnectionNotification()
IMPORT_C voidCancelIoctl()
IMPORT_C voidCancelProgressNotification()
IMPORT_C voidCancelProgressNotification(TSubConnectionUniqueId)
IMPORT_C voidCancelServiceChangeNotification()
IMPORT_C voidCancelWaitForIncoming()
IMPORT_C voidClose()
IMPORT_C TIntControl(TUint, TUint, TDes8 &)
IMPORT_C voidDataReceivedNotificationCancel()
IMPORT_C voidDataReceivedNotificationCancel(TSubConnectionUniqueId)
IMPORT_C voidDataReceivedNotificationRequest(TUint, TPckg< TUint > &, TRequestStatus &)
IMPORT_C voidDataReceivedNotificationRequest(TSubConnectionUniqueId, TUint, TPckg< TUint > &, TRequestStatus &)
IMPORT_C voidDataSentNotificationCancel()
IMPORT_C voidDataSentNotificationCancel(TSubConnectionUniqueId)
IMPORT_C voidDataSentNotificationRequest(TUint, TPckg< TUint > &, TRequestStatus &)
IMPORT_C voidDataSentNotificationRequest(TSubConnectionUniqueId, TUint, TPckg< TUint > &, TRequestStatus &)
IMPORT_C voidDataTransferredCancel()
IMPORT_C voidDataTransferredCancel(TSubConnectionUniqueId)
IMPORT_C voidDataTransferredRequest(TPckg< TUint > &, TPckg< TUint > &, TRequestStatus &)
IMPORT_C voidDataTransferredRequest(TSubConnectionUniqueId, TPckg< TUint > &, TPckg< TUint > &, TRequestStatus &)
IMPORT_C TIntEnumerateConnections(TUint &)
IMPORT_C TIntEnumerateSubConnections(TUint &)
IMPORT_C TIntGetBoolSetting(const TDesC &, TBool &)
IMPORT_C TIntGetConnectionInfo(TUint, TDes8 &)
IMPORT_C TIntGetDesSetting(const TDesC &, TDes8 &)
IMPORT_C TIntGetDesSetting(const TDesC &, TDes16 &)
IMPORT_C TIntGetIntSetting(const TDesC &, TUint32 &)
IMPORT_C TIntGetLongDesSetting(const TDesC &, TDes &)
IMPORT_C TIntGetOpt(TUint, TUint, TInt &)
IMPORT_C TIntGetParameters(ESock::CCommsDataObjectBase &)
IMPORT_C TIntGetSubConnectionInfo(TDes8 &)
IMPORT_C TIntGetSubConnectionInfo(TUint, TDes8 &)
IMPORT_C voidIoctl(TUint, TUint, TRequestStatus &, TDes8 *)
IMPORT_C voidIoctl(TUint, TUint, TRequestStatus &)
IMPORT_C voidIsConnectionActiveCancel()
IMPORT_C voidIsConnectionActiveRequest(TUint, TPckg< TBool > &, TRequestStatus &)
IMPORT_C voidIsSubConnectionActiveCancel(TSubConnectionUniqueId)
IMPORT_C voidIsSubConnectionActiveRequest(TSubConnectionUniqueId, TUint, TPckg< TBool > &, TRequestStatus &)
IMPORT_C TIntLastProgressError(TNifProgress &)
IMPORT_C TIntName(TName &)
IMPORT_C TIntOpen(RSocketServ &, TUint)
IMPORT_C TIntOpen(RSocketServ &, TName &)
IMPORT_C TIntProgress(TNifProgress &)
IMPORT_C TIntProgress(TSubConnectionUniqueId, TNifProgress &)
IMPORT_C voidProgressNotification(TNifProgressBuf &, TRequestStatus &, TUint)
IMPORT_C voidProgressNotification(TSubConnectionUniqueId, TNifProgressBuf &, TRequestStatus &, TUint)
TBool SameSession(TInt)
IMPORT_C voidServiceChangeNotification(TUint32 &, TDes &, TRequestStatus &)
IMPORT_C TIntSetOpt(TUint, TUint, TInt)
IMPORT_C TIntSetParameters(ESock::CCommsDataObjectBase &)
IMPORT_C voidStart(TRequestStatus &)
IMPORT_C voidStart(TConnPref &, TRequestStatus &)
IMPORT_C TIntStart()
IMPORT_C TIntStart(TConnPref &)
IMPORT_C TIntStop()
IMPORT_C TIntStop(TConnStopType)
IMPORT_C TIntStop(TSubConnectionUniqueId)
IMPORT_C TIntStop(TSubConnectionUniqueId, TConnStopType)
IMPORT_C voidWaitForIncoming(RSubConnection &, TRequestStatus &)
IMPORT_C TIntWaitForIncoming(RSubConnection &)
Inherited Functions
RSubSessionBase::CloseSubSession(TInt)
RSubSessionBase::CreateAutoCloseSubSession(RSessionBase &,TInt,const TIpcArgs &)
RSubSessionBase::CreateSubSession(const RSessionBase &,TInt)
RSubSessionBase::CreateSubSession(const RSessionBase &,TInt,const TIpcArgs &)
RSubSessionBase::RSubSessionBase()
RSubSessionBase::Send(TInt)const
RSubSessionBase::Send(TInt,const TIpcArgs &)const
RSubSessionBase::SendReceive(TInt)const
RSubSessionBase::SendReceive(TInt,TRequestStatus &)const
RSubSessionBase::SendReceive(TInt,const TIpcArgs &)const
RSubSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const
RSubSessionBase::Session()const
RSubSessionBase::SubSessionHandle()const
Public Member Enumerations
enumTConnAttachType { EAttachTypeNormal, EAttachTypeMonitor }
enumTConnStopType { EStopNormal, EStopAuthoritative }
Private Attributes
TPckg< TUint32 >iNewISPId
TUint32 iReserved

Constructor & Destructor Documentation

RConnection()

IMPORT_CRConnection()

Connection Management Interface

~RConnection()

IMPORT_C~RConnection()[virtual]

Member Functions Documentation

AllInterfaceNotification(TDes8 &, TRequestStatus &)

IMPORT_C voidAllInterfaceNotification(TDes8 &aNotification,
TRequestStatus &aStatus
)

Parameters

TDes8 & aNotification
TRequestStatus & aStatus

AllSubConnectionNotification(TSubConnectionNotificationBuf &, TRequestStatus &)

IMPORT_C voidAllSubConnectionNotification(TSubConnectionNotificationBuf &aSubConnectionEvent,
TRequestStatus &aStatus
)

Parameters

TSubConnectionNotificationBuf & aSubConnectionEvent
TRequestStatus & aStatus

Attach(const TDesC8 &, TConnAttachType)

IMPORT_C TIntAttach(const TDesC8 &aConnectionInfo,
TConnAttachTypeaAttachType
)

Parameters

const TDesC8 & aConnectionInfo
TConnAttachType aAttachType

CancelAllInterfaceNotification()

IMPORT_C voidCancelAllInterfaceNotification()

CancelAllSubConnectionNotification()

IMPORT_C voidCancelAllSubConnectionNotification()

CancelIoctl()

IMPORT_C voidCancelIoctl()

CancelProgressNotification()

IMPORT_C voidCancelProgressNotification()

CancelProgressNotification(TSubConnectionUniqueId)

IMPORT_C voidCancelProgressNotification(TSubConnectionUniqueIdaSubConnectionUniqueId)

Parameters

TSubConnectionUniqueId aSubConnectionUniqueId

CancelServiceChangeNotification()

IMPORT_C voidCancelServiceChangeNotification()

CancelWaitForIncoming()

IMPORT_C voidCancelWaitForIncoming()

Close()

IMPORT_C voidClose()

Control(TUint, TUint, TDes8 &)

IMPORT_C TIntControl(TUintaOptionLevel,
TUintaOptionName,
TDes8 &aOption
)

Parameters

TUint aOptionLevel
TUint aOptionName
TDes8 & aOption

DataReceivedNotificationCancel()

IMPORT_C voidDataReceivedNotificationCancel()

DataReceivedNotificationCancel(TSubConnectionUniqueId)

IMPORT_C voidDataReceivedNotificationCancel(TSubConnectionUniqueIdaSubConnectionUniqueId)

Parameters

TSubConnectionUniqueId aSubConnectionUniqueId

DataReceivedNotificationRequest(TUint, TPckg< TUint > &, TRequestStatus &)

IMPORT_C voidDataReceivedNotificationRequest(TUintaThreshold,
TPckg< TUint > &aDownlinkVolume,
TRequestStatus &aStatus
)

Parameters

TUint aThreshold
TPckg< TUint > & aDownlinkVolume
TRequestStatus & aStatus

DataReceivedNotificationRequest(TSubConnectionUniqueId, TUint, TPckg< TUint > &, TRequestStatus &)

IMPORT_C voidDataReceivedNotificationRequest(TSubConnectionUniqueIdaSubConnectionUniqueId,
TUintaThreshold,
TPckg< TUint > &aDownlinkVolume,
TRequestStatus &aStatus
)

Parameters

TSubConnectionUniqueId aSubConnectionUniqueId
TUint aThreshold
TPckg< TUint > & aDownlinkVolume
TRequestStatus & aStatus

DataSentNotificationCancel()

IMPORT_C voidDataSentNotificationCancel()

DataSentNotificationCancel(TSubConnectionUniqueId)

IMPORT_C voidDataSentNotificationCancel(TSubConnectionUniqueIdaSubConnectionUniqueId)

Parameters

TSubConnectionUniqueId aSubConnectionUniqueId

DataSentNotificationRequest(TUint, TPckg< TUint > &, TRequestStatus &)

IMPORT_C voidDataSentNotificationRequest(TUintaThreshold,
TPckg< TUint > &aUplinkVolume,
TRequestStatus &aStatus
)

Parameters

TUint aThreshold
TPckg< TUint > & aUplinkVolume
TRequestStatus & aStatus

DataSentNotificationRequest(TSubConnectionUniqueId, TUint, TPckg< TUint > &, TRequestStatus &)

IMPORT_C voidDataSentNotificationRequest(TSubConnectionUniqueIdaSubConnectionUniqueId,
TUintaThreshold,
TPckg< TUint > &aUplinkVolume,
TRequestStatus &aStatus
)

Parameters

TSubConnectionUniqueId aSubConnectionUniqueId
TUint aThreshold
TPckg< TUint > & aUplinkVolume
TRequestStatus & aStatus

DataTransferredCancel()

IMPORT_C voidDataTransferredCancel()

DataTransferredCancel(TSubConnectionUniqueId)

IMPORT_C voidDataTransferredCancel(TSubConnectionUniqueIdaSubConnectionUniqueId)

Parameters

TSubConnectionUniqueId aSubConnectionUniqueId

DataTransferredRequest(TPckg< TUint > &, TPckg< TUint > &, TRequestStatus &)

IMPORT_C voidDataTransferredRequest(TPckg< TUint > &aUplinkVolume,
TPckg< TUint > &aDownlinkVolume,
TRequestStatus &aStatus
)

Parameters

TPckg< TUint > & aUplinkVolume
TPckg< TUint > & aDownlinkVolume
TRequestStatus & aStatus

DataTransferredRequest(TSubConnectionUniqueId, TPckg< TUint > &, TPckg< TUint > &, TRequestStatus &)

IMPORT_C voidDataTransferredRequest(TSubConnectionUniqueIdaSubConnectionUniqueId,
TPckg< TUint > &aUplinkVolume,
TPckg< TUint > &aDownlinkVolume,
TRequestStatus &aStatus
)

Parameters

TSubConnectionUniqueId aSubConnectionUniqueId
TPckg< TUint > & aUplinkVolume
TPckg< TUint > & aDownlinkVolume
TRequestStatus & aStatus

EnumerateConnections(TUint &)

IMPORT_C TIntEnumerateConnections(TUint &aCount)

Parameters

TUint & aCount

EnumerateSubConnections(TUint &)

IMPORT_C TIntEnumerateSubConnections(TUint &aCount)

Parameters

TUint & aCount

GetBoolSetting(const TDesC &, TBool &)

IMPORT_C TIntGetBoolSetting(const TDesC &aSettingName,
TBool &aValue
)

Since SymbianOS v9.5

Parameters

const TDesC & aSettingName
TBool & aValue

GetConnectionInfo(TUint, TDes8 &)

IMPORT_C TIntGetConnectionInfo(TUintaIndex,
TDes8 &aConnectionInfo
)

Parameters

TUint aIndex
TDes8 & aConnectionInfo

GetDesSetting(const TDesC &, TDes8 &)

IMPORT_C TIntGetDesSetting(const TDesC &aSettingName,
TDes8 &aValue
)

Since SymbianOS v9.5

Parameters

const TDesC & aSettingName
TDes8 & aValue

GetDesSetting(const TDesC &, TDes16 &)

IMPORT_C TIntGetDesSetting(const TDesC &aSettingName,
TDes16 &aValue
)

Since SymbianOS v9.5

Parameters

const TDesC & aSettingName
TDes16 & aValue

GetIntSetting(const TDesC &, TUint32 &)

IMPORT_C TIntGetIntSetting(const TDesC &aSettingName,
TUint32 &aValue
)

Since SymbianOS v9.5

Parameters

const TDesC & aSettingName
TUint32 & aValue

GetLongDesSetting(const TDesC &, TDes &)

IMPORT_C TIntGetLongDesSetting(const TDesC &aSettingName,
TDes &aValue
)

Since SymbianOS v9.5

Parameters

const TDesC & aSettingName
TDes & aValue

GetOpt(TUint, TUint, TInt &)

IMPORT_C TIntGetOpt(TUintaOptionLevel,
TUintaOptionName,
TInt &aOption
)

Parameters

TUint aOptionLevel
TUint aOptionName
TInt & aOption

GetParameters(ESock::CCommsDataObjectBase &)

IMPORT_C TIntGetParameters(ESock::CCommsDataObjectBase &aDataObject)

Parameters

ESock::CCommsDataObjectBase & aDataObject

GetSubConnectionInfo(TDes8 &)

IMPORT_C TIntGetSubConnectionInfo(TDes8 &aSubConnectionInfo)

Parameters

TDes8 & aSubConnectionInfo

GetSubConnectionInfo(TUint, TDes8 &)

IMPORT_C TIntGetSubConnectionInfo(TUintaIndex,
TDes8 &aSubConnectionInfo
)

Parameters

TUint aIndex
TDes8 & aSubConnectionInfo

Ioctl(TUint, TUint, TRequestStatus &, TDes8 *)

IMPORT_C voidIoctl(TUintaOptionLevel,
TUintaOptionName,
TRequestStatus &aStatus,
TDes8 *aDesc
)

Parameters

TUint aOptionLevel
TUint aOptionName
TRequestStatus & aStatus
TDes8 * aDesc

Ioctl(TUint, TUint, TRequestStatus &)

IMPORT_C voidIoctl(TUintaOptionLevel,
TUintaOptionName,
TRequestStatus &aStatus
)

Parameters

TUint aOptionLevel
TUint aOptionName
TRequestStatus & aStatus

IsConnectionActiveCancel()

IMPORT_C voidIsConnectionActiveCancel()

IsConnectionActiveRequest(TUint, TPckg< TBool > &, TRequestStatus &)

IMPORT_C voidIsConnectionActiveRequest(TUintaSecs,
TPckg< TBool > &aState,
TRequestStatus &aStatus
)

Parameters

TUint aSecs
TPckg< TBool > & aState
TRequestStatus & aStatus

IsSubConnectionActiveCancel(TSubConnectionUniqueId)

IMPORT_C voidIsSubConnectionActiveCancel(TSubConnectionUniqueIdaSubConnectionUniqueId)

Parameters

TSubConnectionUniqueId aSubConnectionUniqueId

IsSubConnectionActiveRequest(TSubConnectionUniqueId, TUint, TPckg< TBool > &, TRequestStatus &)

IMPORT_C voidIsSubConnectionActiveRequest(TSubConnectionUniqueIdaSubConnectionUniqueId,
TUintaSecs,
TPckg< TBool > &aState,
TRequestStatus &aStatus
)

Parameters

TSubConnectionUniqueId aSubConnectionUniqueId
TUint aSecs
TPckg< TBool > & aState
TRequestStatus & aStatus

LastProgressError(TNifProgress &)

IMPORT_C TIntLastProgressError(TNifProgress &aProgress)

Parameters

TNifProgress & aProgress

Name(TName &)

IMPORT_C TIntName(TName &aName)

Parameters

TName & aName

Open(RSocketServ &, TUint)

IMPORT_C TIntOpen(RSocketServ &aSocketServer,
TUintaConnectionType =  KConnectionTypeDefault
)

Parameters

RSocketServ & aSocketServer
TUint aConnectionType =  KConnectionTypeDefault

Open(RSocketServ &, TName &)

IMPORT_C TIntOpen(RSocketServ &aSocketServer,
TName &aName
)

Parameters

RSocketServ & aSocketServer
TName & aName

Progress(TNifProgress &)

IMPORT_C TIntProgress(TNifProgress &aProgress)

Parameters

TNifProgress & aProgress

Progress(TSubConnectionUniqueId, TNifProgress &)

IMPORT_C TIntProgress(TSubConnectionUniqueIdaSubConnectionUniqueId,
TNifProgress &aProgress
)

Parameters

TSubConnectionUniqueId aSubConnectionUniqueId
TNifProgress & aProgress

ProgressNotification(TNifProgressBuf &, TRequestStatus &, TUint)

IMPORT_C voidProgressNotification(TNifProgressBuf &aProgress,
TRequestStatus &aStatus,
TUintaSelectedProgress =  KConnProgressDefault
)

Parameters

TNifProgressBuf & aProgress
TRequestStatus & aStatus
TUint aSelectedProgress =  KConnProgressDefault

ProgressNotification(TSubConnectionUniqueId, TNifProgressBuf &, TRequestStatus &, TUint)

IMPORT_C voidProgressNotification(TSubConnectionUniqueIdaSubConnectionUniqueId,
TNifProgressBuf &aProgress,
TRequestStatus &aStatus,
TUintaSelectedProgress =  KConnProgressDefault
)

Parameters

TSubConnectionUniqueId aSubConnectionUniqueId
TNifProgressBuf & aProgress
TRequestStatus & aStatus
TUint aSelectedProgress =  KConnProgressDefault

SameSession(TInt)

TBool SameSession(TIntaSessionHandle)

Parameters

TInt aSessionHandle

ServiceChangeNotification(TUint32 &, TDes &, TRequestStatus &)

IMPORT_C voidServiceChangeNotification(TUint32 &aNewISPId,
TDes &aNewServiceType,
TRequestStatus &aStatus
)

Parameters

TUint32 & aNewISPId
TDes & aNewServiceType
TRequestStatus & aStatus

SetOpt(TUint, TUint, TInt)

IMPORT_C TIntSetOpt(TUintaOptionLevel,
TUintaOptionName,
TIntaOption = 0
)

Parameters

TUint aOptionLevel
TUint aOptionName
TInt aOption = 0

SetParameters(ESock::CCommsDataObjectBase &)

IMPORT_C TIntSetParameters(ESock::CCommsDataObjectBase &aDataObject)

Parameters

ESock::CCommsDataObjectBase & aDataObject

Start(TRequestStatus &)

IMPORT_C voidStart(TRequestStatus &aStatus)

Parameters

TRequestStatus & aStatus

Start(TConnPref &, TRequestStatus &)

IMPORT_C voidStart(TConnPref &aPref,
TRequestStatus &aStatus
)

Parameters

TConnPref & aPref
TRequestStatus & aStatus

Start()

IMPORT_C TIntStart()

Start(TConnPref &)

IMPORT_C TIntStart(TConnPref &aPref)

Parameters

TConnPref & aPref

Stop()

IMPORT_C TIntStop()

Stop(TConnStopType)

IMPORT_C TIntStop(TConnStopTypeaStopType)

Parameters

TConnStopType aStopType

Stop(TSubConnectionUniqueId)

IMPORT_C TIntStop(TSubConnectionUniqueIdaSubConnectionUniqueId)

Parameters

TSubConnectionUniqueId aSubConnectionUniqueId

Stop(TSubConnectionUniqueId, TConnStopType)

IMPORT_C TIntStop(TSubConnectionUniqueIdaSubConnectionUniqueId,
TConnStopTypeaStopType
)

Parameters

TSubConnectionUniqueId aSubConnectionUniqueId
TConnStopType aStopType

WaitForIncoming(RSubConnection &, TRequestStatus &)

IMPORT_C voidWaitForIncoming(RSubConnection &aIncomingSubConnection,
TRequestStatus &aStatus
)

Parameters

RSubConnection & aIncomingSubConnection
TRequestStatus & aStatus

WaitForIncoming(RSubConnection &)

IMPORT_C TIntWaitForIncoming(RSubConnection &aIncomingSubConnection)

Parameters

RSubConnection & aIncomingSubConnection

Member Enumerations Documentation

Enum TConnAttachType

Identifies the intended use of the connection.

Enumerators

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.

Enum TConnStopType

Identifies the type of requirement for stopping the connection.

Enumerators

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.

Member Data Documentation

TPckg< TUint32 > iNewISPId

TPckg< TUint32 >iNewISPId[private]

TUint32 iReserved

TUint32 iReserved[private]