CHttpClientTransaction Class Reference
class CHttpClientTransaction : public CBase
|
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..]
Public Member Functions
|
|
~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
()
|
void
|
OnCompletion
()
|
void
|
OnError
(
TInt
)
|
IMPORT_C
TBool
|
OnRedirection
()
|
void
|
OnResponseHeaders
()
|
IMPORT_C void
|
OnTransferProgress
(
TInt
,
TInt
)
|
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
()
|
Constructor & Destructor Documentation
CHttpClientTransaction()
IMPORT_C
|
CHttpClientTransaction
|
(
|
)
|
[protected]
|
~CHttpClientTransaction()
IMPORT_C
|
~CHttpClientTransaction
|
(
|
)
|
[virtual]
|
Member Functions 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
Parameters
CHttpService
& aClient
|
- CHttpService instance
|
const
TDesC8
& aMethod
|
- HTTP method. [GET, POST etc...]
|
const
TDesC8
& aUri
|
- URI
|
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]
|
Reserved1()
void
|
Reserved1
|
(
|
)
|
[private, inline, virtual]
|
Reserved2()
void
|
Reserved2
|
(
|
)
|
[private, inline, virtual]
|
ResponseHeader(const TDesC8 &)
SendRequest()
IMPORT_C
TInt
|
SendRequest
|
(
|
)
|
|
SetContentSink(MHttpContentSink &)
Set the dynamic
HTTP
content sink
SetContentSink(RFile &)
IMPORT_C
TInt
|
SetContentSink
|
(
|
RFile
&
|
aFile
|
)
|
|
Set the static
HTTP
content sink
Parameters
RFile
& aFile
|
- An opened file
|
SetContentSource(MHttpContentSource &)
Set the dynamic
HTTP
content source.
SetContentSource(RFile &)
IMPORT_C
TInt
|
SetContentSource
|
(
|
RFile
&
|
aFile
|
)
|
|
Set the static
HTTP
content source.
Parameters
RFile
& 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
Parameters
TInt
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
Member Data Documentation
CHttpClientTransactionImpl * iHttpClientTrans
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.