CHttpService Class Reference
#include
<mw/chttpservice.h>
Link against: httpservice.lib
class CHttpService : public CBase |
Constructor & Destructor Documentation
Member Function 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]
Parameter | Description | aHeaderName | - Custom header name |
aHeaderValue | - Value for the header |
AddRequestHeader ( TInt, const THttpHeaderValueVariant & )
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]
Parameter | Description | aHeaderId | - Pre-defined String ID in the HTTP string pool |
aHeaderValue | - Value for the header |
HttpNetworkConnection ( )
returns the CHttpNetworkConnection instance created by the framework. The class can be used to set the connection properties.
MaxConnections ( )
IMPORT_C TInt | MaxConnections | ( | ) | const |
Returns the maximum no. of TCP connections that is set.
MaxTransactionsToPipeline ( )
IMPORT_C TInt | MaxTransactionsToPipeline | ( | ) | const |
Returns the maximum number of transactions to be pipelined.
NewL ( )
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 * )
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.
Parameter | Description | aCallback | - Derived class from MHTTPServiceAuthentication |
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.
Parameter | Description | aValue | aValue No. of connections |
SetMaxTransactionsToPipeline ( TInt )
IMPORT_C void | SetMaxTransactionsToPipeline | ( | TInt | aValue | ) | |
Sets the maximum number of transactions to be pipelined.
Parameter | Description | aValue | - number of transactions |
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
Parameter | Description | aProxyAddress | Proxy address. [for ex; http://myproxy.org:8081] |
Returns: KErrNoMemory if the proxy information cannot be set other KErrNone for success.
String ( TInt, TPtrC8 & )
Retrieves the equivalent string for a give string ID from the HTTP string pool
Parameter | Description | aPtr | String |
Returns: KErrNotFound if the string ID is not found in the HTTP string pool otherwise KErrNone for success