CHttpService Class Reference

#include <mw/chttpservice.h>

Link against: httpservice.lib

class CHttpService : public CBase

Inherits from

  • CHttpService

    Constructor & Destructor Documentation

    ~CHttpService ( )

    IMPORT_C~CHttpService()

    Destructor

    Member Function 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]

    ParameterDescription
    aHeaderName- Custom header name
    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]

    ParameterDescription
    aHeaderId- Pre-defined String ID in the HTTP string pool
    aHeaderValue- Value for the header

    HttpNetworkConnection ( )

    IMPORT_C CHttpNetworkConnection *HttpNetworkConnection()

    returns the CHttpNetworkConnection instance created by the framework. The class can be used to set the connection properties.

    MaxConnections ( )

    IMPORT_C TIntMaxConnections()const

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

    MaxTransactionsToPipeline ( )

    IMPORT_C TIntMaxTransactionsToPipeline()const

    Returns the maximum number of transactions to be pipelined.

    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

    Returns: Proxy address otherwise KNullDesC8 if the proxy information is not set.

    SetAuthentication ( MHTTPServiceAuthentication * )

    IMPORT_C TIntSetAuthentication(MHTTPServiceAuthentication *aCallback)

    This method facilitates to set to construct the authentication credentials to be passed by the application The derived class from MHTTPServiceAuthentication will be called from the framework, if authentication is required.

    ParameterDescription
    aCallback- Derived class from MHTTPServiceAuthentication

    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.

    ParameterDescription
    aValueaValue No. of connections

    SetMaxTransactionsToPipeline ( TInt )

    IMPORT_C voidSetMaxTransactionsToPipeline(TIntaValue)

    Sets the maximum number of transactions to be pipelined.

    ParameterDescription
    aValue- number of transactions

    SetProxy ( const TDesC8 & )

    IMPORT_C TIntSetProxy(const TDesC8 &aProxyAddress)

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

    ParameterDescription
    aProxyAddressProxy address. [for ex; http://myproxy.org:8081]

    Returns: KErrNoMemory if the proxy information cannot be set other KErrNone for success.

    String ( TInt, TPtrC8 & )

    IMPORT_C TIntString(TIntaStringId,
    TPtrC8 &aPtr
    )

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

    ParameterDescription
    aPtrString

    Returns: KErrNotFound if the string ID is not found in the HTTP string pool otherwise KErrNone for success