RHTTPTransaction Class Reference
#include
<mw/http/rhttptransaction.h>
Detailed Description
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
Constructor & Destructor Documentation
RHTTPTransaction ( )
RHTTPTransaction | ( | ) | [inline] |
Default (uninitialised) constructor
Member Function Documentation
Cancel ( THTTPFilterHandle )
Parameter | Description | aStart | The entity that is initiating the cancel (defaults to the client). See THTTPFilterHandle for the values this can take. |
CipherSuite ( )
Obtain the cipher suite information for this transaction.
Returns: RString containing the cipher suite as per RFC2246.
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.
Fail ( THTTPFilterHandle )
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'.
Id ( )
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.
Returns: The transaction ID.
NotifyNewRequestBodyPartL ( THTTPFilterHandle )
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.
-
leave
- KErrNoMemory There was not enough memory.
Parameter | Description | aStart | The filter supplying the new data. This will almost always be the client (default value) |
PropertySet ( )
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.
Response ( )
Gets the response. Note that the returned response may not be valid if it hasn't been created yet.
See also: RHTTPMessage::IsValid()
SendEvent ( THTTPEvent, THTTPEvent::TDirection, THTTPFilterHandle )
SendEventL ( THTTPEvent, THTTPEvent::TDirection, THTTPFilterHandle )
Sends a status message to all relevant filters. This function is predominantly used by filters, rather than by the client.
- leave
- KErrNoMemory There was not enough memory.
Parameter | Description | aStatus | The status message to send. |
aDirection | The direction down the filter queue that this event will be propogated. |
ServerCert ( TCertInfo & )
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
Deprecated
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.
Parameter | Description | aServerCert | A client supplied object into which the certificate information will be placed. |
Returns: KErrNone if certificate has been completed, KErrNotSupported if this function is called for WSP.
ServerCert ( )
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
Returns: a CCertificate pointer to an CX509Certificate object. Calling code can safely cast to CX509Certificate if using "HTTP/TCP". NULL returned if certificate information not found.
SetupHttpDataOptimiser ( MHttpDataOptimiser & )
Sets the HTTP data optimiser for the transaction.
Parameter | Description | aHttpOptimiser | An object of the implementation of interface, MHttpDataOptimiser, supplied by the client. |
Submit ( THTTPFilterHandle )
SubmitL ( THTTPFilterHandle )
Submits a transaction. Once all the headers and other details have been set up, this call actualy causes the request to be made.
- leave
- KErrNoMemory There was not enough memory.
operator!= ( RHTTPTransaction )
Parameter | Description | aTrans | The transaction to compare this one to. |
operator== ( RHTTPTransaction )
Equality operator to check if this transaction is the same as that one.
Parameter | Description | aTrans | The transaction to compare this one to. |