CHttpService Class Reference

class CHttpService : public CBase

Inherits from

Nested Classes and Structures

Constructor & Destructor Documentation

CHttpService()

CHttpService()[private]

Constructor

~CHttpService()

IMPORT_C~CHttpService()

Destructor

Member Functions Documentation

AddCustomRequestHeader(const TDesC8 &, const TDesC8 &)

IMPORT_C TIntAddCustomRequestHeader(const TDesC8 &aHeaderName,
const TDesC8 &aHeaderValue
)

This method facilitates to set the custom HTTP header once in the CHttpService instance that is applicable for all HTTP client transactions. [For ex; User-Agent header]

Parameters

const TDesC8 & aHeaderName- Custom header name
const TDesC8 & aHeaderValue- Value for the header

AddRequestHeader(TInt, const THttpHeaderValueVariant &)

IMPORT_C TIntAddRequestHeader(TIntaHeaderId,
const THttpHeaderValueVariant &aHeaderValue
)

This method facilitates to set the header once in the CHttpService instance that is applicable for all HTTP client transactions. [For ex; User-Agent header]

Parameters

TInt aHeaderId- Pre-defined String ID in the HTTP string pool
const THttpHeaderValueVariant & aHeaderValue- Value for the header

ConstructL()

voidConstructL()[private]

HttpNetworkConnection()

IMPORT_C CHttpNetworkConnection *HttpNetworkConnection()

MaxConnections()

IMPORT_C TIntMaxConnections()const

Returns the maximum no. of TCP connections that is set.

MaxTransactionsToPipeline()

IMPORT_C TIntMaxTransactionsToPipeline()const

NewL()

IMPORT_C CHttpService *NewL()[static]

The default 2-phase constructor to create a CHttpService instance

ProxyAddress()

IMPORT_C const TDesC8 &ProxyAddress()const

Returns the proxy address that is set

Session()

RHTTPSession Session()[private, inline]

SetAuthentication(MHTTPServiceAuthentication *)

IMPORT_C TIntSetAuthentication(MHTTPServiceAuthentication *aCallback)

Parameters

MHTTPServiceAuthentication * aCallback

SetMaxConnections(TInt)

IMPORT_C voidSetMaxConnections(TIntaValue)

Set the maxuimum number of TCP connections[socket] CHttpService instance that can activated at any time. The default no. of connections that the CHttpService instance uses is 6.

Parameters

TInt aValueaValue No. of connections

SetMaxTransactionsToPipeline(TInt)

IMPORT_C voidSetMaxTransactionsToPipeline(TIntaValue)

Parameters

TInt aValue

SetProxy(const TDesC8 &)

IMPORT_C TIntSetProxy(const TDesC8 &aProxyAddress)

Set the proxy that applies to all HTTP client transactions that "this" CHttpService instance creates

Parameters

const TDesC8 & aProxyAddressProxy address. [for ex; http://myproxy.org:8081]

String(TInt, TPtrC8 &)

IMPORT_C TIntString(TIntaStringId,
TPtrC8 &aPtr
)

Retrieves the equivalent string for a give string ID from the HTTP string pool

Parameters

TInt aStringId
TPtrC8 & aPtrString

Member Data Documentation

CHttpServiceStruct * iHttpServiceStruct

CHttpServiceStruct *iHttpServiceStruct[private]