CIctsHttpHandler Class Reference

class CIctsHttpHandler : public CTimer

Handles HTTP related things.

Sends HTTP GET using HTTP FW. Returns results to the caller.

ictsclientinterface.lib

Inherits from

Public Member Functions
~CIctsHttpHandler()
voidCancelHttpRequestL()
TInt MHFRunError(TInt, RHTTPTransaction, const THTTPEvent &)
voidMHFRunL(RHTTPTransaction, const THTTPEvent &)
CIctsHttpHandler *NewL(CIctsEngine &, TInt)
TInt SendHttpRequestL(TDesC8 &, TUint32, TUint32)
Protected Member Functions
voidRunL()
Private Member Functions
CIctsHttpHandler(CIctsEngine &, TInt)
TBool CheckHttp(TDesC8 &)
TBool CheckStatusCodeL(RHTTPTransaction)
voidConstructL()
voidSendHttpGetL(TDesC8 &)
voidSetHttpConnectionInfoL(RConnection &, RSocketServ &)
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::Extension_(TUint,TAny *&,TAny *)
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::RunError(TInt)
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()
CTimer::After(TTimeIntervalMicroSeconds32)
CTimer::At(const TTime &)
CTimer::AtUTC(const TTime &)
CTimer::CTimer(TInt)
CTimer::DoCancel()
CTimer::HighRes(TTimeIntervalMicroSeconds32)
CTimer::Inactivity(TTimeIntervalSeconds)
CTimer::Lock(TTimerLockSpec)
CTimer::~CTimer()
Inherited Enumerations
CActive:TPriority
Private Attributes
TBool iAttachDone
RConnection iConnection
TInt iHttpResponseTime
RHTTPSession iHttpSession
RHTTPTransaction iHttpTransaction
CIctsEngine &iOwner
RSocketServ iSocketServ
TBuf< KHttpResponseLength >iString
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

CIctsHttpHandler(CIctsEngine &, TInt)

CIctsHttpHandler(CIctsEngine &aOwner,
TIntaHttpResponseTime
)[private]

C++ default constructor.

Parameters

CIctsEngine & aOwnerOwner of this instance
TInt aHttpResponseTimeMax time for response

~CIctsHttpHandler()

~CIctsHttpHandler()[virtual]

Destructor.

Member Functions Documentation

CancelHttpRequestL()

voidCancelHttpRequestL()

Cancels HTTP GET request

CheckHttp(TDesC8 &)

TBool CheckHttp(TDesC8 &aIPAddress)[private]

Check http prefix in URL/IP address

Parameters

TDesC8 & aIPAddressURL

CheckStatusCodeL(RHTTPTransaction)

TBool CheckStatusCodeL(RHTTPTransactionaTransaction)[private]

Checks if HTTP status code is a redirect (301,302,303,307)

Parameters

RHTTPTransaction aTransactionHTTP transactionL

ConstructL()

voidConstructL()[private]

By default Symbian 2nd phase constructor is private.

MHFRunError(TInt, RHTTPTransaction, const THTTPEvent &)

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

Callback for HTTP FW to call when HTTP errors occur

Parameters

TInt aErrorerror code
RHTTPTransaction aTransactionHTTP transaction
const THTTPEvent & aEventHTTP event

MHFRunL(RHTTPTransaction, const THTTPEvent &)

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

Callback for HTTP FW to call when HTTP events occur

Parameters

RHTTPTransaction aTransactionHTTP transaction
const THTTPEvent & aEventHTTP event

NewL(CIctsEngine &, TInt)

CIctsHttpHandler *NewL(CIctsEngine &aOwner,
TIntaHttpResponseTime
)[static]

Static constructor.

Parameters

CIctsEngine & aOwner
TInt aHttpResponseTime

RunL()

voidRunL()[protected, virtual]

From CActive Handles an active object's request completion event.

SendHttpGetL(TDesC8 &)

voidSendHttpGetL(TDesC8 &aIp)[private]

Send HTTP request

Parameters

TDesC8 & aIpIP address

SendHttpRequestL(TDesC8 &, TUint32, TUint32)

TInt SendHttpRequestL(TDesC8 &aIPAddress,
TUint32aIapID,
TUint32aNetworkId
)

Send HTTP GET request

Parameters

TDesC8 & aIPAddressIP address
TUint32 aIapIDIAP id
TUint32 aNetworkIdNetwork id

SetHttpConnectionInfoL(RConnection &, RSocketServ &)

voidSetHttpConnectionInfoL(RConnection &aConnection,
RSocketServ &aSocketServ
)[private]

Set HTTP connection info

Parameters

RConnection & aConnectionNetwork connection
RSocketServ & aSocketServSocket server

Member Data Documentation

TBool iAttachDone

TBool iAttachDone[private]

Is attached to connection

RConnection iConnection

RConnection iConnection[private]

Handle to connection Own.

TInt iHttpResponseTime

TInt iHttpResponseTime[private]

Waiting time of HTTP response

RHTTPSession iHttpSession

RHTTPSession iHttpSession[private]

Handle to HTTP session Own.

RHTTPTransaction iHttpTransaction

RHTTPTransaction iHttpTransaction[private]

Handle to HTTP transaction Own.

CIctsEngine & iOwner

CIctsEngine &iOwner[private]

Reference of owner class Not Own.

RSocketServ iSocketServ

RSocketServ iSocketServ[private]

Handle to socket server Own.

TBuf< KHttpResponseLength > iString

TBuf< KHttpResponseLength >iString[private]

String from HTTP FW