#include <mw/http/rhttptransaction.h>
Link against: http.lib
class RHTTPTransaction |
Public Member Functions | |
---|---|
RHTTPTransaction() | |
IMPORT_C void | Cancel(THTTPFilterHandle) |
IMPORT_C RString | CipherSuite() |
IMPORT_C void | Close() |
IMPORT_C void | Fail(THTTPFilterHandle) |
IMPORT_C MHttpDataOptimiser * | HttpDataOptimiser() |
IMPORT_C TInt | Id() |
IMPORT_C void | NotifyNewRequestBodyPartL(THTTPFilterHandle) |
IMPORT_C RHTTPTransactionPropertySet | PropertySet() |
IMPORT_C RHTTPRequest | Request() |
IMPORT_C RHTTPResponse | Response() |
IMPORT_C TInt | SendEvent(THTTPEvent, THTTPEvent::TDirection, THTTPFilterHandle) |
IMPORT_C void | SendEventL(THTTPEvent, THTTPEvent::TDirection, THTTPFilterHandle) |
IMPORT_C TInt | ServerCert(TCertInfo &) |
IMPORT_C const CCertificate * | ServerCert() |
IMPORT_C RHTTPSession | Session() |
IMPORT_C void | SetupHttpDataOptimiser(MHttpDataOptimiser &) |
IMPORT_C TInt | Submit(THTTPFilterHandle) |
IMPORT_C void | SubmitL(THTTPFilterHandle) |
TBool | operator!=(RHTTPTransaction) |
TBool | operator==(RHTTPTransaction) |
A HTTP Transaction. This encapsulates 1 HTTP request and response. A Transaction is associated with a session, and must be created using the session's CreateTransactionL method.
See also: RHTTPSession RHTTPSession::CreateTransactionL
IMPORT_C void | Cancel | ( | THTTPFilterHandle | aStart = THTTPFilterHandle::EClient | ) |
Cancels the transaction.
Parameters | |
---|---|
aStart | The entity that is initiating the cancel (defaults to the client). See THTTPFilterHandle for the values this can take. |
IMPORT_C RString | CipherSuite | ( | ) |
Obtain the cipher suite information for this transaction.
IMPORT_C void | Close | ( | ) |
Closes the transaction and frees all owned resources. Transactions must be opened using RHTTPSession::OpenTransactionL. It is also closed when you close the session.
IMPORT_C void | Fail | ( | THTTPFilterHandle | aStart = THTTPFilterHandle::ECurrentFilter | ) |
This function should be called by filters when they have failed due to running out of memory. It cancels the transaction and sends the synchronous events EUnrecoverableError and EFailed to the client to inform it of the failure. For instance in a filter that attempts to send an event to the client from a MHFRunError to inform the client of a failure, if the call to SendEventL leaves, Fail() may be used to 'give up'.
IMPORT_C MHttpDataOptimiser * | HttpDataOptimiser | ( | ) |
Returns the object of the MHttpDataOptimiser implementation class.
IMPORT_C TInt | Id | ( | ) | const |
Obtain this transaction's ID, which is unique within its session. This is mostly used for producing a slightly-meaningful way of identifying transactions in logging code.
IMPORT_C void | NotifyNewRequestBodyPartL | ( | THTTPFilterHandle | aStart = THTTPFilterHandle::EClient | ) |
Notify HTTP of the availability of more request body data, when submitting body data in several parts.
Parameters | |
---|---|
aStart | The filter supplying the new data. This will almost always be the client (default value) |
Leave Codes | |
---|---|
KErrNoMemory | There was not enough memory. |
IMPORT_C RHTTPTransactionPropertySet | PropertySet | ( | ) | const |
Returns the transaction's property set. This is used by filters to store transaction-specific information, and by clients to specify things like reload or no cache behaviour.
IMPORT_C RHTTPRequest | Request | ( | ) | const |
IMPORT_C RHTTPResponse | Response | ( | ) | const |
Gets the response. Note that the returned response may not be valid if it hasn't been created yet.
See also: RHTTPMessage::IsValid()
IMPORT_C TInt | SendEvent | ( | THTTPEvent | aStatus, |
THTTPEvent::TDirection | aDirection, | |||
THTTPFilterHandle | aStart | |||
) |
IMPORT_C void | SendEventL | ( | THTTPEvent | aStatus, |
THTTPEvent::TDirection | aDirection, | |||
THTTPFilterHandle | aStart | |||
) |
Parameters | |
---|---|
aStatus | The status message to send. |
aDirection | The direction down the filter queue that this event will be propogated. |
Leave Codes | |
---|---|
KErrNoMemory | There was not enough memory. |
IMPORT_C TInt | ServerCert | ( | TCertInfo & | aServerCert | ) |
Obtain the server certificate information for this transaction. This function should only be used for text-mode, for WSP use RHttpSession::ServerCert.
See also: RHttpSession::ServerCert
v9.2 onwards - maintained for compatibility with v9.1 and before TCertInfo has been deprecated since v9.2. CCertificate may be used as an alternative.
Parameters | |
---|---|
aServerCert | A client supplied object into which the certificate information will be placed. |
IMPORT_C const CCertificate * | ServerCert | ( | ) |
Obtain the server certificate information for this transaction. This function should only be used for HTTP. WSP should use RHttpSession::ServerCert.
See also: RHttpSession::ServerCert
IMPORT_C RHTTPSession | Session | ( | ) | const |
IMPORT_C void | SetupHttpDataOptimiser | ( | MHttpDataOptimiser & | aHttpOptimiser | ) |
Sets the HTTP data optimiser for the transaction.
Parameters | |
---|---|
aHttpOptimiser | An object of the implementation of interface, MHttpDataOptimiser, supplied by the client. |
IMPORT_C TInt | Submit | ( | THTTPFilterHandle | aStart = THTTPFilterHandle::EClient | ) |
IMPORT_C void | SubmitL | ( | THTTPFilterHandle | aStart = THTTPFilterHandle::EClient | ) |
Leave Codes | |
---|---|
KErrNoMemory | There was not enough memory. |
TBool | operator!= | ( | RHTTPTransaction | aTrans | ) | const [inline] |
Inequality operator
Parameters | |
---|---|
aTrans | The transaction to compare this one to. |
TBool | operator== | ( | RHTTPTransaction | aTrans | ) | const [inline] |
Equality operator to check if this transaction is the same as that one.
Parameters | |
---|---|
aTrans | The transaction to compare this one to. |