CMTPSession Class Reference

class CMTPSession : public CBase

Implements the session level portion of the MTP communication model. It also implements the data provider layer MTP session interface ( MMTPSession ).

Inherits from

Public Member Functions
~CMTPSession ()
const TMTPTypeRequest & ActiveRequestL ()
TBool CheckPendingEvent (const TMTPTypeRequest &)
void CompletePendingRequest ( TInt )
TUint32 ExpectedTransactionId ()
TAny * GetExtendedInterface ( TUid )
void IncrementExpectedTransactionId ()
CMTPSession * NewLC ( TUint32 , TUint )
const TMTPTypeEvent & PendingEvent ()
TBool RequestPending ()
TInt RouteRequest (const TMTPTypeRequest &)
void RouteRequestRegisterL (const TMTPTypeRequest &, TInt )
TBool RouteRequestRegistered ( TUint16 )
void RouteRequestUnregister (const TMTPTypeRequest &)
TUint32 SessionMTPId ()
TUint SessionUniqueId ()
void SetActiveRequestL (const TMTPTypeRequest &)
void SetRequestPending ( TRequestStatus &)
void SetTransactionPhase ( TMTPTransactionPhase )
void StorePendingEventL (const TMTPTypeEvent &)
TMTPTransactionPhase TransactionPhase ()
Private Member Functions
CMTPSession ( TUint32 , TUint )
void ConstructL ()
TBool RouteRequestMatchOpCode (const TUint16 *, const TMTPTypeRequest &)
TInt RouteRequestOrder (const TMTPTypeRequest &, const TMTPTypeRequest &)
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()
Private Attributes
__FLOG_DECLARATION_MEMBER_MUTABLE
TMTPTypeRequest iActiveRequest
TUint32 iExpectedTransactionId
TAny * iExtendedInterface
TUint32 iIdMTP
TUint iIdUnique
TMTPTypeEvent iPendingEvent
TRequestStatus * iRequestStatus
RArray < TMTPTypeRequest > iRoutingRegistrations
TMTPTransactionPhase iTransactionPhase

Constructor & Destructor Documentation

CMTPSession(TUint32, TUint)

CMTPSession ( TUint32 aMTPId,
TUint aUniqueId
) [private]

Constructor.

Parameters

TUint32 aMTPId
TUint aUniqueId

~CMTPSession()

~CMTPSession ( )

Destructor.

Member Functions Documentation

ActiveRequestL()

const TMTPTypeRequest & ActiveRequestL ( ) const

CheckPendingEvent(const TMTPTypeRequest &)

TBool CheckPendingEvent ( const TMTPTypeRequest & aRequest ) const

Parameters

const TMTPTypeRequest & aRequest

CompletePendingRequest(TInt)

void CompletePendingRequest ( TInt aErr )

Completes the currently pending asynchronous request status with the specified completion code.

Parameters

TInt aErr The asynchronous request completion request.

ConstructL()

void ConstructL ( ) [private]

ExpectedTransactionId()

TUint32 ExpectedTransactionId ( ) const

Provides the next expected TransactionID. Transaction IDs are assigned in incremental sequence by the MTP initiator in the range 0x00000001 to 0xFFFFFFFE.

GetExtendedInterface(TUid)

TAny * GetExtendedInterface ( TUid aInterfaceUid )

Parameters

TUid aInterfaceUid

IncrementExpectedTransactionId()

void IncrementExpectedTransactionId ( )

Increments the next expected TransactionID to the next value in the sequence. TransactionIDs are assigned by the MTP initiator starting from 0x00000001. When the TransactionID increments to 0xFFFFFFFF it wraps back to 0x00000001.

NewLC(TUint32, TUint)

CMTPSession * NewLC ( TUint32 aMTPId,
TUint aUniqueId
) [static]

Parameters

TUint32 aMTPId
TUint aUniqueId

PendingEvent()

const TMTPTypeEvent & PendingEvent ( ) const

RequestPending()

TBool RequestPending ( ) const

Indicates if an asynchronous request is currently pending.

RouteRequest(const TMTPTypeRequest &)

TInt RouteRequest ( const TMTPTypeRequest & aRequest )

Parameters

const TMTPTypeRequest & aRequest

RouteRequestMatchOpCode(const TUint16 *, const TMTPTypeRequest &)

TBool RouteRequestMatchOpCode ( const TUint16 * aOpCode,
const TMTPTypeRequest & aRequest
) [private, static]

Parameters

const TUint16 * aOpCode
const TMTPTypeRequest & aRequest

RouteRequestOrder(const TMTPTypeRequest &, const TMTPTypeRequest &)

TInt RouteRequestOrder ( const TMTPTypeRequest & aLeft,
const TMTPTypeRequest & aRight
) [private, static]

Parameters

const TMTPTypeRequest & aLeft
const TMTPTypeRequest & aRight

RouteRequestRegisterL(const TMTPTypeRequest &, TInt)

void RouteRequestRegisterL ( const TMTPTypeRequest & aRequest,
TInt aDpId
)

Parameters

const TMTPTypeRequest & aRequest
TInt aDpId

RouteRequestRegistered(TUint16)

TBool RouteRequestRegistered ( TUint16 aOpCode ) const

Indicates if a routing request is registered on the session with the specified MTP operation code.

Parameters

TUint16 aOpCode The MTP operation code.

RouteRequestUnregister(const TMTPTypeRequest &)

void RouteRequestUnregister ( const TMTPTypeRequest & aRequest )

Parameters

const TMTPTypeRequest & aRequest

SessionMTPId()

TUint32 SessionMTPId ( ) const

SessionUniqueId()

TUint SessionUniqueId ( ) const

SetActiveRequestL(const TMTPTypeRequest &)

void SetActiveRequestL ( const TMTPTypeRequest & aRequest )

Sets or resets the session's active transaction request dataset. The active transaction request dataset should only be set at the start of the transaction (ERequestPhase), and reset and the end of the transaction (ECompletingPhase).

Parameters

const TMTPTypeRequest & aRequest The active transaction request dataset.

SetRequestPending(TRequestStatus &)

void SetRequestPending ( TRequestStatus & aStatus )

Set the status to complete for the currently pending asynchronous request.

Parameters

TRequestStatus & aStatus The asynchronous request status to complete.

SetTransactionPhase(TMTPTransactionPhase)

void SetTransactionPhase ( TMTPTransactionPhase aPhase )

Sets the session's transaction phase state variable.

Parameters

TMTPTransactionPhase aPhase The new transaction phase state value.

StorePendingEventL(const TMTPTypeEvent &)

void StorePendingEventL ( const TMTPTypeEvent & aEvent )

Parameters

const TMTPTypeEvent & aEvent

TransactionPhase()

TMTPTransactionPhase TransactionPhase ( ) const

Provides the current MTP transaction state for the session.

Member Data Documentation

__FLOG_DECLARATION_MEMBER_MUTABLE

__FLOG_DECLARATION_MEMBER_MUTABLE [private]

FLOGGER debug trace member variable.

TMTPTypeRequest iActiveRequest

TMTPTypeRequest iActiveRequest [private]

TUint32 iExpectedTransactionId

TUint32 iExpectedTransactionId [private]

TAny * iExtendedInterface

TAny * iExtendedInterface [private]

TUint32 iIdMTP

TUint32 iIdMTP [private]

TUint iIdUnique

TUint iIdUnique [private]

TMTPTypeEvent iPendingEvent

TMTPTypeEvent iPendingEvent [private]

TRequestStatus * iRequestStatus

TRequestStatus * iRequestStatus [private]

RArray< TMTPTypeRequest > iRoutingRegistrations

RArray < TMTPTypeRequest > iRoutingRegistrations [private]

TMTPTransactionPhase iTransactionPhase

TMTPTransactionPhase iTransactionPhase [private]