THTTPEvent Class Reference

#include <mw/http/thttpevent.h>

class THTTPEvent

Detailed Description

A HTTP status message. Status messages consist of a UID and a status code within that UID. Extension dlls that needs to create new status messages should use their own UID and create status codes within that UID.

Member Attribute Documentation

iIsSessionEventFlag

TBool iIsSessionEventFlag[protected]

Flag to indicate whether the event is a session event

iStatus

TInt iStatus

The status value.

iUID

TUint iUID

The UID.

Member Enumeration Documentation

Enum TDirection

The TDirection type defines the direction of an event. An outgoing event originates from the client or from filters. The clients do not send these explicitly since the API methods of RHTTPTransaction or RHTTPSession do it on their behalf. Incoming events originate from the protocol handler or from filters, and clients should handle these.

EnumeratorValueDescription
EOutgoing

An event originating with the client (e.g. start transaction).

EIncoming

An event originating with the server (e.g. something received).

Enum TStandardEvent

The TStandardEvent type is used to specify a family of event types. Any negative event number is used to convey error codes. All events are incoming (originate with the origin server) unless otherwise indicated. Outgoing messages will not be seen by the MHTTPTransactionCallback's MHFRunL.

EnumeratorValueDescription
EAllKRequestPending + 1

Used when registering filter to indicate the filter is instrested in ALL events, both transaction and session events.

EAnyTransactionEventKRequestPending

Used when registering filters to indicate the filter is interested in any transaction event, from any direction.

EAnySessionEventKSessionEventBaseStatus

Used when registering filters to indicate the filter is interested in any session event.

Enum TTransactionEvent

The TTransactionEvents type defines the events that correspond to transactions. Outgoing events originate from the client or from filters. The clients do not send these explicitly since the API methods of RHTTPTransaction do it on their behalf. Incoming events originate from the protocol handler or from filters, and clients should handle these. The ESucceeded and EFailed events are mutually exclusive, but one will always be sent to the client as the final event for a transaction.

EnumeratorValueDescription
ESubmitKTransactionEventBaseStatus

The transaction is being submitted. An outgoing event.

ECancelKTransactionEventBaseStatus + 1

The transaction is being cancelled. An outgoing event.

ENotifyNewRequestBodyPartKTransactionEventBaseStatus + 2

A new part of request body data is available for transmission. An outgoing event

EClosedKTransactionEventBaseStatus + 3

The transaction is being closed. An outgoing event.

EGotResponseHeadersKTransactionEventBaseStatus + 4

All the response headers have been received. An incoming event.

EGotResponseBodyDataKTransactionEventBaseStatus + 5

Some (more) body data has been received (in the HTTP response). An incoming event.

EResponseCompleteKTransactionEventBaseStatus + 6

The transaction's response is complete. An incoming event.

EGotResponseTrailerHeadersKTransactionEventBaseStatus + 7

Some trailer headers have been received. An incoming event.

ESucceededKTransactionEventBaseStatus + 8

The transaction has succeeded. An incoming event.

EFailedKTransactionEventBaseStatus + 9

The transaction has failed. This is a 'catch-all' for communicating failures, and more details of the failure should have been notified in previous messages or status codes. If the client could process these then it is possible that it should not consider the transaction a failure. For instance a browser that displays the body of 404 responses to the user would not consider a 404 response to be a failure, as it would display it just like a 200 response even though a 404 will be flagged as a 'failure'. An incoming event.

EUnrecoverableErrorKTransactionEventBaseStatus + 10

Generated from RHTTPTransaction::Fail(). A filter has failed in a way that prevents it from using the normal event mechanism to inform the client of the error. This probably means it's run out of memory. An incoming event.

ETooMuchRequestDataKTransactionEventBaseStatus + 11

An event that indicates that there is too much request data to be sent. The transaction will subsequently be cancelled. An incoming event.

ERedirectRequiresConfirmationKTransactionEventBaseStatus + 12

If the returned status code for a transaciton is either 301, 302 or 307 and the requested method is NOT a GET or HEAD, then the filter sends the client an event ERedirectRequiresConfirmation as stated in RFC2616.

On receiving this event, the transaction is already setup with the redirected URI and the client is required to make the decision to whether to submit the transaction or close the transaction.

If the requested method is GET or HEAD the transaction is automatically redirected and this event is not used.

ENeedTunnelKTransactionEventBaseStatus + 13

A transaction has been specified to use a proxy and the request requires a tunnel to be establised to the origin server.

EGetCipherSuiteKTransactionEventBaseStatus + 14

The client wishes to view the current cipher suite.

ERequestCompleteKTransactionEventBaseStatus + 15

The transaction's request is complete. An incoming event.

EReceived100ContinueKTransactionEventBaseStatus + 16

An event to signal that 100 Continue response has been received.

ECancelWaitFor100ContinueKTransactionEventBaseStatus + 17

An event to cancel the wait for a 100-Continue event.

ESendTimeOutKTransactionEventBaseStatus + 18

An event of Send Timeout for a Request.

EReceiveTimeOutKTransactionEventBaseStatus + 19

An event of Receive Timeout for a Response.

ESuspendKTransactionEventBaseStatus +20

An event that indicate that transaction Suspended.

EResumeKTransactionEventBaseStatus +21

An event that indicate that transaction Resume.

Enum TTransactionWarning

The TTransactionWarning type indicates that something in a transaction may be incorrect but the transaction may continue. It may also indicate that something (e.g. a filter) may have performed an action that has changed the transaction and that the client should be informed of this.

EnumeratorValueDescription
ERedirectedPermanentlyKTransactionWarningBaseStatus

An event indicating that the transaction has been redirected and the original origin server indicated that it was a permanent redirection. The URI for the transaction is now the redirected location. A permanent redirection may require further client behavior if the request came from a stored URI. This is to avoid further redirections on subsequent requests for this resource.

ERedirectedTemporarilyKTransactionWarningBaseStatus + 1

An event indicating that the transaction has been redirected and the original server indicated that it was a temporary redirection.

EMoreDataReceivedThanExpectedKTransactionWarningBaseStatus + 2

An event generated by the Protocol Handler when it receives a Content- Length value that does not match the actual length of the body data.

Constructor & Destructor Documentation

THTTPEvent ( TInt, TUint )

THTTPEvent(TIntaStatus,
TUintaUID =  KHTTPUid
)[inline]

Constructor

ParameterDescription
aStatusThe status value.
aUIDThe UID.

THTTPEvent ( TStandardEvent )

THTTPEvent(TStandardEventaStatus = EAnyTransactionEvent)[inline]

Constructor (using a standard event and the HTTP UID)

ParameterDescription
aStatusThe standard event to use.

THTTPEvent ( TTransactionEvent )

THTTPEvent(TTransactionEventaStatus)[inline]

Constructor (using a transaction event and the HTTP UID)

ParameterDescription
aStatusThe transaction event to use.

Member Function Documentation

IsSessionEvent ( )

TBool IsSessionEvent()const [inline]

Returns: ETrue if the event is a session event

operator!= ( THTTPEvent )

TBool operator!=(THTTPEventaThat)const [inline]

Inequality operator

Returns: ETrue if the HTTP event objects are not equal.

operator!= ( TStandardEvent )

TBool operator!=(TStandardEventaStatus)const [inline]

Inequality operator (compares with a standard event)

Returns: ETrue if the standard event objects are not equal.

operator!= ( TTransactionEvent )

TBool operator!=(TTransactionEventaStatus)const [inline]

Inequality operator (compares with a transaction event)

Returns: ETrue if the transaction event objects are not equal.

operator= ( TStandardEvent )

THTTPEvent &operator=(TStandardEventaStatus)[inline]

Assigns a standard event code to an event object

ParameterDescription
aStatusThe standard event.

Returns: The HTTP event object.

operator= ( TTransactionEvent )

THTTPEvent &operator=(TTransactionEventaStatus)[inline]

Assigns a transaction event code to an event object

ParameterDescription
aStatusThe transaction event.

Returns: The HTTP event object.

operator== ( THTTPEvent )

TBool operator==(THTTPEventaThat)const [inline]

Equality operator

Returns: ETrue if the HTTP event objects are equal.

operator== ( TStandardEvent )

TBool operator==(TStandardEventaStatus)const [inline]

Equality operator (compares with a standard event)

Returns: ETrue if the standard event objects are equal.

operator== ( TTransactionEvent )

TBool operator==(TTransactionEventaStatus)const [inline]

Equality operator (compares with a transaction event)

Returns: ETrue if the transaction event objects are equal.