Roap::CRoapHttpHandler Class Reference

class Roap::CRoapHttpHandler : public CActive

Inherits from

Public Member Functions
~CRoapHttpHandler ()
void CreateConnectionL ( TRequestStatus *)
void DoTransactionL ( CRoapResponse &, TDesC8 &, TRequestStatus *)
CRoapHttpHandler * NewL ()
void SetObserver ( MRoapObserver *)
void SetPreferredIap ( TUint32 )
void SetUrlL ( TDesC8 &)
Protected Member Functions
TInt AppendMultipartData (const TDesC8 &)
TInt AppendPduData (const TDesC8 &)
TBool CheckHttpCode ( TInt )
void Complete ()
void ConnectL ()
void CreateSessionL ()
void DoCancel ()
void DoTransactionL ()
TBool GetCredentialsL (const TUriC8 &, RString , RStringF , RString &, RString &)
TBool GetNextDataPart ( TPtrC8 &)
void HandleResponseHeadersL ( RHTTPResponse )
void InstallHttpFiltersL ()
TInt MHFRunError ( TInt , RHTTPTransaction , const THTTPEvent &)
void MHFRunL ( RHTTPTransaction , const THTTPEvent &)
TInt OverallDataSize ()
void ReleaseData ()
TInt Reset ()
TInt RunError ( TInt )
void RunL ()
void SelfComplete ( TInt &)
void SetHeaderL ( RHTTPHeaders , TInt , const TDesC8 &)
TInt StaticTimeOut ( TAny *)
void TimeOut ()
Private Member Functions
CRoapHttpHandler ()
void ConstructL ()
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
enum TRoapState {
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 ( TInt aHttpStatus ) [protected]

Parameters

TInt aHttpStatus

Complete()

void Complete ( ) [protected]

ConnectL()

void ConnectL ( ) [protected]

ConstructL()

void ConstructL ( ) [private]

CreateConnectionL(TRequestStatus *)

void CreateConnectionL ( TRequestStatus * aStatus )

Parameters

TRequestStatus * aStatus

CreateSessionL()

void CreateSessionL ( ) [protected]

DoCancel()

void DoCancel ( ) [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 *)

void DoTransactionL ( CRoapResponse & aResponse,
TDesC8 & aReqBody,
TRequestStatus * aStatus
)

Parameters

CRoapResponse & aResponse
TDesC8 & aReqBody
TRequestStatus * aStatus

DoTransactionL()

void DoTransactionL ( ) [protected]

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

TBool GetCredentialsL ( const TUriC8 & aURI,
RString aRealm,
RStringF aAuthenticationType,
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)

void HandleResponseHeadersL ( RHTTPResponse aHttpResponse ) [protected]

Parameters

RHTTPResponse aHttpResponse

InstallHttpFiltersL()

void InstallHttpFiltersL ( ) [protected]

MHFRunError(TInt, RHTTPTransaction, const THTTPEvent &)

TInt MHFRunError ( TInt aError,
RHTTPTransaction aTransaction,
const THTTPEvent & aEvent
) [protected, virtual]

Parameters

TInt aError
RHTTPTransaction aTransaction
const THTTPEvent & aEvent

MHFRunL(RHTTPTransaction, const THTTPEvent &)

void MHFRunL ( RHTTPTransaction aTransaction,
const THTTPEvent & aEvent
) [protected, virtual]

Parameters

RHTTPTransaction aTransaction
const THTTPEvent & aEvent

NewL()

CRoapHttpHandler * NewL ( ) [static]

OverallDataSize()

TInt OverallDataSize ( ) [protected, virtual]

ReleaseData()

void ReleaseData ( ) [protected, virtual]

Reset()

TInt Reset ( ) [protected, virtual]

RunError(TInt)

TInt RunError ( TInt aError ) [protected, virtual]

Parameters

TInt aError

RunL()

void RunL ( ) [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 &)

void SelfComplete ( TInt & aResult ) [protected]

Parameters

TInt & aResult

SetHeaderL(RHTTPHeaders, TInt, const TDesC8 &)

void SetHeaderL ( RHTTPHeaders aHeaders,
TInt aHdrField,
const TDesC8 & aHdrValue
) [protected]

Parameters

RHTTPHeaders aHeaders
TInt aHdrField
const TDesC8 & aHdrValue

SetObserver(MRoapObserver *)

void SetObserver ( MRoapObserver * aRoapObserver )

Parameters

MRoapObserver * aRoapObserver

SetPreferredIap(TUint32)

void SetPreferredIap ( TUint32 aPreferredIap )

Parameters

TUint32 aPreferredIap

SetUrlL(TDesC8 &)

void SetUrlL ( TDesC8 & aUrl )

Parameters

TDesC8 & aUrl

StaticTimeOut(TAny *)

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

Parameters

TAny * aPointer

TimeOut()

void TimeOut ( ) [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]