ESock::CTransportFlowShim Class Reference

class ESock::CTransportFlowShim : public ESock::CNetworkFlow

Service Access Point Shim to convert CServProviderBase objects to CControlledServProvider objects.

Provides transport services to a single protocol. Several of the calls to CServProviderBase have pre-conditions attached to them - for example a connection oriented protocol must have its local address set (either by a SetLocalName() or AutoBind()) before it is opened. If the socket server calls the CServProviderBase in such an erroneous way, the protocol should panic.

Since 9.0

Public Member Functions
CTransportFlowShim *NewL(CSubConnectionFlowFactoryBase &, const Messages::TNodeId &, CProtocolIntfBase *)
CServProviderBase *Provider()
voidSetSSP(CServProviderBase &)
Protected Member Functions
CTransportFlowShim(CSubConnectionFlowFactoryBase &, const Messages::TNodeId &, CProtocolIntfBase *)
~CTransportFlowShim()
voidActiveOpen()
voidBindToL(TCFDataClient::TBindTo &)
CSubConnectionFlowBase &CloneFlowL()
TInt Control(TUint, TUint, TDes8 &)
voidDestroy()
voidExtractSetOptExtensions()
MSessionControl *GetControlL(TInt, MSessionControlNotify &)
MLowerControl *GetControlL(const TDesC8 &)
voidGetData(TDes8 &, TUint, TSockAddr *)
voidIoctl(TUint, TUint, TDes8 *)
TInt LockToConnectionInfo()
const Messages::TNodeId &NodeId()
TInt PassiveOpen(TUint)
voidReceivedL(const Messages::TRuntimeCtxId &, const Messages::TNodeId &, Messages::TSignatureBase &)
voidRejoin(const TCFFlow::TRejoin &)
EDataClientRoutedGuard EShuttingDown EBearerExpectedSAP_FLAG_FUNCTIONS(DeleteUponBearerReception, EDeleteUponBearerReception)
TInt SecurityCheck(MProvdSecurityChecker *)
MLowerDataSender::TSendResult Send(RMBufChain &)
voidSetBearerExpected()
voidSetDataClientRoutedGuard()
voidSetDeleteUponBearerReception()
voidSetDetaching()
voidSetFlowParamsInitialised()
voidSetLocalName(TSockAddr &)
TInt SetOption(TUint, TUint, const TDesC8 &)
voidSetProtocolOptions()
TInt SetRemName(TSockAddr &)
voidSetSockType(TUint)
voidShutdown(MSessionControl::TCloseType)
voidShutdown(MSessionControl::TCloseType, const TDesC8 &)
TBool ShuttingDown()
voidStart()
voidStartFlowL(const Messages::TRuntimeCtxId &)
voidStopFlow(TCFDataClient::TStop &)
TBool Stopped()
voidStoreProvision(TCFDataClient::TProvisionConfig &)
voidSubConnectionError(const Messages::TEBase::TError &, TUint)
voidUnbind()
voidUnbind(MUpperDataReceiver *, MUpperControl *)
TBool UseBearerErrors()
TUint Write(const TDesC8 &, TUint, TSockAddr *)
TInt Write(RMBufChain &, TUint, TSockAddr *)
Private Member Functions
voidCanClose(MSocketNotify::TDelete)
voidCanClose(const TDesC8 &, MSocketNotify::TDelete)
CTransportFlowShim *CloneNSetSAP(CServProviderBase &)
voidCompleteStart(TInt)
voidConnectComplete()
voidConnectComplete(const TDesC8 &)
voidConnectComplete(CServProviderBase &)
voidConnectComplete(CServProviderBase &, const TDesC8 &)
voidDisconnect(void)
TBool DoNoBearer()
voidError(TInt, TUint)
voidInitDestroy()
voidIoctlComplete(TDesC8 *)
voidNewData(TUint)
voidNoBearer(const TDesC8 &)
voidNoBearerCompletion()
voidPostDataClientRouted()
voidPostNoBearer()
voidSetFlowParams(const TFlowParams &)
voidSetLocalNameProcess()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
ESock::CCommsProviderBase::AccessPointConfig()const
ESock::CCommsProviderBase::~CCommsProviderBase()
ESock::CNetworkFlow::BindToL(const TCFDataClient::TBindTo &)
ESock::CNetworkFlow::CNetworkFlow(CSubConnectionFlowFactoryBase &,const Messages::TNodeId &,CProtocolIntfBase *)
ESock::CNetworkFlow::ClearIdle()
ESock::CNetworkFlow::ClearIdleSent()
ESock::CNetworkFlow::ClearLocalAddressSet()
ESock::CNetworkFlow::ClearNoBearerGuard()
ESock::CNetworkFlow::ClearRemoteAddressSet()
ESock::CNetworkFlow::ClearStarted()
ESock::CNetworkFlow::DoGetBinderControlL()
ESock::CNetworkFlow::FetchInterfaceControlL(TSupportedCommsApiExt)
ESock::CNetworkFlow::Flow()
ESock::CNetworkFlow::Idle()
ESock::CNetworkFlow::IdleSent()
ESock::CNetworkFlow::IsBoundToSession()const
ESock::CNetworkFlow::LocalAddressSet()
ESock::CNetworkFlow::NoBearerGuard()
ESock::CNetworkFlow::ProcessDCIdleState()
ESock::CNetworkFlow::RemoteAddressSet()
ESock::CNetworkFlow::SetIdle()
ESock::CNetworkFlow::SetIdleSent()
ESock::CNetworkFlow::SetLocalAddressSet()
ESock::CNetworkFlow::SetNoBearerGuard()
ESock::CNetworkFlow::SetRemoteAddressSet()
ESock::CNetworkFlow::SetStarted()
ESock::CNetworkFlow::Started()
ESock::CNetworkFlow::UpdateDestinationAddress(const TSockAddr &)
ESock::CNetworkFlow::~CNetworkFlow()
ESock::CSubConnectionFlowBase::CSubConnectionFlowBase(CSubConnectionFlowFactoryBase &,const Messages::TNodeId &,CProtocolIntfBase *)
ESock::CSubConnectionFlowBase::ControlProvider()const
ESock::CSubConnectionFlowBase::DeleteThisFlow()
ESock::CSubConnectionFlowBase::Factory()const
ESock::CSubConnectionFlowBase::FetchNodeInterfaceControlL(TInt)
ESock::CSubConnectionFlowBase::GetBinderControlL()
ESock::CSubConnectionFlowBase::HasControlPlane()const
ESock::CSubConnectionFlowBase::ProtocolIntf()const
ESock::CSubConnectionFlowBase::SubConnectionGoingDown()
ESock::CSubConnectionFlowBase::~CSubConnectionFlowBase()
Protected Member Enumerations
enumTStateFlag {
EDetaching = 0x0001000, EDataClientRoutedGuard = 0x00020000, EStopped = 0x00040000, EShuttingDown = 0x00080000, EFlowParamsInitialised = 0x00100000, EBearerExpected = 0x00200000, EDeleteUponBearerReception = 0x00400000, EUseBearerErrors = 0x00800000
}
Public Member Type Definitions
typedef CTransportFlowShimFactory FactoryType
Private Attributes
TFlowParams iFlowParams
MUpperControl *iHostResolverNotify
TSoIfConnectionInfo iIfInfo
MSessionControlNotify *iListenerControlNotify
CProtocolRef *iProtocolReference
CServProviderBase *iProvider
Messages::RRequestOriginator iStartRequest
Inherited Attributes
ESock::CCommsProviderBase::iAccessPointConfig
ESock::CNetworkFlow::iLocalAddress
ESock::CNetworkFlow::iLowerControl
ESock::CNetworkFlow::iLowerFlow
ESock::CNetworkFlow::iRemoteAddress
ESock::CNetworkFlow::iSessionControlNotify
ESock::CNetworkFlow::iSessionDataNotify
ESock::CNetworkFlow::iStateFlags
ESock::CSubConnectionFlowBase::iLastRequestOriginator
ESock::CSubConnectionFlowBase::iProtocolIntf
ESock::CSubConnectionFlowBase::iSubConnectionProvider

Constructor & Destructor Documentation

CTransportFlowShim(CSubConnectionFlowFactoryBase &, const Messages::TNodeId &, CProtocolIntfBase *)

CTransportFlowShim(CSubConnectionFlowFactoryBase &aFactory,
const Messages::TNodeId &aSubConn,
CProtocolIntfBase *aProtocolIntf
)[protected]

Parameters

CSubConnectionFlowFactoryBase & aFactory
const Messages::TNodeId & aSubConn
CProtocolIntfBase * aProtocolIntf

~CTransportFlowShim()

~CTransportFlowShim()[protected, virtual]

Member Functions Documentation

ActiveOpen()

voidActiveOpen()[protected, virtual]

BindToL(TCFDataClient::TBindTo &)

voidBindToL(TCFDataClient::TBindTo &aBindTo)[protected]

Request from control side (at network layer) to indicate that the SubConnection is up and running and that we should bind to a Flow below.

Parameters

TCFDataClient::TBindTo & aBindTo

CanClose(MSocketNotify::TDelete)

voidCanClose(MSocketNotify::TDeleteaDelete = MSocketNotify::EDelete)[private, virtual]

Parameters

MSocketNotify::TDelete aDelete = MSocketNotify::EDelete

CanClose(const TDesC8 &, MSocketNotify::TDelete)

voidCanClose(const TDesC8 &aDisconnectData,
MSocketNotify::TDeleteaDelete = MSocketNotify::EDelete
)[private, virtual]

Parameters

const TDesC8 & aDisconnectData
MSocketNotify::TDelete aDelete = MSocketNotify::EDelete

CloneFlowL()

CSubConnectionFlowBase &CloneFlowL()[protected, virtual]

CloneNSetSAP(CServProviderBase &)

CTransportFlowShim *CloneNSetSAP(CServProviderBase &aSSP)[private]

Parameters

CServProviderBase & aSSP

CompleteStart(TInt)

voidCompleteStart(TIntaError)[private]

Parameters

TInt aError

ConnectComplete()

voidConnectComplete()[private, virtual]

ConnectComplete(const TDesC8 &)

voidConnectComplete(const TDesC8 &aConnectData)[private, virtual]

Parameters

const TDesC8 & aConnectData

ConnectComplete(CServProviderBase &)

voidConnectComplete(CServProviderBase &aSSP)[private, virtual]

Parameters

CServProviderBase & aSSP

ConnectComplete(CServProviderBase &, const TDesC8 &)

voidConnectComplete(CServProviderBase &aSSP,
const TDesC8 &aConnectData
)[private, virtual]

Parameters

CServProviderBase & aSSP
const TDesC8 & aConnectData

Control(TUint, TUint, TDes8 &)

TInt Control(TUintaLevel,
TUintaName,
TDes8 &aOption
)[protected, virtual]

Parameters

TUint aLevel
TUint aName
TDes8 & aOption

Destroy()

voidDestroy()[protected]

Disconnect(void)

voidDisconnect(void)[private, virtual]

Parameters

void

DoNoBearer()

TBool DoNoBearer()[private]

Do the actual no Bearer call.

Error(TInt, TUint)

voidError(TIntanError,
TUintanOperationMask = MSocketNotify::EErrorAllOperations
)[private, virtual]

Parameters

TInt anError
TUint anOperationMask = MSocketNotify::EErrorAllOperations

ExtractSetOptExtensions()

voidExtractSetOptExtensions()[protected]

GetControlL(TInt, MSessionControlNotify &)

MSessionControl *GetControlL(TIntaSessionType,
MSessionControlNotify &aSessionControlNotify
)[protected, virtual]

Parameters

TInt aSessionType
MSessionControlNotify & aSessionControlNotify

GetControlL(const TDesC8 &)

MLowerControl *GetControlL(const TDesC8 &aProtocol)[protected, virtual]

Parameters

const TDesC8 & aProtocol

GetData(TDes8 &, TUint, TSockAddr *)

voidGetData(TDes8 &aDesc,
TUintaOptions,
TSockAddr *anAddr
)[protected, virtual]

Parameters

TDes8 & aDesc
TUint aOptions
TSockAddr * anAddr

InitDestroy()

voidInitDestroy()[private]

Ioctl(TUint, TUint, TDes8 *)

voidIoctl(TUintaLevel,
TUintaName,
TDes8 *anOption
)[protected, virtual]

Performs some protocol specific IO control.

Note:

If this function is called erroneously, the protocol should call Error() on the socket. If an Ioctl call is already outstanding, the client will be panicked with the value ETwoIoctls.

Parameters

TUint aLevelOption level.
TUint aNameOption name.
TDes8 * anOptionOption data.

IoctlComplete(TDesC8 *)

voidIoctlComplete(TDesC8 *aBuf)[private, virtual]

Parameters

TDesC8 * aBuf

LockToConnectionInfo()

TInt LockToConnectionInfo()[protected]

NewData(TUint)

voidNewData(TUintaCount)[private, virtual]

Parameters

TUint aCount

NewL(CSubConnectionFlowFactoryBase &, const Messages::TNodeId &, CProtocolIntfBase *)

CTransportFlowShim *NewL(CSubConnectionFlowFactoryBase &aFactory,
const Messages::TNodeId &aSubConn,
CProtocolIntfBase *aProtocolIntf
)[static]

Parameters

CSubConnectionFlowFactoryBase & aFactory
const Messages::TNodeId & aSubConn
CProtocolIntfBase * aProtocolIntf

NoBearer(const TDesC8 &)

voidNoBearer(const TDesC8 &aConnectionParams)[private, virtual]

Upcall from protocol indicating no underlying bearer for the socket.

Parameters

const TDesC8 & aConnectionParamsAdditional connection parameters from the stack, in the form of a human readable string. Initially, the required protocols (e.g. "protocol=ip").

NoBearerCompletion()

voidNoBearerCompletion()[private]

NodeId()

const Messages::TNodeId &NodeId()const [protected, virtual]

PassiveOpen(TUint)

TInt PassiveOpen(TUintaQueueSize)[protected, virtual]

Tells the protocol to start waiting for an incoming connection request on this socket (i.e. port). It is called by the socket server in response to a listen request from a client.

Only ever called on connection-oriented sockets. Such a socket should always have both the local address and the remote address specified before this function is called. If this is not the case, then the protocol should panic.

The aQue parameter is the number of sockets which can be waiting for an outstanding Start after calling ConnectComplete(). The protocol should keep a count of sockets in this state - incrementing a variable in ConnectComplete(), and decrementing it in Start().

When a connection has completed, the protocol should call ConnectComplete() on its TNotify. If an error occurs during connection the protocol should not call ConnectComplete() at all; instead it should call Error().

Parameters

TUint aQueueSize

PostDataClientRouted()

voidPostDataClientRouted()[private]

PostNoBearer()

voidPostNoBearer()[private]

Provider()

CServProviderBase *Provider()[inline]

ReceivedL(const Messages::TRuntimeCtxId &, const Messages::TNodeId &, Messages::TSignatureBase &)

voidReceivedL(const Messages::TRuntimeCtxId &aSender,
const Messages::TNodeId &aRecipient,
Messages::TSignatureBase &aMessage
)[protected, virtual]

Parameters

const Messages::TRuntimeCtxId & aSender
const Messages::TNodeId & aRecipient
Messages::TSignatureBase & aMessage

Rejoin(const TCFFlow::TRejoin &)

voidRejoin(const TCFFlow::TRejoin &aRejoinMessage)[protected]

Parameters

const TCFFlow::TRejoin & aRejoinMessage

SAP_FLAG_FUNCTIONS(DeleteUponBearerReception, EDeleteUponBearerReception)

EDataClientRoutedGuard EShuttingDown EBearerExpectedSAP_FLAG_FUNCTIONS(DeleteUponBearerReception,
EDeleteUponBearerReception
)[protected]

Parameters

DeleteUponBearerReception
EDeleteUponBearerReception

SecurityCheck(MProvdSecurityChecker *)

TInt SecurityCheck(MProvdSecurityChecker *aSecurityChecker)[protected, virtual]

Ask the SAP provider to perform a security policy check on the client process (default implementation).

Parameters

MProvdSecurityChecker * aSecurityChecker

Send(RMBufChain &)

MLowerDataSender::TSendResult Send(RMBufChain &aData)[protected, virtual]

Parameters

RMBufChain & aData

SetBearerExpected()

voidSetBearerExpected()[protected, inline]

SetDataClientRoutedGuard()

voidSetDataClientRoutedGuard()[protected, inline]

SetDeleteUponBearerReception()

voidSetDeleteUponBearerReception()[protected, inline]

SetDetaching()

voidSetDetaching()[protected, inline]

SetFlowParams(const TFlowParams &)

voidSetFlowParams(const TFlowParams &aFlowParams)[private, inline]

Parameters

const TFlowParams & aFlowParams

SetFlowParamsInitialised()

voidSetFlowParamsInitialised()[protected, inline]

SetLocalName(TSockAddr &)

voidSetLocalName(TSockAddr &anAddr)[protected, virtual]

Sets the local name (address) of the socket service provider entity. The format of the data in the TSockAddr object is defined by individual protocols.

Parameters

TSockAddr & anAddrThe address

SetLocalNameProcess()

voidSetLocalNameProcess()[private]

SetOption(TUint, TUint, const TDesC8 &)

TInt SetOption(TUintaLevel,
TUintaName,
const TDesC8 &anOption
)[protected, virtual]

Sets some protocol specific option when called by the socket server on behalf of a client. A protocol may pass the request down a protocol stack (to protocols it is bound to) using the SetOption() function of CProtocolBase.

Parameters

TUint aLevelOption level.
TUint aNameOption name.
const TDesC8 & anOptionOption data.

SetProtocolOptions()

voidSetProtocolOptions()[protected]

SetRemName(TSockAddr &)

TInt SetRemName(TSockAddr &anAddr)[protected, virtual]

Sets the remote name (address) of the socket service provider entity. The format of the data in the TSockAddr object is defined by individual protocols.

Parameters

TSockAddr & anAddrThe address

SetSSP(CServProviderBase &)

voidSetSSP(CServProviderBase &aSSP)

Parameters

CServProviderBase & aSSP

SetSockType(TUint)

voidSetSockType(TUintaSockType)[protected]

Parameters

TUint aSockType

Shutdown(MSessionControl::TCloseType)

voidShutdown(MSessionControl::TCloseTypeaOption)[protected, virtual]

Terminates a connection (or closes a non connection-oriented socket down).

The value of the option argument specifies the type of processing which will be required of the protocol after this function is called.

Normally, when the socket server has called Shutdown() for a socket, it will wait for the socket to call CanClose() before destroying the CServProviderBase object. However, if the option argument is EImmediate, the CServProviderBase will be destroyed as soon as Shutdown() returns.

Parameters

MSessionControl::TCloseType aOption

Shutdown(MSessionControl::TCloseType, const TDesC8 &)

voidShutdown(MSessionControl::TCloseTypeaOption,
const TDesC8 &aDisconnectionData
)[protected, virtual]

Parameters

MSessionControl::TCloseType aOption
const TDesC8 & aDisconnectionData

ShuttingDown()

TBool ShuttingDown()[protected, inline]

Start()

voidStart()[protected, virtual]

Start a service provider.

StartFlowL(const Messages::TRuntimeCtxId &)

voidStartFlowL(const Messages::TRuntimeCtxId &aSender)[protected]

Parameters

const Messages::TRuntimeCtxId & aSender

StopFlow(TCFDataClient::TStop &)

voidStopFlow(TCFDataClient::TStop &aMessage)[protected]

Parameters

TCFDataClient::TStop & aMessage

Stopped()

TBool Stopped()[protected, inline]

StoreProvision(TCFDataClient::TProvisionConfig &)

voidStoreProvision(TCFDataClient::TProvisionConfig &aMessage)[protected]

Parameters

TCFDataClient::TProvisionConfig & aMessage

SubConnectionError(const Messages::TEBase::TError &, TUint)

voidSubConnectionError(const Messages::TEBase::TError &errorMsg,
TUintanOperationMask = (MSessionControlNotify::EErrorSend|MSessionControlNotify::EErrorConnect|MSessionControlNotify::EErrorCompleteSetLocalName)
)[protected]

Parameters

const Messages::TEBase::TError & errorMsg
TUint anOperationMask = (MSessionControlNotify::EErrorSend|MSessionControlNotify::EErrorConnect|MSessionControlNotify::EErrorCompleteSetLocalName)

Unbind()

voidUnbind()[protected, virtual]

Unbind(MUpperDataReceiver *, MUpperControl *)

voidUnbind(MUpperDataReceiver *aReceiver,
MUpperControl *aControl
)[protected, virtual]

Parameters

MUpperDataReceiver * aReceiver
MUpperControl * aControl

UseBearerErrors()

TBool UseBearerErrors()[protected, inline]

Write(const TDesC8 &, TUint, TSockAddr *)

TUint Write(const TDesC8 &aDesc,
TUintaOptions,
TSockAddr *anAddr
)[protected, virtual]

Sends data onto the network via the protocol.

Connection-oriented sockets must be in a connected state (that is ConnectComplete() has been called on their MSocketNotify before Write() is called).

The socket server keeps track of how much data is waiting and then tries to send it all until the protocol tells it to hold off by returning 0 (datagram sockets) or 'less than all data consumed' (stream sockets) to Write(). The protocol should call CanSend() when it is ready to send more data.

anAddr is the address to write the data to. Connection oriented sockets always use the default value.

Parameters

const TDesC8 & aDescThe data to be sent.
TUint aOptionsProtocol specific options.
TSockAddr * anAddrAddress to write the data to.

Write(RMBufChain &, TUint, TSockAddr *)

TInt Write(RMBufChain &aData,
TUintaOptions,
TSockAddr *anAddr
)[protected, virtual]

Sends data onto the network via the protocol.

Connection-oriented sockets must be in a connected state (that is ConnectComplete() has been called on their MSocketNotify before Write() is called).

The socket server keeps track of how much data is waiting and then tries to send it all until the protocol tells it to hold off by returning 0 (datagram sockets) or 'less than all data consumed' (stream sockets) to Write(). The protocol should call CanSend() when it is ready to send more data.

anAddr is the address to write the data to. Connection oriented sockets always use the default value.

Parameters

RMBufChain & aDataThe data to be sent.
TUint aOptionsProtocol specific options.
TSockAddr * anAddrAddress to write the data to.

Member Enumerations Documentation

Enum TStateFlag

Enumerators

EDetaching = 0x0001000
EDataClientRoutedGuard = 0x00020000
EStopped = 0x00040000
EShuttingDown = 0x00080000
EFlowParamsInitialised = 0x00100000
EBearerExpected = 0x00200000
EDeleteUponBearerReception = 0x00400000
EUseBearerErrors = 0x00800000

Member Type Definitions Documentation

Typedef FactoryType

typedef CTransportFlowShimFactory FactoryType

Member Data Documentation

TFlowParams iFlowParams

TFlowParams iFlowParams[private]

MUpperControl * iHostResolverNotify

MUpperControl *iHostResolverNotify[private]

TSoIfConnectionInfo iIfInfo

TSoIfConnectionInfo iIfInfo[private]

MSessionControlNotify * iListenerControlNotify

MSessionControlNotify *iListenerControlNotify[private]

CProtocolRef * iProtocolReference

CProtocolRef *iProtocolReference[private]

CServProviderBase * iProvider

CServProviderBase *iProvider[private]

Messages::RRequestOriginator iStartRequest

Messages::RRequestOriginator iStartRequest[private]