#include <mw/chttpservice.h>
Link against: httpservice.lib
class CHttpService : public CBase |
Public Member Functions | |
---|---|
~CHttpService() | |
IMPORT_C TInt | AddCustomRequestHeader(const TDesC8 &, const TDesC8 &) |
IMPORT_C TInt | AddRequestHeader(TInt, const THttpHeaderValueVariant &) |
IMPORT_C CHttpNetworkConnection * | HttpNetworkConnection() |
IMPORT_C TInt | MaxConnections() |
IMPORT_C TInt | MaxTransactionsToPipeline() |
IMPORT_C CHttpService * | NewL() |
IMPORT_C const TDesC8 & | ProxyAddress() |
IMPORT_C TInt | SetAuthentication(MHTTPServiceAuthentication *) |
IMPORT_C void | SetClientCredential(const CX509Certificate &, const CDecPKCS8Data &) |
IMPORT_C TInt | SetDialogMode(const TDialogMode) |
IMPORT_C TInt | SetDialogSelection(const TServerCertValidation) |
IMPORT_C void | SetMaxConnections(TInt) |
IMPORT_C void | SetMaxTransactionsToPipeline(TInt) |
IMPORT_C TInt | SetProxy(const TDesC8 &) |
IMPORT_C TInt | String(TInt, TPtrC8 &) |
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 | |
---|---|
aHeaderName | - Custom header name |
aHeaderValue | - Value for the header |
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 | |
---|---|
aHeaderId | - Pre-defined String ID in the HTTP string pool |
aHeaderValue | - Value for the header |
IMPORT_C CHttpNetworkConnection * | HttpNetworkConnection | ( | ) |
returns the CHttpNetworkConnection instance created by the framework. The class can be used to set the connection properties.
IMPORT_C TInt | MaxConnections | ( | ) | const |
Returns the maximum no. of TCP connections that is set.
IMPORT_C TInt | MaxTransactionsToPipeline | ( | ) | const |
Returns the maximum number of transactions to be pipelined.
IMPORT_C CHttpService * | NewL | ( | ) | [static] |
The default 2-phase constructor to create a CHttpService instance
IMPORT_C const TDesC8 & | ProxyAddress | ( | ) | const |
Returns the proxy address that is set
IMPORT_C TInt | SetAuthentication | ( | 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.
Parameters | |
---|---|
aCallback | - Derived class from MHTTPServiceAuthentication |
IMPORT_C void | SetClientCredential | ( | const CX509Certificate & | aCertificate, |
const CDecPKCS8Data & | aPrivateKey | |||
) |
IMPORT_C TInt | SetDialogMode | ( | const TDialogMode | aDialogMode | ) |
To select the dialog mode.
Parameters | |
---|---|
aDialogMode | - enum value of type TDialogMode. |
IMPORT_C TInt | SetDialogSelection | ( | const TServerCertValidation | aValidations | ) |
To select the server certificate validation failure dialog to attend in HTTP::EDialogNoPrompt mode. Incase multiple validation selection, respective TServerCertValidation enums are logically ORed into single 32bit integer and provisioned.
Parameters | |
---|---|
aValidations | - Logically ORed enums of type TServerCertValidation. |
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 | |
---|---|
aValue | aValue No. of connections |
IMPORT_C void | SetMaxTransactionsToPipeline | ( | TInt | aValue | ) |
Sets the maximum number of transactions to be pipelined.
Parameters | |
---|---|
aValue | - number of transactions |
Set the proxy that applies to all HTTP client transactions that "this" CHttpService instance creates
Parameters | |
---|---|
aProxyAddress | Proxy address. [for ex; http://myproxy.org:8081] |