RSubConnection Class Reference

class RSubConnection : public RCommsSubSession
A Sub-Connection, a channel within a Connection. A representation of a channel between this device and remote devices with which we are communicating. This channel will be used by one or more sockets. Depending on the state of the channel, it may not be possible to bind arbitary sockets into it. Attempts to bind sockets from different protocol families to a single channel is an error, as each channel can only be used by one protocol family.
Note:

The sub-connection can represent a end-to-end channel and/or a channel from this device to an intermediate device (e.g an access server such as a GGSN which using UMTS and PDP contexts. Properties can be specified simultaneously on protocol and link level.)

Before using any of these services, a connection to a socket server session must have been made and the connection must be open.

Since v9.0

Inherits from

Nested Classes and Structures

Public Member Functions
RSubConnection()
IMPORT_C voidAdd(RSocket &, TRequestStatus &)
IMPORT_C voidCancelEventNotification()
IMPORT_C voidClose()
IMPORT_C TIntControl(TUint, TUint, TDes8 &)
IMPORT_C voidEventNotification(TNotificationEventBuf &, TBool, TRequestStatus &)
IMPORT_C voidEventNotification(TNotificationEventBuf &, TEventFilter, TUint, TRequestStatus &)
IMPORT_C TIntGetParameters(RSubConParameterBundle &)
IMPORT_C TIntGetParameters(RParameterFamilyBundle &)
IMPORT_C TIntOpen(RSocketServ &, TSubConnType, RConnection &)
IMPORT_C voidRemove(RSocket &, TRequestStatus &)
TBool SameSession(TInt)
IMPORT_C TIntSetParameters(const RSubConParameterBundle &)
IMPORT_C TIntSetParameters(const RParameterFamilyBundle &)
IMPORT_C voidStart(TRequestStatus &)
IMPORT_C TIntStart()
IMPORT_C TIntStop()
Private Member Functions
IMPORT_C TIntOpen(RSocketServ &, TSubConnOpen::TSubConnType, RConnection &)
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
enumTSubConnType { EAttachToDefault, ECreateNew, EWaitIncoming }
Private Attributes
TInt iSpare

Constructor & Destructor Documentation

RSubConnection()

IMPORT_CRSubConnection()

Empty sub-connection handle constructor

Member Functions Documentation

Add(RSocket &, TRequestStatus &)

IMPORT_C voidAdd(RSocket &aSocket,
TRequestStatus &aStatus
)

Associate a socket with a subconnection. The socket must already be using the same connection or the association attempt will fail. The completion of this method does not indicate that the socket is now running over the sub-connection, it only indicates that the association is complete and a negotiation has started to move the socket onto the subconnection. An event (via eventNotification) will be sent once the socket is running on the sub-connection.

Parameters

RSocket & aSocketSocket to be associated with the Sub-Connection
TRequestStatus & aStatusStatus to complete when socket has been added (or failed to add)

CancelEventNotification()

IMPORT_C voidCancelEventNotification()

Cancel an outstanding Event Notification request

Close()

IMPORT_C voidClose()

Closes the sub-connection.

The sub-connection will not be dropped immediately: it will be dropped when there is no more data traffic on the sub-connection.

Control(TUint, TUint, TDes8 &)

IMPORT_C TIntControl(TUintaOptionLevel,
TUintaOptionName,
TDes8 &aOption
)

Parameters

TUint aOptionLevel
TUint aOptionName
TDes8 & aOption

EventNotification(TNotificationEventBuf &, TBool, TRequestStatus &)

IMPORT_C voidEventNotification(TNotificationEventBuf &aEventBuffer,
TBoolaGenericEventsOnly,
TRequestStatus &aStatus
)

Requests asynchronous event notification for the sub-connection.

Parameters

TNotificationEventBuf & aEventBufferA buffer to receive event notification.
TBool aGenericEventsOnly
TRequestStatus & aStatusOn return, the status of the request.

EventNotification(TNotificationEventBuf &, TEventFilter, TUint, TRequestStatus &)

IMPORT_C voidEventNotification(TNotificationEventBuf &aEventBuffer,
TEventFilteraEventFilterList,
TUintaEventListLength,
TRequestStatus &aStatus
)

Requests asynchronous notification of a specific list of events for the sub-connection.

Parameters

TNotificationEventBuf & aEventBufferA buffer to receive event notification.
TEventFilter aEventFilterListlist of event filters specifying a subset of events of interest.
TUint aEventListLengthLength of the filter list provided
TRequestStatus & aStatusOn return, the status of the request.

GetParameters(RSubConParameterBundle &)

IMPORT_C TIntGetParameters(RSubConParameterBundle &aParametersSet)

Fetch the sub-connection's current parameters (Requested, Acceptable and Granted)

Parameters

RSubConParameterBundle & aParametersSetbundle of parameters to write the current parameters into

GetParameters(RParameterFamilyBundle &)

IMPORT_C TIntGetParameters(RParameterFamilyBundle &aParametersSet)

Fetch the sub-connection's current parameters (Requested, Acceptable and Granted)

Parameters

RParameterFamilyBundle & aParametersSetbundle of parameters to write the current parameters into

Open(RSocketServ &, TSubConnType, RConnection &)

IMPORT_C TIntOpen(RSocketServ &aServer,
TSubConnTypeaSubConnType,
RConnection &aConnection
)

Opens a new RSubConnection instance.

Parameters

RSocketServ & aServer
TSubConnType aSubConnTypespecifies the type of sub connection, the different available types are defined by TSubConnType.
RConnection & aConnectionParent Connection that is to be sub divided by this sub-connection

Open(RSocketServ &, TSubConnOpen::TSubConnType, RConnection &)

IMPORT_C TIntOpen(RSocketServ &aServer,
TSubConnOpen::TSubConnTypeaSubConnType,
RConnection &aConnection
)[private]

Opens a new RSubConnection instance.

Parameters

RSocketServ & aServerSocket Server session.
TSubConnOpen::TSubConnType aSubConnTypeEAttachToDefault when attaching to default or ECreateNew for new one
RConnection & aConnectionParent Connection that is to be sub divided by this sub-connection

Remove(RSocket &, TRequestStatus &)

IMPORT_C voidRemove(RSocket &aSocket,
TRequestStatus &aStatus
)

Remove a socket from a subconnection. The socket will be moved back to the default sub-connection. The successful completion of this method does not indicate that the socket has moved back to the default sub-connection, it only indicates that the move negotiation has been successful. An event (via eventNotification) will be sent once the socket is running on the default sub-connection.

Parameters

RSocket & aSocketSocket to be removed from the Sub-Connection
TRequestStatus & aStatusStatus to complete when socket has been removed (or failed to remove)

SameSession(TInt)

TBool SameSession(TIntaSessionHandle)

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

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

Parameters

TInt aSessionHandleThe handle which is to be checked against that of this RSubConnection

SetParameters(const RSubConParameterBundle &)

IMPORT_C TIntSetParameters(const RSubConParameterBundle &aParametersSet)

Set Parameters of the sub-connection. Successful completion of this method only indicates that the negotiation has been successfully started. An event via eventNotification) will be sent once the granted parameters are available.

Parameters

const RSubConParameterBundle & aParametersSetbundle of parameters to be applied to the sub-connection

SetParameters(const RParameterFamilyBundle &)

IMPORT_C TIntSetParameters(const RParameterFamilyBundle &aParametersSet)

Set Parameters of the sub-connection. Successful completion of this method only indicates that the negotiation has been successfully started. An event via eventNotification) will be sent once the granted parameters are available.

Parameters

const RParameterFamilyBundle & aParametersSetbundle of parameters to be applied to the sub-connection

Start(TRequestStatus &)

IMPORT_C voidStart(TRequestStatus &aStatus)

Unused

Parameters

TRequestStatus & aStatus

Start()

IMPORT_C TIntStart()

Unused

Stop()

IMPORT_C TIntStop()

Unused

Member Enumerations Documentation

Enum TSubConnType

Enumerators

EAttachToDefault
ECreateNew
EWaitIncoming

Member Data Documentation

TInt iSpare

TInt iSpare[private]