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 ()
void CancelHttpRequestL ()
TInt MHFRunError ( TInt , RHTTPTransaction , const THTTPEvent &)
void MHFRunL ( RHTTPTransaction , const THTTPEvent &)
CIctsHttpHandler * NewL ( CIctsEngine &, TInt )
TInt SendHttpRequestL ( TDesC8 &, TUint32 , TUint32 )
Protected Member Functions
void RunL ()
Private Member Functions
CIctsHttpHandler ( CIctsEngine &, TInt )
TBool CheckHttp ( TDesC8 &)
TBool CheckStatusCodeL ( RHTTPTransaction )
void ConstructL ()
void SendHttpGetL ( TDesC8 &)
void SetHttpConnectionInfoL ( 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,
TInt aHttpResponseTime
) [private]

C++ default constructor.

Parameters

CIctsEngine & aOwner Owner of this instance
TInt aHttpResponseTime Max time for response

~CIctsHttpHandler()

~CIctsHttpHandler ( ) [virtual]

Destructor.

Member Functions Documentation

CancelHttpRequestL()

void CancelHttpRequestL ( )

Cancels HTTP GET request

CheckHttp(TDesC8 &)

TBool CheckHttp ( TDesC8 & aIPAddress ) [private]

Check http prefix in URL/IP address

Parameters

TDesC8 & aIPAddress URL

CheckStatusCodeL(RHTTPTransaction)

TBool CheckStatusCodeL ( RHTTPTransaction aTransaction ) [private]

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

Parameters

RHTTPTransaction aTransaction HTTP transactionL

ConstructL()

void ConstructL ( ) [private]

By default Symbian 2nd phase constructor is private.

MHFRunError(TInt, RHTTPTransaction, const THTTPEvent &)

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

Callback for HTTP FW to call when HTTP errors occur

Parameters

TInt aError error code
RHTTPTransaction aTransaction HTTP transaction
const THTTPEvent & aEvent HTTP event

MHFRunL(RHTTPTransaction, const THTTPEvent &)

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

Callback for HTTP FW to call when HTTP events occur

Parameters

RHTTPTransaction aTransaction HTTP transaction
const THTTPEvent & aEvent HTTP event

NewL(CIctsEngine &, TInt)

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

Static constructor.

Parameters

CIctsEngine & aOwner
TInt aHttpResponseTime

RunL()

void RunL ( ) [protected, virtual]

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

SendHttpGetL(TDesC8 &)

void SendHttpGetL ( TDesC8 & aIp ) [private]

Send HTTP request

Parameters

TDesC8 & aIp IP address

SendHttpRequestL(TDesC8 &, TUint32, TUint32)

TInt SendHttpRequestL ( TDesC8 & aIPAddress,
TUint32 aIapID,
TUint32 aNetworkId
)

Send HTTP GET request

Parameters

TDesC8 & aIPAddress IP address
TUint32 aIapID IAP id
TUint32 aNetworkId Network id

SetHttpConnectionInfoL(RConnection &, RSocketServ &)

void SetHttpConnectionInfoL ( RConnection & aConnection,
RSocketServ & aSocketServ
) [private]

Set HTTP connection info

Parameters

RConnection & aConnection Network connection
RSocketServ & aSocketServ Socket 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