CHttpClientTransaction Class Reference
#include
<mw/chttpclienttransaction.h>
Link against: httpservice.lib
class CHttpClientTransaction : public CBase |
Public Member Functions |
---|
virtual | ~CHttpClientTransaction() |
IMPORT_C TInt | AddCustomRequestHeader(const TDesC8 &, const TDesC8 &) |
IMPORT_C TInt | AddRequestHeader(TInt, const THttpHeaderValueVariant &) |
IMPORT_C TInt | AddRequestHeader(TInt, const THttpHeaderValueVariant &, TInt, const THttpHeaderValueVariant &) |
IMPORT_C TInt | AddRequestHeader(const TDesC8 &, const THttpHeaderValueVariant &) |
IMPORT_C TInt | AddRequestHeader(const TDesC8 &, const THttpHeaderValueVariant &, const TDesC8 &, const THttpHeaderValueVariant &) |
IMPORT_C TInt | AddRequestHeader(const TDesC8 &, const TDesC8 &, const THttpHeaderValueVariant &) |
IMPORT_C void | CancelRequest() |
IMPORT_C TInt | Create(CHttpService &, const TDesC8 &, const TDesC8 &) |
IMPORT_C void | DisablePipelining() |
pure virtual void | OnCompletion() |
pure virtual void | OnError(TInt) |
virtual IMPORT_C TBool | OnRedirection() |
pure virtual void | OnResponseHeaders() |
virtual IMPORT_C void | OnTransferProgress(TInt, TInt) |
virtual IMPORT_C void | OnWarning(TInt) |
IMPORT_C THttpHeaderElementIterator | ResponseHeader(TInt) |
IMPORT_C THttpHeaderElementIterator | ResponseHeader(const TDesC8 &) |
IMPORT_C THttpHeaderIterator | ResponseHeaders() |
IMPORT_C TInt | SendRequest() |
IMPORT_C TInt | SetContentSink(MHttpContentSink &) |
IMPORT_C TInt | SetContentSink(RFile &) |
IMPORT_C TInt | SetContentSource(MHttpContentSource &) |
IMPORT_C TInt | SetContentSource(RFile &) |
IMPORT_C void | SetNoRetry() |
IMPORT_C void | SetRequestTimeout(TInt) |
IMPORT_C void | SetResponseTimeout(TInt) |
IMPORT_C TInt | StatusCode() |
IMPORT_C const TDesC8 & | StatusText() |
Detailed Description
In HTTP terms a single transaction is one request and its equivalent response. CHttpClientTransaction encapsulates the information for the transaction. The client transaction is associated with the client session. Client should derive from this class and implement the concrete use cases. [for ex; download, upload etc..]
Constructor & Destructor Documentation
CHttpClientTransaction ( )
IMPORT_C | CHttpClientTransaction | ( | ) | [protected] |
~CHttpClientTransaction ( )
IMPORT_C | ~CHttpClientTransaction | ( | ) | [virtual] |
Member Function Documentation
AddCustomRequestHeader ( const TDesC8 &, const TDesC8 & )
IMPORT_C TInt | AddCustomRequestHeader | ( | const TDesC8 & | aHeaderName, |
| const TDesC8 & | aHeaderValue |
| ) | |
AddRequestHeader ( TInt, const THttpHeaderValueVariant & )
AddRequestHeader ( TInt, const THttpHeaderValueVariant &, TInt, const THttpHeaderValueVariant & )
AddRequestHeader ( const TDesC8 &, const THttpHeaderValueVariant & )
AddRequestHeader ( const TDesC8 &, const THttpHeaderValueVariant &, const TDesC8 &, const THttpHeaderValueVariant & )
AddRequestHeader ( const TDesC8 &, const TDesC8 &, const THttpHeaderValueVariant & )
CancelRequest ( )
IMPORT_C void | CancelRequest | ( | ) | |
Create ( CHttpService &, const TDesC8 &, const TDesC8 & )
Create the HTTP transaction by specifiying the method [GET, POST etc..] and a URI
Parameter | Description | aClient | - CHttpService instance |
aMethod | - HTTP method. [GET, POST etc...] |
aUri | - URI |
Returns: KErrNoMemory incase of failure otherwise KErrNone for success
DisablePipelining ( )
IMPORT_C void | DisablePipelining | ( | ) | |
Disable the pipelining for this transaction. The transaction will be send on a free TCP connection and no other transactions will be send via that TCP connection till the response for this transaction is received
OnCompletion ( )
void | OnCompletion | ( | ) | [pure virtual] |
OnError ( TInt )
void | OnError | ( | TInt | aError | ) | [pure virtual] |
OnRedirection ( )
IMPORT_C TBool | OnRedirection | ( | ) | [virtual] |
OnResponseHeaders ( )
void | OnResponseHeaders | ( | ) | [pure virtual] |
OnTransferProgress ( TInt, TInt )
IMPORT_C void | OnTransferProgress | ( | TInt | aTotal, |
| TInt | aTransffered |
| ) | [virtual] |
OnWarning ( TInt )
IMPORT_C void | OnWarning | ( | TInt | aWarning | ) | [virtual] |
ResponseHeader ( const TDesC8 & )
SendRequest ( )
IMPORT_C TInt | SendRequest | ( | ) | |
SetContentSink ( MHttpContentSink & )
Set the dynamic HTTP content sink
SetContentSink ( RFile & )
Set the static HTTP content sink
Parameter | Description | aFile | - An opened file |
SetContentSource ( MHttpContentSource & )
Set the dynamic HTTP content source.
SetContentSource ( RFile & )
Set the static HTTP content source.
Parameter | Description | aFile | - An opened file |
SetNoRetry ( )
IMPORT_C void | SetNoRetry | ( | ) | |
Disable automatic retry on a TCP connection failure. On TCP connection failure the error will be notified via OnError function
SetRequestTimeout ( TInt )
IMPORT_C void | SetRequestTimeout | ( | TInt | aValue | ) | |
Set the HTTP request timeout. If the HTTP request didn't send in the specified time OnError will be called with an error code
Parameter | Description | aValue | - Request timeout value |
SetResponseTimeout ( TInt )
IMPORT_C void | SetResponseTimeout | ( | TInt | aValue | ) | |
Set the HTTP response timeout. If the HTTP response didn't arrive in the specified time OnError will be called with an error code
StatusCode ( )
IMPORT_C TInt | StatusCode | ( | ) | const |
Returns HTTP response status code
StatusText ( )
IMPORT_C const TDesC8 & | StatusText | ( | ) | const |
Returns HTTP response status text