Roap::CRoapHttpHandler Class Reference

class Roap::CRoapHttpHandler : public CActive

Inherits from

Public Member Functions
~CRoapHttpHandler()
voidCreateConnectionL(TRequestStatus *)
voidDoTransactionL(CRoapResponse &, TDesC8 &, TRequestStatus *)
CRoapHttpHandler *NewL()
voidSetObserver(MRoapObserver *)
voidSetPreferredIap(TUint32)
voidSetUrlL(TDesC8 &)
Protected Member Functions
TInt AppendMultipartData(const TDesC8 &)
TInt AppendPduData(const TDesC8 &)
TBool CheckHttpCode(TInt)
voidComplete()
voidConnectL()
voidCreateSessionL()
voidDoCancel()
voidDoTransactionL()
TBool GetCredentialsL(const TUriC8 &, RString, RStringF, RString &, RString &)
TBool GetNextDataPart(TPtrC8 &)
voidHandleResponseHeadersL(RHTTPResponse)
voidInstallHttpFiltersL()
TInt MHFRunError(TInt, RHTTPTransaction, const THTTPEvent &)
voidMHFRunL(RHTTPTransaction, const THTTPEvent &)
TInt OverallDataSize()
voidReleaseData()
TInt Reset()
TInt RunError(TInt)
voidRunL()
voidSelfComplete(TInt &)
voidSetHeaderL(RHTTPHeaders, TInt, const TDesC8 &)
TInt StaticTimeOut(TAny *)
voidTimeOut()
Private Member Functions
CRoapHttpHandler()
voidConstructL()
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()
Private Member Enumerations
enumTRoapState {
EInit, EStart, EConnect, EReady, ERequest, EComplete, ECloseSession
}
Inherited Enumerations
CActive:TPriority
Private Attributes
HBufC8 *iBoundary
TInt iBytesReceived
CRoapConnection *iConnection
TInt iError
MRoapObserver *iObserver
TRequestStatus *iParentStatus
TUint32 iPreferredIap
TBool iReportBytes
HBufC8 *iRequestBody
CRoapResponse *iResponse
RHTTPSession iSession
TRoapState iState
CPeriodic *iTimeout
RHTTPTransaction iTransaction
HBufC8 *iUri
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

CRoapHttpHandler()

CRoapHttpHandler()[private]

~CRoapHttpHandler()

~CRoapHttpHandler()[virtual]

Member Functions Documentation

AppendMultipartData(const TDesC8 &)

TInt AppendMultipartData(const TDesC8 &aDataChunk)[protected]

Parameters

const TDesC8 & aDataChunk

AppendPduData(const TDesC8 &)

TInt AppendPduData(const TDesC8 &aDataChunk)[protected]

Parameters

const TDesC8 & aDataChunk

CheckHttpCode(TInt)

TBool CheckHttpCode(TIntaHttpStatus)[protected]

Parameters

TInt aHttpStatus

Complete()

voidComplete()[protected]

ConnectL()

voidConnectL()[protected]

ConstructL()

voidConstructL()[private]

CreateConnectionL(TRequestStatus *)

voidCreateConnectionL(TRequestStatus *aStatus)

Parameters

TRequestStatus * aStatus

CreateSessionL()

voidCreateSessionL()[protected]

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

DoTransactionL(CRoapResponse &, TDesC8 &, TRequestStatus *)

voidDoTransactionL(CRoapResponse &aResponse,
TDesC8 &aReqBody,
TRequestStatus *aStatus
)

Parameters

CRoapResponse & aResponse
TDesC8 & aReqBody
TRequestStatus * aStatus

DoTransactionL()

voidDoTransactionL()[protected]

GetCredentialsL(const TUriC8 &, RString, RStringF, RString &, RString &)

TBool GetCredentialsL(const TUriC8 &aURI,
RStringaRealm,
RStringFaAuthenticationType,
RString &aUsername,
RString &aPassword
)[protected, virtual]

Parameters

const TUriC8 & aURI
RString aRealm
RStringF aAuthenticationType
RString & aUsername
RString & aPassword

GetNextDataPart(TPtrC8 &)

TBool GetNextDataPart(TPtrC8 &aDataPart)[protected, virtual]

Parameters

TPtrC8 & aDataPart

HandleResponseHeadersL(RHTTPResponse)

voidHandleResponseHeadersL(RHTTPResponseaHttpResponse)[protected]

Parameters

RHTTPResponse aHttpResponse

InstallHttpFiltersL()

voidInstallHttpFiltersL()[protected]

MHFRunError(TInt, RHTTPTransaction, const THTTPEvent &)

TInt MHFRunError(TIntaError,
RHTTPTransactionaTransaction,
const THTTPEvent &aEvent
)[protected, virtual]

Parameters

TInt aError
RHTTPTransaction aTransaction
const THTTPEvent & aEvent

MHFRunL(RHTTPTransaction, const THTTPEvent &)

voidMHFRunL(RHTTPTransactionaTransaction,
const THTTPEvent &aEvent
)[protected, virtual]

Parameters

RHTTPTransaction aTransaction
const THTTPEvent & aEvent

NewL()

CRoapHttpHandler *NewL()[static]

OverallDataSize()

TInt OverallDataSize()[protected, virtual]

ReleaseData()

voidReleaseData()[protected, virtual]

Reset()

TInt Reset()[protected, virtual]

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

SelfComplete(TInt &)

voidSelfComplete(TInt &aResult)[protected]

Parameters

TInt & aResult

SetHeaderL(RHTTPHeaders, TInt, const TDesC8 &)

voidSetHeaderL(RHTTPHeadersaHeaders,
TIntaHdrField,
const TDesC8 &aHdrValue
)[protected]

Parameters

RHTTPHeaders aHeaders
TInt aHdrField
const TDesC8 & aHdrValue

SetObserver(MRoapObserver *)

voidSetObserver(MRoapObserver *aRoapObserver)

Parameters

MRoapObserver * aRoapObserver

SetPreferredIap(TUint32)

voidSetPreferredIap(TUint32aPreferredIap)

Parameters

TUint32 aPreferredIap

SetUrlL(TDesC8 &)

voidSetUrlL(TDesC8 &aUrl)

Parameters

TDesC8 & aUrl

StaticTimeOut(TAny *)

TInt StaticTimeOut(TAny *aPointer)[protected, static]

Parameters

TAny * aPointer

TimeOut()

voidTimeOut()[protected]

Member Enumerations Documentation

Enum TRoapState

Enumerators

EInit
EStart
EConnect
EReady
ERequest
EComplete
ECloseSession

Member Data Documentation

HBufC8 * iBoundary

HBufC8 *iBoundary[private]

TInt iBytesReceived

TInt iBytesReceived[private]

CRoapConnection * iConnection

CRoapConnection *iConnection[private]

TInt iError

TInt iError[private]

MRoapObserver * iObserver

MRoapObserver *iObserver[private]

TRequestStatus * iParentStatus

TRequestStatus *iParentStatus[private]

TUint32 iPreferredIap

TUint32 iPreferredIap[private]

TBool iReportBytes

TBool iReportBytes[private]

HBufC8 * iRequestBody

HBufC8 *iRequestBody[private]

CRoapResponse * iResponse

CRoapResponse *iResponse[private]

RHTTPSession iSession

RHTTPSession iSession[private]

TRoapState iState

TRoapState iState[private]

CPeriodic * iTimeout

CPeriodic *iTimeout[private]

RHTTPTransaction iTransaction

RHTTPTransaction iTransaction[private]

HBufC8 * iUri

HBufC8 *iUri[private]