RHTTPTransaction Class Reference

class 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. RHTTPSession RHTTPSession::CreateTransactionL

Constructor & Destructor Documentation

RHTTPTransaction()

RHTTPTransaction()[inline]

Default (uninitialised) constructor

Member Functions Documentation

Cancel(THTTPFilterHandle)

IMPORT_C voidCancel(THTTPFilterHandleaStart = THTTPFilterHandle::EClient)

Cancels the transaction.

Parameters

THTTPFilterHandle aStart = THTTPFilterHandle::EClientThe entity that is initiating the cancel (defaults to the client). See THTTPFilterHandle for the values this can take.

CipherSuite()

IMPORT_C RStringCipherSuite()

Obtain the cipher suite information for this transaction.

Close()

IMPORT_C voidClose()

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)

IMPORT_C voidFail(THTTPFilterHandleaStart = 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'.

Parameters

THTTPFilterHandle aStart = THTTPFilterHandle::ECurrentFilter

HttpDataOptimiser()

IMPORT_C MHttpDataOptimiser *HttpDataOptimiser()

Returns the object of the MHttpDataOptimiser implementation class.

Id()

IMPORT_C TIntId()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.

Implementation()

CTransaction *Implementation()[private, inline]

NotifyNewRequestBodyPartL(THTTPFilterHandle)

IMPORT_C voidNotifyNewRequestBodyPartL(THTTPFilterHandleaStart = 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.

Parameters

THTTPFilterHandle aStart = THTTPFilterHandle::EClientThe filter supplying the new data. This will almost always be the client (default value)

PropertySet()

IMPORT_C RHTTPTransactionPropertySetPropertySet()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.

Request()

IMPORT_C RHTTPRequestRequest()const

Response()

IMPORT_C RHTTPResponseResponse()const

Gets the response. Note that the returned response may not be valid if it hasn't been created yet. RHTTPMessage::IsValid()

SendEvent(THTTPEvent, THTTPEvent::TDirection, THTTPFilterHandle)

IMPORT_C TIntSendEvent(THTTPEventaStatus,
THTTPEvent::TDirectionaDirection,
THTTPFilterHandleaStart
)

Parameters

THTTPEvent aStatus
THTTPEvent::TDirection aDirection
THTTPFilterHandle aStart

SendEventL(THTTPEvent, THTTPEvent::TDirection, THTTPFilterHandle)

IMPORT_C voidSendEventL(THTTPEventaStatus,
THTTPEvent::TDirectionaDirection,
THTTPFilterHandleaStart
)
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.

Parameters

THTTPEvent aStatusThe status message to send.
THTTPEvent::TDirection aDirectionThe direction down the filter queue that this event will be propogated.
THTTPFilterHandle aStart

ServerCert(TCertInfo &)

IMPORT_C TIntServerCert(TCertInfo &aServerCert)

Obtain the server certificate information for this transaction. This function should only be used for text-mode, for WSP use RHttpSession::ServerCert. 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

TCertInfo & aServerCertA client supplied object into which the certificate information will be placed.

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. RHttpSession::ServerCert

Session()

IMPORT_C RHTTPSessionSession()const

SetupHttpDataOptimiser(MHttpDataOptimiser &)

IMPORT_C voidSetupHttpDataOptimiser(MHttpDataOptimiser &aHttpOptimiser)

Sets the HTTP data optimiser for the transaction.

Parameters

MHttpDataOptimiser & aHttpOptimiserAn object of the implementation of interface, MHttpDataOptimiser, supplied by the client.

Submit(THTTPFilterHandle)

IMPORT_C TIntSubmit(THTTPFilterHandleaStart = THTTPFilterHandle::EClient)

Parameters

THTTPFilterHandle aStart = THTTPFilterHandle::EClient

SubmitL(THTTPFilterHandle)

IMPORT_C voidSubmitL(THTTPFilterHandleaStart = THTTPFilterHandle::EClient)
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.

Parameters

THTTPFilterHandle aStart = THTTPFilterHandle::EClient

operator!=(RHTTPTransaction)

TBool operator!=(RHTTPTransactionaTrans)const [inline]

Inequality operator

Parameters

RHTTPTransaction aTransThe transaction to compare this one to.

operator==(RHTTPTransaction)

TBool operator==(RHTTPTransactionaTrans)const [inline]

Equality operator to check if this transaction is the same as that one.

Parameters

RHTTPTransaction aTransThe transaction to compare this one to.

Member Data Documentation

CTransaction * iImplementation

CTransaction *iImplementation[private]