CPort Class Reference

class CPort : public CObject

Base class for implementations of serial protocol module ports. Its functions are called by the comms server in response to client calls to RComm.

The class implements CObject to obtain reference counting behaviour. The reference count is incremented when a port is first created, and, for ports in shared mode, on every later opening.

CPort is an abstract class which defines many pure virtual functions which derived classes must implement. Most of these pure virtual functions correspond to the client interface of the RComm class.

Created when the first client does an Open request passing its name. Destroyed only when it deletes itself (following a call to Destruct).

Inherits from

Nested Classes and Structures

Public Member Functions
CPort()
~CPort()
TBool AreAnyPending()
voidBreak(TInt)
voidBreakCancel()
IMPORT_C voidBreakCompleted(TInt)
IMPORT_C voidBreakNotifyCompleted(TInt)
IMPORT_C voidClose()
voidCommBreak(const RMessage2 &, CCommSession *)
voidCommBreakCancel(TInt, CCommSession *)
voidCommCancel(TInt, CCommSession *)
voidCommCaps(const RMessage2 &, CCommSession &)
voidCommConfig(const RMessage2 &, CCommSession &)
voidCommDebugState(const RMessage2 &, CCommSession &)
voidCommGetFlowControlStatus(const RMessage2 &, CCommSession *)
voidCommGetRole(const RMessage2 &, CCommSession *)
voidCommGetServerConfig(const RMessage2 &, CCommSession &)
voidCommNotifyBreak(const RMessage2 &, CCommSession *)
voidCommNotifyBreakCancel(TInt, CCommSession *)
voidCommNotifyConfigChange(const RMessage2 &, CCommSession *)
voidCommNotifyConfigChangeCancel(TInt, CCommSession *)
voidCommNotifyDataAvailable(const RMessage2 &, CCommSession *)
voidCommNotifyDataAvailableCancel(TInt, CCommSession *)
voidCommNotifyFlowControlChange(const RMessage2 &, CCommSession *)
voidCommNotifyFlowControlChangeCancel(TInt, CCommSession *)
voidCommNotifyOutputEmpty(const RMessage2 &, CCommSession *)
voidCommNotifyOutputEmptyCancel(TInt, CCommSession *)
voidCommNotifySignalChange(const RMessage2 &, CCommSession *)
voidCommNotifySignalChangeCancel(TInt, CCommSession *)
voidCommQueryReceiveBuffer(const RMessage2 &, CCommSession &)
voidCommRead(const RMessage2 &, CCommSession *)
voidCommReadCancel(TInt, CCommSession *)
voidCommReceiveBufferLength(const RMessage2 &, CCommSession &)
voidCommResetBuffers(const RMessage2 &, CCommSession &)
voidCommSetAccess(const RMessage2 &, CCommSession &)
voidCommSetAccessCancel(TInt, CCommSession *)
voidCommSetConfig(const RMessage2 &, CCommSession &)
voidCommSetReceiveBufferLength(const RMessage2 &, CCommSession &)
voidCommSetServerConfig(const RMessage2 &, CCommSession &)
voidCommSetSignalsToMark(const RMessage2 &, CCommSession &)
voidCommSetSignalsToSpace(const RMessage2 &, CCommSession &)
voidCommSignals(const RMessage2 &, CCommSession &)
voidCommWrite(const RMessage2 &, CCommSession *)
voidCommWriteCancel(TInt, CCommSession *)
IMPORT_C voidConfigChangeCompleted(const TDesC8 &, TInt)
voidDestruct()
IMPORT_C voidFlowControlChangeCompleted(const TFlowControl &, TInt)
voidFreeMemory()
voidFreeSession(CCommSession *)
TInt GetCaps(TDes8 &)
TInt GetConfig(TDes8 &)
TInt GetFlowControlStatus(TFlowControl &)
TInt GetReceiveBufferLength(TInt &)
TInt GetRole(TCommRole &)
TInt GetServerConfig(TDes8 &)
TInt GetSignals(TUint &)
IMPORT_C TIntIPCRead(const TAny *, TDes8 &, TInt)
IMPORT_C TIntIPCWrite(const TAny *, const TDesC8 &, TInt)
voidInitL(TDesC8 &)
TBool IsBlockedSetAccessWaiting(CCommSession &)
voidNotifyBreak()
voidNotifyBreakCancel()
voidNotifyConfigChange()
voidNotifyConfigChangeCancel()
voidNotifyDataAvailable()
voidNotifyDataAvailableCancel()
IMPORT_C voidNotifyDataAvailableCompleted(TInt)
voidNotifyFlowControlChange()
voidNotifyFlowControlChangeCancel()
voidNotifyOutputEmpty()
voidNotifyOutputEmptyCancel()
IMPORT_C voidNotifyOutputEmptyCompleted(TInt)
voidNotifySignalChange(TUint)
voidNotifySignalChangeCancel()
TInt QueryReceiveBuffer(TInt &)
voidReadCancel()
IMPORT_C voidReadCompleted(TInt)
TInt ReadTimerExpiredHandler(TAny *)
voidResetBuffers(TUint)
TBool SessionHasBeenPreempted(CCommSession *)
TBool SessionIsAwaitingOpen(CCommSession *)
TInt SetConfig(const TDesC8 &)
TInt SetReceiveBufferLength(TInt)
TInt SetRole(TCommRole)
TInt SetServerConfig(const TDesC8 &)
TInt SetSignalsToMark(TUint)
TInt SetSignalsToSpace(TUint)
IMPORT_C voidSignalChangeCompleted(const TUint &, TInt)
voidStartRead(const TAny *, TInt)
voidStartWrite(const TAny *, TInt)
TBool TakeOwnershipForBreak(const RMessage2 &, CCommSession *)
TBool TakeOwnershipForBreaking(const RMessage2 &, CCommSession *)
TBool TakeOwnershipForConfig(const RMessage2 &, CCommSession *)
TBool TakeOwnershipForFlowControl(const RMessage2 &, CCommSession *)
TBool TakeOwnershipForNotifyDataAvailable(const RMessage2 &, CCommSession *)
TBool TakeOwnershipForNotifyOutputEmpty(const RMessage2 &, CCommSession *)
TBool TakeOwnershipForReading(const RMessage2 &, CCommSession *)
TBool TakeOwnershipForSignals(const RMessage2 &, CCommSession *)
TBool TakeOwnershipForWriting(const RMessage2 &, CCommSession *)
voidWriteCancel()
IMPORT_C voidWriteCompleted(TInt)
TInt WriteTimerExpiredHandler(TAny *)
Private Member Functions
IMPORT_C voidCPort_Reserved1()
voidDoOpenL(CCommSession *, TInternalCommAccess, TCommRole, TBool)
voidDoPreemption()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
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()
CObject::AccessCount()const
CObject::CObject()
CObject::Dec()
CObject::Extension_(TUint,TAny *&,TAny *)
CObject::FullName()const
CObject::Inc()
CObject::Name()const
CObject::Open()
CObject::Owner()const
CObject::SetName(const TDesC *)
CObject::SetNameL(const TDesC *)
CObject::SetOwner(CObject *)
CObject::UniqueID()const
CObject::~CObject()
Public Member Type Definitions
typedef TCommAccess TAccess
Private Attributes
RMessagePtr2 iBlockedBreak
RMessagePtr2 iBlockedBreakNotify
RMessagePtr2 iBlockedConfigChange
TInt iBlockedConfigChangeDummyPadding
RMessagePtr2 iBlockedFlowControlChange
TInt iBlockedFlowControlChangeDummyPadding
RMessagePtr2 iBlockedNotifyDataAvailable
RMessagePtr2 iBlockedNotifyOutputEmpty
RMessagePtr2 iBlockedRead
RMessagePtr2 iBlockedSignalChange
TInt iBlockedSignalChangeDummyPadding
RMessagePtr2 iBlockedWrite
CCommSession *iBreakNotifyOwner
TInt iBreakNotifyOwnerHandle
TInt iBreakOwnerHandle
TAny *iCPort_Reserved
CCommSession *iConfigOwner
TInt iConfigOwnerHandle
CExtra *iExtra
CCommSession *iFlowControlOwner
TInt iFlowControlOwnerHandle
TInternalCommAccess iMode
CCommSession *iNotifyDataAvailableOwner
TInt iNotifyDataAvailableOwnerHandle
CCommSession *iNotifyOutputEmptyOwner
TInt iNotifyOutputEmptyOwnerHandle
CPortManager *iPortManager
CCommSession *iReadOwner
TInt iReadOwnerHandle
TDeltaTimerEntry iReadTimer
TBool iReadTimerPending
CCommSession *iSignalOwner
TInt iSignalOwnerHandle
CCommSession *iWriteOwner
TInt iWriteOwnerHandle
TDeltaTimerEntry iWriteTimer
TBool iWriteTimerPending

Constructor & Destructor Documentation

CPort()

IMPORT_CCPort()

~CPort()

IMPORT_C~CPort()[virtual]

Member Functions Documentation

AreAnyPending()

TBool AreAnyPending()

Break(TInt)

voidBreak(TIntaTime)[pure virtual]

Specifies the protocol for setting a break condition at the port. It is called by the comms server in response to a RComm::Break() request from the client.

When the break is complete, the function should call BreakCompleted().

Parameters

TInt aTimeTime period to break for in microseconds

BreakCancel()

voidBreakCancel()[pure virtual]

Specifies the protocol for cancelling a break request. It is called by the comms server in response to a RComm::BreakCancel() request from the client.

The implementation should abort any processing which was taking place as a result of the break request. Do not call BreakCompleted().

BreakCompleted(TInt)

IMPORT_C voidBreakCompleted(TIntanError)

Parameters

TInt anError

BreakNotifyCompleted(TInt)

IMPORT_C voidBreakNotifyCompleted(TIntanError)

Parameters

TInt anError

CPort_Reserved1()

IMPORT_C voidCPort_Reserved1()[private, virtual]

Close()

IMPORT_C voidClose()[virtual]

CommBreak(const RMessage2 &, CCommSession *)

voidCommBreak(const RMessage2 &aMessage,
CCommSession *aClient
)

Parameters

const RMessage2 & aMessage
CCommSession * aClient

CommBreakCancel(TInt, CCommSession *)

voidCommBreakCancel(TIntaHandle,
CCommSession *aClient
)

Parameters

TInt aHandle
CCommSession * aClient

CommCancel(TInt, CCommSession *)

voidCommCancel(TIntaHandle,
CCommSession *aClient
)

Parameters

TInt aHandle
CCommSession * aClient

CommCaps(const RMessage2 &, CCommSession &)

voidCommCaps(const RMessage2 &aMessage,
CCommSession &aSession
)

Parameters

const RMessage2 & aMessage
CCommSession & aSession

CommConfig(const RMessage2 &, CCommSession &)

voidCommConfig(const RMessage2 &aMessage,
CCommSession &aSession
)const

Parameters

const RMessage2 & aMessage
CCommSession & aSession

CommDebugState(const RMessage2 &, CCommSession &)

voidCommDebugState(const RMessage2 &aMessage,
CCommSession &aSession
)

Parameters

const RMessage2 & aMessage
CCommSession & aSession

CommGetFlowControlStatus(const RMessage2 &, CCommSession *)

voidCommGetFlowControlStatus(const RMessage2 &aMessage,
CCommSession *aClient
)

Parameters

const RMessage2 & aMessage
CCommSession * aClient

CommGetRole(const RMessage2 &, CCommSession *)

voidCommGetRole(const RMessage2 &aMessage,
CCommSession *aClient
)

Parameters

const RMessage2 & aMessage
CCommSession * aClient

CommGetServerConfig(const RMessage2 &, CCommSession &)

voidCommGetServerConfig(const RMessage2 &aMessage,
CCommSession &aSession
)

Parameters

const RMessage2 & aMessage
CCommSession & aSession

CommNotifyBreak(const RMessage2 &, CCommSession *)

voidCommNotifyBreak(const RMessage2 &aMessage,
CCommSession *aClient
)

Parameters

const RMessage2 & aMessage
CCommSession * aClient

CommNotifyBreakCancel(TInt, CCommSession *)

voidCommNotifyBreakCancel(TIntaHandle,
CCommSession *aClient
)

Parameters

TInt aHandle
CCommSession * aClient

CommNotifyConfigChange(const RMessage2 &, CCommSession *)

voidCommNotifyConfigChange(const RMessage2 &aMessage,
CCommSession *aClient
)

Parameters

const RMessage2 & aMessage
CCommSession * aClient

CommNotifyConfigChangeCancel(TInt, CCommSession *)

voidCommNotifyConfigChangeCancel(TIntaHandle,
CCommSession *aClient
)

Parameters

TInt aHandle
CCommSession * aClient

CommNotifyDataAvailable(const RMessage2 &, CCommSession *)

voidCommNotifyDataAvailable(const RMessage2 &aMessage,
CCommSession *aClient
)

Parameters

const RMessage2 & aMessage
CCommSession * aClient

CommNotifyDataAvailableCancel(TInt, CCommSession *)

voidCommNotifyDataAvailableCancel(TIntaHandle,
CCommSession *aClient
)

Parameters

TInt aHandle
CCommSession * aClient

CommNotifyFlowControlChange(const RMessage2 &, CCommSession *)

voidCommNotifyFlowControlChange(const RMessage2 &aMessage,
CCommSession *aClient
)

Parameters

const RMessage2 & aMessage
CCommSession * aClient

CommNotifyFlowControlChangeCancel(TInt, CCommSession *)

voidCommNotifyFlowControlChangeCancel(TIntaHandle,
CCommSession *aClient
)

Parameters

TInt aHandle
CCommSession * aClient

CommNotifyOutputEmpty(const RMessage2 &, CCommSession *)

voidCommNotifyOutputEmpty(const RMessage2 &aMessage,
CCommSession *aClient
)

Parameters

const RMessage2 & aMessage
CCommSession * aClient

CommNotifyOutputEmptyCancel(TInt, CCommSession *)

voidCommNotifyOutputEmptyCancel(TIntaHandle,
CCommSession *aClient
)

Parameters

TInt aHandle
CCommSession * aClient

CommNotifySignalChange(const RMessage2 &, CCommSession *)

voidCommNotifySignalChange(const RMessage2 &aMessage,
CCommSession *aClient
)

Parameters

const RMessage2 & aMessage
CCommSession * aClient

CommNotifySignalChangeCancel(TInt, CCommSession *)

voidCommNotifySignalChangeCancel(TIntaHandle,
CCommSession *aClient
)

Parameters

TInt aHandle
CCommSession * aClient

CommQueryReceiveBuffer(const RMessage2 &, CCommSession &)

voidCommQueryReceiveBuffer(const RMessage2 &aMessage,
CCommSession &aSession
)const

Parameters

const RMessage2 & aMessage
CCommSession & aSession

CommRead(const RMessage2 &, CCommSession *)

voidCommRead(const RMessage2 &aMessage,
CCommSession *aClient
)

Parameters

const RMessage2 & aMessage
CCommSession * aClient

CommReadCancel(TInt, CCommSession *)

voidCommReadCancel(TIntaHandle,
CCommSession *aClient
)

Parameters

TInt aHandle
CCommSession * aClient

CommReceiveBufferLength(const RMessage2 &, CCommSession &)

voidCommReceiveBufferLength(const RMessage2 &aMessage,
CCommSession &aSession
)const

Parameters

const RMessage2 & aMessage
CCommSession & aSession

CommResetBuffers(const RMessage2 &, CCommSession &)

voidCommResetBuffers(const RMessage2 &aMessage,
CCommSession &aSession
)

Parameters

const RMessage2 & aMessage
CCommSession & aSession

CommSetAccess(const RMessage2 &, CCommSession &)

voidCommSetAccess(const RMessage2 &aMessage,
CCommSession &aSession
)

Parameters

const RMessage2 & aMessage
CCommSession & aSession

CommSetAccessCancel(TInt, CCommSession *)

voidCommSetAccessCancel(TIntaHandle,
CCommSession *aClient
)

Parameters

TInt aHandle
CCommSession * aClient

CommSetConfig(const RMessage2 &, CCommSession &)

voidCommSetConfig(const RMessage2 &aMessage,
CCommSession &aSession
)

Parameters

const RMessage2 & aMessage
CCommSession & aSession

CommSetReceiveBufferLength(const RMessage2 &, CCommSession &)

voidCommSetReceiveBufferLength(const RMessage2 &aMessage,
CCommSession &aSession
)

Parameters

const RMessage2 & aMessage
CCommSession & aSession

CommSetServerConfig(const RMessage2 &, CCommSession &)

voidCommSetServerConfig(const RMessage2 &aMessage,
CCommSession &aSession
)

Parameters

const RMessage2 & aMessage
CCommSession & aSession

CommSetSignalsToMark(const RMessage2 &, CCommSession &)

voidCommSetSignalsToMark(const RMessage2 &aMessage,
CCommSession &aSession
)

Parameters

const RMessage2 & aMessage
CCommSession & aSession

CommSetSignalsToSpace(const RMessage2 &, CCommSession &)

voidCommSetSignalsToSpace(const RMessage2 &aMessage,
CCommSession &aSession
)

Parameters

const RMessage2 & aMessage
CCommSession & aSession

CommSignals(const RMessage2 &, CCommSession &)

voidCommSignals(const RMessage2 &aMessage,
CCommSession &aSession
)

Parameters

const RMessage2 & aMessage
CCommSession & aSession

CommWrite(const RMessage2 &, CCommSession *)

voidCommWrite(const RMessage2 &aMessage,
CCommSession *aClient
)

Parameters

const RMessage2 & aMessage
CCommSession * aClient

CommWriteCancel(TInt, CCommSession *)

voidCommWriteCancel(TIntaHandle,
CCommSession *aClient
)

Parameters

TInt aHandle
CCommSession * aClient

ConfigChangeCompleted(const TDesC8 &, TInt)

IMPORT_C voidConfigChangeCompleted(const TDesC8 &aNewConfig,
TIntanError
)

Parameters

const TDesC8 & aNewConfig
TInt anError

Destruct()

voidDestruct()[pure virtual]

Specifies the protocol for port destruction. It is called by the comms server when the last client-side reference to a CPort object has been closed and the CPort must be deleted. The comms server will not delete a CPort other than by calling Destruct().

The implementation should perform any asynchronous shutdown operations on its own resources and, when these operations have completed, should delete this.

DoOpenL(CCommSession *, TInternalCommAccess, TCommRole, TBool)

voidDoOpenL(CCommSession *aSession,
TInternalCommAccessaMode,
TCommRoleaRole,
TBoolaIsNew
)[private]

Parameters

CCommSession * aSession
TInternalCommAccess aMode
TCommRole aRole
TBool aIsNew

DoPreemption()

voidDoPreemption()[private]

FlowControlChangeCompleted(const TFlowControl &, TInt)

IMPORT_C voidFlowControlChangeCompleted(const TFlowControl &aFlowControl,
TIntanError
)

Parameters

const TFlowControl & aFlowControl
TInt anError

FreeMemory()

voidFreeMemory()[virtual]

FreeSession(CCommSession *)

voidFreeSession(CCommSession *aSession)

Parameters

CCommSession * aSession

GetCaps(TDes8 &)

TInt GetCaps(TDes8 &aPackage)[pure virtual]

Specifies a protocol for getting the port capabilities. It is called by the comms server in response to a RComm::Caps() request from the client.

A system error code

Parameters

TDes8 & aPackageA TCommCaps package buffer that, on return, holds the port capabilities

GetConfig(TDes8 &)

TInt GetConfig(TDes8 &aPackage)const [pure virtual]

Specifies a protocol for getting the current configuration of the serial port. It is called by the comms server in response to a RComm::GetConfig() request from the client.

A system wide error code

Parameters

TDes8 & aPackageA packaged TCommConfig buffer, set on return to the current configuration of the serial port

GetFlowControlStatus(TFlowControl &)

TInt GetFlowControlStatus(TFlowControl &aFlowControl)[pure virtual]

Gets flow control status. It is called by the comms server in response to a RComm::SetMode() request from the client.

A system-wide error code

Parameters

TFlowControl & aFlowControlFlow control status to return to the client

GetReceiveBufferLength(TInt &)

TInt GetReceiveBufferLength(TInt &aLength)const [pure virtual]

Specifies a protocol for requesting the size of the serial port buffers. It is called by the comms server in response to a RComm::ReceiveBufferLength() request from the client.

A system error code

Parameters

TInt & aLengthThe current size of the serial port buffers in bytes

GetRole(TCommRole &)

TInt GetRole(TCommRole &aRole)[pure virtual]

Gets DCE/DTE role. It is called by the comms server in response to a RComm::GetRole() request from the client.

A system-wide error code

Parameters

TCommRole & aRoleOn return, DCE/DTE role to return to the client

GetServerConfig(TDes8 &)

TInt GetServerConfig(TDes8 &aPackage)[pure virtual]

Specifies a protocol for getting the buffer mode. It is called by the comms server in response to a RComm::Mode() request from the client.

A system error code

Parameters

TDes8 & aPackageA TCommServerConfig package buffer that, on return, holds the current buffer mode settings

GetSignals(TUint &)

TInt GetSignals(TUint &aSignals)[pure virtual]

Specifies a protocol for getting the status of the serial port control lines. It is called by the comms server in response to a RComm::GetSignals() request from the client.

A system error code

Parameters

TUint & aSignalsAn integer with the bits set to reflect the status of the handshaking lines.

IPCRead(const TAny *, TDes8 &, TInt)

IMPORT_C TIntIPCRead(const TAny *aPtr,
TDes8 &aDes,
TIntaOffset = 0
)const

Parameters

const TAny * aPtr
TDes8 & aDes
TInt aOffset = 0

IPCWrite(const TAny *, const TDesC8 &, TInt)

IMPORT_C TIntIPCWrite(const TAny *aPtr,
const TDesC8 &aDes,
TIntaOffset = 0
)const

Parameters

const TAny * aPtr
const TDesC8 & aDes
TInt aOffset = 0

InitL(TDesC8 &)

voidInitL(TDesC8 &aName)

Parameters

TDesC8 & aName

IsBlockedSetAccessWaiting(CCommSession &)

TBool IsBlockedSetAccessWaiting(CCommSession &aClient)

Parameters

CCommSession & aClient

NotifyBreak()

voidNotifyBreak()[pure virtual]

Specifies the protocol for setting a "break" notification. It is called by the comms server in response to a RComm::NotifyBreak() request from the client.

NotifyBreakCancel()

voidNotifyBreakCancel()[pure virtual]

Specifies the protocol for cancelling a "break" notification. It is called by the comms server in response to a RComm::NotifyBreakCancel() request from the client.

NotifyConfigChange()

voidNotifyConfigChange()[pure virtual]

Specifies the protocol for setting a "configuration change" notification. It is called by the comms server in response to a RComm::NotifyConfigChange() request from the client.

NotifyConfigChangeCancel()

voidNotifyConfigChangeCancel()[pure virtual]

Specifies the protocol for cancelling a "configuration change" notification. It is called by the comms server in response to a RComm::NotifyConfigChangeCancel() request from the client.

NotifyDataAvailable()

voidNotifyDataAvailable()[pure virtual]

Specifies the protocol for setting a "data available" notification. It is called

by the comms server in response to a RComm::NotifyDataAvailable() request from the client.

NotifyDataAvailableCancel()

voidNotifyDataAvailableCancel()[pure virtual]

Specifies the protocol for cancelling a "data available" notification. It is called by the comms server in response to a RComm::NotifyDataAvailableCancel() request from the client.

NotifyDataAvailableCompleted(TInt)

IMPORT_C voidNotifyDataAvailableCompleted(TIntanError)

Parameters

TInt anError

NotifyFlowControlChange()

voidNotifyFlowControlChange()[pure virtual]

Specifies the protocol for setting a "flow control change" notification. It is called by the comms server in response to a RComm::NotifyFlowControlChange() request from the client.

NotifyFlowControlChangeCancel()

voidNotifyFlowControlChangeCancel()[pure virtual]

Specifies the protocol for cancelling a "flow control change" notification. It is called by the comms server in response to a RComm::NotifyFlowControlChangeCancel() request from the client.

NotifyOutputEmpty()

voidNotifyOutputEmpty()[pure virtual]

Specifies the protocol for setting a transmit buffer empty notification. It is called by the comms server in response to a RComm::NotifyOutputEmpty() request from the client.

NotifyOutputEmptyCancel()

voidNotifyOutputEmptyCancel()[pure virtual]

Specifies the protocol for cancelling a transmit buffer empty notification. It is called by the comms server in response to a RComm::NotifyOutputEmptyCancel() request from the client.

NotifyOutputEmptyCompleted(TInt)

IMPORT_C voidNotifyOutputEmptyCompleted(TIntanError)

Parameters

TInt anError

NotifySignalChange(TUint)

voidNotifySignalChange(TUintaSignalMask)[pure virtual]

Specifies the protocol for setting a "signal change" notification. It is called by the comms server in response to a RComm::NotifySignalChange() request from the client.

Parameters

TUint aSignalMaskSignal mask passed by client

NotifySignalChangeCancel()

voidNotifySignalChangeCancel()[pure virtual]

Specifies the protocol for cancelling a "signal change" notification. It is called by the comms server in response to a RComm::NotifySignalChangeCancel() request from the client.

QueryReceiveBuffer(TInt &)

TInt QueryReceiveBuffer(TInt &aLength)const [pure virtual]

Specifies a protocol for requesting the number of bytes that are currently waiting in the port's receive buffer. It is called by the comms server in response to a RComm::QueryReceiveBuffer() request from the client.

A system wide error code.

Parameters

TInt & aLengthOn return, the number of bytes currently waiting to be read from the receive buffer.

ReadCancel()

voidReadCancel()[pure virtual]

Specifies the protocol for cancelling reading from the port. It is called by the comms server in response to a RComm::ReadCancel() request from the client or when the iReadTimer timer expires.

The implementation should abort any processing which was taking place as a result of the read request. Do not call ReadCompleted().

ReadCompleted(TInt)

IMPORT_C voidReadCompleted(TIntanError)

Parameters

TInt anError

ReadTimerExpiredHandler(TAny *)

TInt ReadTimerExpiredHandler(TAny *aPtr)[static]

Parameters

TAny * aPtr

ResetBuffers(TUint)

voidResetBuffers(TUintaFlags)[pure virtual]

Specifies a protocol for resetting the receive and/or transmit buffers to zero length. It is called by the comms server in response to a RComm::ResetBuffers() request from the client.

Parameters

TUint aFlagsBitmask of the following flags: KCommResetRx to reset the receive buffer; KCommResetTx to reset the transmit buffer

SessionHasBeenPreempted(CCommSession *)

TBool SessionHasBeenPreempted(CCommSession *aSession)

Parameters

CCommSession * aSession

SessionIsAwaitingOpen(CCommSession *)

TBool SessionIsAwaitingOpen(CCommSession *aSession)

Parameters

CCommSession * aSession

SetConfig(const TDesC8 &)

TInt SetConfig(const TDesC8 &aPackage)[pure virtual]

Specifies a protocol for setting the configuration of the port. It is called by the comms server in response to a RComm::SetConfig() request from the client.

A system error code

Parameters

const TDesC8 & aPackageA packaged TCommConfig buffer holding the new configuration values

SetReceiveBufferLength(TInt)

TInt SetReceiveBufferLength(TIntaLength)[pure virtual]

Specifies a protocol for setting the size of the serial port buffers. It is called by the comms server in response to a RComm::SetReceiveBufferLength() request from the client.

A system error code

Parameters

TInt aLengthRequested size of the serial port buffers in bytes

SetRole(TCommRole)

TInt SetRole(TCommRoleaRole)[pure virtual]

Sets DCE/DTE role. It is called by the comms server in response to a RComm::Open() request from the client.

A system-wide error code

Parameters

TCommRole aRoleDCE/DTE role

SetServerConfig(const TDesC8 &)

TInt SetServerConfig(const TDesC8 &aPackage)[pure virtual]

Specifies a protocol for setting the buffer mode. It is called by the comms server in response to a RComm::SetMode() request from the client.

A system-wide error code

Parameters

const TDesC8 & aPackageA TCommServerConfig package buffer holding the mode settings

SetSignalsToMark(TUint)

TInt SetSignalsToMark(TUintaSignals)[pure virtual]

Specifies a protocol for setting serial port control lines. It is called by the comms server in response to a RComm::SetSignals() request from the client.

A system error code

Parameters

TUint aSignalsA bitmask of the handshaking lines to set

SetSignalsToSpace(TUint)

TInt SetSignalsToSpace(TUintaSignals)[pure virtual]

Specifies a protocol for clearing serial port control lines. It is called by the comms server in response to a RComm::SetSignals() request from the client.

A system error code

Parameters

TUint aSignalsA bitmask of the handshaking lines to clear

SignalChangeCompleted(const TUint &, TInt)

IMPORT_C voidSignalChangeCompleted(const TUint &aSignals,
TIntanError
)

Parameters

const TUint & aSignals
TInt anError

StartRead(const TAny *, TInt)

voidStartRead(const TAny *aClientBuffer,
TIntaLength
)[pure virtual]

Specifies the protocol for reading from the port. It is called by the comms server in response to a RComm::Read() or RComm::ReadOneOrMore() request from the client.

A negative value for aLength is used to flag that the read request was from RComm::ReadOneOrMore() rather than from RComm::Read(). The maximum length of data to be read is the absolute value of aLength.

The implementation should use IPCWrite() to write the data to the client's buffer. When all the data has been read, the function should call ReadCompleted().

Parameters

const TAny * aClientBufferPointer into client address space to the descriptor containing the client's buffer
TInt aLengthThe amount of data to be read

StartWrite(const TAny *, TInt)

voidStartWrite(const TAny *aClientBuffer,
TIntaLength
)[pure virtual]

Specifies the protocol for writing to the port. It is called by the comms server in response to a RComm::Write() request from the client.

The implementation should use IPCRead() to get the data to write from the client's buffer. When all the data has been written, the function should call WriteCompleted().

Parameters

const TAny * aClientBufferPointer into client address space to the descriptor containing the client's buffer
TInt aLengthThe amount of data to be written

TakeOwnershipForBreak(const RMessage2 &, CCommSession *)

TBool TakeOwnershipForBreak(const RMessage2 &aMessage,
CCommSession *aClient
)

Parameters

const RMessage2 & aMessage
CCommSession * aClient

TakeOwnershipForBreaking(const RMessage2 &, CCommSession *)

TBool TakeOwnershipForBreaking(const RMessage2 &aMessage,
CCommSession *aClient
)

Parameters

const RMessage2 & aMessage
CCommSession * aClient

TakeOwnershipForConfig(const RMessage2 &, CCommSession *)

TBool TakeOwnershipForConfig(const RMessage2 &aMessage,
CCommSession *aClient
)

Parameters

const RMessage2 & aMessage
CCommSession * aClient

TakeOwnershipForFlowControl(const RMessage2 &, CCommSession *)

TBool TakeOwnershipForFlowControl(const RMessage2 &aMessage,
CCommSession *aClient
)

Parameters

const RMessage2 & aMessage
CCommSession * aClient

TakeOwnershipForNotifyDataAvailable(const RMessage2 &, CCommSession *)

TBool TakeOwnershipForNotifyDataAvailable(const RMessage2 &aMessage,
CCommSession *aClient
)

Parameters

const RMessage2 & aMessage
CCommSession * aClient

TakeOwnershipForNotifyOutputEmpty(const RMessage2 &, CCommSession *)

TBool TakeOwnershipForNotifyOutputEmpty(const RMessage2 &aMessage,
CCommSession *aClient
)

Parameters

const RMessage2 & aMessage
CCommSession * aClient

TakeOwnershipForReading(const RMessage2 &, CCommSession *)

TBool TakeOwnershipForReading(const RMessage2 &aMessage,
CCommSession *aClient
)

Parameters

const RMessage2 & aMessage
CCommSession * aClient

TakeOwnershipForSignals(const RMessage2 &, CCommSession *)

TBool TakeOwnershipForSignals(const RMessage2 &aMessage,
CCommSession *aClient
)

Parameters

const RMessage2 & aMessage
CCommSession * aClient

TakeOwnershipForWriting(const RMessage2 &, CCommSession *)

TBool TakeOwnershipForWriting(const RMessage2 &aMessage,
CCommSession *aClient
)

Parameters

const RMessage2 & aMessage
CCommSession * aClient

WriteCancel()

voidWriteCancel()[pure virtual]

Specifies the protocol for cancelling writing to the port. It is called by the comms server in response to a RComm::WriteCancel() request from the client.

The implementation should abort any processing which was taking place as a result of the write request. Do not call WriteCompleted().

WriteCompleted(TInt)

IMPORT_C voidWriteCompleted(TIntanError)

Parameters

TInt anError

WriteTimerExpiredHandler(TAny *)

TInt WriteTimerExpiredHandler(TAny *aPtr)[static]

Parameters

TAny * aPtr

Member Type Definitions Documentation

Typedef TAccess

typedef TCommAccess TAccess

Member Data Documentation

RMessagePtr2 iBlockedBreak

RMessagePtr2 iBlockedBreak[private]

RMessagePtr2 iBlockedBreakNotify

RMessagePtr2 iBlockedBreakNotify[private]

RMessagePtr2 iBlockedConfigChange

RMessagePtr2 iBlockedConfigChange[private]

The encapsulated message

TInt iBlockedConfigChangeDummyPadding

TInt iBlockedConfigChangeDummyPadding[private]

Private padding to preserve BC with earlier versions

RMessagePtr2 iBlockedFlowControlChange

RMessagePtr2 iBlockedFlowControlChange[private]

The encapsulated message

TInt iBlockedFlowControlChangeDummyPadding

TInt iBlockedFlowControlChangeDummyPadding[private]

Private padding to preserve BC with earlier versions

RMessagePtr2 iBlockedNotifyDataAvailable

RMessagePtr2 iBlockedNotifyDataAvailable[private]

RMessagePtr2 iBlockedNotifyOutputEmpty

RMessagePtr2 iBlockedNotifyOutputEmpty[private]

RMessagePtr2 iBlockedRead

RMessagePtr2 iBlockedRead[private]

RMessagePtr2 iBlockedSignalChange

RMessagePtr2 iBlockedSignalChange[private]

The encapsulated message

TInt iBlockedSignalChangeDummyPadding

TInt iBlockedSignalChangeDummyPadding[private]

Private padding to preserve BC with earlier versions

RMessagePtr2 iBlockedWrite

RMessagePtr2 iBlockedWrite[private]

CCommSession * iBreakNotifyOwner

CCommSession *iBreakNotifyOwner[private]

TInt iBreakNotifyOwnerHandle

TInt iBreakNotifyOwnerHandle[private]

TInt iBreakOwnerHandle

TInt iBreakOwnerHandle[private]

TAny * iCPort_Reserved

TAny *iCPort_Reserved[private]

CCommSession * iConfigOwner

CCommSession *iConfigOwner[private]

TInt iConfigOwnerHandle

TInt iConfigOwnerHandle[private]

CExtra * iExtra

CExtra *iExtra[private]

CCommSession * iFlowControlOwner

CCommSession *iFlowControlOwner[private]

TInt iFlowControlOwnerHandle

TInt iFlowControlOwnerHandle[private]

TInternalCommAccess iMode

TInternalCommAccess iMode[private]

CCommSession * iNotifyDataAvailableOwner

CCommSession *iNotifyDataAvailableOwner[private]

TInt iNotifyDataAvailableOwnerHandle

TInt iNotifyDataAvailableOwnerHandle[private]

CCommSession * iNotifyOutputEmptyOwner

CCommSession *iNotifyOutputEmptyOwner[private]

TInt iNotifyOutputEmptyOwnerHandle

TInt iNotifyOutputEmptyOwnerHandle[private]

CPortManager * iPortManager

CPortManager *iPortManager[private]

CCommSession * iReadOwner

CCommSession *iReadOwner[private]

TInt iReadOwnerHandle

TInt iReadOwnerHandle[private]

TDeltaTimerEntry iReadTimer

TDeltaTimerEntry iReadTimer[private]

TBool iReadTimerPending

TBool iReadTimerPending[private]

CCommSession * iSignalOwner

CCommSession *iSignalOwner[private]

TInt iSignalOwnerHandle

TInt iSignalOwnerHandle[private]

CCommSession * iWriteOwner

CCommSession *iWriteOwner[private]

TInt iWriteOwnerHandle

TInt iWriteOwnerHandle[private]

TDeltaTimerEntry iWriteTimer

TDeltaTimerEntry iWriteTimer[private]

TBool iWriteTimerPending

TBool iWriteTimerPending[private]