Symbian
 Developer Library

DEVELOPER LIBRARY

[Index] [Glossary] [Previous] [Next]



Location: http\RHTTPTransaction.h
Link against: http.lib

Class RHTTPTransaction

class RHTTPTransaction

Support

Supported from 7.0

Description

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==()

See also:


Construction and destruction


RHTTPTransaction()

inline RHTTPTransaction();

Description

Default (uninitialised) constructor.

[Top]


Member Functions


SubmitL()

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

Description

Submits a transaction.

After the headers and other details have been set up, use this function to make the request.

Parameters

THTTPFilterHandle aStart=THTTPFilterHandle::EClient

Handle to the first filter to handle the transaction

Leave codes

KErrNoMemory

Out of memory


NotifyNewRequestBodyPartL()

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

Description

Notifies the framework of the availability of more request body data.

This is used when submitting body data in several parts.

Parameters

THTTPFilterHandle aStart=THTTPFilterHandle::EClient

Handle to the first filter to handle the transaction

Leave codes

KErrNoMemory

Out of memory


SendEventL()

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

Description

Sends an event to all relevant filters.

This function is predominantly used by filters, rather than by the client.

Parameters

THTTPEvent aStatus

The event to send

THTTPEvent::TDirection aDirection

The direction down the filter queue to propogate this event

THTTPFilterHandle aStart

Handle to the first filter to handle this

Leave codes

KErrNoMemory

Out of memory


Response()

RHTTPResponse Response() const;

Description

Gets the transaction response.

Note that the returned response may not be valid if it has not been created yet.

Return value

RHTTPResponse

The response


Request()

RHTTPRequest Request() const;

Description

Gets the transaction request.

Return value

RHTTPRequest

The request


Session()

RHTTPSession Session() const;

Description

Gets the transport framework session in use.

Return value

RHTTPSession

The transport framework session in use


PropertySet()

RHTTPTransactionPropertySet PropertySet() const;

Description

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.

Return value

RHTTPTransactionPropertySet

The transaction's property set


Cancel()

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

Description

Cancels the transaction.

Parameters

THTTPFilterHandle aStart=THTTPFilterHandle::EClient

Handle to the first filter to handle this


Close()

void Close();

Description

Closes the transaction and frees all owned resources.

Transactions must be opened using RHTTPSession::OpenTransactionL().

Transactions are also closed when you close their session.


Fail()

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.

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.

Parameters

THTTPFilterHandle aStart=THTTPFilterHandle::ECurrentFilter

Handle to the first filter to handle this


operator==()

TBool operator ==(RHTTPTransaction aTrans) const;

Description

Equality operator.

Parameters

RHTTPTransaction aTrans

The transaction to compare with

Return value

TBool

ETrue if equal, EFalse if not


operator!=()

TBool operator !=(RHTTPTransaction aTrans) const;

Description

Inequality operator.

Parameters

RHTTPTransaction aTrans

The transaction to compare with

Return value

TBool

ETrue if unequal, EFalse if not


Id()

TInt Id() const;

Description

Gets this transaction's ID, which is unique within its session.

This is mostly used to identify transactions in logging code.

Return value

TInt

The transaction ID


ServerCert()

TInt ServerCert(TCertInfo& aServerCert);

Description

Obtains the server certificate information for this transaction.

This function should only be used for HTTP. 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 the certificate has been completed, KErrNotSupported if the protocol does not support this

[Top]


Internal members

Description

This is internal and not intended for use.


iImplementation

private: CTransaction* iImplementation;

Description

This is internal and not intended for use.