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 TInt AddCustomRequestHeader ( 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 TInt AddRequestHeader ( TInt aHeaderId,
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()

void ConstructL ( ) [private]

HttpNetworkConnection()

IMPORT_C CHttpNetworkConnection * HttpNetworkConnection ( )

MaxConnections()

IMPORT_C TInt MaxConnections ( ) const

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

MaxTransactionsToPipeline()

IMPORT_C TInt MaxTransactionsToPipeline ( ) 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 TInt SetAuthentication ( MHTTPServiceAuthentication * aCallback )

Parameters

MHTTPServiceAuthentication * aCallback

SetMaxConnections(TInt)

IMPORT_C void SetMaxConnections ( TInt aValue )

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 aValue aValue No. of connections

SetMaxTransactionsToPipeline(TInt)

IMPORT_C void SetMaxTransactionsToPipeline ( TInt aValue )

Parameters

TInt aValue

SetProxy(const TDesC8 &)

IMPORT_C TInt SetProxy ( const TDesC8 & aProxyAddress )

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

Parameters

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

String(TInt, TPtrC8 &)

IMPORT_C TInt String ( TInt aStringId,
TPtrC8 & aPtr
)

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

Parameters

TInt aStringId
TPtrC8 & aPtr String

Member Data Documentation

CHttpServiceStruct * iHttpServiceStruct

CHttpServiceStruct * iHttpServiceStruct [private]