Roap::CRoapEngBase Class Reference

class Roap::CRoapEngBase : public CActive

Inherits from

Public Member Functions
~CRoapEngBase()
IMPORT_C voidAcceptL(MRoapObserver *, TRequestStatus *)
IMPORT_C TIntDoCleanup()
IMPORT_C voidHandleRoReponseL(const TDesC8 &, RPointerArray< CDRMRights > &)
IMPORT_C voidReject()
IMPORT_C voidSetTriggerL(const TDesC8 &, const CAiwGenericParamList *, TTriggerType &, TRiContextStatus &, TDomainOperation &, RPointerArray< HBufC8 > &)
IMPORT_C const CRoapTrigger &Trigger()
Protected Member Functions
CRoapEngBase()
voidCompleteL()
voidCompleteRequest()
voidConstructL()
voidContinue(TRoapState)
voidCreateConnectionL()
voidCreateReqMessageL()
voidDoCancel()
voidGetDomainContextL(TBool &, TBool &, const TDesC8 &)
voidGetRIContextL(TBool &, const TDesC8 &)
voidHandleMultipartL()
voidHandleResponseL()
voidHandleRightsResponsePduL(const TDesC8 &, TBool)
voidHandleRoapResponseL(const TDesC8 &)
TInt MapStatusL()
CRoapTrigger *ParseTriggerL(const TDesC8 &)
TInt RunError(TInt)
voidRunL()
voidSetL()
voidSetProtocolL()
HBufC8 *SignMessageL(const TDesC8 &)
voidStartTransactionL()
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::Extension_(TUint,TAny *&,TAny *)
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::SetActive()
CActive::SetPriority(TInt)
CActive::~CActive()
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()
Public Member Enumerations
enumTRequestType {
EDeviceHello, ERegistration, EROAcquisition, EJoinDomain, ELeaveDomain, EMeteringRequest
}
enumTRoapState {
EInit, EReady, ECreateConn, EStartTrans, ERespReceived, EComplete
}
Inherited Enumerations
CActive:TPriority
Protected Attributes
TBool iAllowedToContactRi
TBool iCompleted
HBufC8 *iDomainRightsResp
CRoapHttpHandler *iHttpHandler
TBool iImplicitJoinDomain
MRoapObserver *iObserver
TRequestStatus *iParentStatus
TUint32 iPreferredIap
TInt iProgressInBytes
TBool iReRegistered
TRequestType iReqMessage
CRoapMessage *iRequest
CRoapMessage *iResponse
TInt iResult
RPointerArray< CDRMRights >iReturnedROs
HBufC8 *iRiAlias
CRoapResponse *iRoapResp
TRoapState iState
TInt iStatusCode
CDRMRIContext *iStoredRiContext
TBool iTransTrackConf
CRoapTrigger *iTrigger
TBool iUseRiContextUrl
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

CRoapEngBase()

CRoapEngBase()[protected]

~CRoapEngBase()

IMPORT_C~CRoapEngBase()[virtual]

Member Functions Documentation

AcceptL(MRoapObserver *, TRequestStatus *)

IMPORT_C voidAcceptL(MRoapObserver *aObserver,
TRequestStatus *aStatus
)

AcceptL

The function starts the ROAP operation. SetTriggerL must be called successfully before calling this function.

Since
3.0
leave
System wide error code

Parameters

MRoapObserver * aObserver
TRequestStatus * aStatus

CompleteL()

voidCompleteL()[protected]

CompleteRequest()

voidCompleteRequest()[protected]

ConstructL()

voidConstructL()[protected]

Continue(TRoapState)

voidContinue(TRoapStateaNextState)[protected]

Parameters

TRoapState aNextState

CreateConnectionL()

voidCreateConnectionL()[protected]

CreateReqMessageL()

voidCreateReqMessageL()[protected, pure virtual]

DoCancel()

voidDoCancel()[protected, virtual]

Implements cancellation of an outstanding request.

This function is called as part of the active object's Cancel().

It must call the appropriate cancel function offered by the active object's asynchronous service provider. The asynchronous service provider's cancel is expected to act immediately.

DoCancel() must not wait for event completion; this is handled by Cancel().

CActive::Cancel

DoCleanup()

IMPORT_C TIntDoCleanup()

DoCleanup

The function deletes the data that has been stored during the last ROAP processing. The asynchronous AcceptL call must be finished before it is useful to call this method.

Since
3.0

GetDomainContextL(TBool &, TBool &, const TDesC8 &)

voidGetDomainContextL(TBool &aIsJoined,
TBool &aIsValidGeneration,
const TDesC8 &aDomainId
)[protected, pure virtual]

Parameters

TBool & aIsJoined
TBool & aIsValidGeneration
const TDesC8 & aDomainId

GetRIContextL(TBool &, const TDesC8 &)

voidGetRIContextL(TBool &aRegistered,
const TDesC8 &aRiId
)[protected, pure virtual]

Parameters

TBool & aRegistered
const TDesC8 & aRiId

HandleMultipartL()

voidHandleMultipartL()[protected, pure virtual]

HandleResponseL()

voidHandleResponseL()[protected]

HandleRightsResponsePduL(const TDesC8 &, TBool)

voidHandleRightsResponsePduL(const TDesC8 &aRightsResp,
TBoolaOnePass
)[protected, pure virtual]

Parameters

const TDesC8 & aRightsResp
TBool aOnePass

HandleRoReponseL(const TDesC8 &, RPointerArray< CDRMRights > &)

IMPORT_C voidHandleRoReponseL(const TDesC8 &aResponse,
RPointerArray< CDRMRights > &aParsedRights
)

HandleRoReponseL

The function is for handling the 1-pass RO acquisition case. Takes in RO response PDU and parses it and stores the Rights Object into the database.

Since
3.0
leave
System wide error code

Parameters

const TDesC8 & aResponse
RPointerArray< CDRMRights > & aParsedRights

HandleRoapResponseL(const TDesC8 &)

voidHandleRoapResponseL(const TDesC8 &aXmlResponse)[protected, pure virtual]

Parameters

const TDesC8 & aXmlResponse

MapStatusL()

TInt MapStatusL()[protected, pure virtual]

ParseTriggerL(const TDesC8 &)

CRoapTrigger *ParseTriggerL(const TDesC8 &aXmlTrigger)[protected, pure virtual]

Parameters

const TDesC8 & aXmlTrigger

Reject()

IMPORT_C voidReject()

Reject

The function cancels the ROAP operation. The initial state (as it was before calling SetTriggerL) is restored. The function handles cleanup of stored data internally (by calling the DoCleanupL method)

Since
3.0

RunError(TInt)

TInt RunError(TIntaError)[protected, virtual]

Parameters

TInt aError

RunL()

voidRunL()[protected, virtual]

Handles an active object's request completion event.

A derived class must provide an implementation to handle the completed request. If appropriate, it may issue another request.

The function is called by the active scheduler when a request completion event occurs, i.e. after the active scheduler's WaitForAnyRequest() function completes.

Before calling this active object's RunL() function, the active scheduler has:

1. decided that this is the highest priority active object with a completed request

2. marked this active object's request as complete (i.e. the request is no longer outstanding)

RunL() runs under a trap harness in the active scheduler. If it leaves, then the active scheduler calls RunError() to handle the leave.

Note that once the active scheduler's Start() function has been called, all user code is run under one of the program's active object's RunL() or RunError() functions.

CActiveScheduler::Start CActiveScheduler::Error CActiveScheduler::WaitForAnyRequest TRAPD

SetL()

voidSetL()[protected]

SetProtocolL()

voidSetProtocolL()[protected]

SetTriggerL(const TDesC8 &, const CAiwGenericParamList *, TTriggerType &, TRiContextStatus &, TDomainOperation &, RPointerArray< HBufC8 > &)

IMPORT_C voidSetTriggerL(const TDesC8 &aXmlTrigger,
const CAiwGenericParamList *aParamList,
TTriggerType &aType,
TRiContextStatus &aContextStatus,
TDomainOperation &aDomainOperation,
RPointerArray< HBufC8 > &aContentIdList
)

SetTriggerL

The function takes in a ROAP Trigger and parses it. The the internal state of ROAP Engine is changed accordingly. After the trigger is set a caller can either accept the ROAP transaction by calling AcceptL or reject by calling Reject.

Since
3.0
leave
System wide error code

Parameters

const TDesC8 & aXmlTrigger
const CAiwGenericParamList * aParamList
TTriggerType & aType
TRiContextStatus & aContextStatus
TDomainOperation & aDomainOperation
RPointerArray< HBufC8 > & aContentIdList

SignMessageL(const TDesC8 &)

HBufC8 *SignMessageL(const TDesC8 &aMessage)const [protected, pure virtual]

Parameters

const TDesC8 & aMessage

StartTransactionL()

voidStartTransactionL()[protected]

Trigger()

IMPORT_C const CRoapTrigger &Trigger()const

Trigger

The function returns a reference to the parsed CRoapTrigger object. The SetTriggerL method must be called successfully before this method can be called.

Since
3.0

Member Enumerations Documentation

Enum TRequestType

Enumerators

EDeviceHello
ERegistration
EROAcquisition
EJoinDomain
ELeaveDomain
EMeteringRequest

Enum TRoapState

Enumerators

EInit
EReady
ECreateConn
EStartTrans
ERespReceived
EComplete

Member Data Documentation

TBool iAllowedToContactRi

TBool iAllowedToContactRi[protected]

TBool iCompleted

TBool iCompleted[protected]

HBufC8 * iDomainRightsResp

HBufC8 *iDomainRightsResp[protected]

CRoapHttpHandler * iHttpHandler

CRoapHttpHandler *iHttpHandler[protected]

TBool iImplicitJoinDomain

TBool iImplicitJoinDomain[protected]

MRoapObserver * iObserver

MRoapObserver *iObserver[protected]

TRequestStatus * iParentStatus

TRequestStatus *iParentStatus[protected]

TUint32 iPreferredIap

TUint32 iPreferredIap[protected]

TInt iProgressInBytes

TInt iProgressInBytes[protected]

TBool iReRegistered

TBool iReRegistered[protected]

TRequestType iReqMessage

TRequestType iReqMessage[protected]

CRoapMessage * iRequest

CRoapMessage *iRequest[protected]

CRoapMessage * iResponse

CRoapMessage *iResponse[protected]

TInt iResult

TInt iResult[protected]

RPointerArray< CDRMRights > iReturnedROs

RPointerArray< CDRMRights >iReturnedROs[protected]

HBufC8 * iRiAlias

HBufC8 *iRiAlias[protected]

CRoapResponse * iRoapResp

CRoapResponse *iRoapResp[protected]

TRoapState iState

TRoapState iState[protected]

TInt iStatusCode

TInt iStatusCode[protected]

CDRMRIContext * iStoredRiContext

CDRMRIContext *iStoredRiContext[protected]

TBool iTransTrackConf

TBool iTransTrackConf[protected]

CRoapTrigger * iTrigger

CRoapTrigger *iTrigger[protected]

TBool iUseRiContextUrl

TBool iUseRiContextUrl[protected]