|
|
|
Location:
http\RHTTPTransaction.h
Link against: http.lib
class RHTTPTransaction
Supported from 7.0
A transport framework transaction.
A transaction encapsulates a request and a response. It is associated with a session, and must be created using RHTTPSession::OpenTransactionL().
Defined in RHTTPTransaction:
Cancel(), Close(), Fail(), Id(), NotifyNewRequestBodyPartL(), PropertySet(), RHTTPTransaction(), Request(), Response(), SendEventL(), ServerCert(), Session(), SubmitL(), iImplementation, operator!=(), operator==()
void SubmitL(THTTPFilterHandle aStart=THTTPFilterHandle::EClient);
Submits a transaction.
After the headers and other details have been set up, use this function to make the request.
|
|
void NotifyNewRequestBodyPartL(THTTPFilterHandle aStart=THTTPFilterHandle::EClient);
Notifies the framework of the availability of more request body data.
This is used when submitting body data in several parts.
|
|
void SendEventL(THTTPEvent aStatus, THTTPEvent::TDirection aDirection, THTTPFilterHandle aStart);
Sends an event to all relevant filters.
This function is predominantly used by filters, rather than by the client.
|
|
RHTTPResponse Response() const;
Gets the transaction response.
Note that the returned response may not be valid if it has not been created yet.
|
RHTTPRequest Request() const;
Gets the transaction request.
|
RHTTPSession Session() const;
Gets the transport framework session in use.
|
RHTTPTransactionPropertySet PropertySet() const;
Gets the transaction's property set.
This is used by filters to store transaction-specific information, and by clients to specify properties such as reload or no cache behaviour.
|
void Cancel(THTTPFilterHandle aStart=THTTPFilterHandle::EClient);
Cancels the transaction.
|
void Close();
Closes the transaction and frees all owned resources.
Transactions must be opened using RHTTPSession::OpenTransactionL().
Transactions are also closed when you close their session.
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.
An example use would be 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() can be used to abort.
|
TBool operator ==(RHTTPTransaction aTrans) const;
Equality operator.
|
|
TBool operator !=(RHTTPTransaction aTrans) const;
Inequality operator.
|
|
TInt Id() const;
Gets this transaction's ID, which is unique within its session.
This is mostly used to identify transactions in logging code.
|
TInt ServerCert(TCertInfo& aServerCert);
Obtains the server certificate information for this transaction.
This function should only be used for HTTP. For WSP, use RHttpSession::ServerCert().
|
|
private: CTransaction* iImplementation;
This is internal and not intended for use.