THTTPEvent Class Reference

class THTTPEvent

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.

Public Member Functions
THTTPEvent(TInt, TUint)
THTTPEvent(TStandardEvent)
THTTPEvent(TTransactionEvent)
TBool IsSessionEvent()
TBool operator!=(THTTPEvent)
TBool operator!=(TStandardEvent)
TBool operator!=(TTransactionEvent)
THTTPEvent &operator=(TStandardEvent)
THTTPEvent &operator=(TTransactionEvent)
TBool operator==(THTTPEvent)
TBool operator==(TStandardEvent)
TBool operator==(TTransactionEvent)
Public Member Enumerations
enumTDirection { EOutgoing, EIncoming }
enumTStandardEvent { EAll = KRequestPending + 1, EAnyTransactionEvent = KRequestPending, EAnySessionEvent = KSessionEventBaseStatus }
enumTTransactionEvent {
ESubmit = KTransactionEventBaseStatus, ECancel = KTransactionEventBaseStatus + 1, ENotifyNewRequestBodyPart = KTransactionEventBaseStatus + 2, EClosed = KTransactionEventBaseStatus + 3, EGotResponseHeaders = KTransactionEventBaseStatus + 4, EGotResponseBodyData = KTransactionEventBaseStatus + 5, EResponseComplete = KTransactionEventBaseStatus + 6, EGotResponseTrailerHeaders = KTransactionEventBaseStatus + 7, ESucceeded = KTransactionEventBaseStatus + 8, EFailed = KTransactionEventBaseStatus + 9, EUnrecoverableError = KTransactionEventBaseStatus + 10, ETooMuchRequestData = KTransactionEventBaseStatus + 11, ERedirectRequiresConfirmation = KTransactionEventBaseStatus + 12, ENeedTunnel = KTransactionEventBaseStatus + 13, EGetCipherSuite = KTransactionEventBaseStatus + 14, ERequestComplete = KTransactionEventBaseStatus + 15, EReceived100Continue = KTransactionEventBaseStatus + 16, ECancelWaitFor100Continue = KTransactionEventBaseStatus + 17, ESendTimeOut = KTransactionEventBaseStatus + 18, EReceiveTimeOut = KTransactionEventBaseStatus + 19, ESuspend = KTransactionEventBaseStatus +20, EResume = KTransactionEventBaseStatus +21
}
enumTTransactionWarning { ERedirectedPermanently = KTransactionWarningBaseStatus, ERedirectedTemporarily = KTransactionWarningBaseStatus + 1, EMoreDataReceivedThanExpected = KTransactionWarningBaseStatus + 2 }
Public Attributes
TInt iStatus
TUint iUID
Protected Attributes
TBool iIsSessionEventFlag

Constructor & Destructor Documentation

THTTPEvent(TInt, TUint)

THTTPEvent(TIntaStatus,
TUintaUID =  KHTTPUid
)[inline]

Constructor

Parameters

TInt aStatusThe status value.
TUint aUID =  KHTTPUid The UID.

THTTPEvent(TStandardEvent)

THTTPEvent(TStandardEventaStatus = EAnyTransactionEvent)[inline]

Constructor (using a standard event and the HTTP UID)

Parameters

TStandardEvent aStatus = EAnyTransactionEventThe standard event to use.

THTTPEvent(TTransactionEvent)

THTTPEvent(TTransactionEventaStatus)[inline]

Constructor (using a transaction event and the HTTP UID)

Parameters

TTransactionEvent aStatusThe transaction event to use.

Member Functions Documentation

IsSessionEvent()

TBool IsSessionEvent()const [inline]

ETrue if the event is a session event

operator!=(THTTPEvent)

TBool operator!=(THTTPEventaThat)const [inline]

Inequality operator ETrue if the HTTP event objects are not equal.

Parameters

THTTPEvent aThat

operator!=(TStandardEvent)

TBool operator!=(TStandardEventaStatus)const [inline]

Inequality operator (compares with a standard event) ETrue if the standard event objects are not equal.

Parameters

TStandardEvent aStatus

operator!=(TTransactionEvent)

TBool operator!=(TTransactionEventaStatus)const [inline]

Inequality operator (compares with a transaction event) ETrue if the transaction event objects are not equal.

Parameters

TTransactionEvent aStatus

operator=(TStandardEvent)

THTTPEvent &operator=(TStandardEventaStatus)[inline]

Assigns a standard event code to an event object The HTTP event object.

Parameters

TStandardEvent aStatusThe standard event.

operator=(TTransactionEvent)

THTTPEvent &operator=(TTransactionEventaStatus)[inline]

Assigns a transaction event code to an event object The HTTP event object.

Parameters

TTransactionEvent aStatusThe transaction event.

operator==(THTTPEvent)

TBool operator==(THTTPEventaThat)const [inline]

Equality operator ETrue if the HTTP event objects are equal.

Parameters

THTTPEvent aThat

operator==(TStandardEvent)

TBool operator==(TStandardEventaStatus)const [inline]

Equality operator (compares with a standard event) ETrue if the standard event objects are equal.

Parameters

TStandardEvent aStatus

operator==(TTransactionEvent)

TBool operator==(TTransactionEventaStatus)const [inline]

Equality operator (compares with a transaction event) ETrue if the transaction event objects are equal.

Parameters

TTransactionEvent aStatus

Member Enumerations 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.

Enumerators

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.

Enumerators

EAll = KRequestPending + 1

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

EAnyTransactionEvent = KRequestPending

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

EAnySessionEvent = KSessionEventBaseStatus

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.

Enumerators

ESubmit = KTransactionEventBaseStatus

The transaction is being submitted. An outgoing event.

ECancel = KTransactionEventBaseStatus + 1

The transaction is being cancelled. An outgoing event.

ENotifyNewRequestBodyPart = KTransactionEventBaseStatus + 2

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

EClosed = KTransactionEventBaseStatus + 3

The transaction is being closed. An outgoing event.

EGotResponseHeaders = KTransactionEventBaseStatus + 4

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

EGotResponseBodyData = KTransactionEventBaseStatus + 5

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

EResponseComplete = KTransactionEventBaseStatus + 6

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

EGotResponseTrailerHeaders = KTransactionEventBaseStatus + 7

Some trailer headers have been received. An incoming event.

ESucceeded = KTransactionEventBaseStatus + 8

The transaction has succeeded. An incoming event.

EFailed = KTransactionEventBaseStatus + 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.

EUnrecoverableError = KTransactionEventBaseStatus + 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.

ETooMuchRequestData = KTransactionEventBaseStatus + 11

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

ERedirectRequiresConfirmation = KTransactionEventBaseStatus + 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.

ENeedTunnel = KTransactionEventBaseStatus + 13

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

EGetCipherSuite = KTransactionEventBaseStatus + 14

The client wishes to view the current cipher suite.

ERequestComplete = KTransactionEventBaseStatus + 15

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

EReceived100Continue = KTransactionEventBaseStatus + 16

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

ECancelWaitFor100Continue = KTransactionEventBaseStatus + 17

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

ESendTimeOut = KTransactionEventBaseStatus + 18

An event of Send Timeout for a Request.

EReceiveTimeOut = KTransactionEventBaseStatus + 19

An event of Receive Timeout for a Response.

ESuspend = KTransactionEventBaseStatus +20

An event that indicate that transaction Suspended.

EResume = KTransactionEventBaseStatus +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.

Enumerators

ERedirectedPermanently = KTransactionWarningBaseStatus

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.

ERedirectedTemporarily = KTransactionWarningBaseStatus + 1

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

EMoreDataReceivedThanExpected = KTransactionWarningBaseStatus + 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.

Member Data Documentation

TBool iIsSessionEventFlag

TBool iIsSessionEventFlag[protected]

Flag to indicate whether the event is a session event

TInt iStatus

TInt iStatus

The status value.

TUint iUID

TUint iUID

The UID.