Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <RHTTPTransaction.h>
Link against: http.lib

Class RHTTPTransaction

class RHTTPTransaction;

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.

Members

Defined in RHTTPTransaction:

See also:


Construction and destruction


RHTTPTransaction()

inline RHTTPTransaction();

Description

Default (uninitialised) constructor

[Top]


Member functions


SubmitL(THTTPFilterHandle)

IMPORT_C void SubmitL(THTTPFilterHandle aStart=THTTPFilterHandle::EClient);

Description

Submits a transaction. Once all the headers and other details have been set up, this call actualy causes the request to be made.

Parameters

THTTPFilterHandle aStart

Leave codes

KErrNoMemory

There was not enough memory.


NotifyNewRequestBodyPartL(THTTPFilterHandle)

IMPORT_C void NotifyNewRequestBodyPartL(THTTPFilterHandle aStart=THTTPFilterHandle::EClient);

Description

Notify HTTP of the availability of more request body data, when submitting body data in several parts.

Parameters

THTTPFilterHandle aStart

The filter supplying the new data. This will almost always be the client (default value)

Leave codes

KErrNoMemory

There was not enough memory.


SendEventL(THTTPEvent,THTTPEvent::TDirection,THTTPFilterHandle)

IMPORT_C void SendEventL(THTTPEvent aStatus, THTTPEvent::TDirection aDirection, THTTPFilterHandle aStart);

Description

Sends a status message to all relevant filters. This function is predominantly used by filters, rather than by the client.

Parameters

THTTPEvent aStatus

The status message to send.

THTTPEvent::TDirection aDirection

The direction down the filter queue that this event will be propogated.

THTTPFilterHandle aStart

Leave codes

KErrNoMemory

There was not enough memory.


Response()const

IMPORT_C RHTTPResponse Response() const;

Description

Gets the response. Note that the returned response may not be valid if it hasn't been created yet.

Return value

RHTTPResponse


Request()const

IMPORT_C RHTTPRequest Request() const;

Description

Gets the request.

Return value

RHTTPRequest


Session()const

IMPORT_C RHTTPSession Session() const;

Description

Returns the session associated with the transaction.

Return value

RHTTPSession


PropertySet()const

IMPORT_C RHTTPTransactionPropertySet PropertySet() const;

Description

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.

Return value

RHTTPTransactionPropertySet


Cancel(THTTPFilterHandle)

IMPORT_C void Cancel(THTTPFilterHandle aStart=THTTPFilterHandle::EClient);

Description

Cancels the transaction.

Parameters

THTTPFilterHandle aStart

The entity that is initiating the cancel (defaults to the client). See THTTPFilterHandle for the values this can take.


Close()

IMPORT_C void Close();

Description

Closes the transaction and frees all owned resources. Transactions must be opened using RHTTPSession::OpenTransactionL(const TUriC8 &,MHTTPTransactionCallback &,RStringF). It is also closed when you close the session.


Fail(THTTPFilterHandle)

IMPORT_C void Fail(THTTPFilterHandle aStart=THTTPFilterHandle::ECurrentFilter);

Description

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, RHTTPTransaction::Fail(THTTPFilterHandle) may be used to 'give up'.

Parameters

THTTPFilterHandle aStart


operator==(RHTTPTransaction)const

inline TBool operator==(RHTTPTransaction aTrans) const;

Description

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

Parameters

RHTTPTransaction aTrans

The transaction to compare this one to.

Return value

TBool


operator!=(RHTTPTransaction)const

inline TBool operator!=(RHTTPTransaction aTrans) const;

Description

Inequality operator

Parameters

RHTTPTransaction aTrans

The transaction to compare this one to.

Return value

TBool


Id()const

IMPORT_C TInt Id() const;

Description

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.

Return value

TInt

The transaction ID.


ServerCert(TCertInfo &)

Interface status: 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.

IMPORT_C TInt ServerCert(TCertInfo &aServerCert);

Description

Obtain the server certificate information for this transaction. This function should only be used for text-mode, for WSP use RHttpSession::ServerCert.

Parameters

TCertInfo &aServerCert

A client supplied object into which the certificate information will be placed.

Return value

TInt

KErrNone if certificate has been completed, KErrNotSupported if this function is called for WSP.


CipherSuite()

IMPORT_C RString CipherSuite();

Description

Obtain the cipher suite information for this transaction.

Return value

RString

RString containing the cipher suite as per RFC2246.