GT0128 Hurricane WAP (HTTP) - HTTP Client API Reference.

Owner: | Application Engines Group
Author: | David Harper
Contributers: | Leon Clarke, Paul Hadfield, David Harper, Franco Bellu, Julia Blumin, David Cunado
Last Revised: | 21st March 2002
Revision: | 1.0.0
Status: | Draft
Reviewers: | Urmi Shah, Brian Evans
Approval: | (PM) Urmi Shah, (ESM) Akin Oyesola, (Architect) Brian Evans, (Hurricane Technical Architect) Alastair Bradley

1. Introduction

1.1 Purpose and Scope

The purpose of this document is to provide reference information about the Application Programming Interfaces provided by HTTP Client. The scope of the HTTP Client component is limited to providing HTTP Client support - there is no HTTP server functionality included.

1.2 Revision History

Date | Version | Status | Description
05-Apr-2001 | 0.1 | Draft | First Draft.
17-May-2001 | 0.2 | Issued | Update with Formatting.
07-Jun-2001 | 0.3 | Issued | Candidate for TAPI
06-Jul-2001 | 0.6 | Issued | Candidate for T3 - HTTP Client release 0.6
10-Jul-2001 | 0.7 | Issued | Updates from T3 doc review
24-Jul-2001 | 0.7.2 | Issued | Revised for T4.
19-Nov-2001 | 0.7.3 | Draft | Updated project numbers
21-Mar-2002 | 1.0.1 | Issued | Revised for Hurricane M5

1.3 References

[Ref. 1] Hypertext Transfer Protocol 1.1 [RFC 2616] <http://www.ietf.org/rfc/rfc2616.txt?number=2616>

1.4 Glossary

API | Application Programming Interface
Client | An end user application that establishes connections to server(s) for the purpose exchanging information
HTTP | HyperText Transfer Protocol
HTTP Client | An application representing an end-user that exchanges information with HTTP server(s) by sending HTTP requests and receiving HTTP responses
RFC2616 | HTTP 1.1 Standard
TCP/IP | Transmission Control Protcol/Internet Protocol
WWW | World-Wide Web

1.5 HTTP Client API

The HTTP Client provides an API for use by applications that wish to to communicate with WWW servers or other internet services based on the HTTP protocol. The API provides a set of classes that allow a client implementation to be conditionally compliant to RFC2616.

An introductory API guide is provided that describes each phase of use of the API together with example code - see API Guide - Introduction.

1.6 Class Hierarchy

A reference that describes each of the classes that constitute the HTTP Client API is documented here.

Author : Technical Architect (Browsing),
API documentation auto-generated by Doxygen from the latest commented source.
Copyright © 2001 Symbian Ltd. All rights reserved.


File Index

HTTP API File List

Here is a list of all documented files with brief descriptions:
CAuthenticationFilterInterface.h [code] | @public
CEComFilter.h [code] | @public
HttpStringConstants.h [code] |
mhttpauthenticationcallback.h [code] |
mhttpdatasupplier.h [code] |
mhttpfilter.h [code] |
mhttpfilterbase.h [code] |
MHTTPFilterCreationCallback.h [code] | @public
mhttpsessioneventcallback.h [code] |
mhttptransactioncallback.h [code] |
rhttpconnectioninfo.h [code] |
rhttpfiltercollection.h [code] |
rhttpheaders.h [code] |
rhttpmessage.h [code] |
rhttppropertyset.h [code] |
rhttprequest.h [code] |
rhttpresponse.h [code] |
rhttpsession.h [code] |
RHTTPTransaction.h [code] | @public
rhttptransactionpropertyset.h [code] |
TFilterConfigurationIter.h [code] | @public
TFilterInformation.h [code] | @public
thttpevent.h [code] |
thttpfilterhandle.h [code] |
thttpfilteriterator.h [code] |
thttpfilterregistration.h [code] |
thttphdrfielditer.h [code] |
thttphdrval.h [code] |


CAuthenticationFilterInterface.h File Reference

@public More...

#include <e32base.h>
#include <ecom.h>
#include <http/rhttpsession.h>

Include dependency graph for CAuthenticationFilterInterface.h:

Include dependency graph

Go to the source code of this file.

Compounds

class | CAuthenticationFilterInterface
@public
Since:
7.0 @dependencies CBase, REComSession, RHTTPSession @lib euser.lib ecom.lib The ECOM interface definition for an HTTP authentication filter.
 More...

struct | TAuthenticationParams

Detailed Description

@public

Warning:
: This file contains Rose Model ID comments - please do not delete

Definition in file CAuthenticationFilterInterface.h.


CEComFilter.h File Reference

@public More...

#include <e32base.h>
#include <ecom/ecom.h>
#include <http/rhttpsession.h>

Include dependency graph for CEComFilter.h:

Include dependency graph

Go to the source code of this file.

Compounds

class CEComFilter
@public
Since:
7.0 This class serves as the base class for ECom filter plugins.
 More...

Detailed Description

@public

Warning:
: This file contains Rose Model ID comments - please do not delete

Definition in file CEComFilter.h.


MHTTPFilterCreationCallback.h File Reference

@public More...

Go to the source code of this file.

Compounds

class MHTTPFilterCreationCallback
@public
Since:
7.0 This class serves as a pure virtual interface required as a session callback to the client when the client requires to configure the filters that are installed.
 More...

Detailed Description

@public

Warning:
: This file contains Rose Model ID comments - please do not delete

Definition in file MHTTPFilterCreationCallback.h.


RHTTPTransaction.h File Reference

@public More...

#include <http/thttpevent.h>
#include <http/rhttpresponse.h>
#include <http/rhttprequest.h>
#include <http/rhttptransactionpropertyset.h>
#include <http/thttpfilterhandle.h>

Include dependency graph for RHTTPTransaction.h:

Include dependency graph

Go to the source code of this file.

Compounds

class RHTTPTransaction
@public
Since:
7.0 A HTTP Transaction.
 More...

Detailed Description

@public

Warning:
: This file contains Rose Model ID comments - please do not delete

Definition in file RHTTPTransaction.h.


TFilterConfigurationIter.h File Reference

@public More...

#include <e32std.h>
#include <http/tfilterinformation.h>

Include dependency graph for TFilterConfigurationIter.h:

Include dependency graph

Go to the source code of this file.

Compounds

class TFilterConfigurationIterator
@public @dependancies CHTTPSession, CEComFilter
Since:
7.0 This class can only be created and destroyed by the session.
 More...

Detailed Description

@public

Warning:
: This file contains Rose Model ID comments - please do not delete

Definition in file TFilterConfigurationIter.h.


TFilterInformation.h File Reference

@public More...

Go to the source code of this file.

Compounds

struct TFilterInformation
@public
Since:
7.0 This structure is used by the TFilterConfigurationIterator to hold the information of the current filter.
 More...

Detailed Description

@public

Warning:
: This file contains Rose Model ID comments - please do not delete

Definition in file TFilterInformation.h.


Annotated Index

HTTP API Compound List

Here are the classes, structs, unions and interfaces with brief descriptions:
MHTTPAuthenticationCallback @public
Since:
7.0 The mixin that needs to be implemented if authentication is to be supported
CAuthenticationFilterInterface @public
Since:
7.0 @dependencies CBase, REComSession, RHTTPSession @lib euser.lib ecom.lib The ECOM interface definition for an HTTP authentication filter
RHTTPConnectionInfo @public
Since:
7.0 The RHTTPConnectionInfo is used for setting/getting values used for setting up a connection over a protocol
MHTTPDataSupplier @public
Since:
7.0 A data supplier - This class is used to deliver the response data to the client, and is also used by the client to supply request body data to HTTP in POST transactions
CEComFilter @public
Since:
7.0 This class serves as the base class for ECom filter plugins
THTTPEvent @public
Since:
7.0 A HTTP status message
MHTTPFilter @public
Since:
7.0 A HTTP filter
MHTTPFilterBase @public
Since:
7.0 A HTTP Filter
RHTTPFilterCollection @public
Since:
7.0 A Handle on the filter collection in a session
TFilterConfigurationIterator @public @dependancies CHTTPSession, CEComFilter
Since:
7.0 This class can only be created and destroyed by the session
MHTTPFilterCreationCallback @public
Since:
7.0 This class serves as a pure virtual interface required as a session callback to the client when the client requires to configure the filters that are installed
THTTPFilterHandle @public
Since:
7.0 A Filter registration handle
TFilterInformation @public
Since:
7.0 This structure is used by the TFilterConfigurationIterator to hold the information of the current filter
THTTPFilterIterator @public
Since:
7.0 An iterator for RHTTPFilterCollection
THTTPFilterRegistration @public
Since:
7.0 A registration of a filter in the filter queue
THTTPHdrFieldIter @public
Since:
7.0 Iterator class to iterate the fields within a RHTTPHeaders
THTTPHdrVal @public
Since:
7.0 A representation of a value found in an HTTP header field
RHTTPHeaders @public
Since:
7.0 The collection of headers (or more correctly, header fields) associated with a message
HTTP A String table
RHTTPMessage @public
Since:
7.0 An abstract HTTP message
RHTTPPropertySet @public
Since:
7.0 A set of named THTTPHdrVal objects
RHTTPRequest @public
Since:
7.0 An HTTP Request
RHTTPResponse @public
Since:
7.0 An HTTP Response
RHTTPSession @public
Since:
7.0 A session handle
THTTPSessionEvent @public
Since:
7.0 A HTTP session status message
MHTTPSessionEventCallback @public
Since:
7.0 The per-session callback for receiving session event callbacks
RHTTPTransaction @public
Since:
7.0 A HTTP Transaction
MHTTPTransactionCallback @public
Since:
7.0 The per-transaction callback for receiving HTTP events
RHTTPTransactionPropertySet @public
Since:
7.0 The set of properties of a transaction


MHTTPAuthenticationCallback Class Reference

@public
Since:
7.0 The mixin that needs to be implemented if authentication is to be supported.
More...

#include <mhttpauthenticationcallback.h>

List of all members.

Public Methods

virtual TBool | GetCredentialsL (const TUriC8 &aURI, RString aRealm, RStringF aAuthenticationType, RString &aUsername, RString &aPassword)=0
Gets some credentials.

void | InstallAuthenticationL (RHTTPSession aSession)
Installs the callback into the session.

Detailed Description

@public
Since:
7.0 The mixin that needs to be implemented if authentication is to be supported.

This supplies the username and password when they are needed for authentication. To use, subclass off this class and implement GetCredentialsL. To install the class into a session, call InstallAuthenticationL.

Definition at line 32 of file mhttpauthenticationcallback.h.

Member Function Documentation

virtual TBool MHTTPAuthenticationCallback::GetCredentialsL | ( | const TUriC8 & | aURI,
 |  | RString | aRealm,
 |  | RStringF | aAuthenticationType,
 |  | RString & | aUsername,
 |  | RString & | aPassword
 | ) | [pure virtual]

Gets some credentials.

Note that the first 3 parameters are informational and many clients may not have a use for them. Clients may want to display some or all of these parameters to the user, so that the user knows who they are giving their credentials to, and how securely they will be transmitted.

Parameters:
aURI | The URI being requested
aRealm | The realm being requested
aAuthenticationType | The type of authentication (basic or digest)
aUsername | The username is returned in this parameter. The caller will close the returned string.
aPassword | The password is returned in this parameter The caller will close the returned string.
Returns:
True if credentials have been obtained.
Exceptions:
Anything . If this function leaves the transaction will be failed.

void MHTTPAuthenticationCallback::InstallAuthenticationL ( RHTTPSession aSession ) [inline]

Installs the callback into the session.

Typicaly called from the implementation class's ConstructL().

Precondition:
The session is opened, but no transactions have been created on it
Postcondition:
The session supports authentication, and uses this API to get its credentials.
Parameters:
aSession the session to install the filter into.
Exceptions:
KErrNoMemory There was not enough memory.

Definition at line 70 of file mhttpauthenticationcallback.h.

References CAuthenticationFilterInterface::InstallFilterL().

The documentation for this class was generated from the following file:
  • mhttpauthenticationcallback.h


CAuthenticationFilterInterface Class Reference

@public
Since:
7.0 @dependencies CBase, REComSession, RHTTPSession @lib euser.lib ecom.lib The ECOM interface definition for an HTTP authentication filter.
More...

#include <CAuthenticationFilterInterface.h>

List of all members.

Public Methods

~CAuthenticationFilterInterface ()
Intended Usage: Virtual destructor
Since:
7.0.

Static Public Methods

void InstallFilterL (RHTTPSession &aSession, MHTTPAuthenticationCallback *aCallback)
Intended Usage: This method is used to install the authentication filter to the filter queue.

Detailed Description

@public
Since:
7.0 @dependencies CBase, REComSession, RHTTPSession @lib euser.lib ecom.lib The ECOM interface definition for an HTTP authentication filter.

Implementations of an authentication filter must inherit this class.

Definition at line 32 of file CAuthenticationFilterInterface.h.

Constructor & Destructor Documentation

CAuthenticationFilterInterface::~CAuthenticationFilterInterface ( ) [inline]

Intended Usage: Virtual destructor

Since:
7.0.

Precondition:
The object identified by the destructor key in iEcomDtorID exists
Postcondition:
The object is destroyed

Definition at line 81 of file CAuthenticationFilterInterface.h.

Member Function Documentation

void CAuthenticationFilterInterface::InstallFilterL | ( | RHTTPSession & | aSession,
 |  | MHTTPAuthenticationCallback * | aCallback
 | ) | [inline, static]

Intended Usage: This method is used to install the authentication filter to the filter queue.

The returned pointer is not owned as the filters must be self-destroying when they are unloaded.

Since:
7.0
Parameters:
aSession | A handle to the transport session
aCallback | A pointer to the object implementing the callback function
Returns:
Pointer to the newly installed plugin
Precondition:
The session had already been setup
Postcondition:
The filter(s) have been installed

Definition at line 72 of file CAuthenticationFilterInterface.h.

Referenced by MHTTPAuthenticationCallback::InstallAuthenticationL().

The documentation for this class was generated from the following file:
  • CAuthenticationFilterInterface.h


RHTTPConnectionInfo Class Reference

@public
Since:
7.0 The RHTTPConnectionInfo is used for setting/getting values used for setting up a connection over a protocol.
More...

#include <rhttpconnectioninfo.h>

Inheritance diagram for RHTTPConnectionInfo:

[legend]
Collaboration diagram for RHTTPConnectionInfo:

[legend]
List of all members.

Detailed Description

@public
Since:
7.0 The RHTTPConnectionInfo is used for setting/getting values used for setting up a connection over a protocol.

All methods are inherited directly from RHTTPPropertySet.

To lookup/change any of the following properties, use RHTTPPropertySet::Property(...) and RHTTPPropertySet::SetPropertyL(...)

To remove properties, use RHTTPPropertySet::RemoveProperty(...) for a named property, or RHTTPPropertySet::RemoveAllProperties() for all.

The following values are currently defined. Note that new values could be added by individual filters. In general, properties should be defined before the first transction is created; filters are not obliged to check with the connection info if the values have changed after this point.

HTTP::EProxyUsage (default HTTP::EDoNotUseProxy) (HTTP::EDoNotUseProxy | HTTP::EUseProxy)

HTTP::EProxyAddress (default empty)

HTTP::EMaxNumTransportHandlers (default 4)

HTTP::EMaxNumTransPerTranspHndlr (default 5)

HTTP::EHTTPVersion (default HTTP::EHttp11) (HTTP::EHttp11 | HTTP::EHttp10)

HTTP::EProtocol (default, and currently only defined value is HTTP::EHTTP)

Definition at line 53 of file rhttpconnectioninfo.h.

The documentation for this class was generated from the following file:
  • rhttpconnectioninfo.h


MHTTPDataSupplier Class Reference

@public
Since:
7.0 A data supplier - This class is used to deliver the response data to the client, and is also used by the client to supply request body data to HTTP in POST transactions.
More...

#include <mhttpdatasupplier.h>

List of all members.

Public Methods

virtual TBool | GetNextDataPart (TPtrC8 &aDataPart)=0
Obtain a data part from the supplier.

virtual void | ReleaseData ()=0
Release the current data part being held at the data supplier.

virtual TInt | OverallDataSize ()=0
Obtain the overall size of the data being supplied, if known to the supplier.

virtual TInt | Reset ()=0
Reset the data supplier.

Detailed Description

@public
Since:
7.0 A data supplier - This class is used to deliver the response data to the client, and is also used by the client to supply request body data to HTTP in POST transactions.

Data is supplied in a number of parts. When a part is available it can be retreived with GetNextDataPart. The returned descriptor will remain valid until ReleaseData is called.

To use this class to supply POST data, you have a number of options. If the post data needs to be URL Form encoded, you should use CHTTPFormEncoder, which will do the encoding and interface to the MHTTPDataSupplier for you. If you have all the data available, return its length in OverallDataSize, and pass back all the data from GetNextDataPart, returning ETrue to indicate that this is the last part.

If you don't want to form all the data at once, but know how much you'll eventualy have, return the total length from OverallDataSize. When GetNextDataPart is first called, return the first part. If GetNextDataPart is called again before ReleaseData, you should still return the first part. Only when ReleaseData is called should you move to the second part. If you don't know the total size of the data, the procedure is the same but you should return KErrNotFound from OverallDataSize.

When the next part is available, clients should call RHTTPTransaction::NotifyNewRequestBodyPartL to inform HTTP that the new data is available. They can do this from ReleaseData if more data is instantly available, or in some applications they may need to call it some time later when the next part has been assembled.

Filter writers should note that the MHTTPDataSupplier interface is designed to be used by 1 client, as 1 component needs to know when to call ReleaseData(). However, filters can be written to transform the data in some way. For instance, a filter could be written to automaticaly handle a particular content encoding. When this filter first receives a GotResponseBodyData, it should take a copy of the response's body and replace the body with a MHTTPDataSupplier supplied by the filter. The filter should then receive the data from HTTP via the saved data supplier and give it to the client via its own data supplier.

Definition at line 65 of file mhttpdatasupplier.h.

Member Function Documentation

virtual TBool MHTTPDataSupplier::GetNextDataPart ( TPtrC8 & aDataPart ) [pure virtual]

Obtain a data part from the supplier.

The data is guaranteed to survive until a call is made to ReleaseData().

Parameters:
aDataPart - the data part
Returns:
ETrue if this is the last part. EFalse otherwise

virtual TInt MHTTPDataSupplier::OverallDataSize ( ) [pure virtual]

Obtain the overall size of the data being supplied, if known to the supplier.

Where a body of data is supplied in several parts this size will be the sum of all the part sizes. If the size is not known, KErrNotFound is returned; in this case the client must use the return code of GetNextDataPart to find out when the data is complete.

Returns:
A size in bytes, or KErrNotFound if the size is not known.

virtual void MHTTPDataSupplier::ReleaseData ( ) [pure virtual]

Release the current data part being held at the data supplier.

This call indicates to the supplier that the part is no longer needed, and another one can be supplied, if appropriate.

virtual TInt MHTTPDataSupplier::Reset ( ) [pure virtual]

Reset the data supplier.

This indicates to the data supplier that it should return to the first part of the data. This could be used in a situation where the data consumer has encountered an error and needs the data to be supplied afresh. Even if the last part has been supplied (i.e. GetNextDataPart has returned ETrue), the data supplier should reset to the first part.

If the supplier cannot reset it should return an error code; otherwise it should return KErrNone, where the reset will be assumed to have succeeded

The documentation for this class was generated from the following file:
  • mhttpdatasupplier.h


CEComFilter Class Reference

@public
Since:
7.0 This class serves as the base class for ECom filter plugins.
More...

#include <CEComFilter.h>

List of all members.

Public Methods

~CEComFilter ()
Intended Usage: Virtual destructor
Since:
7.0.

Static Public Methods

CEComFilter * | InstallFilterL (RHTTPSession aSession, const TUid aEComFilterUid)
Intended Usage: This method is used to install filters to the filter queue.

CEComFilter * | InstallFilterL (RHTTPSession aSession, const TDesC8 &aEComFilterDataType)
Intended Usage: This method is used to install filters to the filter queue.

Detailed Description

@public
Since:
7.0 This class serves as the base class for ECom filter plugins.

It provides minimal functionality to simply install and destroy filters specified by their UID or data type. The RHTTPSession passed in is passed onto the filter as a TAny* pointer and therefore must be casted back to an RHTTPSession pointer by the filter.

Definition at line 33 of file CEComFilter.h.

Constructor & Destructor Documentation

CEComFilter::~CEComFilter ( ) [inline]

Intended Usage: Virtual destructor

Since:
7.0.

Precondition:
The object identified by the destructor key in iEcomDtorID exists
Postcondition:
The object is destroyed

Definition at line 103 of file CEComFilter.h.

Member Function Documentation

CEComFilter * CEComFilter::InstallFilterL | ( | RHTTPSession | aSession,
 |  | const TDesC8 & | aEComFilterDataType
 | ) | [inline, static]

Intended Usage: This method is used to install filters to the filter queue.

The implementation UID of the filter plugin is passed to identify the plugin that is required. The returned pointer is not owned as the filters must be self-destroying when they are unloaded.

Since:
7.0
Parameters:
aSession | A handle to the transport session
aEComFilterDataType | A descriptor containing the datatype of the filter to load
Returns:
Pointer to the newly installed plugin
Precondition:
The session had already been setup
Postcondition:
The filter(s) have been installed

Definition at line 92 of file CEComFilter.h.

CEComFilter * CEComFilter::InstallFilterL | ( | RHTTPSession | aSession,
 |  | const TUid | aEComFilterUid
 | ) | [inline, static]

Intended Usage: This method is used to install filters to the filter queue.

The implementation UID of the filter plugin is passed to identify the plugin that is required. The returned pointer is not owned as the filters must be self-destroying when they are unloaded.

Since:
7.0
Parameters:
aSession | A handle to the transport session
aEComFilterUid | The implementation UID of the plugin
Returns:
Pointer to the newly installed plugin
Precondition:
The session had already been setup
Postcondition:
The filter(s) have been installed

Definition at line 86 of file CEComFilter.h.

The documentation for this class was generated from the following file:
  • CEComFilter.h


THTTPEvent Class Reference

@public
Since:
7.0 A HTTP status message.
More...

#include <thttpevent.h>

Inheritance diagram for THTTPEvent:

[legend]
List of all members.

Public Types

enum | TStandardEvent { EAll = KRequestPending + 1, EAnyTransactionEvent = KRequestPending, EAnySessionEvent = KSessionEventBaseStatus }
The TStandardEvent type is used to specify a family of event types. More...

enum TTransactionEvent {
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
}
The TTransactionEvents type defines the events that correspond to transactions. More...

enum | TDirection { EOutgoing, EIncoming }
The TDirection type defines the direction of an event. More...

enum | TTransactionWarning { ERedirectedPermanently = KTransactionWarningBaseStatus, ERedirectedTemporarily = KTransactionWarningBaseStatus + 1, EMoreDataReceivedThanExpected = KTransactionWarningBaseStatus + 2 }
The TTransactionWarning type indicates that something in a transaction may be incorrect but the transaction may continue. More...

Public Methods

THTTPEvent (TInt aStatus, TUint aUID=KHTTPUid)
Constructor.

THTTPEvent (TStandardEvent aStatus=EAnyTransactionEvent)
Constructor (using a standard event and the HTTP UID).

THTTPEvent (TTransactionEvent aStatus)
Constructor (using a transaction event and the HTTP UID).

THTTPEvent & | operator= (TStandardEvent aStatus)
Assigns a standard event code to an event object.

THTTPEvent & | operator= (TTransactionEvent aStatus)
Assigns a transaction event code to an event object.

TBool | operator== (THTTPEvent aThat) const
Equality operator.

TBool | operator!= (THTTPEvent aThat) const
Inequality operator.

TBool | operator== (TStandardEvent aStatus) const
Equality operator (compares with a standard event).

TBool | operator!= (TStandardEvent aStatus) const
Inequality operator (compares with a standard event).

TBool | operator== (TTransactionEvent aStatus) const
Equality operator (compares with a transaction event).

TBool | operator!= (TTransactionEvent aStatus) const
Inequality operator (compares with a transaction event).

TBool | IsSessionEvent () const
Returns True if the event is a session event.

Public Attributes

TInt | iStatus
The status value.

TUint | iUID
The UID.

Protected Attributes

TBool | iIsSessionEventFlag
Flag to indicate whether the event is a session event.

Detailed Description

@public
Since:
7.0 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.

Definition at line 55 of file thttpevent.h.

Member Enumeration Documentation

enum THTTPEvent::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.

Enumeration values:
EOutgoing An event originating with the client (e.g.

start transaction).

EIncoming An event originating with the server (e.g.

something received).

Definition at line 149 of file thttpevent.h.

enum THTTPEvent::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.

Enumeration values:
EAll | Used when registering filter to indicate the filter is instrested in ALL events, both transaction and session events.
EAnyTransactionEvent | Used when registering filters to indicate the filter is interested in any transaction event, from any direction.
EAnySessionEvent | Used when registering filters to indicate the filter is interested in any session event.

Definition at line 65 of file thttpevent.h.

enum THTTPEvent::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.

Enumeration values:
ESubmit The transaction is being submitted.

An outgoing event.

ECancel The transaction is being cancelled.

An outgoing event.

ENotifyNewRequestBodyPart A new part of request body data is available for transmission.

An outgoing event

EClosed The transaction is being closed.

An outgoing event.

EGotResponseHeaders All the response headers have been received.

An incoming event.

EGotResponseBodyData Some (more) body data has been received (in the HTTP response).

An incoming event.

EResponseComplete The transaction's response is complete.

An incoming event.

EGotResponseTrailerHeaders Some trailer headers have been received.

An incoming event.

ESucceeded The transaction has succeeded.

An incoming event.

EFailed 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 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 An event that indicates that there is too much request data to be sent.

The transaction will subsequently be cancelled. An incoming event.

Definition at line 89 of file thttpevent.h.

enum THTTPEvent::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.

Enumeration values:
ERedirectedPermanently 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 | An event indicating that the transaction has been redirected and the original server indicated that it was a temporary redirection.
EMoreDataReceivedThanExpected | 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.

Definition at line 164 of file thttpevent.h.

Constructor & Destructor Documentation

THTTPEvent::THTTPEvent | ( | TInt | aStatus,
 |  | TUint | aUID = KHTTPUid
 | ) | [inline]

Constructor.

Parameters:
aStatus | The status value.
aUid | The UID.

THTTPEvent::THTTPEvent ( TStandardEvent aStatus = EAnyTransactionEvent ) [inline]

Constructor (using a standard event and the HTTP UID).

Parameters:
aStatus The standard event to use.

THTTPEvent::THTTPEvent ( TTransactionEvent aStatus ) [inline]

Constructor (using a transaction event and the HTTP UID).

Parameters:
aStatus The transaction event to use.

Member Function Documentation

TBool THTTPEvent::IsSessionEvent ( ) [inline]

Returns True if the event is a session event.

TBool THTTPEvent::operator!= ( TTransactionEvent aStatus ) const [inline]

Inequality operator (compares with a transaction event).

TBool THTTPEvent::operator!= ( TStandardEvent aStatus ) const [inline]

Inequality operator (compares with a standard event).

TBool THTTPEvent::operator!= ( THTTPEvent aThat ) const [inline]

Inequality operator.

THTTPEvent& THTTPEvent::operator= ( TTransactionEvent aStatus ) [inline]

Assigns a transaction event code to an event object.

Parameters:
aStatus The transaction event.

THTTPEvent& THTTPEvent::operator= ( TStandardEvent aStatus ) [inline]

Assigns a standard event code to an event object.

Parameters:
aStatus The standard event.

TBool THTTPEvent::operator== ( TTransactionEvent aStatus ) const [inline]

Equality operator (compares with a transaction event).

TBool THTTPEvent::operator== ( TStandardEvent aStatus ) const [inline]

Equality operator (compares with a standard event).

TBool THTTPEvent::operator== ( THTTPEvent aThat ) const [inline]

Equality operator.

Member Data Documentation

TBool THTTPEvent::iIsSessionEventFlag [protected]

Flag to indicate whether the event is a session event.

Definition at line 260 of file thttpevent.h.

TInt THTTPEvent::iStatus

The status value.

Definition at line 250 of file thttpevent.h.

TUint THTTPEvent::iUID

The UID.

Definition at line 255 of file thttpevent.h.

The documentation for this class was generated from the following file:
  • thttpevent.h


MHTTPFilter Class Reference

@public
Since:
7.0 A HTTP filter
More...

#include <mhttpfilter.h>

Inheritance diagram for MHTTPFilter:

[legend]
Collaboration diagram for MHTTPFilter:

[legend]
List of all members.

Public Types

enum TPositions {
EProtocolHandler = 0, ECache = 100, EStatusCodeHandler = 200, ECookies = 300,
ETidyUp = 400, EClientFilters = 500, EClient = 1000
}
Default filter positions. More...

Public Methods

virtual IMPORT_C void | MHFUnload (RHTTPSession aSession, THTTPFilterHandle aHandle)
Called when the filter is being removed from a session's filter queue.

virtual IMPORT_C void | MHFLoad (RHTTPSession aSession, THTTPFilterHandle aHandle)
Called when the filter is being added to the session's filter queue.

Detailed Description

@public
Since:
7.0 A HTTP filter

Definition at line 28 of file mhttpfilter.h.

Member Enumeration Documentation

enum MHTTPFilter::TPositions

Default filter positions.

Enumeration values:
EProtocolHandler | The Protocol Handler :- At the base of the filter chain and nearest to the transport layer.
ECache | Filters to handle caching behaviours.
EStatusCodeHandler Filters to handle particular status codes.

e.g.Redirection and authentication.

ECookies | The cookie filter, and other filters that don't need to be concerned with resubmitting of transactions due to things like redirection.
ETidyUp | The validation filter and any other final tidy up or initial preprocessing of transactions.
EClientFilters | Client filters that assume all standard behaviour is already there.
EClient | The client :- At the head of the filter chain : No position above this must be used.

Definition at line 55 of file mhttpfilter.h.

Member Function Documentation

virtual IMPORT_C void MHTTPFilter::MHFLoad | ( | RHTTPSession | aSession,
 |  | THTTPFilterHandle | aHandle
 | ) | [virtual]

Called when the filter is being added to the session's filter queue.

Parameters:
aSession | The session it's being added to.
aHandle | The filter handle. Complex filters may need to keep track of this, for instance if generating events in response to external stimuli

virtual IMPORT_C void MHTTPFilter::MHFUnload | ( | RHTTPSession | aSession,
 |  | THTTPFilterHandle | aHandle
 | ) | [virtual]

Called when the filter is being removed from a session's filter queue.

Parameters:
aSession | The session it's being removed from
aHandle | The filter handle. Complex filters may need to refer to this to keep track of which particular registration is being unloaded.

The documentation for this class was generated from the following file:
  • mhttpfilter.h


MHTTPFilterBase Class Reference

@public
Since:
7.0 A HTTP Filter.
More...

#include <mhttpfilterbase.h>

Inheritance diagram for MHTTPFilterBase:

[legend]
List of all members.

Public Methods

virtual IMPORT_C void | MHFRunL (RHTTPTransaction aTransaction, const THTTPEvent &aEvent)
Called when the filter's registration conditions are satisfied for events that occur on a transaction.

virtual IMPORT_C void | MHFSessionRunL (const THTTPSessionEvent &aEvent)
Called when the filters registration conditions are satisfied for events that occur on the session.

virtual IMPORT_C TInt | MHFRunError (TInt aError, RHTTPTransaction aTransaction, const THTTPEvent &aEvent)
Called when RunL leaves from a transaction event.

virtual IMPORT_C TInt | MHFSessionRunError (TInt aError, const THTTPSessionEvent &aEvent)
Called when MHFRunL leaves from a session event.

Detailed Description

@public
Since:
7.0 A HTTP Filter.

This is the base class for normal filters (MHTTPFilter) which adds an unload function, and MHTTPTransactionCallback, which doesn't add an unload function.

Definition at line 32 of file mhttpfilterbase.h.

Member Function Documentation

virtual IMPORT_C TInt MHTTPFilterBase::MHFRunError | ( | TInt | aError,
 |  | RHTTPTransaction | aTransaction,
 |  | const THTTPEvent & | aEvent
 | ) | [virtual]

Called when RunL leaves from a transaction event.

This works in the same way as CActve::RunError; return KErrNone if you have handled the error. If you don't completely handle the error, a panic will occur.

Parameters:
aError | The leave code that RunL left with.
aTransaction | The transaction that was being processed.
aEvent | The Event that was being processed.
Returns:
KErrNone if the error has been cancelled or the code of the continuing error otherwise.

virtual IMPORT_C void MHTTPFilterBase::MHFRunL | ( | RHTTPTransaction | aTransaction,
 |  | const THTTPEvent & | aEvent
 | ) | [virtual]

Called when the filter's registration conditions are satisfied for events that occur on a transaction.

Note that this function is not allowed to leave if called with certain events.

See also:
THTTPEvent
Parameters:
aTransaction | The transaction that the event has occurred on.
aEvent | The event that has occurred.
Exceptions:
Any Leaves must be handled by the appropriate MHFRunError.

virtual IMPORT_C TInt MHTTPFilterBase::MHFSessionRunError | ( | TInt | aError,
 |  | const THTTPSessionEvent & | aEvent
 | ) | [virtual]

Called when MHFRunL leaves from a session event.

This works in the same way as CActve::RunError If you don't completely handle the error, a panic will occur.

Parameters:
aError | The leave code that RunL left with.
aEvent | The Event that was being processed.
Returns:
KErrNone if the error has been cancelled or the code of the continuing error otherwise.

virtual IMPORT_C void MHTTPFilterBase::MHFSessionRunL ( const THTTPSessionEvent & aEvent ) [virtual]

Called when the filters registration conditions are satisfied for events that occur on the session.

@ param aEvent The session event that has occured. @ exception Any leaves must be handled by the appropriate MHFRunError.

The documentation for this class was generated from the following file:
  • mhttpfilterbase.h


RHTTPFilterCollection Class Reference

@public
Since:
7.0 A Handle on the filter collection in a session.
More...

#include <rhttpfiltercollection.h>

List of all members.

Public Methods

IMPORT_C void | AddFilterL (MHTTPFilter &aFilter, THTTPEvent aEvent, RStringF aHeader, TInt aStatusCode, TInt aPosition, RStringF aName)
Adds a filter to the session's filter queue.

IMPORT_C void | AddFilterL (MHTTPFilter &aFilter, THTTPEvent aEvent, TInt aPosition, RStringF aName)
Adds a filter to the session's filter queue.

IMPORT_C TBool | CanChangeFilters () const
Returns ETrue if filters can currently be added or removed.

IMPORT_C void | RemoveFilter (RStringF aFilter)
Removes all filter registrations of the specified name.

IMPORT_C THTTPFilterIterator | Query (RStringF aName=RStringF())
Returns an iterator to look at all filter registrations of a particular name.

Detailed Description

@public
Since:
7.0 A Handle on the filter collection in a session.

It provides facilities for adding and deleting filters and for querying what filters are installed.

See also:
RHTTPSession::FilterCollection , MHTTPFilter::TPositions

Definition at line 37 of file rhttpfiltercollection.h.

Member Function Documentation

IMPORT_C void RHTTPFilterCollection::AddFilterL | ( | MHTTPFilter & | aFilter,
 |  | THTTPEvent | aEvent,
 |  | TInt | aPosition,
 |  | RStringF | aName
 | ) |

Adds a filter to the session's filter queue.

Intended Usage: This variant takes no status code or header. It is intended for filters that are only interested in events. For example session events.

Precondition:
The session is open and no transactions have been created yet
Parameters:
aFilter | The filter to add
aEvent | The event that triggers this filter (or all)
aPosition | The position of the filter in the queue. Standard values are documented in the documentation for the supplied filters, and are based on the standard defines in MHTTPFilter::TPositions
aName | the name of the Filter to add
Exceptions:
KErrNoMemory There was not enough memory.
See also:
See MHTTPFilter::TPositions

IMPORT_C void RHTTPFilterCollection::AddFilterL | ( | MHTTPFilter & | aFilter,
 |  | THTTPEvent | aEvent,
 |  | RStringF | aHeader,
 |  | TInt | aStatusCode,
 |  | TInt | aPosition,
 |  | RStringF | aName
 | ) |

Adds a filter to the session's filter queue.

Note: This function only adds filters; it doesn't replace or otherwise affect any pre-existing filters.

Precondition:
The session is open and no transactions have been created yet.
Parameters:
aFilter | The filter to add
aEvent | The event that triggers this filter (or all)
aHeader | The header whose presence triggers this filter (or KNullDesC for any)
aStatusCode | The status code that triggers this filter (or -1 for all)
aPosition | The position of the filter in the queue. Standard values are documented in the documentation for the supplied filters, and are based on the standard defines in MHTTPFilter::TPositions
aName | the name of the Filter to add
Exceptions:
KErrNoMemory There was not enough memory.
See also:
See MHTTPFilter::TPositions

IMPORT_C TBool RHTTPFilterCollection::CanChangeFilters ( )

Returns ETrue if filters can currently be added or removed.

Filters can only be added/removed if there are no transactions in existence on the session.

IMPORT_C THTTPFilterIterator RHTTPFilterCollection::Query ( RStringF aName = RStringF() )

Returns an iterator to look at all filter registrations of a particular name.

By default it will find all filters.

Parameters:
aName The name of the filter to find. (All filters will be found if the default parameter is used)

IMPORT_C void RHTTPFilterCollection::RemoveFilter ( RStringF aFilter )

Removes all filter registrations of the specified name.

The documentation for this class was generated from the following files:
  • rhttpfiltercollection.h
  • rhttpsession.h


TFilterConfigurationIterator Class Reference

@public @dependancies CHTTPSession, CEComFilter
Since:
7.0 This class can only be created and destroyed by the session.
More...

#include <TFilterConfigurationIter.h>

List of all members.

Public Methods

IMPORT_C TInt | First ()
Intended Usage: This method sets the current filter to the first filter in the list.

IMPORT_C TInt | Next ()
Intended Usage: This method sets the current filter to the next filter in the list.

IMPORT_C TBool | AtStart ()
Intended Usage: This method indicates whether the current filter is the first filter in the list.

IMPORT_C TBool | AtEnd ()
Intended Usage: This method indicates whether the current filter is the last filter in the list.

IMPORT_C TInt | FindByDataType (const TDesC8 &aDataType)
Intended Usage: This method find the first filter in the list that has a matching data type that is passed in.

IMPORT_C const TFilterInformation | CurrentFilterInformation () const
Intended Usage: This method will return the information of the current filter.

IMPORT_C TInt | InstallCurrentFilter () const
Intended Usage: This method will install the current filter.

IMPORT_C TInt | UninstallCurrentFilter () const
Intended Usage: This method will uninstall the current filter.

Detailed Description

@public @dependancies CHTTPSession, CEComFilter
Since:
7.0 This class can only be created and destroyed by the session.

It is supplied to the client, if the client wishes to configure the filter that are installed or install filters that must be installed explicitly. The API of the class allows the client to navigate, install, uninstall and query the filter list. The filters visible in this list are only the implicit and explicit filters declared as plugins. This iterator MUST be initialised using the First() method and the return error code checked before any other operations are called.

Definition at line 40 of file TFilterConfigurationIter.h.

Member Function Documentation

TFilterConfigurationIterator::AtEnd ( )

Intended Usage: This method indicates whether the current filter is the last filter in the list.

This method will panic if the iterator has not been initialised using the First() method.

Since:
7.0
Returns:
ETrue if the current filter is the last in the list
Precondition:
The iterator has been initialised using the First() method

TFilterConfigurationIterator::AtStart ( )

Intended Usage: This method indicates whether the current filter is the first filter in the list.

This method will panic if the iterator has not been initialised using the First() method.

Since:
7.0
Returns:
ETrue if the current filter is the first in the list
Precondition:
The iterator has been initialised using the First() method

TFilterConfigurationIterator::CurrentFilterInformation ( ) const

Intended Usage: This method will return the information of the current filter.

The information is provided in a TFilterInformation structure containing the following information: 1) Display name 2) Data type 3) Version 4) UID 5) Category 6) Install status This method will panic if the iterator has not been initialised using the First() method

Since:
7.0
Returns:
A struct containing the current filter information
Precondition:
The iterator has been initialised using the First() method
See also:
TFilterInformation

TFilterConfigurationIterator::FindByDataType ( const TDesC8 & aDataType )

Intended Usage: This method find the first filter in the list that has a matching data type that is passed in.

The method will set the current filter to the filter that matches the data type or if not found the current filter will not change. This method will always begin its search from the beginning of the list.

Since:
7.0
Parameters:
aDataType An 8-bit descriptor containing the data type to match the filter plug-in with
Returns:
KErrNone is the filter plug-in is found, KErrNotFound if not found
Precondition:
Object is constructed
Postcondition:
The current filter is set to the filter that matches the data type

TFilterConfigurationIterator::First ( )

Intended Usage: This method sets the current filter to the first filter in the list.

This method must be used initially to set the current filter and the returned error code must be noted prior to using any of the methods that query or modify the current filter.

Since:
7.0
Returns:
KErrNone if the first filter is found, KErrNotFound if the filter can't be found or no filters exist
Precondition:
Object is constructed
Postcondition:
Current filter is set to the first filter in the list

TFilterConfigurationIterator::InstallCurrentFilter ( ) const

Intended Usage: This method will install the current filter.

This method will panic if a current filter is not set.

Since:
7.0
Returns:
KErrNone if the filter installed, KErrAlreadyExists if the filter has already been installed, KErrNotFound if the filter cannot be found, KErrNotConnected if the ECom plug-in architecture is not connected, KErrNoMemory is the filter is not installed due to low memory, or any other system-wide error codes.
Precondition:
A current filter has been set and is not already installed
Postcondition:
The filter is installed

TFilterConfigurationIterator::Next ( )

Intended Usage: This method sets the current filter to the next filter in the list.

Since:
7.0
Returns:
KErrNone if the next filter is found, KErrNotFound if the filter can't be found, or no filters exist, or the current filter is at the end of the list.
Precondition:
Object is constructed
Postcondition:
Current filter is set to the next filter in the list

TFilterConfigurationIterator::UninstallCurrentFilter ( ) const

Intended Usage: This method will uninstall the current filter.

This method will panic if a current filter is not set.

Since:
7.0
Returns:
KErrNone is the filter uninstalled correctly, KErrNotFound if the filter has not already been installed
Precondition:
A current filter has been set and has already been installed
Postcondition:
The filter is uninstalled

The documentation for this class was generated from the following file:
  • TFilterConfigurationIter.h


MHTTPFilterCreationCallback Class Reference

@public
Since:
7.0 This class serves as a pure virtual interface required as a session callback to the client when the client requires to configure the filters that are installed.
More...

#include <MHTTPFilterCreationCallback.h>

List of all members.

Public Methods

virtual void ConfigureSessionFiltersL (TFilterConfigurationIterator *aFilterConfigIter)=0
Intended Usage: Pure virtual that is called by the session when the session construction is complete.

Detailed Description

@public
Since:
7.0 This class serves as a pure virtual interface required as a session callback to the client when the client requires to configure the filters that are installed.

The session calls the method in the interface when the construction of the session is complete. The callback passes an object of CFilterConfigurationIterator that allows the client to configure the filters that are installed.

Definition at line 29 of file MHTTPFilterCreationCallback.h.

Member Function Documentation

MHTTPFilterCreationCallback::ConfigureSessionFiltersL ( TFilterConfigurationIterator * aFilterConfigIter ) [pure virtual]

Intended Usage: Pure virtual that is called by the session when the session construction is complete.

This passes a CFilterConfigurationIterator back to the client which allows the client to install or install selected filters.

Since:
7.0
Parameters:
aFilterConfigIter Pointer to the filter configuration iterator. Ownership of CFilterConfigurationIterator remains with the session and is not transfered
Precondition:
The session has been constructed
Postcondition:
The filters that are installed are have been configured by the client

The documentation for this class was generated from the following file:
  • MHTTPFilterCreationCallback.h


THTTPFilterHandle Class Reference

@public
Since:
7.0 A Filter registration handle.
More...

#include <thttpfilterhandle.h>

List of all members.

Public Types

enum TStandardValues { EUndefined = 0, EClient = -1, EProtocolHandler = -2 }
Alisases for the client, and the filters you're most likely to want to refer to. More...

Detailed Description

@public
Since:
7.0 A Filter registration handle.

This identifies a particular filter registration, and is passed to the filter in MHFLoad. It is used to identify filters for deletion and for locating the start point for sending events. It is an opaque class; all you need to be able to do with it is to compare them for equality.

Definition at line 29 of file thttpfilterhandle.h.

Member Enumeration Documentation

enum THTTPFilterHandle::TStandardValues

Alisases for the client, and the filters you're most likely to want to refer to.

Enumeration values:
EUndefined | Undefined default value.
EClient | Placeholder for the client.
EProtocolHandler Constant value for the protocol handler.

When sending an event from a MHFRunL, indicates the current filter.

Definition at line 37 of file thttpfilterhandle.h.

The documentation for this class was generated from the following file:
  • thttpfilterhandle.h


TFilterInformation Struct Reference

@public
Since:
7.0 This structure is used by the TFilterConfigurationIterator to hold the information of the current filter.
More...

#include <TFilterInformation.h>

List of all members.

Public Types

enum | TFilterCategory
Public enum defining the filter categories available to the client. More...

Public Methods

TFilterInformation (const TDesC &aDisplayName, const TDesC8 &aDataType, TInt aVersion, TUid aFilterUid, TFilterCategory aFilterCategory, TBool aInstallStatus)
Default constructor that simply initialises the data members.

Public Attributes

const TDesC & | iDisplayName
Contains a constant reference to the descriptor containing the filter's display name.

const TDesC8 & | iDataType
Contains a constant reference to the descriptor containing the filter's data type.

TInt | iVersion
The filter's version number.

TUid | iFilterUid
The filter's plugin UID.

TFilterCategory iFilterCategory
The filter's category.

TBool | iInstallStatus
The install status of the filter.

Detailed Description

@public
Since:
7.0 This structure is used by the TFilterConfigurationIterator to hold the information of the current filter.

This structure simply contains public members containing the following information, the display name, data type, version, UID, category and install status.

See also:
TFilterConfigurationIterator

Definition at line 25 of file TFilterInformation.h.

Member Enumeration Documentation

enum TFilterInformation::TFilterCategory

Public enum defining the filter categories available to the client.

Since:
7.0 @cat Enumerations

Definition at line 33 of file TFilterInformation.h.

Constructor & Destructor Documentation

TFilterInformation::TFilterInformation | ( | const TDesC & | aDisplayName,
 |  | const TDesC8 & | aDataType,
 |  | TInt | aVersion,
 |  | TUid | aFilterUid,
 |  | TFilterCategory | aFilterCategory,
 |  | TBool | aInstallStatus
 | ) | [inline]

Default constructor that simply initialises the data members.

Since:
7.0
Parameters:
aDisplayName | Reference to descriptor containing the display name
aDataType | Reference to descriptor containing the data type
aVersion | Integer of the version number
aFilterUid | The UID of the filter plugin
aFilterCategory | The category of the filter
aInstallStatus | The install status of the filter plugin. Contains ETrue if installed or EFalse otherwise.
Precondition:
None
Postcondition:
Object is fully constructed and initialised

Definition at line 83 of file TFilterInformation.h.

Member Data Documentation

const TDesC8& TFilterInformation::iDataType

Contains a constant reference to the descriptor containing the filter's data type.

Definition at line 45 of file TFilterInformation.h.

const TDesC& TFilterInformation::iDisplayName

Contains a constant reference to the descriptor containing the filter's display name.

Definition at line 41 of file TFilterInformation.h.

TFilterCategory TFilterInformation::iFilterCategory

The filter's category.

Definition at line 57 of file TFilterInformation.h.

TUid TFilterInformation::iFilterUid

The filter's plugin UID.

Definition at line 53 of file TFilterInformation.h.

TBool TFilterInformation::iInstallStatus

The install status of the filter.

Contains ETrue if installed, otherwise EFalse

Definition at line 61 of file TFilterInformation.h.

TInt TFilterInformation::iVersion

The filter's version number.

Definition at line 49 of file TFilterInformation.h.

The documentation for this struct was generated from the following file:
  • TFilterInformation.h


THTTPFilterIterator Class Reference

@public
Since:
7.0 An iterator for RHTTPFilterCollection.
More...

#include <thttpfilteriterator.h>

List of all members.

Public Methods

THTTPFilterIterator ()
Non-initialised constructor.

void | First ()
Moves the iterator to the first member of the collection.

IMPORT_C TBool | AtEnd () const
Returns ETrue if the iterator is at the end of the collection.

IMPORT_C THTTPFilterIterator & | operator++ ()
Moves on to the next item in the collection.

IMPORT_C const THTTPFilterRegistration & | operator() () const
Returns the filter that the iterator is pointing at.

const THTTPFilterRegistration & | operator * () const
Returns the filter that the iterator is pointing at.

const THTTPFilterRegistration & | operator-> () const
Returns the filter that the iterator is pointing at.

Detailed Description

@public
Since:
7.0 An iterator for RHTTPFilterCollection.

The iterator can iterate over a subset of the filters in the collection, depending on how it was created. See RHTTPFilterCollection::Query for more details. In the documentation here, 'the collection' always refers to the filters that this iterator can see.

Definition at line 34 of file thttpfilteriterator.h.

Constructor & Destructor Documentation

THTTPFilterIterator::THTTPFilterIterator ( ) [inline]

Non-initialised constructor.

Note, to get an initialised one that actualy points to a filter collection, use RHTTPFilterCollection::Query

Definition at line 81 of file thttpfilteriterator.h.

Member Function Documentation

IMPORT_C TBool THTTPFilterIterator::AtEnd ( )

Returns ETrue if the iterator is at the end of the collection.

void THTTPFilterIterator::First ( ) [inline]

Moves the iterator to the first member of the collection.

Definition at line 86 of file thttpfilteriterator.h.

References operator++().

const THTTPFilterRegistration & THTTPFilterIterator::operator * ( ) [inline]

Returns the filter that the iterator is pointing at.

Definition at line 92 of file thttpfilteriterator.h.

References operator()().

IMPORT_C const THTTPFilterRegistration& THTTPFilterIterator::operator() ( )

Returns the filter that the iterator is pointing at.

Referenced by operator *(), and operator->().

IMPORT_C THTTPFilterIterator& THTTPFilterIterator::operator++ ( )

Moves on to the next item in the collection.

Referenced by First().

const THTTPFilterRegistration & THTTPFilterIterator::operator-> ( ) [inline]

Returns the filter that the iterator is pointing at.

Definition at line 97 of file thttpfilteriterator.h.

References operator()().

The documentation for this class was generated from the following file:
  • thttpfilteriterator.h


THTTPFilterRegistration Class Reference

@public
Since:
7.0 A registration of a filter in the filter queue
More...

#include <thttpfilterregistration.h>

Collaboration diagram for THTTPFilterRegistration:

[legend]
List of all members.

Public Methods

THTTPFilterRegistration ()
Default constructor.

THTTPFilterRegistration (MHTTPFilter &aFilter, THTTPEvent aEvent, RStringTokenF aHeader, TInt aStatusCode, TInt aPosition, RStringTokenF aName, TInt aHandle)
Constructor.

TBool | operator== (THTTPFilterRegistration &aThat)
Equality operator.

TBool | operator!= (THTTPFilterRegistration &aThat)
Inequality operator.

Public Attributes

TInt | iPosition
The position.

MHTTPFilter * iFilter
The filter.

THTTPEvent iEvent
The event it's interested in (or any).

RStringTokenF | iHeader
The header it's interested in (or any).

TInt | iStatus
The status it's interested in (or any).

RStringTokenF | iName
The name of the filter.

TInt | iHandle
The handle of the filter.

Detailed Description

@public
Since:
7.0 A registration of a filter in the filter queue

Definition at line 30 of file thttpfilterregistration.h.

Constructor & Destructor Documentation

THTTPFilterRegistration::THTTPFilterRegistration ( ) [inline]

Default constructor.

Definition at line 72 of file thttpfilterregistration.h.

THTTPFilterRegistration::THTTPFilterRegistration | ( | MHTTPFilter & | aFilter,
 |  | THTTPEvent | aEvent,
 |  | RStringTokenF | aHeader,
 |  | TInt | aStatusCode,
 |  | TInt | aPosition,
 |  | RStringTokenF | aName,
 |  | TInt | aHandle
 | ) | [inline]

Constructor.

Definition at line 77 of file thttpfilterregistration.h.

Member Function Documentation

TBool THTTPFilterRegistration::operator!= ( THTTPFilterRegistration & aThat )

Inequality operator.

TBool THTTPFilterRegistration::operator== ( THTTPFilterRegistration & aThat )

Equality operator.

Member Data Documentation

THTTPEvent THTTPFilterRegistration::iEvent

The event it's interested in (or any).

Definition at line 57 of file thttpfilterregistration.h.

MHTTPFilter* THTTPFilterRegistration::iFilter

The filter.

Definition at line 54 of file thttpfilterregistration.h.

TInt THTTPFilterRegistration::iHandle

The handle of the filter.

Definition at line 69 of file thttpfilterregistration.h.

RStringTokenF THTTPFilterRegistration::iHeader

The header it's interested in (or any).

Definition at line 60 of file thttpfilterregistration.h.

RStringTokenF THTTPFilterRegistration::iName

The name of the filter.

Definition at line 66 of file thttpfilterregistration.h.

TInt THTTPFilterRegistration::iPosition

The position.

Definition at line 51 of file thttpfilterregistration.h.

TInt THTTPFilterRegistration::iStatus

The status it's interested in (or any).

Definition at line 63 of file thttpfilterregistration.h.

The documentation for this class was generated from the following file:
  • thttpfilterregistration.h


THTTPHdrFieldIter Class Reference

@public
Since:
7.0 Iterator class to iterate the fields within a RHTTPHeaders.
More...

#include <thttphdrfielditer.h>

List of all members.

Public Methods

THTTPHdrFieldIter (const CHeaders *aHeaders)
Construct an iterator for the fields of the supplied header collection.

IMPORT_C | ~THTTPHdrFieldIter ()
Class destructor.

IMPORT_C void | First ()
Reset iterator to point at the first field in the header collection.

IMPORT_C TBool | AtEnd () const
Check if the iterator is at the end of the collection.

IMPORT_C void | operator++ ()
Advance the iterator to the next field.

IMPORT_C RStringTokenF | operator() ()
Obtain the name of the header field currently pointed at by the iterator.

Detailed Description

@public
Since:
7.0 Iterator class to iterate the fields within a RHTTPHeaders.

Definition at line 29 of file thttphdrfielditer.h.

Constructor & Destructor Documentation

THTTPHdrFieldIter::THTTPHdrFieldIter ( const CHeaders * aHeaders ) [inline]

Construct an iterator for the fields of the supplied header collection.

Parameters:
aHeaders The header collection whose fields we want to iterate

Definition at line 88 of file thttphdrfielditer.h.

References First().

IMPORT_C THTTPHdrFieldIter::~THTTPHdrFieldIter ( )

Class destructor.

Member Function Documentation

IMPORT_C TBool THTTPHdrFieldIter::AtEnd ( )

Check if the iterator is at the end of the collection.

If so, further calls to operator() will return NULL.

Returns:
True if the iterator has reached the end of the header fields

IMPORT_C void THTTPHdrFieldIter::First ( )

Reset iterator to point at the first field in the header collection.

Referenced by THTTPHdrFieldIter().

IMPORT_C RStringTokenF THTTPHdrFieldIter::operator() ( )

Obtain the name of the header field currently pointed at by the iterator.

Returns:
The field name; or <empty string> if the iterator has gone off the end of the header collection

IMPORT_C void THTTPHdrFieldIter::operator++ ( )

Advance the iterator to the next field.

Returns:
True if the iterator still points at a valid part after advancing.

The documentation for this class was generated from the following file:
  • thttphdrfielditer.h


THTTPHdrVal Class Reference

@public
Since:
7.0 A representation of a value found in an HTTP header field.
More...

#include <thttphdrval.h>

List of all members.

Public Types

enum THTTPValType {
KTIntVal = 0x00, KStrVal = 0x01, KDateVal = 0x02, KStrFVal = 0x03,
KNoType = 0x04
}

Public Methods

IMPORT_C | THTTPHdrVal ()
Default constructor Used when constructing an empty header value that is to be filled in by a call to a function.

IMPORT_C | THTTPHdrVal (TInt aIntVal)
Constructor for an integer field value.

IMPORT_C | THTTPHdrVal (RStringF aStrVal)
Constructor for an string value.

IMPORT_C | THTTPHdrVal (RString aStrVal)
Constructor for an string value.

IMPORT_C | THTTPHdrVal (TDateTime aDateVal)
Constructor for an date/time value.

IMPORT_C THTTPHdrVal | Copy () const
Obtain a copy of this header value.

IMPORT_C THTTPValType | Type () const
Determine the type of this header field value.

IMPORT_C TInt | Int () const
Obtain the (integer) value held within Panics if the value is of the wring type.

operator TInt () const
Cast operator to obtain the HTTP value as an integer.

IMPORT_C RStringF | StrF () const
Obtain the (string) value held within Panics if the value is of the wring type.

operator RStringF () const
Cast operator to obtain the HTTP value as a string.

operator RString () const
Cast operator to obtain the HTTP value as a string.

IMPORT_C TDateTime | DateTime () const
Obtain the (date/time) value held within.

operator TDateTime () const
Cast operator to obtain the HTTP value as an date/time.

IMPORT_C void | SetInt (TInt aIntVal)
Set the header value to be the supplied integer.

IMPORT_C void | SetStrF (RStringF aStrVal)
Set the header value to be the supplied string.

IMPORT_C void | SetStr (RString aStrVal)
Set the header value to be the supplied string.

IMPORT_C void | SetDateTime (TDateTime aDateVal)
Set the header value to be the supplied date/time.

IMPORT_C TBool | operator== (THTTPHdrVal aVal) const
Comparison operator.

IMPORT_C TBool | operator!= (THTTPHdrVal aVal) const
Comparison operator.

Detailed Description

@public
Since:
7.0 A representation of a value found in an HTTP header field.

Three fundamental types are used in HTTP - integers, strings (which may be free text, 'enumeration values', URIs, etc. or date/times.

The class allows any of the three values to be held and the current value (as well as its type) to be determined.

THTTPHdrVal instances are used to assign values to header fields, their parts and their associated parameters.

See also:
RHTTPHeaders

Definition at line 35 of file thttphdrval.h.

Member Enumeration Documentation

enum THTTPHdrVal::THTTPValType

Enumeration values:
KTIntVal | the value is an integer
KStrVal | the value is a case-sensitive string
KDateVal | the value is a date/time
KStrFVal | the value is a case-insensitive string
KNoType | no value has yet been set

Definition at line 41 of file thttphdrval.h.

Constructor & Destructor Documentation

IMPORT_C THTTPHdrVal::THTTPHdrVal ( )

Default constructor Used when constructing an empty header value that is to be filled in by a call to a function.

e.g. RHTTPHeaders::GetField

IMPORT_C THTTPHdrVal::THTTPHdrVal ( TInt aIntVal )

Constructor for an integer field value.

Parameters:
aIntVal The integer value

IMPORT_C THTTPHdrVal::THTTPHdrVal ( RStringF aStrVal )

Constructor for an string value.

Parameters:
aStrVal The string value

IMPORT_C THTTPHdrVal::THTTPHdrVal ( RString aStrVal )

Constructor for an string value.

Parameters:
aStrVal The string value

IMPORT_C THTTPHdrVal::THTTPHdrVal ( TDateTime aDateVal )

Constructor for an date/time value.

Parameters:
aDateVal The date/time value

Member Function Documentation

IMPORT_C THTTPHdrVal THTTPHdrVal::Copy ( )

Obtain a copy of this header value.

This is critical when the header contains a string, since a new string reference must be created

Returns:
The copied header value

IMPORT_C TDateTime THTTPHdrVal::DateTime ( )

Obtain the (date/time) value held within.

Panics if the value is of the wrong type

Precondition:
Requires that the object was previously set to hold a TDateTime
Returns:
An date/time value

Referenced by operator TDateTime().

IMPORT_C TInt THTTPHdrVal::Int ( )

Obtain the (integer) value held within Panics if the value is of the wring type.

Precondition:
Requires that the object was previously set to hold a TInt
Returns:
An integer value

Referenced by operator TInt().

THTTPHdrVal::operator RString ( ) [inline]

Cast operator to obtain the HTTP value as a string.

Note this doesn't convert from a different form to string! Panics if the value is of the wring type

Precondition:
Requires that the object was previously set to hold a string

Definition at line 256 of file thttphdrval.h.

THTTPHdrVal::operator RStringF ( ) [inline]

Cast operator to obtain the HTTP value as a string.

Note this doesn't convert from a different form to string! Panics if the value is of the wring type

Precondition:
Requires that the object was previously set to hold a string

Definition at line 251 of file thttphdrval.h.

References StrF().

THTTPHdrVal::operator TDateTime ( ) [inline]

Cast operator to obtain the HTTP value as an date/time.

Note this doesn't convert from a different form to date! Panics if the value is of the wring type

Precondition:
Requires that the object was previously set to hold a TDateTime

Definition at line 261 of file thttphdrval.h.

References DateTime().

THTTPHdrVal::operator TInt ( ) [inline]

Cast operator to obtain the HTTP value as an integer.

Note this doesn't convert from a different form to integer! Panics if the value is of the wrong type

Precondition:
Requires that the object was previously set to hold a TInt

Definition at line 246 of file thttphdrval.h.

References Int().

IMPORT_C TBool THTTPHdrVal::operator!= ( THTTPHdrVal aVal ) const

Comparison operator.

Does a comparison based on the current type.

Parameters:
aVal The string to compare.

IMPORT_C TBool THTTPHdrVal::operator== ( THTTPHdrVal aVal ) const

Comparison operator.

Does a comparison based on the current type.

Parameters:
aVal The header value to compare.

IMPORT_C void THTTPHdrVal::SetDateTime ( TDateTime aDateVal )

Set the header value to be the supplied date/time.

Any previous value, or its type, are lost.

Parameters:
aDateVal The date/time value

IMPORT_C void THTTPHdrVal::SetInt ( TInt aIntVal )

Set the header value to be the supplied integer.

Warning:
Any previous value, or its type, are lost.
Parameters:
aIntVal The integer value

IMPORT_C void THTTPHdrVal::SetStr ( RString aStrVal )

Set the header value to be the supplied string.

Any previous value, or its type, are lost.

Parameters:
aStrVal The string value

IMPORT_C void THTTPHdrVal::SetStrF ( RStringF aStrVal )

Set the header value to be the supplied string.

Warning:
Any previous value, or its type, are lost.
Parameters:
aStrVal The string value

IMPORT_C RStringF THTTPHdrVal::StrF ( )

Obtain the (string) value held within Panics if the value is of the wring type.

Precondition:
Requires that the object was previously set to hold a string
Returns:
A string

Referenced by operator RStringF().

IMPORT_C THTTPValType THTTPHdrVal::Type ( )

Determine the type of this header field value.

Returns:
A THTTPValType enumeration describing the value's type

The documentation for this class was generated from the following file:
  • thttphdrval.h


RHTTPHeaders Class Reference

@public
Since:
7.0 The collection of headers (or more correctly, header fields) associated with a message.
More...

#include <rhttpheaders.h>

List of all members.

Public Methods

RHTTPHeaders ()
Default constructor.

Getter methods
Methods for reading data.

IMPORT_C TInt | FieldPartsL (RStringF aFieldName) const
Obtain the number of parts in the named header field's value, Simple headers are created with a single part following one call to SetFieldL.

IMPORT_C TInt | GetField (RStringF aFieldName, TInt aPartIdx, THTTPHdrVal &aHeaderValue) const
Obtain the named header field's value.

IMPORT_C TInt | GetRawField (RStringF aFieldName, TPtrC8 &aRawFieldData) const
Obtain an Raw representation of the named header field's value.

IMPORT_C TInt | GetParam (RStringF aFieldName, RStringF aParamName, THTTPHdrVal &aReturn, TInt aPartIdx=0) const
Obtain the value of a named parameter, associated with the named header field.

IMPORT_C THTTPHdrFieldIter | Fields () const
Access the fields within this header collection, via an iterator.

Setter Methods
Methods for writing data.

IMPORT_C void | SetFieldL (RStringF aFieldName, THTTPHdrVal aFieldValue)
Set a named field in the header.

IMPORT_C void | SetFieldL (RStringF aFieldName, THTTPHdrVal aFieldValue, RStringF aParamName, THTTPHdrVal aParamValue)
Set a named field in the header, and associate with it the supplied parameter.

IMPORT_C void | SetParamL (RStringF aFieldName, RStringF aParamName, THTTPHdrVal aParamValue, TInt aPartIdx)
Set a parameter in an existing header.

IMPORT_C void | SetRawFieldL (RStringF aFieldName, const TDesC8 &aRawFieldData, const TDesC8 &aFieldSeparator)
Set a named field in the header to contain the supplied Raw header data.

IMPORT_C TInt | RemoveField (RStringF aFieldName)
Remove, entirely, the named header field from the header collection.

IMPORT_C TInt | RemoveFieldPart (RStringF aFieldName, TInt aIndex)
Remove a single part of a header field.

IMPORT_C void | RemoveAllFields ()
Remove all the fields of this header collection.

Detailed Description

@public
Since:
7.0 The collection of headers (or more correctly, header fields) associated with a message.

Header (fields) can be created, read and modified. They may be composed of several parts (by repeated invocations of API methods, see below) and may be assigned one or more parameters. Individual field parts and parameters take values described using THTTPHdrVal.

See also:
RHTTPMessage , THTTPHdrVal

Definition at line 34 of file rhttpheaders.h.

Constructor & Destructor Documentation

RHTTPHeaders::RHTTPHeaders ( ) [inline]

Default constructor.

Definition at line 197 of file rhttpheaders.h.

Member Function Documentation

IMPORT_C TInt RHTTPHeaders::FieldPartsL ( RStringF aFieldName ) const

Obtain the number of parts in the named header field's value, Simple headers are created with a single part following one call to SetFieldL.

Subsequent calls to SetFieldL create additional parts if the field exists already.

Exceptions:
KErrNoMemory
Parameters:
aFieldName The header name
Returns:
The number of parts, or zero if the field does not exist.

IMPORT_C THTTPHdrFieldIter RHTTPHeaders::Fields ( )

Access the fields within this header collection, via an iterator.

Each application of the iterator returns the name of the next field type. This may then be accessed via RHTTPHeaders methods.

Returns:
The iterator.

IMPORT_C TInt RHTTPHeaders::GetField | ( | RStringF | aFieldName,
 |  | TInt | aPartIdx,
 |  | THTTPHdrVal & | aHeaderValue
 | ) | const

Obtain the named header field's value.

The index of a part within the field must be specified. Parts are indexed from 0 and fields with only one part return the entire field for index 0

Parameters:
aFieldName | The header name
aPartIdx | The index of the part
aHeaderValue | The header field value
Returns:
An error condition. Returns KErrNotFound if there is not a field with the specifed field name

IMPORT_C TInt RHTTPHeaders::GetParam | ( | RStringF | aFieldName,
 |  | RStringF | aParamName,
 |  | THTTPHdrVal & | aReturn,
 |  | TInt | aPartIdx = 0
 | ) | const

Obtain the value of a named parameter, associated with the named header field.

An optional index to a part within the header field may be supplied, if not it is assumed that it is the first part.

Parameters:
aFieldName | The header name
aParamName | The parameter name
aReturn | The returned value. Note that this must be Copy()d by the caller, if it wants to keep the value.
aPartIdx | The optional index of the part
Returns:
An error condition. Returns KErrNotFound if there is not a field with the specifed field name

IMPORT_C TInt RHTTPHeaders::GetRawField | ( | RStringF | aFieldName,
 |  | TPtrC8 & | aRawFieldData
 | ) | const

Obtain an Raw representation of the named header field's value.

Note that general client use of this method is strongly discouraged since it exposes the Raw representation of particular headers. However it may be needed for some cases where received headers could not be decoded by HTTP. It will normally be used internally when preparing header data to be transmitted with a request.

Parameters:
aFieldName | The field name, e.g, 'Content-Type'
aRawFieldData | The field's data content, in an appropriate Raw form
Returns:
An error condition. Returns KErrNotFound if there is not a field with the specifed field name

IMPORT_C void RHTTPHeaders::RemoveAllFields ( )

Remove all the fields of this header collection.

IMPORT_C TInt RHTTPHeaders::RemoveField ( RStringF aFieldName )

Remove, entirely, the named header field from the header collection.

All its parts and associated parameters (where they exist) are also removed.

Parameters:
aFieldName The field name.
Returns:
KErrNone if the removal is successful; KErrNotFound if the field didn't exist within the headers.

IMPORT_C TInt RHTTPHeaders::RemoveFieldPart | ( | RStringF | aFieldName,
 |  | TInt | aIndex
 | ) |

Remove a single part of a header field.

Just the part and any associated paramters are removed. If this results in no parts being present in the header then it will also be removed

Parameters:
aFieldName The header name
a aIndex The particular part of the field to be removed
Returns:
KErrNone if the removal is sucessful; KErrNotFound if the header didn't exist. No exception is raised if the particular value is not found as part of that header

IMPORT_C void RHTTPHeaders::SetFieldL | ( | RStringF | aFieldName,
 |  | THTTPHdrVal | aFieldValue,
 |  | RStringF | aParamName,
 |  | THTTPHdrVal | aParamValue
 | ) |

Set a named field in the header, and associate with it the supplied parameter.

If the field doesn't already exist it will be created along with a parameter; if it does exist, then a new part will be created along with the parameter.

Parameters:
aFieldName | The field name, e.g. 'Accept'
aFieldValue | The field value. e.g. 'text/plain'
aParamName | The parameter name, e.g. 'q'
aParamValue | The parameter value, e.g. '0.3'

IMPORT_C void RHTTPHeaders::SetFieldL | ( | RStringF | aFieldName,
 |  | THTTPHdrVal | aFieldValue
 | ) |

Set a named field in the header.

On the first instance that this API method is used for a given field name, the first will be created. On subsequent calls, the same field will be extended to have several parts, with a new part created to hold the supplied value.

Parameters:
aFieldName | The field name, e.g, 'Content-Type'
aFieldValue | The field value, e.g. 'text/html'

IMPORT_C void RHTTPHeaders::SetParamL | ( | RStringF | aFieldName,
 |  | RStringF | aParamName,
 |  | THTTPHdrVal | aParamValue,
 |  | TInt | aPartIdx
 | ) |

Set a parameter in an existing header.

Parameters:
aFieldName | The field name, e.g. 'Accept'
aPartIdx | The part of the header to add the parameter to
aParamName | The parameter name, e.g. 'q'
aParamValue | The parameter value, e.g. '0.3' @leave KErrNotFoud if the field, or the part within the field doesn't exist

IMPORT_C void RHTTPHeaders::SetRawFieldL | ( | RStringF | aFieldName,
 |  | const TDesC8 & | aRawFieldData,
 |  | const TDesC8 & | aFieldSeparator
 | ) |

Set a named field in the header to contain the supplied Raw header data.

If the header already exists then a LF and the new data will be added to the existing data. This is used to indicate that there are multiple instances of this header

Note that general client use of this method is strongly discouraged since it exposes the raw representation of particular headers. However it may be needed for some cases where headers to be transmitted have no encoding known to HTTP. It will normally be used internally when receiving data from a service provider.

Parameters:
aFieldName | The field name, e.g, 'Content-Type'
aRawFieldData | The field's data content, in a raw form
aFieldSeparator | The header field separator

The documentation for this class was generated from the following file:
  • rhttpheaders.h


HTTP Class Reference

A String table. More...

#include <HttpStringConstants.h>

List of all members.

Public Types

enum TStrings {
ECONNECT, EDELETE, EGET, EHEAD,
EOPTIONS, EPOST, EPUT, ETRACE,
EHttp10, EHttp11, ECacheControl, EConnection,
EDate, EPragma, ETransferEncoding, EUpgrade,
EVia, EWarning, EHost, EAccept,
EAcceptCharset, EAcceptEncoding, EAcceptLanguage, EAuthorization,
ECookie, ECookie2, EExpect, EFrom,
EIfModifiedSince, EIfMatch, EIfNoneMatch, EIfRange,
EIfUnmodifiedSince, EKeepAlive, EMaxForwards, EProxyAuthorization,
ERange, EReferer, EUserAgent, EAcceptRanges,
EAge, EETag, ELocation, EProxyAuthenticate,
ERetryAfter, EServer, ESetCookie, ESetCookie2,
EVary, EWWWAuthenticate, EAllow, EContentBase,
EContentDisposition, EContentEncoding, EContentLanguage, EContentLength,
EContentLocation, EContentMD5, EContentRange, EContentType,
EExpires, ELastModified, EQ, EGzip,
ECompress, EDeflate, EIdentity, EBytes,
ENone, ENoCache, ENoStore, EMaxAge,
EMaxStale, EMinFresh, ENoTransform, EOnlyIfCached,
EPublic, EPrivate, EMustRevalidate, EProxyRevalidate,
ESMaxAge, EClose, ECharset, E100Continue,
ETE, ETrailer, EChunked, EBasic,
EDigest, ERealm, EDomain, ENonce,
EOpaque, EStale, EAlgorithm, EQop,
EAuth, EResponse, EUri, ECnonce,
ENc, E00000001, EPort, EAuthentication,
ERedirect, EValidation, EProtocolHandler, EClient,
ETextModeHeadersValidator, ESessionHeaderFilter, ECookieFilter, EProxyUsage,
EProxyAddress, EUseProxy, EDoNotUseProxy, EMaxNumTransportHandlers,
EMaxNumTransPerTranspHndlr, EHTTPVersion, EMaxRedirect, EProtocol,
EHTTP, EWSP, EWspCapClientMessageSize, EWspCapServerMessageSize,
EWspCapUseAcknowledgements, EWspCapSupportSuspendResume, EWspCapMaxOutstandingRequests, EWspProxyAddress,
EWspBearer, EWspIp, EWspSMS, EWspLocalPort,
EWspRemotePort, EWspServiceNumber, EWspSessionType, EWspConnectionOriented,
EWspConnectionLess, EWspSecurity, EWspUseWtls, EWspDoNotUseWtls,
EWspProxyConnectionTimeout, EWspProxyExceptionInfo, EWspRemainingSDUSize, EWspRemainingMessageSize,
EAuthenticatedOK, EAuthenticationFailure, EUsername, EPassword,
EAuthenticationStatus, ERedirectCount, EProtTrans, EAnyAny,
ETextAny, ETextHtml, ETextPlain, ETextVndWapWml,
EApplicationOctetStream, EApplicationXWwwFormUrlEncoded, ECookieName, ECookieValue,
EPath, EComment, ECommentURL, EDiscard,
ECookiePort, ESecure, EVersion, EHttpSocketServ,
EHttpSocketConnection, ESecureDialog
}

Detailed Description

A String table.

Definition at line 11 of file HttpStringConstants.h.

Member Enumeration Documentation

enum HTTP::TStrings

Enumeration values:
ECONNECT | CONNECT.
EDELETE | DELETE.
EGET | GET.
EHEAD | HEAD.
EOPTIONS | OPTIONS.
EPOST | POST.
EPUT | PUT.
ETRACE | TRACE.
EHttp10 | HTTP/1.0.
EHttp11 | HTTP/1.1.
ECacheControl | Cache-Control.
EConnection | Connection.
EDate | Date.
EPragma | Pragma.
ETransferEncoding | Transfer-Encoding.
EUpgrade | Upgrade.
EVia | Via.
EWarning | Warning.
EHost | Host.
EAccept | Accept.
EAcceptCharset | Accept-Charset.
EAcceptEncoding | Accept-Encoding.
EAcceptLanguage | Accept-Language.
EAuthorization | Authorization.
ECookie | Cookie.
ECookie2 | Cookie2.
EExpect | Expect.
EFrom | From.
EIfModifiedSince | If-Modified-Since.
EIfMatch | If-Match.
EIfNoneMatch | If-None-Match.
EIfRange | If-Range.
EIfUnmodifiedSince | If-Unmodified-Since.
EKeepAlive | Keep-Alive.
EMaxForwards | Max-Forwards.
EProxyAuthorization | Proxy-Authorization.
ERange | Range.
EReferer | Referer.
EUserAgent | User-Agent.
EAcceptRanges | Accept-Ranges.
EAge | Age.
EETag | ETag.
ELocation | Location.
EProxyAuthenticate | Proxy-Authenticate.
ERetryAfter | Retry-After.
EServer | Server.
ESetCookie | Set-Cookie.
ESetCookie2 | Set-Cookie2.
EVary | Vary.
EWWWAuthenticate | WWW-Authenticate.
EAllow | Allow.
EContentBase | Content-Base.
EContentDisposition | Content-Disposition.
EContentEncoding | Content-Encoding.
EContentLanguage | Content-Language.
EContentLength | Content-Length.
EContentLocation | Content-Location.
EContentMD5 | Content-MD5.
EContentRange | Content-Range.
EContentType | Content-Type.
EExpires | Expires.
ELastModified | Last-Modified.
EQ | q
EGzip | gzip
ECompress | compress
EDeflate | deflate
EIdentity | identity
EBytes | bytes
ENone | none
ENoCache | no-cache
ENoStore | no-store
EMaxAge | max-age
EMaxStale | max-stale
EMinFresh | min-fresh
ENoTransform | no-transform
EOnlyIfCached | only-if-cached
EPublic | public
EPrivate | private
EMustRevalidate | must-revalidate
EProxyRevalidate | proxy-revalidate
ESMaxAge | s-maxage
EClose | close
ECharset | charset
E100Continue | 100-continue
ETE | TE.
ETrailer | trailer
EChunked | chunked
EBasic | Basic.
EDigest | Digest.
ERealm | realm
EDomain | domain
ENonce | nonce
EOpaque | opaque
EStale | stale
EAlgorithm | algorithm
EQop | qop
EAuth | auth
EResponse | response
EUri | uri
ECnonce | cnonce
ENc | nc
E00000001 | 00000001
EPort | _000
EAuthentication | _Auth
ERedirect | _Red
EValidation | _Val
EProtocolHandler | _ProtH
EClient | Client.
ETextModeHeadersValidator | _thv
ESessionHeaderFilter | _shf
ECookieFilter | _ckf
EProxyUsage | _001
EProxyAddress | _002
EUseProxy | _003
EDoNotUseProxy | _004
EMaxNumTransportHandlers | _005
EMaxNumTransPerTranspHndlr | _006
EHTTPVersion | _007
EMaxRedirect | _008
EProtocol | Protocol.
EHTTP | HTTP.
EWSP | WSP.
EWspCapClientMessageSize | _009
EWspCapServerMessageSize | _00A
EWspCapUseAcknowledgements | _00B
EWspCapSupportSuspendResume | _00C
EWspCapMaxOutstandingRequests | _00D
EWspProxyAddress | _00E
EWspBearer | _00F
EWspIp | _010
EWspSMS | _011
EWspLocalPort | _012
EWspRemotePort | _013
EWspServiceNumber | _014
EWspSessionType | _015
EWspConnectionOriented | _016
EWspConnectionLess | _017
EWspSecurity | _018
EWspUseWtls | _019
EWspDoNotUseWtls | _01A
EWspProxyConnectionTimeout | _01B
EWspProxyExceptionInfo | _01C
EWspRemainingSDUSize | _01D
EWspRemainingMessageSize | _01E
EAuthenticatedOK | _01F
EAuthenticationFailure | _020
EUsername | Username.
EPassword | Password.
EAuthenticationStatus | Authentication:Status.
ERedirectCount | _021
EProtTrans | _022
EAnyAny * / *
ETextAny | text/ *
ETextHtml | text/html
ETextPlain | text/plain
ETextVndWapWml | text/vnd.wap.wml
EApplicationOctetStream | application/octet-stream
EApplicationXWwwFormUrlEncoded | application/x-www-form-urlencoded
ECookieName | _023
ECookieValue | _024
EPath | Path.
EComment | Comment.
ECommentURL | CommentURL.
EDiscard | Discard.
ECookiePort | Port.
ESecure | Secure.
EVersion | Version.
EHttpSocketServ | _025
EHttpSocketConnection | _026
ESecureDialog | _027

Definition at line 14 of file HttpStringConstants.h.

The documentation for this class was generated from the following file:
  • HttpStringConstants.h


RHTTPMessage Class Reference

@public
Since:
7.0 An abstract HTTP message.
More...

#include <rhttpmessage.h>

Inheritance diagram for RHTTPMessage:

[legend]
List of all members.

Public Methods

RHTTPMessage ()
Default (uninitialised) constructor.

IMPORT_C RHTTPHeaders | GetHeaderCollection ()
Returns the header collection for the message.

IMPORT_C void | SetBody (MHTTPDataSupplier &aBody)
Sets the messages body, replacing any existing body.

IMPORT_C void | RemoveBody ()
Removes the body.

IMPORT_C TBool | HasBody () const
Determine whether this message has any associated body data.

IMPORT_C MHTTPDataSupplier * | Body () const
Gets the body.

Detailed Description

@public
Since:
7.0 An abstract HTTP message.

In RFC2616, an HTTP message is defined as having a header and an optional body. This class is specialised for HTTP requests and responses.

Definition at line 29 of file rhttpmessage.h.

Constructor & Destructor Documentation

RHTTPMessage::RHTTPMessage ( ) [inline]

Default (uninitialised) constructor.

Definition at line 76 of file rhttpmessage.h.

Member Function Documentation

IMPORT_C MHTTPDataSupplier* RHTTPMessage::Body ( )

Gets the body.

The body is supplied as a MHTTPDataSupplier, which can be used to return the current data chunk, and to acknowledge when that chunk has been consumed by the client.

Note that the client can assume the body object will remain unchanged from when it receives the first data until the end of the transaction.

Returns:
A data supplier that provides access to a body data chunk. NULL if the body has not been set, or has been removed

IMPORT_C RHTTPHeaders RHTTPMessage::GetHeaderCollection ( )

Returns the header collection for the message.

IMPORT_C TBool RHTTPMessage::HasBody ( )

Determine whether this message has any associated body data.

Returns:
ETrue if there is some body data, EFalse if not.

IMPORT_C void RHTTPMessage::RemoveBody ( )

Removes the body.

IMPORT_C void RHTTPMessage::SetBody ( MHTTPDataSupplier & aBody )

Sets the messages body, replacing any existing body.

The body is supplied as a MHTTPDataSupplier, which will then return the data in 1 or more chunks on request.

Parameters:
aBody The data supplier that will supply the body.

The documentation for this class was generated from the following file:
  • rhttpmessage.h


RHTTPPropertySet Class Reference

@public
Since:
7.0 A set of named THTTPHdrVal objects.
More...

#include <rhttppropertyset.h>

Inheritance diagram for RHTTPPropertySet:

[legend]
List of all members.

Public Methods

IMPORT_C | RHTTPPropertySet ()
Default (uninitialised) constructor.

IMPORT_C TBool | Property (RStringF aPropertyName, THTTPHdrVal &aVal) const
Returns a property.

IMPORT_C void | SetPropertyL (RStringF aPropertyName, THTTPHdrVal aValue)
Sets or creates a property.

IMPORT_C void | RemoveProperty (RStringF aPropertyName)
Removes a named property.

IMPORT_C void | RemoveAllProperties ()
Removes all properties.

Detailed Description

@public
Since:
7.0 A set of named THTTPHdrVal objects.

Used for storing arbitrary collections of information.

Definition at line 29 of file rhttppropertyset.h.

Constructor & Destructor Documentation

IMPORT_C RHTTPPropertySet::RHTTPPropertySet ( )

Default (uninitialised) constructor.

An object constructed in this way means 'use text-mode HTTP with default settings'

Member Function Documentation

IMPORT_C TBool RHTTPPropertySet::Property | ( | RStringF | aPropertyName,
 |  | THTTPHdrVal & | aVal
 | ) | const

Returns a property.

Parameters:
aPropertyName | The name of the property.
aVal | The returned value of the property (if defined)
Returns:
ETrue if the property exists

IMPORT_C void RHTTPPropertySet::RemoveAllProperties ( )

Removes all properties.

IMPORT_C void RHTTPPropertySet::RemoveProperty ( RStringF aPropertyName )

Removes a named property.

Parameters:
aPropertyName The name of the property

IMPORT_C void RHTTPPropertySet::SetPropertyL | ( | RStringF | aPropertyName,
 |  | THTTPHdrVal | aValue
 | ) |

Sets or creates a property.

Parameters:
aPropertyName | The name of the property
aValue | The new value of the property
Exceptions:
KErrNoMemory There was not enough memory.

The documentation for this class was generated from the following file:
  • rhttppropertyset.h


RHTTPRequest Class Reference

@public
Since:
7.0 An HTTP Request.
More...

#include <rhttprequest.h>

Inheritance diagram for RHTTPRequest:

[legend]
Collaboration diagram for RHTTPRequest:

[legend]
List of all members.

Public Methods

Get Methods
Methods for reading information from the response.

IMPORT_C RStringF | Method () const
Gets the method name.

IMPORT_C const TUriC8 & | URI () const
Gets the URI.

Set Methods
Methods for setting information.

These methods will not be of use to the client; they are intended for the use of advanced filters

IMPORT_C void | SetMethod (RStringF aMethod)
Sets the method name.

IMPORT_C void | SetURIL (const TUriC8 &aURI)
Sets the URI.

Detailed Description

@public
Since:
7.0 An HTTP Request.

This class extends the abstract HTTP Message to add an HTTP method to be invoked on the resource at the remote HTTP server, and the URL that identifies that resource.

Definition at line 29 of file rhttprequest.h.

Member Function Documentation

IMPORT_C RStringF RHTTPRequest::Method ( )

Gets the method name.

IMPORT_C void RHTTPRequest::SetMethod ( RStringF aMethod )

Sets the method name.

IMPORT_C void RHTTPRequest::SetURIL ( const TUriC8 & aURI )

Sets the URI.

IMPORT_C const TUriC8& RHTTPRequest::URI ( )

Gets the URI.

The documentation for this class was generated from the following file:
  • rhttprequest.h


RHTTPResponse Class Reference

@public
Since:
7.0 An HTTP Response.
More...

#include <rhttpresponse.h>

Inheritance diagram for RHTTPResponse:

[legend]
Collaboration diagram for RHTTPResponse:

[legend]
List of all members.

Public Methods

Get Methods
Methods for reading information from the response.

IMPORT_C TInt | StatusCode () const
Returns the status code.

IMPORT_C RStringF | StatusText () const
Returns the status text, that is the text after the number on the first line of the response.

IMPORT_C TVersion | Version () const
Returns the version of HTTP used by the server.

Set Methods
Methods for setting information.

These methods will not be of use to the client; they are intended for the use of advanced filters

IMPORT_C void | SetStatusCode (TInt aStatus)
Sets the status code.

IMPORT_C void | SetStatusText (RStringF aStatusString)
Sets the status string.

IMPORT_C void | SetVersion (TVersion aVersion)
Sets the HTTP version.

Detailed Description

@public
Since:
7.0 An HTTP Response.

This class extends the abstract HTTP Message to add an HTTP version, a status code and status text.

Definition at line 28 of file rhttpresponse.h.

Member Function Documentation

IMPORT_C void RHTTPResponse::SetStatusCode ( TInt aStatus )

Sets the status code.

IMPORT_C void RHTTPResponse::SetStatusText ( RStringF aStatusString )

Sets the status string.

IMPORT_C void RHTTPResponse::SetVersion ( TVersion aVersion )

Sets the HTTP version.

IMPORT_C TInt RHTTPResponse::StatusCode ( )

Returns the status code.

IMPORT_C RStringF RHTTPResponse::StatusText ( )

Returns the status text, that is the text after the number on the first line of the response.

IMPORT_C TVersion RHTTPResponse::Version ( )

Returns the version of HTTP used by the server.

The documentation for this class was generated from the following file:
  • rhttpresponse.h


RHTTPSession Class Reference

@public
Since:
7.0 A session handle.
More...

#include <rhttpsession.h>

List of all members.

Public Methods

RHTTPSession ()
Constructor.

IMPORT_C void | SetSessionEventCallback (MHTTPSessionEventCallback *aSessionEventCallback)
Sets the session event callback.

IMPORT_C void | SendSessionEventL (THTTPSessionEvent aStatus, THTTPSessionEvent::TDirection aDirection, THTTPFilterHandle aStart=THTTPFilterHandle::EClient)
Send an session event.

IMPORT_C void | FailSessionEvent (THTTPFilterHandle aStart=THTTPFilterHandle::EClient)
Fail the session event.

IMPORT_C void | OpenL ()
Opens the session using the default protocol HTTP/TCP.

IMPORT_C void | OpenL (const TDesC8 &aProtocol)
Opens the session using the protocol indicated by the parameter passed in.

IMPORT_C void | OpenL (const TDesC8 &aProtocol, MHTTPFilterCreationCallback *aSessionCallback)
Opens the session using the protocol indicated by the parameter passed in.

IMPORT_C RHTTPTransaction | OpenTransactionL (const TUriC8 &aURI, MHTTPTransactionCallback &aCallback, RStringF aMethod=RStringF())
Creates a transaction.

IMPORT_C void | Close ()
Closes the session.

IMPORT_C RStringPool | StringPool () const
Accessor for the HTTP string pool.

IMPORT_C RHTTPConnectionInfo | ConnectionInfo () const
Accessor for the connection info for this session, and which is used for all transactions in the session.

RHTTPFilterCollection | FilterCollection () const
Accessor for the filter collection.

IMPORT_C RHTTPHeaders | RequestSessionHeadersL ()
Accessor for the session headers.

IMPORT_C RHTTPHeaders | ResponseSessionHeadersL ()
Accessor for the response session headers.

TBool | operator== (RHTTPSession aTrans) const
Equality operator.

TBool | operator!= (RHTTPSession aTrans) const
Inequality operator.

IMPORT_C TInt | ServerCert (TCertInfo &aServerCert)
Obtain the server certificate information for this session.

IMPORT_C void | ConnectL ()
Connect this WSP session.

IMPORT_C void | DisconnectL ()
Disconnect this WSP session.

Static Public Methods

IMPORT_C void | ListAvailableProtocolsL (RPointerArray< HBufC8 > &aProtocolArray)
This is a static methods that lists all the available protocols by adding the prorocol descriptors to the descriptor array passed in.

Detailed Description

@public
Since:
7.0 A session handle.

A session is a set of HTTP transactions using the same connection settings (e.g. proxy) and the same set of filters. Multi-homing support provided by HTTP framework enables clients to specify Connection preferences through the session property EHttpSocketConnection.

Note that RHTTPSession (and consequently the whole of HTTP) depends on the active scheduler; a scheduler must be installed when the session is opened and it must be running if a transaction is actually to do anything.

See also:
RHTTPTransaction

Definition at line 49 of file rhttpsession.h.

Constructor & Destructor Documentation

RHTTPSession::RHTTPSession ( ) [inline]

Constructor.

Postcondition:
The session is closed. (It must be opened with OpenL)
See also:
OpenL

Definition at line 218 of file rhttpsession.h.

Member Function Documentation

IMPORT_C void RHTTPSession::Close ( )

Closes the session.

All transactions will be stopped and closed

Postcondition:
The session and all open transactions in it are closed.

IMPORT_C RHTTPConnectionInfo RHTTPSession::ConnectionInfo ( )

Accessor for the connection info for this session, and which is used for all transactions in the session.

Note that by and large, the connection info should be set up before the first transaction is created.

Returns:
A handle to the connection inf.

IMPORT_C void RHTTPSession::ConnectL ( )

Connect this WSP session.

This function does nothing when called for text-mode.

IMPORT_C void RHTTPSession::DisconnectL ( )

Disconnect this WSP session.

This function does nothing when called for text-mode.

IMPORT_C void RHTTPSession::FailSessionEvent ( THTTPFilterHandle aStart = THTTPFilterHandle::EClient )

Fail the session event.

RHTTPFilterCollection RHTTPSession::FilterCollection ( ) [inline]

Accessor for the filter collection.

Note that the filter collection can't be edited after the first transaction has been created.

Definition at line 224 of file rhttpsession.h.

References RHTTPFilterCollection::iImplementation.

IMPORT_C void RHTTPSession::ListAvailableProtocolsL ( RPointerArray< HBufC8 > & aProtocolArray ) [static]

This is a static methods that lists all the available protocols by adding the prorocol descriptors to the descriptor array passed in.

Any existing data in the descriptor array passed in is deleted. This function leaves if the descriptor array can not be updated with the appropriate array code.

Parameters:
aProtocolArray A pointer array to heap based descriptors. The data in this array will be deleted and filled with descriptors containing the available protocols
See also:
OpenL

IMPORT_C void RHTTPSession::OpenL | ( | const TDesC8 & | aProtocol,
 |  | MHTTPFilterCreationCallback * | aSessionCallback
 | ) |

Opens the session using the protocol indicated by the parameter passed in.

This method should be used if configuring the installed filters is required. Once construction if the session is complete the callback method passed in is called passing in a TFilterConfigurationIterator to allow the filters that are installed to be configured. This function leaves with an apropriate code if the open failed.

Parameters:
aProtocol | The protocol required
aSessionCallback | The pointer to the object providing the call back method
Precondition:
The session is closed. An active scheduler is installed.
Postcondition:
The session is open.

IMPORT_C void RHTTPSession::OpenL ( const TDesC8 & aProtocol )

Opens the session using the protocol indicated by the parameter passed in.

This function leaves with an apropriate code if the open failed.

Parameters:
aProtocol The protocol required
Precondition:
The session is closed. An active scheduler is installed.
Postcondition:
The session is open.

IMPORT_C void RHTTPSession::OpenL ( )

Opens the session using the default protocol HTTP/TCP.

This function leaves with an apropriate code if the open failed.

Precondition:
The session is closed. An active scheduler is installed.
Postcondition:
The session is open.

IMPORT_C RHTTPTransaction RHTTPSession::OpenTransactionL | ( | const TUriC8 & | aURI,
 |  | MHTTPTransactionCallback & | aCallback,
 |  | RStringF | aMethod = RStringF()
 | ) |

Creates a transaction.

Precondition:
The session is open
Parameters:
aURI | The URI that the request will be sent to.
aCallback | A callback for all status events relating to this transaction.
aMethod | The HTTP method to use (default: GET)
Exceptions:
KErrNoMemory There was not enough memory.

TBool RHTTPSession::operator!= ( RHTTPSession aTrans ) const [inline]

Inequality operator.

Parameters:
aTrans The session to compare this one to.

Definition at line 235 of file rhttpsession.h.

TBool RHTTPSession::operator== ( RHTTPSession aTrans ) const [inline]

Equality operator.

Parameters:
aTrans The session to compare this one to.

Definition at line 231 of file rhttpsession.h.

References iImplementation.

IMPORT_C RHTTPHeaders RHTTPSession::RequestSessionHeadersL ( )

Accessor for the session headers.

These are headers that will get added to each request They only become part of the transaction headers when a transaction is submitted and they will not replace headers that already exist in the transaction request

IMPORT_C RHTTPHeaders RHTTPSession::ResponseSessionHeadersL ( )

Accessor for the response session headers.

These are headers that will get added to each response if the corresponding header doesn't already exist

IMPORT_C void RHTTPSession::SendSessionEventL | ( | THTTPSessionEvent | aStatus,
 |  | THTTPSessionEvent::TDirection | aDirection,
 |  | THTTPFilterHandle | aStart = THTTPFilterHandle::EClient
 | ) |

Send an session event.

Parameters:
aEvent. The session event to sent.

IMPORT_C TInt RHTTPSession::ServerCert ( TCertInfo & aServerCert )

Obtain the server certificate information for this session.

This function should only be used for WSP, for text-mode use RHttpTransaction::ServerCert.

See also:
RHttpTransaction::ServerCert
Parameters:
aServerCert A client supplied object into which the certificate information will be placed.
Returns:
KErrNone if certificate has been completed, KErrNotSupported if this function is called for text-mode.

IMPORT_C void RHTTPSession::SetSessionEventCallback ( MHTTPSessionEventCallback * aSessionEventCallback )

Sets the session event callback.

Until it is set all incoming session events are consumed

IMPORT_C RStringPool RHTTPSession::StringPool ( )

Accessor for the HTTP string pool.

Returns:
A handle for the string pool used in HTTP.

The documentation for this class was generated from the following file:
  • rhttpsession.h


THTTPSessionEvent Class Reference

@public
Since:
7.0 A HTTP session status message.
More...

#include <thttpevent.h>

Inheritance diagram for THTTPSessionEvent:

[legend]
Collaboration diagram for THTTPSessionEvent:

[legend]
List of all members.

Public Types

enum TSessionEvent {
EConnect = KSessionEventBaseStatus, EDisconnect = KSessionEventBaseStatus + 1, EConnectedOK = KSessionEventBaseStatus + 2, EConnectedWithReducedCapabilities = KSessionEventBaseStatus + 3,
EDisconnected = KSessionEventBaseStatus + 4, EAuthenticatedOK = KSessionEventBaseStatus + 5, EAuthenticationFailure = KSessionEventBaseStatus + 6, EConnectionTimedOut = KSessionEventBaseStatus + 7
}
The TSessionEvents type defines the evenst that correspond to the of a session entity. More...

enum TSessionWarning {
ENotConnected = KSessionWarningBaseStatus, EExceptionInfo = KSessionWarningBaseStatus + 1, ERedirected = KSessionWarningBaseStatus + 2, EAlreadyConnecting = KSessionWarningBaseStatus + 3,
EAlreadyConnected = KSessionWarningBaseStatus + 4, EAlreadyDisconnecting = KSessionWarningBaseStatus + 5, EAlreadyDisconnected = KSessionWarningBaseStatus + 6
}

Public Methods

THTTPSessionEvent (TInt aStatus, TUint aUID=KHTTPUid)
Constructor.

THTTPSessionEvent (TStandardEvent aStatus=EAnySessionEvent)
Constructor (using a standard event and the HTTP UID).

THTTPSessionEvent (TSessionEvent aStatus)
Constructor (using a session event and the HTTP UID).

THTTPSessionEvent & | operator= (TSessionEvent aStatus)
Assigns a session event code to an event object.

TBool | operator== (TSessionEvent aStatus) const
Equality operator (compares with a session event).

TBool | operator!= (TSessionEvent aStatus) const
Inequality operator (compares with a session event).

Detailed Description

@public
Since:
7.0 A HTTP session 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.

Definition at line 273 of file thttpevent.h.

Member Enumeration Documentation

enum THTTPSessionEvent::TSessionEvent

The TSessionEvents type defines the evenst that correspond to the of a session entity.

Outgoing events originate from the client or from filters. Incoming events originate from the protocol handler or from filters, and clients should handle these.

Enumeration values:
EConnect A session connection should be initiated.

An outgoing event.

EDisconnect The session should be disconnected.

An outgoing event.

EConnectedOK The session has been successfully connected.

None of the client requested capabilities were denied or reduced by the proxy. An incoming event.

EConnectedWithReducedCapabilities The session has been connected, but with one or more of the client requested capabilities denied or reduced by the proxy.

An incoming event.

EDisconnected The session has been disconnected.

This either confirms an earlier EDisconnect event or indicates a forced disconnection by the proxy. An incoming event.

EAuthenticatedOK | The authentication handshake succeeded with the automatic validation of the (proxy) server certificate.
EAuthenticationFailure | The authentication handshake failed.
EConnectionTimedOut | The connection attempt to the proxy timed out.

Definition at line 281 of file thttpevent.h.

enum THTTPSessionEvent::TSessionWarning

Enumeration values:
ENotConnected The client has requested a transaction event that requires a session to be connected or the connection to be initiated, but neither is currently true.

The transaction event will be left pending until the session is connected. An incoming event.

EExceptionInfo The proxy has sent some information that is not related to a transaction and has no effect on the state of the session.

The information from the proxy is in the EProxyExceptionInfo property.

ERedirected The client connection request was (permanently) redirected to a new WAP proxy address.

The client should check the EWspProxyAddress property for the new address. The client's access-point database can then be updated with this address. No notification is given of a temporary redirection.

EAlreadyConnecting | The client has requested a session event that is not valid whilst the WSP session is trying to establish a connection.
EAlreadyConnected | The client has requested a session event that is not valid whilst the WSP session is in the Connected state.
EAlreadyDisconnecting | The client has requested a session event that is not valid whilst the WSP session is trying to close the connection.
EAlreadyDisconnected | The client has requested a session event that is not valid whilst the WSP session is in the Null (or disconnected) state.

Definition at line 316 of file thttpevent.h.

Constructor & Destructor Documentation

THTTPSessionEvent::THTTPSessionEvent | ( | TInt | aStatus,
 |  | TUint | aUID = KHTTPUid
 | ) | [inline]

Constructor.

Parameters:
aStatus | The status value.
aUid | The UID.

THTTPSessionEvent::THTTPSessionEvent ( TStandardEvent aStatus = EAnySessionEvent ) [inline]

Constructor (using a standard event and the HTTP UID).

Parameters:
aStatus The standard event to use.

THTTPSessionEvent::THTTPSessionEvent ( TSessionEvent aStatus ) [inline]

Constructor (using a session event and the HTTP UID).

Parameters:
aStatus The session event to use.

Member Function Documentation

TBool THTTPSessionEvent::operator!= ( TSessionEvent aStatus ) const [inline]

Inequality operator (compares with a session event).

THTTPSessionEvent& THTTPSessionEvent::operator= ( TSessionEvent aStatus ) [inline]

Assigns a session event code to an event object.

Parameters:
aStatus The session event.

TBool THTTPSessionEvent::operator== ( TSessionEvent aStatus ) const [inline]

Equality operator (compares with a session event).

The documentation for this class was generated from the following file:
  • thttpevent.h


MHTTPSessionEventCallback Class Reference

@public
Since:
7.0 The per-session callback for receiving session event callbacks.
More...

#include <mhttpsessioneventcallback.h>

List of all members.

Public Methods

virtual void | MHFSessionRunL (const THTTPSessionEvent &aEvent)=0
Called when the filters registration conditions are satisfied for events that occur on the session.

virtual TInt | MHFSessionRunError (TInt aError, const THTTPSessionEvent &aEvent)=0
Called when MHFRunL leaves from a session event.

Detailed Description

@public
Since:
7.0 The per-session callback for receiving session event callbacks.

Definition at line 27 of file mhttpsessioneventcallback.h.

Member Function Documentation

virtual TInt MHTTPSessionEventCallback::MHFSessionRunError | ( | TInt | aError,
 |  | const THTTPSessionEvent & | aEvent
 | ) | [pure virtual]

Called when MHFRunL leaves from a session event.

This works in the same way as CActve::RunError If you don't completely handle the error, a panic will occur.

Parameters:
aError | The leave code that RunL left with.
aEvent | The Event that was being processed.
Returns:
KErrNone if the error has been cancelled or the code of the continuing error otherwise.

virtual void MHTTPSessionEventCallback::MHFSessionRunL ( const THTTPSessionEvent & aEvent ) [pure virtual]

Called when the filters registration conditions are satisfied for events that occur on the session.

@ param aEvent The session event that has occured. @ exception Any leaves must be handled by the appropriate MHFRunError.

The documentation for this class was generated from the following file:
  • mhttpsessioneventcallback.h


RHTTPTransaction Class Reference

@public
Since:
7.0 A HTTP Transaction.
More...

#include <RHTTPTransaction.h>

List of all members.

Public Methods

RHTTPTransaction ()
Default (uninitialised) constructor.

IMPORT_C void | SubmitL (THTTPFilterHandle aStart=THTTPFilterHandle::EClient)
Submits a transaction.

IMPORT_C void | NotifyNewRequestBodyPartL (THTTPFilterHandle aStart=THTTPFilterHandle::EClient)
Notify HTTP of the availability of more request body data, when submitting body data in several parts.

IMPORT_C void | SendEventL (THTTPEvent aStatus, THTTPEvent::TDirection aDirection, THTTPFilterHandle aStart)
Sends a status message to all relevant filters.

IMPORT_C RHTTPResponse | Response () const
Gets the response.

IMPORT_C RHTTPRequest | Request () const
Gets the request.

IMPORT_C RHTTPSession | Session () const
Returns the session associated with the transaction.

IMPORT_C RHTTPTransactionPropertySet | PropertySet () const
Returns the transaction's property set.

IMPORT_C void | Cancel (THTTPFilterHandle aStart=THTTPFilterHandle::EClient)
Cancels the transaction.

IMPORT_C void | Close ()
Closes the transaction and frees all owned resources.

IMPORT_C void | Fail (THTTPFilterHandle aStart=THTTPFilterHandle::ECurrentFilter)
This function should be called by filters when they have failed due to running out of memory.

TBool | operator== (RHTTPTransaction aTrans) const
Equality operator to check if this transaction is the same as that one.

TBool | operator!= (RHTTPTransaction aTrans) const
Inequality operator.

IMPORT_C TInt | Id () const
Obtain this transaction's ID, which is unique within its session.

IMPORT_C TInt | ServerCert (TCertInfo &aServerCert)
Obtain the server certificate information for this transaction.

Detailed Description

@public
Since:
7.0 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.

See also:
RHTTPSession , RHTTPSession::CreateTransactionL

Definition at line 38 of file RHTTPTransaction.h.

Constructor & Destructor Documentation

RHTTPTransaction::RHTTPTransaction ( ) [inline]

Default (uninitialised) constructor.

Definition at line 173 of file RHTTPTransaction.h.

Member Function Documentation

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

Cancels the transaction.

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

IMPORT_C void RHTTPTransaction::Close ( )

Closes the transaction and frees all owned resources.

Transactions must be opened using RHTTPSession::OpenTransactionL. It is also closed when you close the session.

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

IMPORT_C TInt RHTTPTransaction::Id ( )

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.

Returns:
The transaction ID.

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

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

Parameters:
aStart The filter supplying the new data. This will almost always be the client (default value)
Exceptions:
KErrNoMemory There was not enough memory.

TBool RHTTPTransaction::operator!= ( RHTTPTransaction aTrans ) const [inline]

Inequality operator.

Parameters:
aTrans The transaction to compare this one to.

Definition at line 168 of file RHTTPTransaction.h.

TBool RHTTPTransaction::operator== ( RHTTPTransaction aTrans ) const [inline]

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

Parameters:
aTrans The transaction to compare this one to.

Definition at line 164 of file RHTTPTransaction.h.

References iImplementation.

IMPORT_C RHTTPTransactionPropertySet RHTTPTransaction::PropertySet ( )

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.

IMPORT_C RHTTPRequest RHTTPTransaction::Request ( )

Gets the request.

IMPORT_C RHTTPResponse RHTTPTransaction::Response ( )

Gets the response.

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

See also:
RHTTPMessage::IsValid()

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

Sends a status message to all relevant filters.

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

Parameters:
aStatus | The status message to send.
aDirection | The direction down the filter queue that this event will be propogated.
Exceptions:
KErrNoMemory There was not enough memory.

IMPORT_C TInt RHTTPTransaction::ServerCert ( TCertInfo & aServerCert )

Obtain the server certificate information for this transaction.

This function should only be used for text-mode, for WSP use RHttpSession::ServerCert.

See also:
RHttpSession::ServerCert
Parameters:
aServerCert A client supplied object into which the certificate information will be placed.
Returns:
KErrNone if certificate has been completed, KErrNotSupported if this function is called for WSP.

IMPORT_C RHTTPSession RHTTPTransaction::Session ( )

Returns the session associated with the transaction.

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

Submits a transaction.

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

Exceptions:
KErrNoMemory There was not enough memory.

The documentation for this class was generated from the following file:
  • RHTTPTransaction.h


MHTTPTransactionCallback Class Reference

@public
Since:
7.0 The per-transaction callback for receiving HTTP events.
More...

#include <mhttptransactioncallback.h>

List of all members.

Public Methods

virtual void | MHFRunL (RHTTPTransaction aTransaction, const THTTPEvent &aEvent)=0
Called when the filter's registration conditions are satisfied for events that occur on a transaction.

virtual TInt | MHFRunError (TInt aError, RHTTPTransaction aTransaction, const THTTPEvent &aEvent)=0
Called when RunL leaves from a transaction event.

Detailed Description

@public
Since:
7.0 The per-transaction callback for receiving HTTP events.

Definition at line 27 of file mhttptransactioncallback.h.

Member Function Documentation

virtual TInt MHTTPTransactionCallback::MHFRunError | ( | TInt | aError,
 |  | RHTTPTransaction | aTransaction,
 |  | const THTTPEvent & | aEvent
 | ) | [pure virtual]

Called when RunL leaves from a transaction event.

This works in the same way as CActve::RunError; return KErrNone if you have handled the error. If you don't completely handle the error, a panic will occur.

Parameters:
aError | The leave code that RunL left with.
aTransaction | The transaction that was being processed.
aEvent | The Event that was being processed.
Returns:
KErrNone if the error has been cancelled or the code of the continuing error otherwise.

virtual void MHTTPTransactionCallback::MHFRunL | ( | RHTTPTransaction | aTransaction,
 |  | const THTTPEvent & | aEvent
 | ) | [pure virtual]

Called when the filter's registration conditions are satisfied for events that occur on a transaction.

Note that this function is not allowed to leave if called with certain events.

See also:
THTTPEvent
Parameters:
aTransaction | The transaction that the event has occurred on.
aEvent | The event that has occurred.
Exceptions:
Any Leaves must be handled by the appropriate MHFRunError.

The documentation for this class was generated from the following file:
  • mhttptransactioncallback.h


RHTTPTransactionPropertySet Class Reference

@public
Since:
7.0 The set of properties of a transaction.
More...

#include <rhttptransactionpropertyset.h>

Inheritance diagram for RHTTPTransactionPropertySet:

[legend]
Collaboration diagram for RHTTPTransactionPropertySet:

[legend]
List of all members.

Detailed Description

@public
Since:
7.0 The set of properties of a transaction.

This is used by filters to store per-transaction information, and is also used by the client to specify transaction properties (such as no caching, reload and so on)

Definition at line 28 of file rhttptransactionpropertyset.h.

The documentation for this class was generated from the following file:
  • rhttptransactionpropertyset.h


Hierarchical Index

HTTP API Class Hierarchy

Go to the graphical class hierarchy

This inheritance list is sorted roughly, but not completely, alphabetically:

  • MHTTPAuthenticationCallback
  • CAuthenticationFilterInterface
  • CAuthenticationFilterInterface::TAuthenticationParams
  • MHTTPDataSupplier
  • CEComFilter
  • THTTPEvent
    • THTTPSessionEvent
  • MHTTPFilterBase
    • MHTTPFilter
  • RHTTPFilterCollection
  • TFilterConfigurationIterator
  • MHTTPFilterCreationCallback
  • THTTPFilterHandle
  • TFilterInformation
  • THTTPFilterIterator
  • THTTPFilterRegistration
  • THTTPHdrFieldIter
  • THTTPHdrVal
  • THTTPHdrVal::TQConv
  • RHTTPHeaders
  • HTTP
  • RHTTPMessage
    • RHTTPRequest
    • RHTTPResponse
  • RHTTPPropertySet
    • RHTTPConnectionInfo
    • RHTTPTransactionPropertySet
  • RHTTPSession
  • MHTTPSessionEventCallback
  • RHTTPTransaction
  • MHTTPTransactionCallback


Compound Member Index

HTTP API Compound Members

a | b | c | d | e | f | g | h | i | k | l | m | n | o | p | q | r | s | t | u | v | ~

Here is a list of all documented class members with links to the classes they belong to:

- a -

  • AddFilterL() : RHTTPFilterCollection
  • AtEnd() : THTTPHdrFieldIter, THTTPFilterIterator, TFilterConfigurationIterator
  • AtStart() : TFilterConfigurationIterator

- b -

  • Body() : RHTTPMessage

- c -

  • Cancel() : RHTTPTransaction
  • CanChangeFilters() : RHTTPFilterCollection
  • Close() : RHTTPTransaction, RHTTPSession
  • ConfigureSessionFiltersL() : MHTTPFilterCreationCallback
  • ConnectionInfo() : RHTTPSession
  • ConnectL() : RHTTPSession
  • Copy() : THTTPHdrVal
  • CurrentFilterInformation() : TFilterConfigurationIterator

- d -

  • DateTime() : THTTPHdrVal
  • DisconnectL() : RHTTPSession

- e -

  • E00000001 : HTTP
  • E100Continue : HTTP
  • EAccept : HTTP
  • EAcceptCharset : HTTP
  • EAcceptEncoding : HTTP
  • EAcceptLanguage : HTTP
  • EAcceptRanges : HTTP
  • EAge : HTTP
  • EAlgorithm : HTTP
  • EAll : THTTPEvent
  • EAllow : HTTP
  • EAlreadyConnected : THTTPSessionEvent
  • EAlreadyConnecting : THTTPSessionEvent
  • EAlreadyDisconnected : THTTPSessionEvent
  • EAlreadyDisconnecting : THTTPSessionEvent
  • EAnyAny : HTTP
  • EAnySessionEvent : THTTPEvent
  • EAnyTransactionEvent : THTTPEvent
  • EApplicationOctetStream : HTTP
  • EApplicationXWwwFormUrlEncoded : HTTP
  • EAuth : HTTP
  • EAuthenticatedOK : HTTP, THTTPSessionEvent
  • EAuthentication : HTTP
  • EAuthenticationFailure : HTTP, THTTPSessionEvent
  • EAuthenticationStatus : HTTP
  • EAuthorization : HTTP
  • EBasic : HTTP
  • EBytes : HTTP
  • ECache : MHTTPFilter
  • ECacheControl : HTTP
  • ECancel : THTTPEvent
  • ECharset : HTTP
  • EChunked : HTTP
  • EClient : HTTP, THTTPFilterHandle, MHTTPFilter
  • EClientFilters : MHTTPFilter
  • EClose : HTTP
  • EClosed : THTTPEvent
  • ECnonce : HTTP
  • EComment : HTTP
  • ECommentURL : HTTP
  • ECompress : HTTP
  • ECONNECT : HTTP
  • EConnect : THTTPSessionEvent
  • EConnectedOK : THTTPSessionEvent
  • EConnectedWithReducedCapabilities : THTTPSessionEvent
  • EConnection : HTTP
  • EConnectionTimedOut : THTTPSessionEvent
  • EContentBase : HTTP
  • EContentDisposition : HTTP
  • EContentEncoding : HTTP
  • EContentLanguage : HTTP
  • EContentLength : HTTP
  • EContentLocation : HTTP
  • EContentMD5 : HTTP
  • EContentRange : HTTP
  • EContentType : HTTP
  • ECookie : HTTP
  • ECookie2 : HTTP
  • ECookieFilter : HTTP
  • ECookieName : HTTP
  • ECookiePort : HTTP
  • ECookies : MHTTPFilter
  • ECookieValue : HTTP
  • EDate : HTTP
  • EDeflate : HTTP
  • EDELETE : HTTP
  • EDigest : HTTP
  • EDiscard : HTTP
  • EDisconnect : THTTPSessionEvent
  • EDisconnected : THTTPSessionEvent
  • EDomain : HTTP
  • EDoNotUseProxy : HTTP
  • EETag : HTTP
  • EExceptionInfo : THTTPSessionEvent
  • EExpect : HTTP
  • EExpires : HTTP
  • EFailed : THTTPEvent
  • EFrom : HTTP
  • EGET : HTTP
  • EGotResponseBodyData : THTTPEvent
  • EGotResponseHeaders : THTTPEvent
  • EGotResponseTrailerHeaders : THTTPEvent
  • EGzip : HTTP
  • EHEAD : HTTP
  • EHost : HTTP
  • EHTTP : HTTP
  • EHttp10 : HTTP
  • EHttp11 : HTTP
  • EHttpSocketConnection : HTTP
  • EHttpSocketServ : HTTP
  • EHTTPVersion : HTTP
  • EIdentity : HTTP
  • EIfMatch : HTTP
  • EIfModifiedSince : HTTP
  • EIfNoneMatch : HTTP
  • EIfRange : HTTP
  • EIfUnmodifiedSince : HTTP
  • EIncoming : THTTPEvent
  • EKeepAlive : HTTP
  • ELastModified : HTTP
  • ELocation : HTTP
  • EMaxAge : HTTP
  • EMaxForwards : HTTP
  • EMaxNumTransPerTranspHndlr : HTTP
  • EMaxNumTransportHandlers : HTTP
  • EMaxRedirect : HTTP
  • EMaxStale : HTTP
  • EMinFresh : HTTP
  • EMoreDataReceivedThanExpected : THTTPEvent
  • EMustRevalidate : HTTP
  • ENc : HTTP
  • ENoCache : HTTP
  • ENonce : HTTP
  • ENone : HTTP
  • ENoStore : HTTP
  • ENotConnected : THTTPSessionEvent
  • ENotifyNewRequestBodyPart : THTTPEvent
  • ENoTransform : HTTP
  • EOnlyIfCached : HTTP
  • EOpaque : HTTP
  • EOPTIONS : HTTP
  • EOutgoing : THTTPEvent
  • EPassword : HTTP
  • EPath : HTTP
  • EPort : HTTP
  • EPOST : HTTP
  • EPragma : HTTP
  • EPrivate : HTTP
  • EProtocol : HTTP
  • EProtocolHandler : HTTP, THTTPFilterHandle, MHTTPFilter
  • EProtTrans : HTTP
  • EProxyAddress : HTTP
  • EProxyAuthenticate : HTTP
  • EProxyAuthorization : HTTP
  • EProxyRevalidate : HTTP
  • EProxyUsage : HTTP
  • EPublic : HTTP
  • EPUT : HTTP
  • EQ : HTTP
  • EQop : HTTP
  • ERange : HTTP
  • ERealm : HTTP
  • ERedirect : HTTP
  • ERedirectCount : HTTP
  • ERedirected : THTTPSessionEvent
  • ERedirectedPermanently : THTTPEvent
  • ERedirectedTemporarily : THTTPEvent
  • EReferer : HTTP
  • EResponse : HTTP
  • EResponseComplete : THTTPEvent
  • ERetryAfter : HTTP
  • ESecure : HTTP
  • ESecureDialog : HTTP
  • EServer : HTTP
  • ESessionHeaderFilter : HTTP
  • ESetCookie : HTTP
  • ESetCookie2 : HTTP
  • ESMaxAge : HTTP
  • EStale : HTTP
  • EStatusCodeHandler : MHTTPFilter
  • ESubmit : THTTPEvent
  • ESucceeded : THTTPEvent
  • ETE : HTTP
  • ETextAny : HTTP
  • ETextHtml : HTTP
  • ETextModeHeadersValidator : HTTP
  • ETextPlain : HTTP
  • ETextVndWapWml : HTTP
  • ETidyUp : MHTTPFilter
  • ETooMuchRequestData : THTTPEvent
  • ETRACE : HTTP
  • ETrailer : HTTP
  • ETransferEncoding : HTTP
  • EUndefined : THTTPFilterHandle
  • EUnrecoverableError : THTTPEvent
  • EUpgrade : HTTP
  • EUri : HTTP
  • EUseProxy : HTTP
  • EUserAgent : HTTP
  • EUsername : HTTP
  • EValidation : HTTP
  • EVary : HTTP
  • EVersion : HTTP
  • EVia : HTTP
  • EWarning : HTTP
  • EWSP : HTTP
  • EWspBearer : HTTP
  • EWspCapClientMessageSize : HTTP
  • EWspCapMaxOutstandingRequests : HTTP
  • EWspCapServerMessageSize : HTTP
  • EWspCapSupportSuspendResume : HTTP
  • EWspCapUseAcknowledgements : HTTP
  • EWspConnectionLess : HTTP
  • EWspConnectionOriented : HTTP
  • EWspDoNotUseWtls : HTTP
  • EWspIp : HTTP
  • EWspLocalPort : HTTP
  • EWspProxyAddress : HTTP
  • EWspProxyConnectionTimeout : HTTP
  • EWspProxyExceptionInfo : HTTP
  • EWspRemainingMessageSize : HTTP
  • EWspRemainingSDUSize : HTTP
  • EWspRemotePort : HTTP
  • EWspSecurity : HTTP
  • EWspServiceNumber : HTTP
  • EWspSessionType : HTTP
  • EWspSMS : HTTP
  • EWspUseWtls : HTTP
  • EWWWAuthenticate : HTTP

- f -

  • Fail() : RHTTPTransaction
  • FailSessionEvent() : RHTTPSession
  • FieldPartsL() : RHTTPHeaders
  • Fields() : RHTTPHeaders
  • FilterCollection() : RHTTPSession
  • FindByDataType() : TFilterConfigurationIterator
  • First() : THTTPHdrFieldIter, THTTPFilterIterator, TFilterConfigurationIterator

- g -

  • GetCredentialsL() : MHTTPAuthenticationCallback
  • GetField() : RHTTPHeaders
  • GetHeaderCollection() : RHTTPMessage
  • GetNextDataPart() : MHTTPDataSupplier
  • GetParam() : RHTTPHeaders
  • GetRawField() : RHTTPHeaders

- h -

  • HasBody() : RHTTPMessage

- i -

  • Id() : RHTTPTransaction
  • iDataType : TFilterInformation
  • iDisplayName : TFilterInformation
  • iEvent : THTTPFilterRegistration
  • iFilter : THTTPFilterRegistration
  • iFilterCategory : TFilterInformation
  • iFilterUid : TFilterInformation
  • iHandle : THTTPFilterRegistration
  • iHeader : THTTPFilterRegistration
  • iInstallStatus : TFilterInformation
  • iIsSessionEventFlag : THTTPEvent
  • iName : THTTPFilterRegistration
  • InstallAuthenticationL() : MHTTPAuthenticationCallback
  • InstallCurrentFilter() : TFilterConfigurationIterator
  • InstallFilterL() : CEComFilter, CAuthenticationFilterInterface
  • Int() : THTTPHdrVal
  • iPosition : THTTPFilterRegistration
  • IsSessionEvent() : THTTPEvent
  • iStatus : THTTPFilterRegistration, THTTPEvent
  • iUID : THTTPEvent
  • iVersion : TFilterInformation

- k -

  • KDateVal : THTTPHdrVal
  • KNoType : THTTPHdrVal
  • KStrFVal : THTTPHdrVal
  • KStrVal : THTTPHdrVal
  • KTIntVal : THTTPHdrVal

- l -

  • ListAvailableProtocolsL() : RHTTPSession

- m -

  • Method() : RHTTPRequest
  • MHFLoad() : MHTTPFilter
  • MHFRunError() : MHTTPTransactionCallback, MHTTPFilterBase
  • MHFRunL() : MHTTPTransactionCallback, MHTTPFilterBase
  • MHFSessionRunError() : MHTTPSessionEventCallback, MHTTPFilterBase
  • MHFSessionRunL() : MHTTPSessionEventCallback, MHTTPFilterBase
  • MHFUnload() : MHTTPFilter

- n -

  • Next() : TFilterConfigurationIterator
  • NotifyNewRequestBodyPartL() : RHTTPTransaction

- o -

  • OpenL() : RHTTPSession
  • OpenTransactionL() : RHTTPSession
  • operator *() : THTTPFilterIterator
  • operator RString() : THTTPHdrVal
  • operator RStringF() : THTTPHdrVal
  • operator TDateTime() : THTTPHdrVal
  • operator TInt() : THTTPHdrVal
  • operator!=() : THTTPHdrVal, THTTPFilterRegistration, THTTPSessionEvent, THTTPEvent, RHTTPTransaction, RHTTPSession
  • operator()() : THTTPHdrFieldIter, THTTPFilterIterator
  • operator++() : THTTPHdrFieldIter, THTTPFilterIterator
  • operator->() : THTTPFilterIterator
  • operator=() : THTTPSessionEvent, THTTPEvent
  • operator==() : THTTPHdrVal, THTTPFilterRegistration, THTTPSessionEvent, THTTPEvent, RHTTPTransaction, RHTTPSession
  • OverallDataSize() : MHTTPDataSupplier

- p -

  • Property() : RHTTPPropertySet
  • PropertySet() : RHTTPTransaction

- q -

  • Query() : RHTTPFilterCollection

- r -

  • ReleaseData() : MHTTPDataSupplier
  • RemoveAllFields() : RHTTPHeaders
  • RemoveAllProperties() : RHTTPPropertySet
  • RemoveBody() : RHTTPMessage
  • RemoveField() : RHTTPHeaders
  • RemoveFieldPart() : RHTTPHeaders
  • RemoveFilter() : RHTTPFilterCollection
  • RemoveProperty() : RHTTPPropertySet
  • Request() : RHTTPTransaction
  • RequestSessionHeadersL() : RHTTPSession
  • Reset() : MHTTPDataSupplier
  • Response() : RHTTPTransaction
  • ResponseSessionHeadersL() : RHTTPSession
  • RHTTPHeaders() : RHTTPHeaders
  • RHTTPMessage() : RHTTPMessage
  • RHTTPPropertySet() : RHTTPPropertySet
  • RHTTPSession() : RHTTPSession
  • RHTTPTransaction() : RHTTPTransaction

- s -

  • SendEventL() : RHTTPTransaction
  • SendSessionEventL() : RHTTPSession
  • ServerCert() : RHTTPTransaction, RHTTPSession
  • Session() : RHTTPTransaction
  • SetBody() : RHTTPMessage
  • SetDateTime() : THTTPHdrVal
  • SetFieldL() : RHTTPHeaders
  • SetInt() : THTTPHdrVal
  • SetMethod() : RHTTPRequest
  • SetParamL() : RHTTPHeaders
  • SetPropertyL() : RHTTPPropertySet
  • SetRawFieldL() : RHTTPHeaders
  • SetSessionEventCallback() : RHTTPSession
  • SetStatusCode() : RHTTPResponse
  • SetStatusText() : RHTTPResponse
  • SetStr() : THTTPHdrVal
  • SetStrF() : THTTPHdrVal
  • SetURIL() : RHTTPRequest
  • SetVersion() : RHTTPResponse
  • StatusCode() : RHTTPResponse
  • StatusText() : RHTTPResponse
  • StrF() : THTTPHdrVal
  • StringPool() : RHTTPSession
  • SubmitL() : RHTTPTransaction

- t -

  • TDirection : THTTPEvent
  • TFilterCategory : TFilterInformation
  • TFilterInformation() : TFilterInformation
  • THTTPEvent() : THTTPEvent
  • THTTPFilterIterator() : THTTPFilterIterator
  • THTTPFilterRegistration() : THTTPFilterRegistration
  • THTTPHdrFieldIter() : THTTPHdrFieldIter
  • THTTPHdrVal() : THTTPHdrVal
  • THTTPSessionEvent() : THTTPSessionEvent
  • THTTPValType : THTTPHdrVal
  • TPositions : MHTTPFilter
  • TSessionEvent : THTTPSessionEvent
  • TSessionWarning : THTTPSessionEvent
  • TStandardEvent : THTTPEvent
  • TStandardValues : THTTPFilterHandle
  • TStrings : HTTP
  • TTransactionEvent : THTTPEvent
  • TTransactionWarning : THTTPEvent
  • Type() : THTTPHdrVal

- u -

  • UninstallCurrentFilter() : TFilterConfigurationIterator
  • URI() : RHTTPRequest

- v -

  • Version() : RHTTPResponse

- ~ -

  • ~CAuthenticationFilterInterface() : CAuthenticationFilterInterface
  • ~CEComFilter() : CEComFilter
  • ~THTTPHdrFieldIter() : THTTPHdrFieldIter


Page Index

HTTP API Related Pages

Here is a list of all related documentation pages:
  • API Guide - Introduction
  • API Guide - Overview
  • API Guide - A Simple Client Session
  • API Guide - Handling Request Body Data
  • API Guide - Cancelling And Closing Transactions
  • API Guide - API required for WSP
  • API Guide - Session And Transaction Properties
  • API Guide - Filters


API Guide - Introduction

Owner: | Application Engines Group
Author: | Paul Hadfield
Contributers: | Leon Clarke
Last Revised: | 10-Jul-2001.
Status: | Draft
Reviewers: | David Harper, Leon Clarke
Approval: | (PM) Urmi Shah, (ESM) Akin Oyesola, (Architect) Brian Evans
Open Issues:
Requires update for loading filters using the TFilterConfigurationIterator with code samples
Requires string pool updates
Requires more/updated code samples, more for WSP
Doxygen does not compile past section 9.1, all API doc is lost after this section

Contents

1. Introduction
1.1 Scope
1.2 References
2 HTTP Client Overview
2.1 Purpose
2.2 Architectural Relationships
2.3 Description
2.3.1 Sessions
2.3.2 Transactions
2.3.3 Headers
2.3.4 Data Suppliers
2.3.5 Filters
3 A Simple Client Session
3.1 Opening The Session
3.2 Creating A Transaction
3.3 Setting Request Headers
3.4 Starting The Transaction
3.5 Receiving Transaction Events
3.6 Sending Session Events
3.7 Receiving Session Events
3.8 Obtaining The Response Status
3.9 Obtaining The Response Headers
3.10 Obtaining The Response Body
3.11 Completing The Transaction
3.12 Terminating The Session
4 Handling Request Body Data
4.1 Specifying A Request Data Supplier
4.2 Signalling New Body Data
4.3 Streaming Body Data
5 Cancelling And Closing Transactions
6 WSP API
6.1 Session API
6.2 Session headers
7 Session Properties
7.1 HTTP Version
7.2 Specifying An HTTP Proxy
7.3 Tuning The HTTP Protocol Handler
7.4 Transaction Properties
7.5 WSP Session Properties
7.5.1 Proxy Information Properties
7.5.2 Capability Properties
7.5.3 Miscellaneous properties
7.6 WSP Transaction Properties
8 Filters
8.1 Adding, Removing and Querying Filters
8.2 Authentication Filter
8.3 Redirection Filter
8.4 Validation Filter
8.5 Configuring & Installing Filters
8.6 Writing A Filter
9 Headers
9.1 Header Structure
9.2 Adding, Removing and Accessing Header Field Parts
9.3 Adding, Removing and Accessing Header Field Parameters
9.4 Specific Header Format
9.4.1 Accept
9.4.2 Accept-Charset
9.4.3 Authorisation
9.4.4 Connection
9.4.5 Content-Length
9.4.6 Content-Type
9.4.7 Date
9.4.8 Host
APIGd9z4z9TransEnc
9.4.10 User-Agent
9.4.11 WWW-Authenticate
10 Retrieving Server Certificates
11 The HTTP String Table
11.1 Using Multiple Sessions

1. Introduction

1.1 Scope

This document provides a guide for usage of the HTTP Client API. Most public APIs are covered; however for a full description of each API see [Ref. 1]

1.2 References

All Documents can be found in \londata04\psisoft\Dev\GT\GT 0102 HTTP Client 6.2\… unless otherwise stated.
[Ref.1] SGL.GT0102.00x HTTP Client 6.2 API Reference
[Ref.2] Hypertext Transfer Protocol 1.1 [RFC 2616] <http://www.ietf.org/rfc/rfc2616.txt?number=2616>

Contents

Author : Technical Architect (Browsing),
API documentation auto-generated by Doxygen from the latest commented source.
Copyright © 2001 Symbian Ltd. All rights reserved.


API Guide - Overview

2 HTTP Client Overview

2.1 Purpose

The HTTP Client API provides a client interface for Internet applications to use the HTTP Protocol [Ref. 2] for communication with HTTP servers on the Internet. Using the API correctly enables the application to be a conditionally HTTP 1.1 compliant client, as defined in [Ref. 2].

2.2 Architectural Relationships

The HTTP Client architecture provides a generalised mechanism for HTTP-like protocols that operate over various transports. Using a single API, a client can choose an HTTP protocol, encoding and transport. The client is not expected to implement anything else specific to those choices in its own code. The default operation provides plain-text HTTP (as defined in [Ref. 2]) operating over a TCP/IP connection via ESOCK.

2.3 Description

There are five key concepts used in the API: sessions, transactions, headers, data suppliers and filters.

2.3.1 Sessions

A session encapsulates the client's HTTP activity over the duration of the client's execution. Usually one session is used at a time; however the client may use several concurrently if desired. Each session has an associated set of properties, which define the HTTP protocol, encoding and transport that are used. Those properties apply to all HTTP transactions carried out within the life of that session. The session also has an associated set of filters, that provide additional automatic behaviours on the client's behalf.

The session class is provided by RHTTPSession.

2.3.2 Transactions

A transaction represents an interation between the HTTP client and an HTTP origin server. Normally a transaction consists of a single exchange of messages between client and server - a client request and a server response. However the transaction may be extended by filters that operate on it.

Transactions execute asychronously within the client's process. The client is notified when events are available for each outstanding transaction.

Both the request and response portion of a transaction are composed of a header and an optional body. The request portion of the transaction also specifies an HTTP Method that describes the type of operation that the client wishes to invoke at the origin server, together with a URI that specifies the resource held at the server on which the method is to be invoked. The response portion of a transaction contains an HTTP status code and message, which indicate the success of the method or the state of the resource following the method. The use of request and response bodies is determined by the HTTP method in use; e.g. in error conditions, some servers may just return a status code and message, providing no entity body.

The transaction class is provided by RHTTPTransaction.

2.3.3 Headers

The header portion of requests and responses may have zero or more fields, which are used to convey information between the HTTP client and server. The information might relate to the data conveyed in body of the message, to the actual connection between the client and server, or might be used to convey data describing the client or server themselves. Headers as transmitted to or received from the HTTP server will be in an encoded form, according to the HTTP protocol and encoding that are used. Since the HTTP API gives clients implementation independence from these choices, a generic form is used to represent header data in the API.

The headers class is provided by RHTTPHeaders.

2.3.4 Data Suppliers

The body portion of requests and responses is represented in the API as a mix-in interface, allowing the real implementation of the classes that generate body data to be wholly hidden. The API enables signalling between the client and the transport in use, to ensure that body data is only consumed or emitted at a rate the client can support. This means that clients can assemble the body of their requests piece-by-piece, have each piece transmitted only when it is ready, and be signalled when transmission is complete so the next piece may be prepared and the old one released.

Data supplier classes must implement MHTTPDataSupplier.

2.3.5 Filters

Filters are add-on modules that provide additional behaviours to a session beyond the simple request-response transaction described above. Behaviours may be triggered by the presence of particular headers in a request or a response; by status codes in a response, or by particular events that occur on a transaction. The HTTP RFC [Ref. 2] describes a number of standard behaviours that take place over a series of request-response exchanges - client authentication, redirection and caching. The former two are implemented as individual filters in the 6.2 release.

Since the representation of headers is generic as described in 2.3.3 Headers, filters may be implemented in a protocol- and transport-independent manner.

Filter classes must implement MHTTPFilter.

2.4 Example Code

Example code used throughout this guide is taken from HTTPEXAMPLECLIENT, a simple console application that provides a menu-driven interface to the HTTP API.

Contents


API Guide - A Simple Client Session

3 A Simple Client Session

This chapter describes each of the stages needed to use HTTP for a single, simple transaction. The code fragments are taken from HTTPEXAMPLECLIENT.

3.1 Opening The Session

A new HTTP Client session is started by declaring a RHTTPSession object, which must remain in scope for the duration of the session, and invoking one of the RHTTPSession::OpenL methods. The first RHTTPSession::OpenL takes no parameters and uses the the default protocol HTTP/TCP. The second overload allows the protocol to be specified using a descriptor passed in and the third overload takes parameters for the protocol to use and a callback to indicate to the client the the session is created and allows to further manual configurability. Usually, the RHTTPSession handle is a data member of a client class:

From the header file httpexampleclient.h:

    class CHttpClient : public CBase, ...
        {
        ...
    private:
        RHTTPSession iSession;
        ...
        };

From the implementation file httpexampleclient.cpp:

    CHttpClient::CHttpClient()
        {
        ...
        iSession.OpenL();
        ...
        }

To create a session using a particular protocol, the example code below should be written as follows:

    ...
    _LIT8(KTxtWsp, "WSP/WSP");
    iSession.OpenL(KTxtWsp());
    ...

A static method is also avaiable on the session to allow the user to see what protocols are available on the device before the session is open. This is shown in the example code below:

    ...
    RPointerArray<HBufC> protocolArray;
    iSession.ListAvailableProtocolsL(protocolArray);
    for(TInt i=0; i<protocolArray.Count(); ++i)
        {
        // Do some protocol decision coding here
        break;
        }
    iSession.OpenL(protocolArray[i].Des());
    protocolArray.ResetAndDestroy();
    ...

The session also allows the clients to further configure the session by adding and removing filters. This method of opening the session to further customise the session is detailed in 8 Filters.

3.2 Creating A Transaction

To create a new transaction within the session, the client must specify a URI, an HTTP method and a callback object that is used to receive events that arise during the transaction. The callback object must implement the MHTTPTransactionCallback interface.

The RHTTPTransaction handle returned by the session uniquely identifies the new transaction. It may be stored in a class data member, but this isn't mandatory.

    void CHttpClient::InvokeHttpMethodL(const TDesC8& aUri, RStringF aMethod)
        {
        ...
        TUriParser8 uri;
        uri.Parse(aUri);
        RHTTPTransaction trans = iSession.OpenTransactionL(uri, *iTransObs, aMethod);
        ...
        };

The second parameter to RHTTPSession::OpenTransactionL() provides the transaction callback. The class which implements the callback is separate in HTTPEXAMPLECLIENT.

From the header file httpexampleclient.h:

    class CHttpEventHandler : public CBase, public MHTTPTransactionCallback
        {
    public:
        //
        // methods from MHTTPTransactionCallback
        //
        void MHFRunL(RHTTPTransaction aTransaction, THTTPEvent aEvent);
        TInt MHFRunError(TInt aError, RHTTPTransaction aTransaction, THTTPEvent aEvent);

The two callback methods are inherited from MHTTPFilterBase - hence the MHF prefix to their names. This is an interesting feature of the HTTP Client design - client code is treated like a filter. The use of these methods is described later.

3.3 Setting Request Headers

After opening the transaction, the client may set request headers, if desired. Note that the use of request headers is optional for very simple transactions - the few headers that the HTTP RFC [Ref. 2] describes as mandatory for HTTP/1.1 are automatically generated.

To access the headers associated with a transaction's request or response, the RHTTPHeaderCollection class is used. The handle is obtained from either the RHTTPRequest or RHTTPResponse objects associated with the transaction.

From the implementation file httpexampleclient.cpp:

        RHTTPHeaders hdr = trans.Request().GetHeaderCollection();

        // Add headers appropriate to all methods
        SetHeaderL(hdr, HTTP::EUserAgent, KUserAgent);
        SetHeaderL(hdr, HTTP::EAccept, KAccept);
        ...
    void CHttpClient::SetHeaderL(RHTTPHeaders aHeaders, TInt aHdrField, const TDesC8& aHdrValue)
        {
        RStringF valStr = iSession.StringPool().OpenFStringL(aHdrValue);
        THTTPHdrVal val(valStr);
        aHeaders.SetFieldL(iSession.StringPool().StringF(aHdrField), val);
        valStr.Close();
        }

Note that the header field types are specified using enumerations from the HTTP namespace, e.g. HTTP::EUserAgent. The class used to hold the header field value, THTTPHdrVal, is like a C++ union, in that it can hold different data types. In this example, it holds an RStringF value which is initialised using the session's string-pool from the supplied descriptor. These must be 8-bit strings, since the HTTP RFC [Ref. 2] assumes a 7-bit encoding for all transmissions.

3.4 Starting The Transaction

When headers have been set, a simple transaction with no request body can be started immediately. This is the case for HTTP methods such as GET, HEAD, TRACE. Some other HTTP methods include a body in the request, e.g. POST. The data supplier that the client uses to supply request body data must be associated with the transaction before the transaction is started.

In HTTPEXAMPLECLIENT, the CHttpClient class also acts as its own data supplier when the POST method is chosen in the menu. See 4 Handling Request Body Data for examples of code that provides a request body.

When the transaction ready to start, the client calls RHTTPTransaction::SubmitL() to indicate that the request should be submitted. From the implementation file httpexampleclient.cpp:

        ...
        // submit the transaction
        trans.SubmitL();

        // Start the scheduler, once the transaction completes or is cancelled on an error the scheduler will be
        // stopped in the event handler
        CActiveScheduler::Start();

The HTTPEXAMPLECLIENT application is implemented as a synchronous client, hence the local CActiveScheduler. When CActiveScheduler::Stop() is called upon completion of the transaction, execution continues from this point. More complex applications will have an active scheduler elsewhere that should already be running.

3.5 Receiving Transaction Events

The transaction is now processed by HTTP. All processing by the internal HTTP core and protocol/transport handlers is done in the client's thread. As data is received from the HTTP server, events are generated internally and passed back to the client via the session filters. When an event reaches the client. HTTP invokes the transaction callback.

From the implementation file httpexampleclient.cpp:

    void CHttpEventHandler::MHFRunL(RHTTPTransaction aTransaction, THTTPEvent aEvent)
        {
        switch (aEvent.iStatus)
            {
            case THTTPEvent::EGotResponseHeaders:
                {
                ...
                } break;
            case THTTPEvent::EGotResponseBodyData:
                {
                ...
                } break;
            case THTTPEvent::EResponseComplete:
                {
                ...
                } break;
            case THTTPEvent::ESucceeded:
                {
                ...
                } break;
            case THTTPEvent::EFailed:
                {
                ...
                } break;
            default:
                {
                ...
                } break;
            }
        }

Events are processed in turn by the client. They arrive in the order shown in the example code above. The following table explains the events' meanings:

THTTPEvent::EGotResponseHeaders | indicates that the response status is known, and that the headers from the response are ready for access by the client. This event will always be the first received, unless an error condition has arisen.
THTTPEvent::EGotResponseBodyData | indicates that some body data is ready for processing. Response bodies are generally large enough to require splitting into smaller pieces (due to the use of fixed-size internal buffers), so the event will arrive as many times as there are pieces, until the whole body has been retrieved.
THTTPEvent::EResponseComplete | indicates that the transaction's response has been completely received. The client can now expect to be told whether the transaction was successful or not.
THTTPEvent::ESucceeded | One of two possible final messages that indicate success of the transaction
THTTPEvent::EFailed | Second of two possible final messages that indicate failure of the transaction
(anything else) | An unrecognised event. Negative values indicate an error propogated from filters or lower comms layers. If not understood by the client, error values may be safely ignored since a THTTPEvent::EFailed event is guaranteed to follow. Positive values are used for warning conditions.

3.6 Sending Session Events

Methods RHTTPSession::SetSessionEventCallback(MHTTPSessionEventCallback*) and RHTTPSession::SendSessionEventL(THTTPSessionEvent, THTTPEvent::TDirection, THTTPFilterHandle) are used to provide support for session events. The callback is rather like MHTTPTransactionCallback and is used by the client to receive session events. SendSessionEventL() provides a general mechanism for the client, protocol handlers and filters to send session events in either direction.

3.7 Receiving Session Events

The following session events have been added for WSP and should be handled in the MHTTPSessionEventCallback::MHFSessionRunL() in a similiar way to that shown in 3.5 Receiving Transaction Events:

Connection events:

EConnectedOK | this event indicates that a successful proxy connection was established with no client-requested capabilities denied by the proxy
EConnectedWithReducedCapabilities | this event indicates that a successful proxy connection was established with one or more client-requested capabilities reduced or denied by the proxy
EConnectionTimedOut | this event indicates that the Proxy connection timed out

Disconnection events:

EDisconnected | this event indicates that the current session has been disconnected. This either confirms the client's use of RHTTPSession::DisconnectL() or indicates a forced disconnection by the WAP Proxy
ERedirected | this event indicates that the client connection request was redirected to a new WAP Proxy address. The client should check the EWspProxyAddress property and update its access-point database with the new address. (This is WSP permanent redirection - no notification will be sent to the client of temporary redirection)

Authentication events:

EAuthenticatedOK | this event indicates that the authentication handshake succeeded with automatic validation of the server certificate
EAuthenticationFailure | this event indicates that the authentication handshake failed

3.8 Obtaining The Response Status

To obtain the response status code, and text description, the transaction response is used:

        case THTTPEvent::EGotResponseHeaders:
            {
            RHTTPResponse resp = aTransaction.Response();
            TInt status = resp.StatusCode();
            RStringF statusStr = resp.StatusText();

3.9 Obtaining The Response Headers

The response headers can be iterated using the THTTPHdrFieldIter class. Individual header fields can be queried as in this example:

        RHTTPResponse resp = aTrans.Response();
        RStringPool strP = aTrans.Session().StringPool();
        RHTTPHeaders hdr = resp.GetHeaderCollection();
        THTTPHdrFieldIter it = hdr.Fields();

        TBuf<KMaxHeaderNameLen>  fieldName16;
        TBuf<KMaxHeaderValueLen> fieldVal16;

        while (it.AtEnd() == EFalse)
            {
            // Get the name of the next header field
            RStringTokenF fieldName = it();
            RStringF fieldNameStr = strP.StringF(fieldName);

            // Check it does indeed exist
            THTTPHdrVal fieldVal;
            if (hdr.GetField(fieldNameStr,0,fieldVal) == KErrNone)
                {
                ...
                // Display realm for WWW-Authenticate header
                RStringF wwwAuth = strP.StringF(HTTP::EWWWAuthenticate,RHTTPSession::GetTable());
                if (fieldNameStr == wwwAuth)
                    {
                    // check the auth scheme is 'basic'
                    RStringF basic = strP.StringF(HTTP::EBasic,RHTTPSession::GetTable());
                    RStringF realm = strP.StringF(HTTP::ERealm,RHTTPSession::GetTable());
                    THTTPHdrVal realmVal;
                    if (fieldVal.StrF() == basic)

                        // check the header has a 'realm' parameter
                        if (hdr.GetParam(wwwAuth, realm, realmVal) == KErrNone)
                        {
                        RStringF realmValStr = strP.StringF(realmVal.StrF());
                        fieldVal16.Copy(realmValStr);
                        Printf(_L("Realm is: %S\n"), &fieldVal16);
                        }
                    }
                }
            // Advance the iterator
            ++it;
            }

3.10 Obtaining The Response Body

To access the response body, the data supplier contained in the transaction response must be used. When the client has finished processing each piece of body data, the data must be released:

        case THTTPEvent::EGotResponseBodyData:
            {
            // Some (more) body data has been received. Get the body data supplier
            MHTTPDataSupplier* body = aTransaction.Response().Body();
            TPtrC8 dataChunk;
            TBool isLast = body->GetDataChunk(dataChunk);
            Dump(dataChunk);
            if (isLast)
                Printf(_L("Got the last data chunk.\n"));

            // Done with that bit of body data
            body->ReleaseData();
            } break;

The MHTTPDataSupplier::OverallDataSize() method can be used to find out how large the entire body is before processing the body data. The value returned is based on the HTTP response Content-Length header. Not all responses will include this header however - e.g. when the HTTP server is using the 'chunked' transfer encoding. In that circumstance, the overall data size will be returned as KErrNotFound.

Regardless of that, the final piece of body data will always cause MHTTPDataSupplier::GetDataChunk() to return ETrue.

3.11 Completing The Transaction

In HTTPEXAMPLECLIENT, the final completion of the transaction (indicated with a success or failure message) causes the local active scheduler to stop. The EResponseComplete code is not used for anything special here. Since each transaction is guaranteed to send either an ESucceeded event or an EFailed event, those can be used as a signal to finish.

        case THTTPEvent::EResponseComplete:
            {
            // The transaction's response is complete
            Printf(_L("\nTransaction Complete\n"));
            } break;
        case THTTPEvent::ESucceeded:
            {
            Printf(_L("Transaction Successful\n"));
            aTransaction.Close();
            CActiveScheduler::Stop();
            } break;
        case THTTPEvent::EFailed:
            {
            Printf(_L("Transaction Failed\n"));
            aTransaction.Close();
            CActiveScheduler::Stop();
            } break;

The transaction is closed using RHTTPTransaction::Close(). This causes resources associated with that transaction to be freed interally. The transaction should not be used again.

3.12 Terminating The Session

When the client is ready to terminate, the session is closed:

        CHttpClient::~CHttpClient()
        {
        iSession.Close();
        ...
        }

Closing the session causes all resources to be returned to the system. Any remaining transactions that weren't complete are immediately cancelled.

Contents


API Guide - Handling Request Body Data

4 Handling Request Body Data

HTTP methods POST and PUT both require a request body to be specified by the client before a transaction is submitted. Also required in the request is a Content-Type header, to inform the HTTP server of the body data's media (MIME) type.

If the body or Content-Type header are absent, an error will be returned as an event. See 8.4 Validation Filter for details of errors that can be sent.

4.1 Specifying A Request Data Supplier

The following code fragment from HTTPEXAMPLECLIENT demonstrates a request body being set:

    void CHttpClient::InvokeHttpMethodL(const TDesC8& aUri, RStringF aMethod)
        {
        ...
        RHTTPTransaction trans = iSess.OpenTransactionL(uri, *iTransObs, aMethod);
        RHTTPHeaders hdr = trans.Request().GetHeaderCollection();
        ...
        // Add headers and body data for methods that use request bodies
        if (iHasARequestBody)
            {
            // Content type header
            TBuf8<KMaxContentTypeSize> contTypeBuf;
            contTypeBuf.Copy(iReqBodyContentType);
            RStringF contTypeStr = iSess.StringPool().OpenFStringL(contTypeBuf);
            THTTPHdrVal contType(contTypeStr);
            hdr.SetFieldL(iSess.StringPool().StringF(HTTP::EContentType,RHTTPSession::GetTable()), contType);
            contTypeStr.Close();

            MHTTPDataSupplier* dataSupplier = this;
            if (iManualPost)
                dataSupplier = iFormEncoder;
            trans.Request().SetBody(*dataSupplier);
            }

        // submit the transaction
        trans.SubmitL();

The code uses two alternative alterative implementations of MHTTPDataSupplier: the second method, not described here, is the CHTTPFormEncoder class - a utility to encode a series of field name-value pairs into the URI-encoded form, as used by Web/WAP browsers to send data the user has entered into text boxes.

The first method sets the request body data supplier to be the CHttpClient object itself. From the header file httpexampleclient.h:

        class CHttpClient : public CBase, public MHTTPDataSupplier,
        ...
            {
        ...
        public: // methods inherited from MHTTPDataSupplier
            virtual TBool GetDataChunk(TPtrC8& aDataChunk);
            virtual void ReleaseData();
            virtual TInt OverallDataSize();
        ...
        };

The client must implement the three pure-virtual methods of MHTTPDataSupplier to allow HTTP to obtain the body data it needs as it assembles an HTTP request.

GetDataChunk() | When this method is invoked, the client must set the aDataChunk parameter to point at an 8-bit data buffer that is populated with the next piece of body data to be transmitted. If this buffer holds the last part of the request body, the method must return ETrue.
ReleaseData() | When this method is invoked, the client can free the data buffer it last returned from GetDataChunk(), and can start to assemble the next buffer for transmission.
OverallDataSize() | When this method is invoked, the client should return the size of the whole request body data, if it is known. If unknown, it should return KErrNotFound

There is no need for the client to set a 'Content-Length' header. HTTP will do this automatically, based on what it gets from calling OverallDataSize().

4.2 Signalling New Body Data

After ReleaseData() has been invoked, the client must prepare the next buffer of data for transmission. Since HTTP cannot predict when each buffer will be ready, it will pause the request transmission until an event is sent by the client to notify the availability of new data.

This is done using the RHTTPTransaction::RequestNewBodyDataChunkL() method.

        void CHttpClient::ReleaseData()
            {
            // Clear out the submit buffer
            TPtr8 buff = iReqBodySubmitBuffer->Des();
            buff.Zero();
            // Notify HTTP of more data available immediately, since it's being read from file
            TRAPD(err, iTrans.NotifyNewRequestBodyChunkL());
            if (err != KErrNone)
                User::Panic(KHttpExampleClientPanic, KCouldntNotifyBodyDataChunk);
            }

When the THTTPEvent::ENotifyNewRequestBodyChunk is processed by HTTP it resumes transmission of body data and invokes again on the client's GetDataChunk() method.

4.3 Streaming Body Data

If the client application is using HTTP POST to stream data to a server, then it is unlikely to know at the start of the transaction how much data is to be sent.

As described above, the client's OverallDataSize() method should return KErrNotFound to indicate this. The result is that HTTP will automatically switch over to use the 'chunked' transfer encoding. HTTP automatically generates the 'Transfer-Encoding: chunked' header and will not send a Content-Length header.

Contents


API Guide - Cancelling And Closing Transactions

5 Cancelling And Closing Transactions

Transactions that have been submitted may be cancelled at any time, using RHTTPTransaction::Cancel(). When this is done, no further events will be received for that transaction as originally submitted. From HTTPEXAMPLECLIENT, this code fragment:

    void CHttpEventHandler::MHFRunL(RHTTPTransaction aTransaction, THTTPEvent aEvent)
        {
        switch (aEvent.iStatus)
            {
            case THTTPEvent::EGotResponseHeaders:
                {
                ...
                // If we're cancelling, do it now...
                if (cancelling)
                    {
                    aTransaction.Cancel();
                    Printf(_L("\nTransaction Cancelled\n"));
                    ...
                    }
                ...

In this case, the transaction is left in a cancelled state. The client has the option, at this time, to modify the request if desired, and to resubmit the transaction. This might be done, for example, if the HTTP server has indicated with a 400-series status code that there was a client error.

When a transaction is resubmitted following cancellation, it is exactly as if it had been submitted for the first time - e.g. no preferential treatment as given it in terms of time-to-service.

The practice of Cancelling in an MHFRunL() method, modifying the request, and resubmitting is common in filter design. See 8.6 Writing A Filter for more information.

If the client wishes to abort a transaction, it may close the transaction using RHTTPTransaction::Close(). It is not necessary to cancel first, since a Cancel() is done automatically during the Close(). Closing the transaction enables HTTP to clean up resources allocated during the execution of that transaction.

Once a transaction is closed it must NOT be reused. Doing so will cause the client to panic, or behave unpredictably.

Contents


API Guide - API required for WSP

6 WSP API

6.1 Session API

Methods RHTTPSession::ConnectL() and RHTTPSession::DisconnectL() are used to initiate WAP Proxy (gateway) connections and disconnections. These methods have no meaning for text-mode HTTP and are ignored if used in that situation.

6.2 Session headers

Methods RHTTPHeaders RequestSessionHeadersL() and RHTTPHeaders ResponseSessionHeadersL() are used to gain access to header collections associated with the session. There is a separate collection of headers for both requests and responses. WSP Proxy/Gateway connection and disconnection.


API Guide - Session And Transaction Properties

7 Session Properties

Both an RHTTPSession and an RHTTPTransaction can have associated with them a set of properties. Properties take the form of name-value pairs, where the name is an RStringF and the value is a THTTPHdrVal, allowing integers, strings, URIs and dates to be stored.

Session properties are called Connection Information in the API since they mainly relate to the type of connection that is made between the client and an HTTP server. They are accessed using the RHTTPSession::ConnectionInfo() method, which returns an RHTTPConnectionInfo handle.

Note that in general, session properties should be defined before the first transction is created; filters are not obliged to check with the connection info if the values have changed after this point. However, some exceptions are allowable with HTTP version and proxy configuration.

7.1 HTTP Version

By default, HTTP sessions will use HTTP/1.1. To use HTTP/1.0 the connection info property HTTP::EHTTPVersion must be set to HTTP::EHttp10. From HTTPEXAMPLECLIENT:

    ...
        switch(cmd)
        {
        case EVersion10:
            SetHttpVersion(HTTP::EHttp10);
            break;
        case EVersion11:
            SetHttpVersion(HTTP::EHttp11);
            break;
    ...

    void CHttpClient::SetHttpVersion(HTTP::TStrings aHttpVersion)
        {
        RHTTPConnectionInfo connInfo = iSess.ConnectionInfo();
        RStringPool p=iSess.StringPool();
        connInfo.SetPropertyL(p.StringF(HTTP::EHTTPVersion,RHTTPSession::GetTable()),THTTPHdrVal(p.StringF(aHttpVersion)));
        }

The version chosen will apply to all new transactions following the property change, but will not affect any transactions currently in progress.

Since HTTP/1.1 recommends the use of a persistent connection for requests made in series to a single origin server, the default behaviour of HTTP Client is to set up persistent connections for each transaction. This can be overridden by specifing a Connection header in the client request. See 9.4.4 Connection.

7.2 Specifying An HTTP Proxy

By default, a new RHTTPSession will be set to make direct connections to an origin server. To switch it to use a proxy, two properties must be set: HTTP::EProxyUsage and HTTP::EProxyAddress.

HTTP::EProxyUsage can take the values HTTP::EDoNotUseProxy (the default) or HTTP::EUseProxy.

HTTP::EProxyAddress must be set using an RStringF value that contains the proxy address as an IP Address and port number separated by a colon, e.g. "10.35.2.4:9003"

    void CHttpClient::SetProxyL(RStringF aProxyAddr)
        {
        RHTTPConnectionInfo connInfo = iSess.ConnectionInfo();
        THTTPHdrVal proxyUsage(iSess.StringPool().StringF(HTTP::EUseProxy,RHTTPSession::GetTable()));
        connInfo.SetPropertyL(iSess.StringPool().StringF(HTTP::EProxyUsage,RHTTPSession::GetTable()), proxyUsage);

        THTTPHdrVal proxyAddr(aProxyAddr);
        connInfo.SetPropertyL(iSess.StringPool().StringF(HTTP::EProxyAddress,RHTTPSession::GetTable()), aProxyAddr);

        Printf(_L("Proxy set to:%S\n\n"), &iProxyName);
        }

Again, changes made to the proxy settings will affect only new transactions opened on the session, not any currently in progress.

7.3 Tuning The HTTP Protocol Handler

Some tuning can be attempted to optimise HTTP comms performance. The session properties HTTP::EMaxNumTransportHandlers and HTTP::EMaxNumTransPerTranspHndlr determine how the internal queueing works.

HTTP::EMaxNumTransportHandlers determines the maximum number of sockets that may be open at a time. Its default value is 4.

HTTP::EMaxNumTransPerTranspHndlr determines how many transactions may be allocated to a given transport handler (i.e. socket) before being backed up in a pending queue. Its default value is 5.

7.4 Transaction Properties

Transaction properties are accessed using the RHTTPTransaction::PropertySet() method, which returns an RHTTPTransactionPropertySet handle. They are used as a means of storing information related to a transaction that is required to persist during the transaction lifetime. Such information is not transmitted, the mechanism merely provides a useful association, mainly used by filter developers.

Two pre-defined properties that may be set by the client are called HTTP::EUsername and HTTP::EPassword. Their use is described in 8.2 Authentication Filter.

An example of properties in use is taken from the Redirection filter, where a count is maintained of the number of redirections made in response to 300-series HTTP status codes:

        // see if this transaction has been redirected before
        THTTPHdrVal redirectCountProperty;
        if (aTransaction.PropertySet().Property(p.StringF(HTTP::ERedirectCount,RHTTPSession::GetTable()),
                                                redirectCountProperty))
            {
            __ASSERT_DEBUG(redirectCountProperty.Type() == THTTPHdrVal::KTIntVal, HTTPPanic::Panic(HTTPPanic::EHeaderInvalidType));
            redirectCount = redirectCountProperty.Int();
            __ASSERT_DEBUG(redirectCount > 0, HTTPPanic::Panic(HTTPPanic::EHeaderInvalidType));
            }

        // Only redirect a certain number of times, and update the redirect count property of the transaction
        if (++redirectCount < KRedirectLimit)
            {
            aTransaction.PropertySet().SetPropertyL(p.StringF(HTTP::ERedirectCount,RHTTPSession::GetTable()), redirectCount);

7.5 WSP Session Properties

Session properties will be used in WSP to indicate desired client capabilities, and to specify a WAP Proxy in preference to those located in CommDB. All session properties are optional, with suitable defaults chosen internally if not supplied.

7.5.1 Proxy Information Properties

The following session properties are defined for specification of a WAP Proxy

EWspProxyAddress | this property is of type RStringF and should contain a bearer-dependent proxy address
EWspBearerthis property is of type RStringF and should one of the following values: EWspIp - for an IP (v4) bearer; or EWspSMS - for an 8-bit WAP SMS bearer
EWspLocalPort | this property is of type TInt and contains the local port number for an IP bearer
EWspRemotePort | this property is of type TInt and contains the remote port number for an IP bearer
EWspServiceNumber | this property is of type TInt and should contain the proxy's service number, when using an SMS bearer
EWspSessionType | this property is of type RStringF and should one of the following values: EWspConnectionOriented - for a Connection-Oriented WSP session; EWspConnectionLess - for a Connectionless WSP session
EWspSecurity | this property is of type RStringF and should one of the following values: EWspUseWtls - for a WTLS-secured WSP session; EWspDoNotUseWtls - for a non-secured WSP session

7.5.2 Capability Properties

The following session properties are defined to configure WSP capabilities

EWspCapClientMsgSize | this property is of type TInt and is used to negotiate the largest message that may be transferred from the Proxy to the Client in a single transaction over WSP
EWspCapServerMsgSize | this property is of type TInt and is used to negotiate the largest message that may be transferred from the Client to the Proxy in a single transaction over WSP
EWspCapUseAcknowledgements | this property is untyped, i.e. if it is present (with any value - which will be ignored) then the WSP protocol handler will negotiate the use of WSP acknowledgment PDUs
EWspCapSupportSuspendResume | this property is untyped, i.e. if it is present (with any value - which will be ignored) then the WSP protocol handler will negotiate the use of Suspend/Resume PDUs when the client calls the RHTTPSession::ConnectL()/DisconnectL() APIs
EWspCapMethodMaxOutstandingRequests | this property is of type TInt and is used to negotiate the maximum number of simultaneous outstanding requests the client may make using WSP

Following the proxy connection, the capability session properties will be updated with the values negotiated with the proxy. The client will be able to check for the final capability settings following receipt of the session event EConnectedWithReducedCapabilities. If the client did not set capabilities at all, they can find out what capabilities were agreed with the proxy using these properties, following either the EConnectedWith-ReducedCapabilities or the EConnectedOK session events.

7.5.3 Miscellaneous properties

The following additional session properties are defined to configure WSP policy/behaviour:

EWspProxyConnectionTimeout | this property is of type TInt and must contain a time interval specified in seconds for which the WSP protocol handler waits before timing out on a Proxy connection
ESecurityDialogMode | this property is of type RStringF and should one of the following values: EDialogModeAttended - All untrusted WTLS server certificates result in a user dialog being shown; EDialogModeUnattended - Untrusted WTLS server certificates are rejected without user confirmation

7.6 WSP Transaction Properties

The following two new transaction properties will be used in WSP to assist the client in determining how long its request bodies can be:

EWspRemainingSDUSize | this property is of type TInt and is used to indicate how much more body data can be transmitted in the current PDU
EwspRemainingMessageSize | this property is of type TInt and is used (when Large-Data Transfer is negotiated with the Proxy) to indicate how much more body data can be transmitted overall in the current request

These transaction properties will be updated by the WSP Protocol Handler before each call made to the client's MHTTPDataSupplier::GetNextDataPart() method when obtaining the request body.

Contents


API Guide - Filters

8 Filters

A filter is best thought of as manipulating a transaction on its way either to or from the server. Behaviours can be implemented in filters that modify the transaction, e.g. change headers, add or remove headers, transform the body; that terminate or cancel a transaction, perhaps resubmitting a replacement; or that perform other operations on the client device using information obtained from transaction headers or body.

An RHTTPSession contains a queue that can hold zero or more filters, which are arranged in a priority order. The filter objects are shared amongst all transactions. To join the filter queue, a filter must register itself on the session, providing registration details that specify its triggers.

Filter triggers may include: particular events, the presence of particular headers or particular status codes.

When an event occurs on a transaction, the event traverses the filter queue in one of two directions: from client to server, or from server back to the client. Priority order determines which filters are visited first when events traverse away from the client (i.e. events that originate from the client such as THTTPEvent::ESubmit, which is sent when RHTTPTransaction::SubmitL() is called); reverse priority order applies to events that traverse back towards the client (i.e. those that originate from the server, such as THTTPEvent::EResponseComplete).

8.1 Adding, Removing and Querying Filters

When an RHTTPSession is opened, a standard set of filters is pre-installed. The client does not need to do anything further if these filters are acceptable. The standard set includes:

  • Redirection Filter
  • Validation Filter
The client may add further filters of its own, or remove filters from the pre-installed set. The API to do this is RHTTPFilterCollection, for which a handle is obtained using RHTTPSession::FilterCollection()

Filters may only be added to, or removed from, a session when no transactions are opened on that session. This is easy to determine immediately after the session itself is opened; to aid the client in determining the condition later on, the API RHTTPFilterCollection::CanChangeFilters is provided.

The collection of currently-installed filters can be queried using an iterator. The following sample code demonstrates the use of the iterator:

    void CHttpClient::ShowFilters()
        {
        RHTTPFilterCollection filtColl = iSess.FilterCollection();
        THTTPFilterIterator iter = filtColl.Query();

        THTTPFilterRegistration regInfo;
        iter.First();
        TInt lines = 0;
        while (!iter.AtEnd())
            {
            // Get next filter registration info
            regInfo = iter();

            TBuf<KMaxFilterNameLength> name;
            name.Copy(iSess.StringPool().StringF(regInfo.iName).DesC().Left(KMaxFilterNameLength));
            TBuf<KMaxHeaderNameLength> header;
            header.Copy(iSess.StringPool().StringF(regInfo.iHeader).DesC().Left(KMaxHeaderNameLength));

            Printf(_L("\n%16S | %4d  | %4d   | %16S |   %3d  | %2d"),
                    &name, regInfo.iPosition, regInfo.iEvent.iStatus, &header, regInfo.iStatus, regInfo.iHandle);
            ++iter;
            }
        }

8.2 Authentication Filter

The authentication filter provides an easy way of supporting basic and digest authentication as defined in RFC2617. As it needs a way of getting hold of passwords, it is not installed as standard, but only when a MHTTPAuthenticationCallback installs it. To use it, you will need to implement a subclass of MHTTPAuthenticationCallback, and should see the documentation for that class for further details.

Anyone using HTTP authentication should be aware of its security limitations. In particular, basic authentication essentialy involves passing passwords around in plaintext. MHTTPAuthenticationCallback::GetCredentialsL is told the authentication scheme being used, and applications where plaintext passwords would be a problem should consider rejecting challenges using basic authentication. See section 4 of RFC2617 for more details.

The authentication filter supports the following: Basic (Base64) authentication

Digest authentication using the MD5 algorithm and the 'auth' Quality of Protection. It also supports the older RFC2069 style digest authentication for backwards compatibility. The MD5-sess algorithm is not supported as no major servers seem to support it. The 'auth-int' qop is not supported as it doesn't seem to add any real benefit; anyone who cares about integrity checking would want to use ssl.

The filter remembers passwords and will attempt to use them for subsequent challenges where they appear to be apropriate. It will forget them if they turn out to be wrong. Currently there is no facility to persist the passwords. For basic authentication, an attempt is made to supply the username and password with the first request if the URI suggests that a previously stored username and password are applicable. This is not done for digest, as that introduces a lot of complications into the digest algorithm.

If an authentication challenge is received which the filter can't understand or if the MHTTPAuthenticationCallback does not supply credentials (returns EFalse) the filter effectively does nothing, meaning that the client will receive the 401 error response in the same way as other error responses.

There are 2 alternate methods of supplying the username and password with a request. Clients that know the username and password up front might want to consider using these methods and getting their MHTTPAuthenticationCallback::GetCredentialsL to always return EFalse. The first method is to supply a URI of the form http://<username>:<password>@host/. In this case the username and the password will be removed from the URI when it is submitted, but will be used for any subsequent authentication challenge. The other way is to define transaction properties called 'username' and 'password' containing the username and password.

The filter is registered at position EStatusCodeHandler for handling the '401' return code, and at position EStatusCodeHandler + 1 for handling submit events.

8.3 Redirection Filter

The Redirection Filter handles 300-series status codes from HTTP servers. These are used to tell the client of the correct location of a resource that has moved. Most clients will want this situation to be handled transparently - i.e. to make a new request for the resource at the location specified by the server using the 'Location' header.

When an HTTP response is received that includes the status codes 300, 301, 302, 303 or 307, the Redirection filter cancels the current transaction, and uses the URI from the 'Location' response header to make a resubmitted request on the same transaction. This means that all the headers in the original client request are preserved in the new request.

If no 'Location' header was found in the server response, the filter will send a KErrHttpRedirectNoLocationField error to the client. The response body may contain further information about the possible location of the resource.

In the case of the HTTP 305 'Use Proxy' status code, the transaction is not resubmitted. Instead, a KErrHttpRedirectUseProxy error is sent to the client. The 'Location' header will contain the address of a proxy to which the client must send the request for that URL. In practice, this means the client should modify the properties of their current RHTTPSession as described in 7.2 Specifying An HTTP Proxy above.

HTTP 304 'Not Modified' responses are not handled by the redirection filter since they are used to indicate that the client contains a valid copy of the resource in cache.

It is possible for the client request to be redirected more than once. To prevent the request becoming stuck in an endless loop of redirections, the number of successive redirections that the filter will handle is limited to 5.

8.4 Validation Filter

The Validation Filter has three main roles:

  • It checks the presence of a request body to ensure it is consistent with the HTTP method in use;
  • It validates client requests to ensure that they do not include inappropriate header fields;
  • It provides a simplified result status for transactions.
Request bodies are only allowed for HTTP methods POST and PUT. If GET, HEAD or TRACE requests contain a body the filter will cancel the transaction and send a KErrHttpRequestHasBody error event to the client.

If the request headers contain any fields that are defined by [Ref. 2] as response header fields, the error event KErrHttpInvalidHeaderInRequest is sent to the client. Offending fields are removed, and the transaction is allowed to continue.

If the request does not have a body, and the request headers contain any fields that are defined by [Ref. 2] as entity header fields, then KErrHttpInvalidHeaderInRequest is sent to the client, the fields are removed, and the transaction continues.

If the request has a body, and the 'Content-Type' header is not present in the request headers, then the transaction will be cancelled and the error event KErrHttpEntityHeaderMissingContentType is sent to the client.

See also 9 Headers and the header enumerations in HTTP for further information about different header types.

When a transaction response is received, the validation filter will determine from the status code whether the transaction has ultimately been a success or a failure. The two events THTTPEvent::ESucceeded and THTTPEvent::EFailed are used to inform the client of this. The client may assume that no further events for that transaction will arrive once it has received either of these two.

8.5 Configuring & Installing Filters

Apart from the standard set of filters listed in 8 Filters, the client must manually install any other filter it wishes to use. Some filters may need to be configured before they can be installed; this should be done when the filter is instantiated.

An example of where filter configuration is needed is the authentication filter, which requires a callback to gather user credentials from the client. The client must implement the MHTTPAuthenticationCallback class, and at the time it opens an HTTP session must specify the object that implements the callback to configure the filter.

From httpexampleclient.h:

    class CHttpClient : public CBase, public MHTTPDataSupplier,
                    public MHTTPAuthenticationCallback
        {
        public:
        ...
            // methods inherited from MHTTPAuthenticationCallback
            virtual TBool GetCredentialsL(const TUriC8& aURI, RString aRealm,
                                         RStringF aAuthenticationType,
                                         RString& aUsername,
                                         RString& aPassword);
        ...

From httpexampleclient.cpp:

    void CHttpClient::ConstructL()
        {
        ...

        // Open the RHTTPSession and install this class as the callback for authentication requests
        iSess.OpenL();
        InstallAuthenticationL(iSess);

        ...
        }

In this case, MHTTPAuthenticationCallback::InstallAuthenticationL(...) already is implemented in HTTP.DLL. It does the job of creating and installing the filter on the client's behalf:

    void MHTTPAuthenticationCallback::InstallAuthenticationL(RHTTPSession aSession)
        {
        // Create an authentication filter. This will install itself, and
        // will delete itself when uninstalled, so we don't need to keep
        // track of it at all.
        CAuthenticationFilter::NewL(*this, aSession);
        }

However in other cases, the client may have to construct the filter itself, and configure it, before installing it on the session, e.g.:

    void CAuthenticationFilter::ConstructL(RHTTPSession aSession)
        {
        ...
        // Register for WWW-Authenticate headers and 401 status codes
        aSession.FilterCollection().AddFilterL(*this,
                                               THTTPEvent::EGotResponseHeaders,
                                               iStringPool.StringF(HTTP::EWWWAuthenticate,RHTTPSession::GetTable()),
                                               401,
                                               EStatusCodeHandler,
                                               iStringPool.StringF(HTTP::EAuthentication,RHTTPSession::GetTable()));
        ...
        }

8.6 Writing A Filter

This guide is intended to provide a quick overview. Refer to the functions mentioned for more details.

Filters need to dereive from the MHTTPFilter class. Normaly, the constructor or NewL of a filter would take a session as a parameter, and would then register itself by calling RHTTPFilterCollection::AddFilterL()

Filters can often delete themselves automaticaly. If a filter only registers itself once, it can delete itself simply by overriding MHFUnload() and 'delete this' in it. If you register several times, it's probably easiest to overload both MHTTPFilter::MHFLoad and MHTTPFilter::MHFUnload, increment a reference count in MHFLoad, decrement it in MHTTPFilter::MHFUnload and when it reaches zero, 'delete this'.

The filter will be notified of events via MHTTPFilterBase::MHFRunL, just like client notification. (And in a way that's quite similar to active objects). If The MHFRunL leaves, you need to handle the error in MHTTPFilterBase::MHFRunError. There is a potential problem there, in that you may well want to tell the client that something has gone wrong via RHTTPTransaction::SendEventL, which can itself leave. If it does leave, you may be forced to call RHTTPTransaction::Fail, which cancels the transaction and sends an EUnrecoverableError message outwards.

It's important to note that a filter object is per-session, and so might be shared by several transactions. This means that if you have per-transaction state that you need to store, it must be stored in the transaction's property set. DO NOT STORE ANY PER-TRANSACTION INFORMATION IN THE FILTER OBJECT.

Contents


Graphical Class Hierarchy

HTTP API Graphical Class Hierarchy

Go to the textual class hierarchy


CAuthenticationFilterInterface.h Source File

CAuthenticationFilterInterface.h

Go to the documentation of this file.
00001 // CAuthenticationFilterInterface.h
00002 //
00003 // Copyright (C) 2001 Symbian Ltd.
00004
00011 #ifndef __CAUTHENTICATIONFILTERINTERFACE_H__
00012 #define __CAUTHENTICATIONFILTERINTERFACE_H__
00013
00014 // System includes
00015 #include <e32base.h>
00016 #include <ecom.h>
00017 #include <http/rhttpsession.h>
00018
00019 // Forward declarations
00020 class MHTTPAuthenticationCallback;
00021
00032 class CAuthenticationFilterInterface : public CBase
00033     {
00034 public: // Methods
00047     inline static void InstallFilterL(RHTTPSession& aSession, MHTTPAuthenticationCallback* aCallback);
00048
00056     inline ~CAuthenticationFilterInterface();
00057
00058 public:
00059     struct TAuthenticationParams
00060         {
00061         RHTTPSession* iSession;
00062         MHTTPAuthenticationCallback* iCallback;
00063         };
00064
00065 private: // Attributes
00067     TUid iEcomDtorID;
00068     };
00069
00070 //----------------------------------------------------------------------------------------
00071
00072 inline void CAuthenticationFilterInterface::InstallFilterL(RHTTPSession& aSession, MHTTPAuthenticationCallback* aCallback)
00073     {
00074     const TUid KUidAuthenticationFilter = {0x101F447C};
00075     TAuthenticationParams authParams;
00076     authParams.iSession = &aSession;
00077     authParams.iCallback = aCallback;
00078     REComSession::CreateImplementationL(KUidAuthenticationFilter, _FOFF(CAuthenticationFilterInterface,iEcomDtorID), &authParams);
00079     }
00080
00081 inline CAuthenticationFilterInterface::~CAuthenticationFilterInterface()
00082     {
00083     REComSession::DestroyedImplementation(iEcomDtorID);
00084     }
00085
00086 #endif // __CAUTHENTICATIONFILTERINTERFACE_H__


CEComFilter.h Source File

CEComFilter.h

Go to the documentation of this file.
00001 // CEComFilter.h
00002 //
00003 // Copyright (C) 2001 Symbian Ltd.
00004
00011 #ifndef __CECOMFILTER_H__
00012 #define __CECOMFILTER_H__
00013
00014 // System includes
00015 #include <e32base.h>
00016 #include <ecom/ecom.h>
00017 #include <http/rhttpsession.h>
00018
00019 // The ECom filter interface UID
00020 const TUid KUidFilterPluginInterface = {0x101F446D};
00021
00032 //##ModelId=3C4C0F400280
00033 class CEComFilter : public CBase
00034     {
00035 public: // Methods
00049     //##ModelId=3C4C0F4002A8
00050     inline static CEComFilter* InstallFilterL(RHTTPSession aSession, const TUid aEComFilterUid);
00051
00065     //##ModelId=3C4C0F4002AB
00066     inline static CEComFilter* InstallFilterL(RHTTPSession aSession, const TDesC8& aEComFilterDataType);
00067
00075     //##ModelId=3C4C0F40029E
00076     inline ~CEComFilter();
00077
00078 private: // Attributes
00080     //##ModelId=3C4C0F400297
00081     TUid iEcomDtorID;
00082     };
00083
00084 //----------------------------------------------------------------------------------------
00085
00086 inline CEComFilter* CEComFilter::InstallFilterL(RHTTPSession aSession, const TUid aEComFilterUid)
00087     {
00088     TAny* filterPlugin = REComSession::CreateImplementationL(aEComFilterUid, _FOFF(CEComFilter,iEcomDtorID), &aSession);
00089     return REINTERPRET_CAST(CEComFilter*, filterPlugin);
00090     }
00091
00092 inline CEComFilter* CEComFilter::InstallFilterL(RHTTPSession aSession,const TDesC8& aEComFilterDataType)
00093     {
00094     TEComResolverParams resolverParams;
00095     resolverParams.SetDataType(aEComFilterDataType);
00096     // This will leave if the plugin is not found
00097     TAny* filterPlugin = REComSession::CreateImplementationL(KUidFilterPluginInterface,
00098                                             _FOFF(CEComFilter,iEcomDtorID),
00099                                             &aSession, resolverParams);
00100     return REINTERPRET_CAST(CEComFilter*, filterPlugin);
00101     }
00102
00103 inline CEComFilter::~CEComFilter()
00104     {
00105     REComSession::DestroyedImplementation(iEcomDtorID);
00106     }
00107
00108 #endif // __CECOMFILTER_H__


Member List

CAuthenticationFilterInterface Member List

This is the complete list of members for CAuthenticationFilterInterface, including all inherited members.
InstallFilterL(RHTTPSession &aSession, MHTTPAuthenticationCallback *aCallback) | CAuthenticationFilterInterface | [inline, static]
~CAuthenticationFilterInterface() | CAuthenticationFilterInterface | [inline]


Member List

CEComFilter Member List

This is the complete list of members for CEComFilter, including all inherited members.
InstallFilterL(RHTTPSession aSession, const TUid aEComFilterUid) | CEComFilter | [inline, static]
InstallFilterL(RHTTPSession aSession, const TDesC8 &aEComFilterDataType) | CEComFilter | [inline, static]
~CEComFilter() | CEComFilter | [inline]


Alphabetical index

HTTP API Compound Index

A
CEComFilter THTTPFilterHandle HTTP
S
MHTTPAuthenticationCallback THTTPEvent TFilterInformation
M
RHTTPSession
CAuthenticationFilterInterface
F
THTTPFilterIterator RHTTPMessage THTTPSessionEvent
C
MHTTPFilter THTTPFilterRegistration
P
MHTTPSessionEventCallback
RHTTPConnectionInfo MHTTPFilterBase
H
RHTTPPropertySet
T
D
RHTTPFilterCollection THTTPHdrFieldIter
R
RHTTPTransaction
MHTTPDataSupplier TFilterConfigurationIterator THTTPHdrVal RHTTPRequest MHTTPTransactionCallback
E
MHTTPFilterCreationCallback RHTTPHeaders RHTTPResponse RHTTPTransactionPropertySet


Member List

HTTP Member List

This is the complete list of members for HTTP, including all inherited members.
E00000001 enum value | HTTP
E100Continue enum value | HTTP
EAccept enum value | HTTP
EAcceptCharset enum value | HTTP
EAcceptEncoding enum value | HTTP
EAcceptLanguage enum value | HTTP
EAcceptRanges enum value | HTTP
EAge enum value | HTTP
EAlgorithm enum value | HTTP
EAllow enum value | HTTP
EAnyAny enum value | HTTP
EApplicationOctetStream enum value | HTTP
EApplicationXWwwFormUrlEncoded enum value | HTTP
EAuth enum value | HTTP
EAuthenticatedOK enum value | HTTP
EAuthentication enum value | HTTP
EAuthenticationFailure enum value | HTTP
EAuthenticationStatus enum value | HTTP
EAuthorization enum value | HTTP
EBasic enum value | HTTP
EBytes enum value | HTTP
ECacheControl enum value | HTTP
ECharset enum value | HTTP
EChunked enum value | HTTP
EClient enum value | HTTP
EClose enum value | HTTP
ECnonce enum value | HTTP
EComment enum value | HTTP
ECommentURL enum value | HTTP
ECompress enum value | HTTP
ECONNECT enum value | HTTP
EConnection enum value | HTTP
EContentBase enum value | HTTP
EContentDisposition enum value | HTTP
EContentEncoding enum value | HTTP
EContentLanguage enum value | HTTP
EContentLength enum value | HTTP
EContentLocation enum value | HTTP
EContentMD5 enum value | HTTP
EContentRange enum value | HTTP
EContentType enum value | HTTP
ECookie enum value | HTTP
ECookie2 enum value | HTTP
ECookieFilter enum value | HTTP
ECookieName enum value | HTTP
ECookiePort enum value | HTTP
ECookieValue enum value | HTTP
EDate enum value | HTTP
EDeflate enum value | HTTP
EDELETE enum value | HTTP
EDigest enum value | HTTP
EDiscard enum value | HTTP
EDomain enum value | HTTP
EDoNotUseProxy enum value | HTTP
EETag enum value | HTTP
EExpect enum value | HTTP
EExpires enum value | HTTP
EFrom enum value | HTTP
EGET enum value | HTTP
EGzip enum value | HTTP
EHEAD enum value | HTTP
EHost enum value | HTTP
EHTTP enum value | HTTP
EHttp10 enum value | HTTP
EHttp11 enum value | HTTP
EHttpSocketConnection enum value | HTTP
EHttpSocketServ enum value | HTTP
EHTTPVersion enum value | HTTP
EIdentity enum value | HTTP
EIfMatch enum value | HTTP
EIfModifiedSince enum value | HTTP
EIfNoneMatch enum value | HTTP
EIfRange enum value | HTTP
EIfUnmodifiedSince enum value | HTTP
EKeepAlive enum value | HTTP
ELastModified enum value | HTTP
ELocation enum value | HTTP
EMaxAge enum value | HTTP
EMaxForwards enum value | HTTP
EMaxNumTransPerTranspHndlr enum value | HTTP
EMaxNumTransportHandlers enum value | HTTP
EMaxRedirect enum value | HTTP
EMaxStale enum value | HTTP
EMinFresh enum value | HTTP
EMustRevalidate enum value | HTTP
ENc enum value | HTTP
ENoCache enum value | HTTP
ENonce enum value | HTTP
ENone enum value | HTTP
ENoStore enum value | HTTP
ENoTransform enum value | HTTP
EOnlyIfCached enum value | HTTP
EOpaque enum value | HTTP
EOPTIONS enum value | HTTP
EPassword enum value | HTTP
EPath enum value | HTTP
EPort enum value | HTTP
EPOST enum value | HTTP
EPragma enum value | HTTP
EPrivate enum value | HTTP
EProtocol enum value | HTTP
EProtocolHandler enum value | HTTP
EProtTrans enum value | HTTP
EProxyAddress enum value | HTTP
EProxyAuthenticate enum value | HTTP
EProxyAuthorization enum value | HTTP
EProxyRevalidate enum value | HTTP
EProxyUsage enum value | HTTP
EPublic enum value | HTTP
EPUT enum value | HTTP
EQ enum value | HTTP
EQop enum value | HTTP
ERange enum value | HTTP
ERealm enum value | HTTP
ERedirect enum value | HTTP
ERedirectCount enum value | HTTP
EReferer enum value | HTTP
EResponse enum value | HTTP
ERetryAfter enum value | HTTP
ESecure enum value | HTTP
ESecureDialog enum value | HTTP
EServer enum value | HTTP
ESessionHeaderFilter enum value | HTTP
ESetCookie enum value | HTTP
ESetCookie2 enum value | HTTP
ESMaxAge enum value | HTTP
EStale enum value | HTTP
ETE enum value | HTTP
ETextAny enum value | HTTP
ETextHtml enum value | HTTP
ETextModeHeadersValidator enum value | HTTP
ETextPlain enum value | HTTP
ETextVndWapWml enum value | HTTP
ETRACE enum value | HTTP
ETrailer enum value | HTTP
ETransferEncoding enum value | HTTP
EUpgrade enum value | HTTP
EUri enum value | HTTP
EUseProxy enum value | HTTP
EUserAgent enum value | HTTP
EUsername enum value | HTTP
EValidation enum value | HTTP
EVary enum value | HTTP
EVersion enum value | HTTP
EVia enum value | HTTP
EWarning enum value | HTTP
EWSP enum value | HTTP
EWspBearer enum value | HTTP
EWspCapClientMessageSize enum value | HTTP
EWspCapMaxOutstandingRequests enum value | HTTP
EWspCapServerMessageSize enum value | HTTP
EWspCapSupportSuspendResume enum value | HTTP
EWspCapUseAcknowledgements enum value | HTTP
EWspConnectionLess enum value | HTTP
EWspConnectionOriented enum value | HTTP
EWspDoNotUseWtls enum value | HTTP
EWspIp enum value | HTTP
EWspLocalPort enum value | HTTP
EWspProxyAddress enum value | HTTP
EWspProxyConnectionTimeout enum value | HTTP
EWspProxyExceptionInfo enum value | HTTP
EWspRemainingMessageSize enum value | HTTP
EWspRemainingSDUSize enum value | HTTP
EWspRemotePort enum value | HTTP
EWspSecurity enum value | HTTP
EWspServiceNumber enum value | HTTP
EWspSessionType enum value | HTTP
EWspSMS enum value | HTTP
EWspUseWtls enum value | HTTP
EWWWAuthenticate enum value | HTTP
TStrings enum name | HTTP


Member List

MHTTPAuthenticationCallback Member List

This is the complete list of members for MHTTPAuthenticationCallback, including all inherited members.
GetCredentialsL(const TUriC8 &aURI, RString aRealm, RStringF aAuthenticationType, RString &aUsername, RString &aPassword)=0 | MHTTPAuthenticationCallback | [pure virtual]
InstallAuthenticationL(RHTTPSession aSession) | MHTTPAuthenticationCallback | [inline]


Member List

MHTTPDataSupplier Member List

This is the complete list of members for MHTTPDataSupplier, including all inherited members.
GetNextDataPart(TPtrC8 &aDataPart)=0 | MHTTPDataSupplier | [pure virtual]
OverallDataSize()=0 | MHTTPDataSupplier | [pure virtual]
ReleaseData()=0 | MHTTPDataSupplier | [pure virtual]
Reset()=0 | MHTTPDataSupplier | [pure virtual]


Member List

MHTTPFilter Member List

This is the complete list of members for MHTTPFilter, including all inherited members.
ECache enum value | MHTTPFilter |
EClient enum value | MHTTPFilter |
EClientFilters enum value | MHTTPFilter |
ECookies enum value | MHTTPFilter |
EProtocolHandler enum value | MHTTPFilter |
EStatusCodeHandler enum value | MHTTPFilter |
ETidyUp enum value | MHTTPFilter |
MHFLoad(RHTTPSession aSession, THTTPFilterHandle aHandle) | MHTTPFilter | [virtual]
MHFRunError(TInt aError, RHTTPTransaction aTransaction, const THTTPEvent &aEvent) | MHTTPFilterBase | [virtual]
MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent &aEvent) | MHTTPFilterBase | [virtual]
MHFSessionRunError(TInt aError, const THTTPSessionEvent &aEvent) | MHTTPFilterBase | [virtual]
MHFSessionRunL(const THTTPSessionEvent &aEvent) | MHTTPFilterBase | [virtual]
MHFUnload(RHTTPSession aSession, THTTPFilterHandle aHandle) | MHTTPFilter | [virtual]
TPositions enum name | MHTTPFilter |


Member List

MHTTPFilterBase Member List

This is the complete list of members for MHTTPFilterBase, including all inherited members.
MHFRunError(TInt aError, RHTTPTransaction aTransaction, const THTTPEvent &aEvent) | MHTTPFilterBase | [virtual]
MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent &aEvent) | MHTTPFilterBase | [virtual]
MHFSessionRunError(TInt aError, const THTTPSessionEvent &aEvent) | MHTTPFilterBase | [virtual]
MHFSessionRunL(const THTTPSessionEvent &aEvent) | MHTTPFilterBase | [virtual]


Member List

MHTTPFilterCreationCallback Member List

This is the complete list of members for MHTTPFilterCreationCallback, including all inherited members.
ConfigureSessionFiltersL(TFilterConfigurationIterator *aFilterConfigIter)=0 MHTTPFilterCreationCallback [pure virtual]


Member List

MHTTPSessionEventCallback Member List

This is the complete list of members for MHTTPSessionEventCallback, including all inherited members.
MHFSessionRunError(TInt aError, const THTTPSessionEvent &aEvent)=0 | MHTTPSessionEventCallback | [pure virtual]
MHFSessionRunL(const THTTPSessionEvent &aEvent)=0 | MHTTPSessionEventCallback | [pure virtual]


Member List

MHTTPTransactionCallback Member List

This is the complete list of members for MHTTPTransactionCallback, including all inherited members.
MHFRunError(TInt aError, RHTTPTransaction aTransaction, const THTTPEvent &aEvent)=0 | MHTTPTransactionCallback | [pure virtual]
MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent &aEvent)=0 | MHTTPTransactionCallback | [pure virtual]


Member List

RHTTPConnectionInfo Member List

This is the complete list of members for RHTTPConnectionInfo, including all inherited members.
Property(RStringF aPropertyName, THTTPHdrVal &aVal) const | RHTTPPropertySet
RemoveAllProperties() | RHTTPPropertySet
RemoveProperty(RStringF aPropertyName) | RHTTPPropertySet
RHTTPPropertySet() | RHTTPPropertySet
SetPropertyL(RStringF aPropertyName, THTTPHdrVal aValue) | RHTTPPropertySet


Member List

RHTTPFilterCollection Member List

This is the complete list of members for RHTTPFilterCollection, including all inherited members.
AddFilterL(MHTTPFilter &aFilter, THTTPEvent aEvent, RStringF aHeader, TInt aStatusCode, TInt aPosition, RStringF aName) | RHTTPFilterCollection
AddFilterL(MHTTPFilter &aFilter, THTTPEvent aEvent, TInt aPosition, RStringF aName) | RHTTPFilterCollection
CanChangeFilters() const | RHTTPFilterCollection
Query(RStringF aName=RStringF()) | RHTTPFilterCollection
RemoveFilter(RStringF aFilter) | RHTTPFilterCollection


Member List

RHTTPHeaders Member List

This is the complete list of members for RHTTPHeaders, including all inherited members.
FieldPartsL(RStringF aFieldName) const | RHTTPHeaders |
Fields() const | RHTTPHeaders |
GetField(RStringF aFieldName, TInt aPartIdx, THTTPHdrVal &aHeaderValue) const | RHTTPHeaders |
GetParam(RStringF aFieldName, RStringF aParamName, THTTPHdrVal &aReturn, TInt aPartIdx=0) const | RHTTPHeaders |
GetRawField(RStringF aFieldName, TPtrC8 &aRawFieldData) const | RHTTPHeaders |
RemoveAllFields() | RHTTPHeaders |
RemoveField(RStringF aFieldName) | RHTTPHeaders |
RemoveFieldPart(RStringF aFieldName, TInt aIndex) | RHTTPHeaders |
RHTTPHeaders() | RHTTPHeaders | [inline]
SetFieldL(RStringF aFieldName, THTTPHdrVal aFieldValue) | RHTTPHeaders |
SetFieldL(RStringF aFieldName, THTTPHdrVal aFieldValue, RStringF aParamName, THTTPHdrVal aParamValue) | RHTTPHeaders |
SetParamL(RStringF aFieldName, RStringF aParamName, THTTPHdrVal aParamValue, TInt aPartIdx) | RHTTPHeaders |
SetRawFieldL(RStringF aFieldName, const TDesC8 &aRawFieldData, const TDesC8 &aFieldSeparator) | RHTTPHeaders |


Member List

RHTTPMessage Member List

This is the complete list of members for RHTTPMessage, including all inherited members.
Body() const | RHTTPMessage |
GetHeaderCollection() | RHTTPMessage |
HasBody() const | RHTTPMessage |
RemoveBody() | RHTTPMessage |
RHTTPMessage() | RHTTPMessage | [inline]
SetBody(MHTTPDataSupplier &aBody) | RHTTPMessage |


Member List

RHTTPPropertySet Member List

This is the complete list of members for RHTTPPropertySet, including all inherited members.
Property(RStringF aPropertyName, THTTPHdrVal &aVal) const | RHTTPPropertySet
RemoveAllProperties() | RHTTPPropertySet
RemoveProperty(RStringF aPropertyName) | RHTTPPropertySet
RHTTPPropertySet() | RHTTPPropertySet
SetPropertyL(RStringF aPropertyName, THTTPHdrVal aValue) | RHTTPPropertySet


Member List

RHTTPRequest Member List

This is the complete list of members for RHTTPRequest, including all inherited members.
Body() const | RHTTPMessage |
GetHeaderCollection() | RHTTPMessage |
HasBody() const | RHTTPMessage |
Method() const | RHTTPRequest |
RemoveBody() | RHTTPMessage |
RHTTPMessage() | RHTTPMessage | [inline]
SetBody(MHTTPDataSupplier &aBody) | RHTTPMessage |
SetMethod(RStringF aMethod) | RHTTPRequest |
SetURIL(const TUriC8 &aURI) | RHTTPRequest |
URI() const | RHTTPRequest |


Member List

RHTTPResponse Member List

This is the complete list of members for RHTTPResponse, including all inherited members.
Body() const | RHTTPMessage |
GetHeaderCollection() | RHTTPMessage |
HasBody() const | RHTTPMessage |
RemoveBody() | RHTTPMessage |
RHTTPMessage() | RHTTPMessage | [inline]
SetBody(MHTTPDataSupplier &aBody) | RHTTPMessage |
SetStatusCode(TInt aStatus) | RHTTPResponse |
SetStatusText(RStringF aStatusString) | RHTTPResponse |
SetVersion(TVersion aVersion) | RHTTPResponse |
StatusCode() const | RHTTPResponse |
StatusText() const | RHTTPResponse |
Version() const | RHTTPResponse |


Member List

RHTTPSession Member List

This is the complete list of members for RHTTPSession, including all inherited members.
Close() | RHTTPSession |
ConnectionInfo() const | RHTTPSession |
ConnectL() | RHTTPSession |
DisconnectL() | RHTTPSession |
FailSessionEvent(THTTPFilterHandle aStart=THTTPFilterHandle::EClient) | RHTTPSession |
FilterCollection() const | RHTTPSession | [inline]
ListAvailableProtocolsL(RPointerArray< HBufC8 > &aProtocolArray) | RHTTPSession | [static]
OpenL() | RHTTPSession |
OpenL(const TDesC8 &aProtocol) | RHTTPSession |
OpenL(const TDesC8 &aProtocol, MHTTPFilterCreationCallback *aSessionCallback) | RHTTPSession |
OpenTransactionL(const TUriC8 &aURI, MHTTPTransactionCallback &aCallback, RStringF aMethod=RStringF()) | RHTTPSession |
operator!=(RHTTPSession aTrans) const | RHTTPSession | [inline]
operator==(RHTTPSession aTrans) const | RHTTPSession | [inline]
RequestSessionHeadersL() | RHTTPSession |
ResponseSessionHeadersL() | RHTTPSession |
RHTTPSession() | RHTTPSession | [inline]
SendSessionEventL(THTTPSessionEvent aStatus, THTTPSessionEvent::TDirection aDirection, THTTPFilterHandle aStart=THTTPFilterHandle::EClient) | RHTTPSession |
ServerCert(TCertInfo &aServerCert) | RHTTPSession |
SetSessionEventCallback(MHTTPSessionEventCallback *aSessionEventCallback) | RHTTPSession |
StringPool() const | RHTTPSession |


Member List

RHTTPTransaction Member List

This is the complete list of members for RHTTPTransaction, including all inherited members.
Cancel(THTTPFilterHandle aStart=THTTPFilterHandle::EClient) | RHTTPTransaction |
Close() | RHTTPTransaction |
Fail(THTTPFilterHandle aStart=THTTPFilterHandle::ECurrentFilter) | RHTTPTransaction |
Id() const | RHTTPTransaction |
NotifyNewRequestBodyPartL(THTTPFilterHandle aStart=THTTPFilterHandle::EClient) | RHTTPTransaction |
operator!=(RHTTPTransaction aTrans) const | RHTTPTransaction | [inline]
operator==(RHTTPTransaction aTrans) const | RHTTPTransaction | [inline]
PropertySet() const | RHTTPTransaction |
Request() const | RHTTPTransaction |
Response() const | RHTTPTransaction |
RHTTPTransaction() | RHTTPTransaction | [inline]
SendEventL(THTTPEvent aStatus, THTTPEvent::TDirection aDirection, THTTPFilterHandle aStart) | RHTTPTransaction |
ServerCert(TCertInfo &aServerCert) | RHTTPTransaction |
Session() const | RHTTPTransaction |
SubmitL(THTTPFilterHandle aStart=THTTPFilterHandle::EClient) | RHTTPTransaction |


Member List

RHTTPTransactionPropertySet Member List

This is the complete list of members for RHTTPTransactionPropertySet, including all inherited members.
Property(RStringF aPropertyName, THTTPHdrVal &aVal) const | RHTTPPropertySet
RemoveAllProperties() | RHTTPPropertySet
RemoveProperty(RStringF aPropertyName) | RHTTPPropertySet
RHTTPPropertySet() | RHTTPPropertySet
SetPropertyL(RStringF aPropertyName, THTTPHdrVal aValue) | RHTTPPropertySet


Member List

TFilterConfigurationIterator Member List

This is the complete list of members for TFilterConfigurationIterator, including all inherited members.
AtEnd() | TFilterConfigurationIterator
AtStart() | TFilterConfigurationIterator
CurrentFilterInformation() const | TFilterConfigurationIterator
FindByDataType(const TDesC8 &aDataType) | TFilterConfigurationIterator
First() | TFilterConfigurationIterator
InstallCurrentFilter() const | TFilterConfigurationIterator
Next() | TFilterConfigurationIterator
UninstallCurrentFilter() const | TFilterConfigurationIterator


Member List

THTTPEvent Member List

This is the complete list of members for THTTPEvent, including all inherited members.
EAll enum value | THTTPEvent |
EAnySessionEvent enum value | THTTPEvent |
EAnyTransactionEvent enum value | THTTPEvent |
ECancel enum value | THTTPEvent |
EClosed enum value | THTTPEvent |
EFailed enum value | THTTPEvent |
EGotResponseBodyData enum value | THTTPEvent |
EGotResponseHeaders enum value | THTTPEvent |
EGotResponseTrailerHeaders enum value | THTTPEvent |
EIncoming enum value | THTTPEvent |
EMoreDataReceivedThanExpected enum value | THTTPEvent |
ENotifyNewRequestBodyPart enum value | THTTPEvent |
EOutgoing enum value | THTTPEvent |
ERedirectedPermanently enum value | THTTPEvent |
ERedirectedTemporarily enum value | THTTPEvent |
EResponseComplete enum value | THTTPEvent |
ESubmit enum value | THTTPEvent |
ESucceeded enum value | THTTPEvent |
ETooMuchRequestData enum value | THTTPEvent |
EUnrecoverableError enum value | THTTPEvent |
iIsSessionEventFlag | THTTPEvent | [protected]
IsSessionEvent() const | THTTPEvent | [inline]
iStatus | THTTPEvent |
iUID | THTTPEvent |
operator!=(THTTPEvent aThat) const | THTTPEvent | [inline]
operator!=(TStandardEvent aStatus) const | THTTPEvent | [inline]
operator!=(TTransactionEvent aStatus) const | THTTPEvent | [inline]
operator=(TStandardEvent aStatus) | THTTPEvent | [inline]
operator=(TTransactionEvent aStatus) | THTTPEvent | [inline]
operator==(THTTPEvent aThat) const | THTTPEvent | [inline]
operator==(TStandardEvent aStatus) const | THTTPEvent | [inline]
operator==(TTransactionEvent aStatus) const | THTTPEvent | [inline]
TDirection enum name | THTTPEvent |
THTTPEvent(TInt aStatus, TUint aUID=KHTTPUid) | THTTPEvent | [inline]
THTTPEvent(TStandardEvent aStatus=EAnyTransactionEvent) | THTTPEvent | [inline]
THTTPEvent(TTransactionEvent aStatus) | THTTPEvent | [inline]
TStandardEvent enum name | THTTPEvent |
TTransactionEvent enum name | THTTPEvent |
TTransactionWarning enum name | THTTPEvent |


Member List

THTTPFilterHandle Member List

This is the complete list of members for THTTPFilterHandle, including all inherited members.
EClient enum value | THTTPFilterHandle
EProtocolHandler enum value | THTTPFilterHandle
EUndefined enum value | THTTPFilterHandle
TStandardValues enum name | THTTPFilterHandle


Member List

THTTPFilterIterator Member List

This is the complete list of members for THTTPFilterIterator, including all inherited members.
AtEnd() const | THTTPFilterIterator |
First() | THTTPFilterIterator | [inline]
operator *() const | THTTPFilterIterator | [inline]
operator()() const | THTTPFilterIterator |
operator++() | THTTPFilterIterator |
operator->() const | THTTPFilterIterator | [inline]
THTTPFilterIterator() | THTTPFilterIterator | [inline]


Member List

THTTPFilterRegistration Member List

This is the complete list of members for THTTPFilterRegistration, including all inherited members.
iEvent | THTTPFilterRegistration |
iFilter | THTTPFilterRegistration |
iHandle | THTTPFilterRegistration |
iHeader | THTTPFilterRegistration |
iName | THTTPFilterRegistration |
iPosition | THTTPFilterRegistration |
iStatus | THTTPFilterRegistration |
operator!=(THTTPFilterRegistration &aThat) | THTTPFilterRegistration |
operator==(THTTPFilterRegistration &aThat) | THTTPFilterRegistration |
THTTPFilterRegistration() | THTTPFilterRegistration | [inline]
THTTPFilterRegistration(MHTTPFilter &aFilter, THTTPEvent aEvent, RStringTokenF aHeader, TInt aStatusCode, TInt aPosition, RStringTokenF aName, TInt aHandle) | THTTPFilterRegistration | [inline]


Member List

THTTPHdrFieldIter Member List

This is the complete list of members for THTTPHdrFieldIter, including all inherited members.
AtEnd() const | THTTPHdrFieldIter |
First() | THTTPHdrFieldIter |
operator()() | THTTPHdrFieldIter |
operator++() | THTTPHdrFieldIter |
THTTPHdrFieldIter(const CHeaders *aHeaders) | THTTPHdrFieldIter | [inline]
~THTTPHdrFieldIter() | THTTPHdrFieldIter |


Member List

THTTPHdrVal Member List

This is the complete list of members for THTTPHdrVal, including all inherited members.
Copy() const | THTTPHdrVal |
DateTime() const | THTTPHdrVal |
Int() const | THTTPHdrVal |
KDateVal enum value | THTTPHdrVal |
KNoType enum value | THTTPHdrVal |
KStrFVal enum value | THTTPHdrVal |
KStrVal enum value | THTTPHdrVal |
KTIntVal enum value | THTTPHdrVal |
operator RString() const | THTTPHdrVal | [inline]
operator RStringF() const | THTTPHdrVal | [inline]
operator TDateTime() const | THTTPHdrVal | [inline]
operator TInt() const | THTTPHdrVal | [inline]
operator!=(THTTPHdrVal aVal) const | THTTPHdrVal |
operator==(THTTPHdrVal aVal) const | THTTPHdrVal |
SetDateTime(TDateTime aDateVal) | THTTPHdrVal |
SetInt(TInt aIntVal) | THTTPHdrVal |
SetStr(RString aStrVal) | THTTPHdrVal |
SetStrF(RStringF aStrVal) | THTTPHdrVal |
StrF() const | THTTPHdrVal |
THTTPHdrVal() | THTTPHdrVal |
THTTPHdrVal(TInt aIntVal) | THTTPHdrVal |
THTTPHdrVal(RStringF aStrVal) | THTTPHdrVal |
THTTPHdrVal(RString aStrVal) | THTTPHdrVal |
THTTPHdrVal(TDateTime aDateVal) | THTTPHdrVal |
THTTPValType enum name | THTTPHdrVal |
Type() const | THTTPHdrVal |


Member List

THTTPSessionEvent Member List

This is the complete list of members for THTTPSessionEvent, including all inherited members.
EAll enum value | THTTPEvent |
EAlreadyConnected enum value | THTTPSessionEvent |
EAlreadyConnecting enum value | THTTPSessionEvent |
EAlreadyDisconnected enum value | THTTPSessionEvent |
EAlreadyDisconnecting enum value | THTTPSessionEvent |
EAnySessionEvent enum value | THTTPEvent |
EAnyTransactionEvent enum value | THTTPEvent |
EAuthenticatedOK enum value | THTTPSessionEvent |
EAuthenticationFailure enum value | THTTPSessionEvent |
ECancel enum value | THTTPEvent |
EClosed enum value | THTTPEvent |
EConnect enum value | THTTPSessionEvent |
EConnectedOK enum value | THTTPSessionEvent |
EConnectedWithReducedCapabilities enum value | THTTPSessionEvent |
EConnectionTimedOut enum value | THTTPSessionEvent |
EDisconnect enum value | THTTPSessionEvent |
EDisconnected enum value | THTTPSessionEvent |
EExceptionInfo enum value | THTTPSessionEvent |
EFailed enum value | THTTPEvent |
EGotResponseBodyData enum value | THTTPEvent |
EGotResponseHeaders enum value | THTTPEvent |
EGotResponseTrailerHeaders enum value | THTTPEvent |
EIncoming enum value | THTTPEvent |
EMoreDataReceivedThanExpected enum value | THTTPEvent |
ENotConnected enum value | THTTPSessionEvent |
ENotifyNewRequestBodyPart enum value | THTTPEvent |
EOutgoing enum value | THTTPEvent |
ERedirected enum value | THTTPSessionEvent |
ERedirectedPermanently enum value | THTTPEvent |
ERedirectedTemporarily enum value | THTTPEvent |
EResponseComplete enum value | THTTPEvent |
ESubmit enum value | THTTPEvent |
ESucceeded enum value | THTTPEvent |
ETooMuchRequestData enum value | THTTPEvent |
EUnrecoverableError enum value | THTTPEvent |
iIsSessionEventFlag | THTTPEvent | [protected]
IsSessionEvent() const | THTTPEvent | [inline]
iStatus | THTTPEvent |
iUID | THTTPEvent |
operator!=(TSessionEvent aStatus) const | THTTPSessionEvent | [inline]
THTTPEvent::operator!=(THTTPEvent aThat) const | THTTPEvent | [inline]
THTTPEvent::operator!=(TStandardEvent aStatus) const | THTTPEvent | [inline]
THTTPEvent::operator!=(TTransactionEvent aStatus) const | THTTPEvent | [inline]
operator=(TSessionEvent aStatus) | THTTPSessionEvent | [inline]
THTTPEvent::operator=(TStandardEvent aStatus) | THTTPEvent | [inline]
THTTPEvent::operator=(TTransactionEvent aStatus) | THTTPEvent | [inline]
operator==(TSessionEvent aStatus) const | THTTPSessionEvent | [inline]
THTTPEvent::operator==(THTTPEvent aThat) const | THTTPEvent | [inline]
THTTPEvent::operator==(TStandardEvent aStatus) const | THTTPEvent | [inline]
THTTPEvent::operator==(TTransactionEvent aStatus) const | THTTPEvent | [inline]
TDirection enum name | THTTPEvent |
THTTPEvent(TInt aStatus, TUint aUID=KHTTPUid) | THTTPEvent | [inline]
THTTPEvent(TStandardEvent aStatus=EAnyTransactionEvent) | THTTPEvent | [inline]
THTTPEvent(TTransactionEvent aStatus) | THTTPEvent | [inline]
THTTPSessionEvent(TInt aStatus, TUint aUID=KHTTPUid) | THTTPSessionEvent | [inline]
THTTPSessionEvent(TStandardEvent aStatus=EAnySessionEvent) | THTTPSessionEvent | [inline]
THTTPSessionEvent(TSessionEvent aStatus) | THTTPSessionEvent | [inline]
TSessionEvent enum name | THTTPSessionEvent |
TSessionWarning enum name | THTTPSessionEvent |
TStandardEvent enum name | THTTPEvent |
TTransactionEvent enum name | THTTPEvent |
TTransactionWarning enum name | THTTPEvent |


Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

Consider the following example:

/*! Invisible class because of truncation */
class Invisible { };

/*! Truncated class, inheritance relation is hidden */
class Truncated : public Invisible { };

/* Class not documented with doxygen comments */
class Undocumented { };

/*! Class that is inherited using public inheritance */
class PublicBase : public Truncated { };

/*! A template class */
template<class T> class Templ { };

/*! Class that is inherited using protected inheritance */
class ProtectedBase { };

/*! Class that is inherited using private inheritance */
class PrivateBase { };

/*! Class that is used by the Inherited class */
class Used { };

/*! Super class that inherits a number of other classes */
class Inherited : public PublicBase,
                  protected ProtectedBase,
                  private PrivateBase,
                  public Undocumented
                  public Templ<int>
{
  private:
    Used *m_usedClass;
};
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

The boxes in the above graph have the following meaning:

  • A filled black box represents the struct or class for which the graph is generated.
  • A box with a black border denotes a documented struct or class.
  • A box with a grey border denotes an undocumented struct or class.
  • A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
The arrows have the following meaning:
  • A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • A dark green arrow is used for protected inheritance.
  • A dark red arrow is used for private inheritance.
  • A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.


HttpStringConstants.h Source File

HttpStringConstants.h

00001 // Autogenerated from \epoc32\build\generated\http\HttpStringConstants.st by the stringtable tool - Do not edit
00002
00003 #ifndef STRINGTABLE_HTTP
00004 #define STRINGTABLE_HTTP
00005
00006 #include "StringPool.h"
00007
00008 struct TStringTable;
00009
00011 class HTTP
00012     {
00013 public:
00014     enum TStrings
00015         {
00017         ECONNECT,
00019         EDELETE,
00021         EGET,
00023         EHEAD,
00025         EOPTIONS,
00027         EPOST,
00029         EPUT,
00031         ETRACE,
00033         EHttp10,
00035         EHttp11,
00037         ECacheControl,
00039         EConnection,
00041         EDate,
00043         EPragma,
00045         ETransferEncoding,
00047         EUpgrade,
00049         EVia,
00051         EWarning,
00053         EHost,
00055         EAccept,
00057         EAcceptCharset,
00059         EAcceptEncoding,
00061         EAcceptLanguage,
00063         EAuthorization,
00065         ECookie,
00067         ECookie2,
00069         EExpect,
00071         EFrom,
00073         EIfModifiedSince,
00075         EIfMatch,
00077         EIfNoneMatch,
00079         EIfRange,
00081         EIfUnmodifiedSince,
00083         EKeepAlive,
00085         EMaxForwards,
00087         EProxyAuthorization,
00089         ERange,
00091         EReferer,
00093         EUserAgent,
00095         EAcceptRanges,
00097         EAge,
00099         EETag,
00101         ELocation,
00103         EProxyAuthenticate,
00105         ERetryAfter,
00107         EServer,
00109         ESetCookie,
00111         ESetCookie2,
00113         EVary,
00115         EWWWAuthenticate,
00117         EAllow,
00119         EContentBase,
00121         EContentDisposition,
00123         EContentEncoding,
00125         EContentLanguage,
00127         EContentLength,
00129         EContentLocation,
00131         EContentMD5,
00133         EContentRange,
00135         EContentType,
00137         EExpires,
00139         ELastModified,
00141         EQ,
00143         EGzip,
00145         ECompress,
00147         EDeflate,
00149         EIdentity,
00151         EBytes,
00153         ENone,
00155         ENoCache,
00157         ENoStore,
00159         EMaxAge,
00161         EMaxStale,
00163         EMinFresh,
00165         ENoTransform,
00167         EOnlyIfCached,
00169         EPublic,
00171         EPrivate,
00173         EMustRevalidate,
00175         EProxyRevalidate,
00177         ESMaxAge,
00179         EClose,
00181         ECharset,
00183         E100Continue,
00185         ETE,
00187         ETrailer,
00189         EChunked,
00191         EBasic,
00193         EDigest,
00195         ERealm,
00197         EDomain,
00199         ENonce,
00201         EOpaque,
00203         EStale,
00205         EAlgorithm,
00207         EQop,
00209         EAuth,
00211         EResponse,
00213         EUri,
00215         ECnonce,
00217         ENc,
00219         E00000001,
00221         EPort,
00223         EAuthentication,
00225         ERedirect,
00227         EValidation,
00229         EProtocolHandler,
00231         EClient,
00233         ETextModeHeadersValidator,
00235         ESessionHeaderFilter,
00237         ECookieFilter,
00239         EProxyUsage,
00241         EProxyAddress,
00243         EUseProxy,
00245         EDoNotUseProxy,
00247         EMaxNumTransportHandlers,
00249         EMaxNumTransPerTranspHndlr,
00251         EHTTPVersion,
00253         EMaxRedirect,
00255         EProtocol,
00257         EHTTP,
00259         EWSP,
00261         EWspCapClientMessageSize,
00263         EWspCapServerMessageSize,
00265         EWspCapUseAcknowledgements,
00267         EWspCapSupportSuspendResume,
00269         EWspCapMaxOutstandingRequests,
00271         EWspProxyAddress,
00273         EWspBearer,
00275         EWspIp,
00277         EWspSMS,
00279         EWspLocalPort,
00281         EWspRemotePort,
00283         EWspServiceNumber,
00285         EWspSessionType,
00287         EWspConnectionOriented,
00289         EWspConnectionLess,
00291         EWspSecurity,
00293         EWspUseWtls,
00295         EWspDoNotUseWtls,
00297         EWspProxyConnectionTimeout,
00299         EWspProxyExceptionInfo,
00301         EWspRemainingSDUSize,
00303         EWspRemainingMessageSize,
00305         EAuthenticatedOK,
00307         EAuthenticationFailure,
00309         EUsername,
00311         EPassword,
00313         EAuthenticationStatus,
00315         ERedirectCount,
00317         EProtTrans,
00319         EAnyAny,
00321         ETextAny,
00323         ETextHtml,
00325         ETextPlain,
00327         ETextVndWapWml,
00329         EApplicationOctetStream,
00331         EApplicationXWwwFormUrlEncoded,
00333         ECookieName,
00335         ECookieValue,
00337         EPath,
00339         EComment,
00341         ECommentURL,
00343         EDiscard,
00345         ECookiePort,
00347         ESecure,
00349         EVersion,
00351         EHttpSocketServ,
00353         EHttpSocketConnection,
00355         ESecureDialog
00356         };
00357     static const TStringTable Table;
00358     };
00359
00360 #endif // STRINGTABLE_HTTP
00361


mhttpauthenticationcallback.h Source File

mhttpauthenticationcallback.h

00001 // MHTTPAuthenticationCallback.h
00002 //
00003 // Copyright (C) 2001 Symbian Ltd.
00004
00011 #ifndef __MHTTPAUTHENTICATIONCALLBACK_H__
00012 #define __MHTTPAUTHENTICATIONCALLBACK_H__
00013
00014 // System includes
00015 #include <uri8.h>
00016 #include <stringpool.h>
00017 #include <http/rhttpsession.h>
00018 #include <http/cauthenticationfilterinterface.h>
00019
00031 //##ModelId=3B1E52A50151
00032 class MHTTPAuthenticationCallback
00033     {
00034  public:
00052     //##ModelId=3B1E52A5015D
00053     virtual TBool GetCredentialsL(const TUriC8& aURI, RString aRealm,
00054                                   RStringF aAuthenticationType,
00055                                   RString& aUsername,
00056                                   RString& aPassword) = 0;
00057
00066     //##ModelId=3B1E52A5015B
00067     inline void InstallAuthenticationL(RHTTPSession aSession);
00068     };
00069
00070 inline void MHTTPAuthenticationCallback::InstallAuthenticationL(RHTTPSession aSession)
00071     {
00072     CAuthenticationFilterInterface::InstallFilterL(aSession, this);
00073     }
00074
00075
00076 #endif //   __MHTTPAUTHENTICATIONCALLBACK_H__


mhttpdatasupplier.h Source File

mhttpdatasupplier.h

00001 // MHTTPDataSupplier.h
00002 //
00003 // Copyright (C) 2001 Symbian Ltd.
00004
00011 #ifndef __MHTTPDATASUPPLIER_H__
00012 #define __MHTTPDATASUPPLIER_H__
00013
00014 // System includes
00015 #include <e32base.h>
00016
00064 //##ModelId=3C4C187903E5
00065 class MHTTPDataSupplier
00066     {
00067  public:
00072     //##ModelId=3C4C187A0026
00073      virtual TBool GetNextDataPart(TPtrC8& aDataPart) = 0;
00074
00079     //##ModelId=3C4C187A0025
00080     virtual void ReleaseData() = 0;
00081
00090     //##ModelId=3C4C187A001D
00091     virtual TInt OverallDataSize() = 0;
00092
00101     //##ModelId=3C4C187A001C
00102     virtual TInt Reset() = 0;
00103
00104 private:
00105     // Some reserved methods for future expansion (e.g. better support
00106     // for ZCD)
00107     //##ModelId=3C4C187A001B
00108     inline virtual void MHDS_Reserved1();
00109     //##ModelId=3C4C187A0012
00110     inline virtual void MHDS_Reserved2();
00111     //##ModelId=3C4C187A0011
00112     inline virtual void MHDS_Reserved3();
00113     };
00114
00115 inline void MHTTPDataSupplier::MHDS_Reserved1()
00116     {}
00117
00118 inline void MHTTPDataSupplier::MHDS_Reserved2()
00119     {}
00120
00121 inline void MHTTPDataSupplier::MHDS_Reserved3()
00122     {}
00123
00124 #endif // __MHTTPDATASUPPLIER_H__


mhttpfilter.h Source File

mhttpfilter.h

00001 // MHTTPFilter.h
00002 //
00003 // Copyright (C) 2001 Symbian Ltd.
00004
00011 #ifndef __MHTTPFILTER_H__
00012 #define __MHTTPFILTER_H__
00013
00014 // System includes
00015 #include <e32std.h>
00016 #include <http/mhttpfilterbase.h>
00017 #include <http/rhttpsession.h>
00018 #include <http/thttpfilterhandle.h>
00019
00027 //##ModelId=3C4C187D03E1
00028 class MHTTPFilter : public MHTTPFilterBase
00029     {
00030  public:
00037     //##ModelId=3C4C187E0011
00038     IMPORT_C virtual void MHFUnload(RHTTPSession aSession,
00039                                     THTTPFilterHandle aHandle);
00040
00047     //##ModelId=3C4C187E000E
00048     IMPORT_C virtual void MHFLoad(RHTTPSession aSession,
00049                                   THTTPFilterHandle aHandle);
00050  public:
00055     enum TPositions
00056         {
00059         EProtocolHandler    = 0,
00060         // Filters that should be downstream of any status-code related processing
00062         ECache              = 100,
00065         EStatusCodeHandler = 200,
00070         ECookies            = 300,
00073         ETidyUp = 400,
00076         EClientFilters      = 500,
00079         EClient             = 1000
00080         };
00081     };
00082
00083 #endif // __MHTTPFILTER_H__


mhttpfilterbase.h Source File

mhttpfilterbase.h

00001 // MHTTPFilterBase.h
00002 //
00003 // Copyright (C) 2001 Symbian Ltd.
00004
00011 #ifndef __MHTTPFILTERBASE_H__
00012 #define __MHTTPFILTERBASE_H__
00013
00014 // System includes
00015 #include <e32std.h>
00016
00017 // Forward declarations
00018 class RHTTPTransaction;
00019 class THTTPEvent;
00020 class THTTPSessionEvent;
00021
00031 //##ModelId=3A914DF9034F
00032 class MHTTPFilterBase
00033     {
00034 public:
00043     //##ModelId=3A914DF9035D
00044     IMPORT_C virtual void MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent& aEvent);
00045
00051     //##ModelId=3C4C37D401C1
00052     IMPORT_C virtual void MHFSessionRunL(const THTTPSessionEvent& aEvent);
00053
00063     //##ModelId=3A914DF90359
00064     IMPORT_C virtual TInt MHFRunError(TInt aError, RHTTPTransaction aTransaction, const THTTPEvent& aEvent);
00065
00074     //##ModelId=3C4C37D302C4
00075     IMPORT_C virtual TInt MHFSessionRunError(TInt aError, const THTTPSessionEvent& aEvent);
00076     };
00077
00078
00079 #endif //    __MHTTPFILTERBASE_H__


MHTTPFilterCreationCallback.h Source File

MHTTPFilterCreationCallback.h

Go to the documentation of this file.
00001 // MHTTPFilterCreationCallback.h
00002 //
00003 // Copyright (C) 2001 Symbian Ltd.
00004
00011 #ifndef __MHTTPFILTERCREATIONCALLBACK_H__
00012 #define __MHTTPFILTERCREATIONCALLBACK_H__
00013
00014 // Forward declarations
00015 class TFilterConfigurationIterator;
00016
00028 //##ModelId=3C4C0F450132
00029 class MHTTPFilterCreationCallback
00030     {
00031 public: // Methods
00043     //##ModelId=3C4C0F450150
00044     virtual void ConfigureSessionFiltersL(TFilterConfigurationIterator* aFilterConfigIter) = 0;
00045     };
00046
00047 #endif // __MHTTPFILTERCREATIONCALLBACK_H__


mhttpsessioneventcallback.h Source File

mhttpsessioneventcallback.h

00001 // MHTTPSessionEventCallback.h
00002 //
00003 // Copyright (C) 2001 Symbian Ltd.
00004
00011 #ifndef __MHTTPSESSIONEVENTCALLBACK_H__
00012 #define __MHTTPSESSIONEVENTCALLBACK_H__
00013
00014 // System includes
00015 #include <e32std.h>
00016 #include <http/rhttptransaction.h>
00017 #include <http/thttpevent.h>
00018
00026 //##ModelId=3C4C0F460242
00027 class MHTTPSessionEventCallback
00028     {
00029 public: // Methods
00030
00036     //##ModelId=3C4C0F460262
00037     virtual void MHFSessionRunL(const THTTPSessionEvent& aEvent) =0;
00038
00047     //##ModelId=3C4C0F460256
00048     virtual TInt MHFSessionRunError(TInt aError, const THTTPSessionEvent& aEvent) =0;
00049     };
00050
00051
00052 #endif //   __MHTTPSESSIONEVENTCALLBACK_H__


mhttptransactioncallback.h Source File

mhttptransactioncallback.h

00001 // MHTTPTransactionCallback.h
00002 //
00003 // Copyright (C) 2001 Symbian Ltd.
00004
00011 #ifndef __MHTTPTRANSACTIONCALLBACK_H__
00012 #define __MHTTPTRANSACTIONCALLBACK_H__
00013
00014 // System includes
00015 #include <e32std.h>
00016 #include <http/rhttptransaction.h>
00017 #include <http/thttpevent.h>
00018
00026 //##ModelId=3C4C1886022B
00027 class MHTTPTransactionCallback
00028     {
00029 public: // Methods
00030
00039     //##ModelId=3C4C1886024C
00040     virtual void MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent& aEvent) =0;
00041
00051     //##ModelId=3C4C1886023F
00052     virtual TInt MHFRunError(TInt aError, RHTTPTransaction aTransaction, const THTTPEvent& aEvent) =0;
00053
00054     };
00055
00056 #endif //   __MHTTPTRANSACTIONCALLBACK_H__


rhttpconnectioninfo.h Source File

rhttpconnectioninfo.h

00001 // RHTTPConnectionInfo.h
00002 //
00003 // Copyright (C) 2001 Symbian Ltd.
00004
00011 #ifndef __RHTTPCONNECTIONINFO_H__
00012 #define __RHTTPCONNECTIONINFO_H__
00013
00014 // System includes
00015 #include <e32std.h>
00016 #include <stringpool.h>
00017 #include <http/rhttppropertyset.h>
00018
00052 //##ModelId=3C4C187A01CA
00053 class RHTTPConnectionInfo : public RHTTPPropertySet
00054     {
00055     };
00056
00057 #endif // __RHTTPCONNECTIONINFO_H__


rhttpfiltercollection.h Source File

rhttpfiltercollection.h

00001 // RHTTPFilterCollection.h
00002 //
00003 // Copyright (C) 2001 Symbian Ltd.
00004
00011 #ifndef __RHTTPFILTERCOLLECTION_H__
00012 #define __RHTTPFILTERCOLLECTION_H__
00013
00014 // System includes
00015 #include <e32std.h>
00016 #include <http/thttpevent.h>
00017 #include <stringpool.h>
00018
00019 // Forward declarations
00020 class RHTTPSession;
00021 class MHTTPFilter;
00022 class THTTPFilterIterator;
00023
00036 //##ModelId=3C4C187C02B3
00037 class RHTTPFilterCollection
00038     {
00039  public:
00040     //##ModelId=3C4C187C02F9
00041     inline RHTTPFilterCollection();
00061     //##ModelId=3C4C187C02E5
00062     IMPORT_C void AddFilterL(MHTTPFilter& aFilter, THTTPEvent aEvent,
00063                              RStringF aHeader, TInt aStatusCode,
00064                              TInt aPosition, RStringF aName);
00065
00066
00080     //##ModelId=3C4C187C02F1
00081     IMPORT_C void AddFilterL(MHTTPFilter& aFilter, THTTPEvent aEvent,
00082                              TInt aPosition, RStringF aName);
00083
00088     //##ModelId=3C4C187C02DF
00089     IMPORT_C TBool CanChangeFilters() const;
00090
00092     //##ModelId=3C4C187C02DD
00093     IMPORT_C void RemoveFilter(RStringF aFilter);
00099     //##ModelId=3C4C187C02DB
00100     IMPORT_C THTTPFilterIterator Query(RStringF aName = RStringF());
00101
00102     //##ModelId=3C4C187C02D1
00103     inline RHTTPSession Session() const;
00104
00105  private:
00106     friend class CHTTPSession;
00107     friend class RHTTPSession;
00108
00109     //##ModelId=3C4C187C02C9
00110     CHTTPSession* iImplementation;
00111     };
00112
00113
00114 inline RHTTPFilterCollection::RHTTPFilterCollection()
00115         : iImplementation(NULL)
00116     {
00117     }
00118
00119 #endif //   __RHTTPFILTERCOLLECTION_H__


rhttpheaders.h Source File

rhttpheaders.h

00001 // RHTTPHeaders.h
00002 //
00003 // Copyright (C) 2001 Symbian Ltd.
00004
00011 #ifndef __RHTTPHEADERS_H__
00012 #define __RHTTPHEADERS_H__
00013
00014 // System includes
00015 #include <http/thttphdrfielditer.h>
00016 #include <http/thttphdrval.h>
00017
00033 //##ModelId=3C4C1880001A
00034 class RHTTPHeaders
00035     {
00036  public:
00039     //##ModelId=3C4C18800088
00040     inline RHTTPHeaders();
00041
00053     //##ModelId=3C4C18800081
00054     IMPORT_C TInt FieldPartsL(RStringF aFieldName) const;
00055
00065     //##ModelId=3C4C18800079
00066     IMPORT_C TInt GetField(RStringF aFieldName,
00067                                   TInt aPartIdx, THTTPHdrVal& aHeaderValue) const;
00068
00080     //##ModelId=3C4C18800076
00081     IMPORT_C TInt GetRawField(RStringF aFieldName,
00082                                TPtrC8& aRawFieldData) const;
00083
00095     //##ModelId=3C4C1880006C
00096     IMPORT_C TInt GetParam(RStringF aFieldName,
00097                                   RStringF aParamName,
00098                                   THTTPHdrVal& aReturn,
00099                                   TInt aPartIdx = 0) const;
00100
00106     //##ModelId=3C4C1880006B
00107     IMPORT_C THTTPHdrFieldIter Fields() const;
00109
00121     //##ModelId=3C4C18800060
00122     IMPORT_C void SetFieldL(RStringF aFieldName, THTTPHdrVal aFieldValue);
00123
00132     //##ModelId=3C4C18800063
00133     IMPORT_C void SetFieldL(RStringF aFieldName, THTTPHdrVal aFieldValue,
00134                             RStringF aParamName, THTTPHdrVal aParamValue);
00135
00143     //##ModelId=3C4C18800058
00144     IMPORT_C void SetParamL(RStringF aFieldName, RStringF aParamName, THTTPHdrVal aParamValue, TInt aPartIdx);
00145
00159     //##ModelId=3C4C1880004F
00160     IMPORT_C void SetRawFieldL(RStringF aFieldName,
00161                                const TDesC8& aRawFieldData,
00162                                const TDesC8& aFieldSeparator);
00163
00170     //##ModelId=3C4C1880004D
00171     IMPORT_C TInt RemoveField(RStringF aFieldName);
00172
00179     //##ModelId=3C4C18800043
00180     IMPORT_C TInt RemoveFieldPart(RStringF aFieldName, TInt aIndex);
00181
00184     //##ModelId=3C4C18800042
00185     IMPORT_C void RemoveAllFields();
00186
00188
00189
00190 private:
00191     friend class CHeaders;
00192     //##ModelId=3C4C1880003A
00193     CHeaders* iImplementation;
00194     };
00195
00196
00197 inline RHTTPHeaders::RHTTPHeaders()
00198         : iImplementation(NULL)
00199     {
00200     }
00201
00202
00203 #endif  // __RHTTPHEADERS_H__


rhttpmessage.h Source File

rhttpmessage.h

00001 // RHTTPMessage.h
00002 //
00003 // Copyright (C) 2001 Symbian Ltd.
00004
00011 #ifndef __RHTTPMESSAGE_H__
00012 #define __RHTTPMESSAGE_H__
00013
00014 // Forward declarations
00015 class RHTTPHeaders;
00016 class MHTTPDataSupplier;
00017 class CMessage;
00018
00028 //##ModelId=3A375D1F0377
00029 class RHTTPMessage
00030     {
00031  public:
00033     //##ModelId=3A375DD60140
00034     inline RHTTPMessage();
00035
00037     //##ModelId=3A375DDE0368
00038     IMPORT_C RHTTPHeaders GetHeaderCollection();
00039
00044     //##ModelId=3A375DE0019E
00045     IMPORT_C void SetBody(MHTTPDataSupplier& aBody);
00046
00048     //##ModelId=3B1E66FF004E
00049     IMPORT_C void RemoveBody();
00050
00054     //##ModelId=3A914DFF01E5
00055     IMPORT_C TBool HasBody() const;
00056
00067     //##ModelId=3A375DE40190
00068     IMPORT_C MHTTPDataSupplier* Body() const;
00069
00070  protected:
00071     //##ModelId=3A914DFF01C7
00072     CMessage* iImplementation;
00073 };
00074
00075
00076 inline RHTTPMessage::RHTTPMessage()
00077         : iImplementation(NULL)
00078     {
00079     };
00080
00081
00082 #endif // __RHTTPMESSAGE_H__


rhttppropertyset.h Source File

rhttppropertyset.h

00001 // RHTTPPropertySet.h
00002 //
00003 // Copyright (C) 2001 Symbian Ltd.
00004
00011 #ifndef __RHTTPPROPERTYSET_H__
00012 #define __RHTTPPROPERTYSET_H__
00013
00014 // System includes
00015 #include <http/thttphdrval.h>
00016
00017 // Forward declarations
00018 class CHeaderFieldPart;
00019
00028 //##ModelId=3C4C188201EA
00029 class RHTTPPropertySet
00030     {
00031  public:
00035     //##ModelId=3A63217800E0
00036     IMPORT_C RHTTPPropertySet();
00037
00043     //##ModelId=3C4C1882021F
00044     IMPORT_C TBool Property(RStringF aPropertyName, THTTPHdrVal& aVal) const;
00045
00051     //##ModelId=3C4C1882021C
00052     IMPORT_C void SetPropertyL(RStringF aPropertyName, THTTPHdrVal aValue);
00053
00057     //##ModelId=3C4C18820213
00058     IMPORT_C void RemoveProperty(RStringF aPropertyName);
00059
00062     //##ModelId=3C4C18820212
00063     IMPORT_C void RemoveAllProperties();
00064
00065  protected:
00066     //##ModelId=3C4C18820208
00067     CHeaderFieldPart* iImplementation;
00068
00069     friend class CHeaderFieldPart;
00070     friend class CHTTPSession;
00071     };
00072
00073
00074
00075 #endif //   __RHTTPPROPERTYSET_H__


rhttprequest.h Source File

rhttprequest.h

00001 // RHTTPRequest.h
00002 //
00003 // Copyright (C) 2001 Symbian Ltd.
00004
00011 #ifndef __RHTTPREQUEST_H__
00012 #define __RHTTPREQUEST_H__
00013
00014 // System includes
00015 #include <uri8.h>
00016 #include <stringpool.h>
00017 #include <http/rhttpmessage.h>
00018
00028 //##ModelId=3C4C186E0191
00029 class RHTTPRequest : public RHTTPMessage
00030     {
00031  public:
00036
00037     //##ModelId=3C4C186E01B3
00038     IMPORT_C RStringF Method() const;
00040     //##ModelId=3C4C186E01B2
00041     IMPORT_C const TUriC8& URI() const;
00043
00050
00051     //##ModelId=3C4C186E01B0
00052     IMPORT_C void  SetMethod(RStringF aMethod);
00054     //##ModelId=3C4C186E01A6
00055     IMPORT_C void SetURIL(const TUriC8& aURI);
00057
00058     friend class CRequest;
00059     };
00060
00061
00062 #endif //   __RHTTPREQUEST_H__


rhttpresponse.h Source File

rhttpresponse.h

00001 // RHTTPResponse.h
00002 //
00003 // Copyright (C) 2001 Symbian Ltd.
00004
00011 #ifndef __RHTTPRESPONSE_H__
00012 #define __RHTTPRESPONSE_H__
00013
00014 // System includes
00015 #include <e32std.h>
00016 #include <http/rhttpmessage.h>
00017 #include <stringpool.h>
00018
00027 //##ModelId=3A375D1203B5
00028 class RHTTPResponse : public RHTTPMessage
00029     {
00030 public:
00036     //##ModelId=3A914DF801B3
00037     IMPORT_C TInt StatusCode() const;
00040     //##ModelId=3A914DF80195
00041     IMPORT_C RStringF StatusText() const;
00043     //##ModelId=3A914DF80163
00044     IMPORT_C TVersion Version() const;
00046
00055     //##ModelId=3A3765310382
00056     IMPORT_C void SetStatusCode(TInt aStatus);
00058     //##ModelId=3A914DF8019F
00059     IMPORT_C void SetStatusText(RStringF aStatusString);
00061     //##ModelId=3A914DF8016D
00062     IMPORT_C void SetVersion(TVersion aVersion);
00064
00065     friend class CResponse;
00066     };
00067
00068
00069
00070 #endif // __RHTTPRESPONSE_H__


rhttpsession.h Source File

rhttpsession.h

00001 // RHTTPSession.h
00002 //
00003 // Copyright (C) 2001 Symbian Ltd.
00004
00011 #ifndef __RHTTPSESSION_H__
00012 #define __RHTTPSESSION_H__
00013
00014 // System includes
00015 #include <e32std.h>
00016 #include <uri8.h>
00017 #include <http/rhttpconnectioninfo.h>
00018 #include <http/rhttpfiltercollection.h>
00019 #include <http/rhttptransaction.h>
00020
00021 // Forward declarations
00022 class MHTTPTransactionCallback;
00023 class CHTTPSession;
00024 class MHTTPSessionEventCallback;
00025 class MHTTPFilterCreationCallback;
00026 class TCertInfo;
00027
00028 const TInt KAnyStatusCode = -1;
00029
00048 //##ModelId=3C4C187B0280
00049 class RHTTPSession
00050     {
00051  public:
00055     //##ModelId=3C4C187B02EF
00056     inline RHTTPSession();
00057
00061     //##ModelId=3C4C187B02EA
00062     IMPORT_C void SetSessionEventCallback(MHTTPSessionEventCallback* aSessionEventCallback);
00063
00067     //##ModelId=3C4C187B02E6
00068     IMPORT_C void SendSessionEventL(THTTPSessionEvent aStatus, THTTPSessionEvent::TDirection aDirection,
00069                              THTTPFilterHandle aStart = THTTPFilterHandle::EClient);
00070
00073     IMPORT_C void FailSessionEvent(THTTPFilterHandle aStart = THTTPFilterHandle::EClient);
00074
00075     //##ModelId=3A49F701013F
00081     //##ModelId=3C4C187B02DA
00082     IMPORT_C void OpenL();
00083
00090     //##ModelId=3C4C187B02DB
00091     IMPORT_C void OpenL(const TDesC8& aProtocol);
00092
00104     //##ModelId=3C4C187B02DD
00105     IMPORT_C void OpenL(const TDesC8& aProtocol, MHTTPFilterCreationCallback* aSessionCallback);
00106
00116     //##ModelId=3C4C187B02D4
00117     IMPORT_C static void ListAvailableProtocolsL(RPointerArray<HBufC8>& aProtocolArray);
00118
00127     //##ModelId=3C4C187B02D0
00128     IMPORT_C RHTTPTransaction OpenTransactionL(const TUriC8& aURI,
00129                                       MHTTPTransactionCallback& aCallback,
00130                                       RStringF aMethod = RStringF());
00131
00135     //##ModelId=3C4C187B02C8
00136     IMPORT_C void Close();
00137
00138
00139     //##ModelId=3C4C187B02C7
00140     IMPORT_C  static const TStringTable& GetTable();
00141
00145     //##ModelId=3C4C187B02C6
00146     IMPORT_C RStringPool StringPool() const;
00147
00153     //##ModelId=3C4C187B02BE
00154     IMPORT_C RHTTPConnectionInfo ConnectionInfo() const;
00155
00159     //##ModelId=3C4C187B02BD
00160     inline RHTTPFilterCollection FilterCollection() const;
00161
00162
00167     //##ModelId=3C4C187B02BC
00168     IMPORT_C RHTTPHeaders RequestSessionHeadersL();
00169
00170
00174     //##ModelId=3C4C187B02B6
00175     IMPORT_C RHTTPHeaders ResponseSessionHeadersL();
00176
00180     //##ModelId=3C4C187B02B4
00181     TBool operator==(RHTTPSession aTrans) const;
00186     //##ModelId=3C4C187B02B2
00187     TBool operator!=(RHTTPSession aTrans) const;
00188
00197     //##ModelId=3C4C187B02AA
00198     IMPORT_C TInt ServerCert(TCertInfo& aServerCert);
00199
00202     //##ModelId=3C4C187B02A9
00203     IMPORT_C void ConnectL();
00204
00207     //##ModelId=3C4C187B02A8
00208     IMPORT_C void DisconnectL();
00209
00210 private:
00211     friend class RHTTPFilterCollection;
00212     friend class CHTTPSession;
00213
00214     //##ModelId=3C4C187B0296
00215     CHTTPSession* iImplementation;
00216 };
00217
00218 inline RHTTPSession::RHTTPSession()
00219         : iImplementation(0)
00220     {
00221     }
00222
00223
00224 inline RHTTPFilterCollection RHTTPSession::FilterCollection() const
00225     {
00226     RHTTPFilterCollection c;
00227     c.iImplementation = iImplementation;
00228     return c;
00229     }
00230
00231 inline TBool RHTTPSession::operator==(RHTTPSession aTrans) const
00232     {
00233     return (iImplementation == aTrans.iImplementation);
00234     };
00235 inline TBool RHTTPSession::operator!=(RHTTPSession aTrans) const
00236     {
00237     return !(*this == aTrans);
00238     };
00239
00240
00241
00242 inline RHTTPSession RHTTPFilterCollection::Session() const
00243     {
00244     RHTTPSession s;
00245     s.iImplementation = iImplementation;
00246     return s;
00247     }
00248
00249
00250
00251
00252 #endif // __RHTTPSESSION_H__


RHTTPTransaction.h Source File

RHTTPTransaction.h

Go to the documentation of this file.
00001 // RHTTPTransaction.h
00002 //
00003 // Copyright (C) 2001 Symbian Ltd.
00004
00011 #ifndef __RHTTPTRANSACTION_H__
00012 #define __RHTTPTRANSACTION_H__
00013
00014 // System includes
00015 #include <http/thttpevent.h>
00016 #include <http/rhttpresponse.h>
00017 #include <http/rhttprequest.h>
00018 #include <http/rhttptransactionpropertyset.h>
00019 #include <http/thttpfilterhandle.h>
00020
00021 // Forward declarations
00022 class CHTTPTransaction;
00023 class MHTTPTransactionCallback;
00024 class TCertInfo;
00025
00037 //##ModelId=3C4C18860091
00038 class RHTTPTransaction
00039     {
00040  public:
00042     //##ModelId=3C4C188600F5
00043     inline RHTTPTransaction();
00044
00050     //##ModelId=3C4C188600ED
00051     IMPORT_C void SubmitL(THTTPFilterHandle aStart =
00052                           THTTPFilterHandle::EClient);
00053
00060     //##ModelId=3C4C188600EB
00061     IMPORT_C void NotifyNewRequestBodyPartL(THTTPFilterHandle aStart =
00062                                              THTTPFilterHandle::EClient);
00063
00071     //##ModelId=3C4C188600E2
00072     IMPORT_C void SendEventL(THTTPEvent aStatus,
00073                              THTTPEvent::TDirection aDirection,
00074                              THTTPFilterHandle aStart);
00075
00080 //##ModelId=3C4C188600E1
00081     IMPORT_C RHTTPResponse Response() const;
00082
00084     //##ModelId=3C4C188600DA
00085     IMPORT_C RHTTPRequest Request() const;
00086
00088     //##ModelId=3C4C188600D9
00089     IMPORT_C RHTTPSession Session() const;
00090
00095     //##ModelId=3C4C188600D8
00096     IMPORT_C RHTTPTransactionPropertySet PropertySet() const;
00097
00103     //##ModelId=3C4C188600CF
00104     IMPORT_C void Cancel(THTTPFilterHandle aStart =
00105                          THTTPFilterHandle::EClient);
00106
00111     //##ModelId=3C4C188600CE
00112     IMPORT_C void Close();
00113
00121     //##ModelId=3C4C188600C7
00122     IMPORT_C void Fail(THTTPFilterHandle aStart =
00123                        THTTPFilterHandle::ECurrentFilter);
00124
00128     //##ModelId=3C4C188600C5
00129     TBool operator==(RHTTPTransaction aTrans) const;
00133     //##ModelId=3C4C188600C3
00134     TBool operator!=(RHTTPTransaction aTrans) const;
00141     //##ModelId=3C4C188600BB
00142     IMPORT_C TInt Id() const;
00143
00152     //##ModelId=3C4C188600B9
00153     IMPORT_C TInt ServerCert(TCertInfo& aServerCert);
00154
00155 private:
00156     friend class RHTTPSession;
00157     friend class CTransaction;
00158
00159  private:
00160     //##ModelId=3C4C188600A7
00161     CTransaction* iImplementation;
00162     };
00163
00164 inline TBool RHTTPTransaction::operator==(RHTTPTransaction aTrans) const
00165     {
00166     return (iImplementation == aTrans.iImplementation);
00167     };
00168 inline TBool RHTTPTransaction::operator!=(RHTTPTransaction aTrans) const
00169     {
00170     return !(*this == aTrans);
00171     };
00172
00173 inline RHTTPTransaction::RHTTPTransaction()
00174         : iImplementation(NULL)
00175     {
00176     }
00177
00178
00179 #endif // __RHTTPTRANSACTION_H__


rhttptransactionpropertyset.h Source File

rhttptransactionpropertyset.h

00001 // RHTTPTransactionPropertySet.h
00002 //
00003 // Copyright (C) 2001 Symbian Ltd.
00004
00011 #ifndef __RHTTPTRANSACTIONPROPERTYSET_H__
00012 #define __RHTTPTRANSACTIONPROPERTYSET_H__
00013
00014 // System includes
00015 #include <http/rhttppropertyset.h>
00016
00027 //##ModelId=3B1E670402C2
00028 class RHTTPTransactionPropertySet : public RHTTPPropertySet
00029     {
00030     };
00031
00032 #endif //   __RHTTPTRANSACTIONPROPERTYSET_H__


Member List

TFilterInformation Member List

This is the complete list of members for TFilterInformation, including all inherited members.
iDataType | TFilterInformation |
iDisplayName | TFilterInformation |
iFilterCategory | TFilterInformation |
iFilterUid | TFilterInformation |
iInstallStatus | TFilterInformation |
iVersion | TFilterInformation |
TFilterCategory enum name | TFilterInformation |
TFilterInformation(const TDesC &aDisplayName, const TDesC8 &aDataType, TInt aVersion, TUid aFilterUid, TFilterCategory aFilterCategory, TBool aInstallStatus) | TFilterInformation | [inline]


TFilterConfigurationIter.h Source File

TFilterConfigurationIter.h

Go to the documentation of this file.
00001 // TFilterConfigurationIter.h
00002 //
00003 // Copyright (C) 2001 Symbian Ltd
00004
00011 #ifndef __TFILTERCONFIGURATIONITER_H__
00012 #define __TFILTERCONFIGURATIONITER_H__
00013
00014 // System includes
00015 #include <e32std.h>
00016
00017 // User includes
00018 #include <http/tfilterinformation.h>
00019
00020 // Forward declarations
00021 class CHTTPSession;
00022 class TSessionFilterInfo;
00023 class CFilterConfigurationIterator_UnitTestContext;
00024
00039 //##ModelId=3C4C0F45009C
00040 class TFilterConfigurationIterator
00041     {
00042 public: // Methods
00055     //##ModelId=3C4C0F45010C
00056     IMPORT_C TInt First();
00057
00068     //##ModelId=3C4C0F45010B
00069     IMPORT_C TInt Next();
00070
00080     //##ModelId=3C4C0F45010A
00081     IMPORT_C TBool AtStart();
00082
00092     //##ModelId=3C4C0F450101
00093     IMPORT_C TBool AtEnd();
00094
00109     //##ModelId=3C4C0F4500F8
00110     IMPORT_C TInt FindByDataType(const TDesC8& aDataType);
00111
00130     //##ModelId=3C4C0F4500F7
00131     IMPORT_C const TFilterInformation CurrentFilterInformation() const;
00132
00146     //##ModelId=3C4C0F4500F6
00147     IMPORT_C TInt InstallCurrentFilter() const;
00148
00159     //##ModelId=3C4C0F4500EF
00160     IMPORT_C TInt UninstallCurrentFilter() const;
00161
00162 private: // Methods
00163     // Friend class
00164     friend class CHTTPSession;
00165
00166     // Friend class for testing purposes
00167     friend class CFilterConfigurationIterator_UnitTestContext;
00168
00169     // Standard default constructor, this is private as it is designed so that only
00170     // the CHTTPSession object that create it.
00171     //##ModelId=3C4C0F4500ED
00172     TFilterConfigurationIterator(CHTTPSession* aSession);
00173
00174     // Standard destructor, this is private as it is designed so that only the
00175     // CHTTPSession object can delete it.
00176     //##ModelId=3C4C0F4500EC
00177     ~TFilterConfigurationIterator();
00178
00179 private: // Attributes
00180     // Pointer to the session implementation. This is not owned.
00181     //##ModelId=3C4C0F4500DA
00182     CHTTPSession* iSession;
00183
00184     // Pointer array containing all the information for all the filter plugins
00185     // discovered by ECom. The list is stored and owned by the session. This is
00186     // not owned.
00187     //##ModelId=3C4C0F4500D0
00188     RPointerArray<TSessionFilterInfo>& iFilterInfoList;
00189
00190     // Value conatining the index of the current filter in the list
00191     //##ModelId=3C4C0F4500C6
00192     TInt iCurrentFilterIndex;
00193
00194     // Value containing the number filters in the list
00195     //##ModelId=3C4C0F4500BC
00196     TInt iFilterCount;
00197     };
00198
00199 #endif // __TFILTERCONFIGURATIONITER_H__


TFilterInformation.h Source File

TFilterInformation.h

Go to the documentation of this file.
00001 // TFilterInformation.h
00002 //
00003 // Copyright (C) 2001 Symbian Ltd
00004
00011 #ifndef __TFILTERINFORMATION_H__
00012 #define __TFILTERINFORMATION_H__
00013
00024 //##ModelId=3C4C37DF0343
00025 struct TFilterInformation
00026     {
00027 public:
00033     enum TFilterCategory
00034         {
00035         EImplicitFilter,
00036         EExplicitFilter
00037         };
00038
00040     //##ModelId=3C4C37DF03A7
00041     const TDesC& iDisplayName;
00042
00044     //##ModelId=3C4C37DF039D
00045     const TDesC8& iDataType;
00046
00048     //##ModelId=3C4C37DF038B
00049     TInt iVersion;
00050
00052     //##ModelId=3C4C37DF0381
00053     TUid iFilterUid;
00054
00056     //##ModelId=3C4C37DF0375
00057     TFilterCategory iFilterCategory;
00058
00060     //##ModelId=3C4C37DF036B
00061     TBool iInstallStatus;
00062
00076     //##ModelId=3C4C37DF03B1
00077     inline TFilterInformation(const TDesC& aDisplayName, const TDesC8& aDataType,
00078                        TInt aVersion, TUid aFilterUid,
00079                        TFilterCategory aFilterCategory, TBool aInstallStatus);
00080     };
00081
00082 // Inline constructor, initialises data members
00083 inline TFilterInformation::TFilterInformation(const TDesC& aDisplayName, const TDesC8& aDataType,
00084                                               TInt aVersion, TUid aFilterUid,
00085                                               TFilterCategory aFilterCategory, TBool aInstallStatus)
00086     :iDisplayName(aDisplayName),
00087     iDataType(aDataType),
00088     iVersion(aVersion),
00089     iFilterUid(aFilterUid),
00090     iFilterCategory(aFilterCategory),
00091     iInstallStatus(aInstallStatus)
00092     {
00093     }
00094
00095 #endif // __TFILTERINFORMATION_H__


thttpevent.h Source File

thttpevent.h

00001 // THTTPEvent.h
00002 //
00003 // Copyright (C) 2001 Symbian Ltd.
00004
00011 #ifndef __THTTPEVENT_H__
00012 #define __THTTPEVENT_H__
00013
00014 // System includes
00015 #include <e32std.h>
00016
00019 const TUint KHTTPUid                = 0x1000A441;
00020
00024 const TUint KHTTPMatchAnyEventUid   =  0x1000A44C;
00025
00029 const TInt KTransactionEventBaseStatus      = 0;
00030
00033 const TInt KTransactionWarningBaseStatus    = 10000;
00034
00038 const TInt KSessionEventBaseStatus          = 100000;
00039
00042 const TInt KSessionWarningBaseStatus        = 110000;
00043
00054 //##ModelId=3C4C18740294
00055 class THTTPEvent
00056     {
00057 public:
00058
00065     enum TStandardEvent
00066         {
00070         EAll                    = KRequestPending + 1,
00074         EAnyTransactionEvent    = KRequestPending,
00078         EAnySessionEvent        = KSessionEventBaseStatus
00079         };
00080
00089     enum TTransactionEvent
00090         {
00093         ESubmit                     = KTransactionEventBaseStatus,
00096         ECancel                     = KTransactionEventBaseStatus + 1,
00100         ENotifyNewRequestBodyPart   = KTransactionEventBaseStatus + 2,
00103         EClosed                     = KTransactionEventBaseStatus + 3,
00106         EGotResponseHeaders         = KTransactionEventBaseStatus + 4,
00110         EGotResponseBodyData        = KTransactionEventBaseStatus + 5,
00113         EResponseComplete           = KTransactionEventBaseStatus + 6,
00116         EGotResponseTrailerHeaders  = KTransactionEventBaseStatus + 7,
00119         ESucceeded                  = KTransactionEventBaseStatus + 8,
00129         EFailed                     = KTransactionEventBaseStatus + 9,
00135         EUnrecoverableError         = KTransactionEventBaseStatus + 10,
00140         ETooMuchRequestData         = KTransactionEventBaseStatus + 11
00141         };
00142
00149     enum TDirection
00150         {
00153         EOutgoing,
00156         EIncoming
00157         };
00158
00164     enum TTransactionWarning
00165         {
00173         ERedirectedPermanently          = KTransactionWarningBaseStatus,
00177         ERedirectedTemporarily          = KTransactionWarningBaseStatus + 1,
00181         EMoreDataReceivedThanExpected   = KTransactionWarningBaseStatus + 2
00182         };
00183
00184 public: // Methods
00185
00190     //##ModelId=3C4C187402FB
00191     inline THTTPEvent(TInt aStatus, TUint aUID = KHTTPUid);
00192
00196     //##ModelId=3C4C18740304
00197     inline THTTPEvent(TStandardEvent aStatus = EAnyTransactionEvent);
00198
00202     //##ModelId=3C4C1874030C
00203     inline THTTPEvent(TTransactionEvent aStatus);
00204
00208     //##ModelId=3C4C187402EF
00209     inline THTTPEvent& operator=(TStandardEvent aStatus);
00210
00214     //##ModelId=3C4C187402F1
00215     inline THTTPEvent& operator=(TTransactionEvent aStatus);
00216
00218     //##ModelId=3C4C187402DA
00219     inline TBool operator==(THTTPEvent aThat) const;
00220
00222     //##ModelId=3C4C187402BD
00223     inline TBool operator!=(THTTPEvent aThat) const;
00224
00226     //##ModelId=3C4C187402DC
00227     inline TBool operator==(TStandardEvent aStatus) const;
00228
00230     //##ModelId=3C4C187402C7
00231     inline TBool operator!=(TStandardEvent aStatus) const;
00232
00234     //##ModelId=3C4C187402E4
00235     inline TBool operator==(TTransactionEvent aStatus) const;
00236
00238     //##ModelId=3C4C187402D0
00239     inline TBool operator!=(TTransactionEvent aStatus) const;
00240
00242     //##ModelId=3C4C187402BC
00243     inline TBool IsSessionEvent() const;
00244
00245 public: // Attributes
00246
00249     //##ModelId=3C4C187402B4
00250     TInt iStatus;
00251
00254     //##ModelId=3C4C187402AA
00255     TUint iUID;
00256
00257 protected: // Attributes
00260     TBool iIsSessionEventFlag;
00261
00262     };
00263
00273 class THTTPSessionEvent : public THTTPEvent
00274     {
00275 public: // Enumerations
00281     enum TSessionEvent
00282         {
00285         EConnect                            = KSessionEventBaseStatus,
00288         EDisconnect                         = KSessionEventBaseStatus + 1,
00293         EConnectedOK                        = KSessionEventBaseStatus + 2,
00298         EConnectedWithReducedCapabilities   = KSessionEventBaseStatus + 3,
00303         EDisconnected                       = KSessionEventBaseStatus + 4,
00307         EAuthenticatedOK                    = KSessionEventBaseStatus + 5,
00310         EAuthenticationFailure              = KSessionEventBaseStatus + 6,
00313         EConnectionTimedOut                 = KSessionEventBaseStatus + 7
00314         };
00315
00316     enum TSessionWarning
00317         {
00323         ENotConnected                       = KSessionWarningBaseStatus,
00328         EExceptionInfo                      = KSessionWarningBaseStatus + 1,
00335         ERedirected                         = KSessionWarningBaseStatus + 2,
00339         EAlreadyConnecting                  = KSessionWarningBaseStatus + 3,
00343         EAlreadyConnected                   = KSessionWarningBaseStatus + 4,
00347         EAlreadyDisconnecting               = KSessionWarningBaseStatus + 5,
00351         EAlreadyDisconnected                = KSessionWarningBaseStatus + 6
00352         };
00353
00354 public:
00359     inline THTTPSessionEvent(TInt aStatus, TUint aUID = KHTTPUid);
00360
00364     inline THTTPSessionEvent(TStandardEvent aStatus = EAnySessionEvent);
00365
00369     inline THTTPSessionEvent(TSessionEvent aStatus);
00370
00374     //##ModelId=3C4C187402F9
00375     inline THTTPSessionEvent& operator=(TSessionEvent aStatus);
00376
00378     //##ModelId=3C4C187402E6
00379     inline TBool operator==(TSessionEvent aStatus) const;
00380
00382     //##ModelId=3C4C187402D2
00383     inline TBool operator!=(TSessionEvent aStatus) const;
00384     };
00385
00386 #include "http/THTTPEvent.inl"
00387
00388 #endif // __THTTPEVENT_H__


thttpfilterhandle.h Source File

thttpfilterhandle.h

00001 // THTTPFilterHandle.h
00002 //
00003 // Copyright (C) 2001 Symbian Ltd.
00004
00011 #ifndef __THTTPFILTERHANDLE_H__
00012 #define __THTTPFILTERHANDLE_H__
00013
00014 // System includes
00015 #include <e32std.h>
00016
00028 //##ModelId=3A914DF50317
00029 class THTTPFilterHandle
00030     {
00031  public:
00032     /* Note. These are negative as values for particular filters use
00033        positive values.*/
00037     enum TStandardValues
00038         {
00039         EUndefined = 0,
00040         EClient = -1,
00041         EProtocolHandler = -2,
00042
00043         ECurrentFilter = -3
00044         };
00045  public:
00046     //##ModelId=3A914DF50336
00047     inline THTTPFilterHandle(TStandardValues aVal = EUndefined);
00048     //##ModelId=3A914DF5032D
00049     inline TBool operator==(THTTPFilterHandle aThat) const;
00050     //##ModelId=3A914DF5032B
00051     inline TBool operator!=(THTTPFilterHandle aThat) const;
00052  private:
00053     //##ModelId=3A914DF50323
00054     TInt iValue;
00055     friend class RHTTPSession;
00056     friend class RHTTPFilterCollection;
00057     friend class CHTTPSession;
00058     friend class CTransaction;
00059     };
00060
00061 inline THTTPFilterHandle::THTTPFilterHandle(TStandardValues aVal)
00062         : iValue(aVal)
00063     {
00064     }
00065
00066 inline TBool THTTPFilterHandle::operator==(THTTPFilterHandle aThat) const
00067     {
00068     return iValue == aThat.iValue;
00069     }
00070
00071 inline TBool THTTPFilterHandle::operator!=(THTTPFilterHandle aThat) const
00072     {
00073     return !(*this == aThat);
00074     }
00075
00076
00077 #endif // __THTTPFILTERHANDLE_H__


thttpfilteriterator.h Source File

thttpfilteriterator.h

00001 // THTTPFilterIterator.h
00002 //
00003 // Copyright (C) 2001 Symbian Ltd.
00004
00011 #ifndef __THTTPFILTERITERATOR_H__
00012 #define __THTTPFILTERITERATOR_H__
00013
00014 // System includes
00015 #include <e32std.h>
00016 #include <stringpool.h>
00017 #include <http/thttpfilterregistration.h>
00018
00019 // Forward declarations
00020 class CHTTPSession;
00021
00033 //##ModelId=3C4C187A0152
00034 class THTTPFilterIterator
00035     {
00036  public:
00040     //##ModelId=3C4C187A01A2
00041     inline THTTPFilterIterator();
00042
00044     //##ModelId=3C4C187A019A
00045     inline void First();
00046
00048     //##ModelId=3C4C187A0199
00049     IMPORT_C TBool AtEnd() const;
00050
00052     //##ModelId=3C4C187A0198
00053     IMPORT_C THTTPFilterIterator& operator++();
00054
00056     //##ModelId=3C4C187A0190
00057     IMPORT_C const THTTPFilterRegistration& operator()() const;
00058
00060     //##ModelId=3C4C187A018F
00061     inline const THTTPFilterRegistration& operator*() const;
00062
00064     //##ModelId=3C4C187A018E
00065     inline const THTTPFilterRegistration& operator->() const;
00066
00067  private:
00068     friend class RHTTPFilterCollection;
00069
00070     //##ModelId=3C4C187A017C
00071     CHTTPSession* iImplementation;
00072
00073     //##ModelId=3C4C187A0172
00074     TInt iPos;
00075
00076     //##ModelId=3C4C187A0168
00077     RStringTokenF iName;
00078     };
00079
00080
00081 inline THTTPFilterIterator::THTTPFilterIterator()
00082         : iImplementation(NULL), iPos(0)
00083     {
00084     }
00085
00086 inline void THTTPFilterIterator::First()
00087     {
00088     iPos = -1;
00089     operator++();
00090     }
00091
00092 inline const THTTPFilterRegistration& THTTPFilterIterator::operator*() const
00093     {
00094     return operator()();
00095     }
00096
00097 inline const THTTPFilterRegistration& THTTPFilterIterator::operator->() const
00098     {
00099     return operator()();
00100     }
00101
00102
00103
00104 #endif //   __THTTPFILTERITERATOR_H__


thttpfilterregistration.h Source File

thttpfilterregistration.h

00001 // THTTPFilterRegistration.h
00002 //
00003 // Copyright (C) 2001 Symbian Ltd.
00004
00011 #ifndef __THTTPFILTERREGISTRATION_H__
00012 #define __THTTPFILTERREGISTRATION_H__
00013
00014 // System includes
00015 #include <e32std.h>
00016 #include <stringpool.h>
00017 #include <http/thttpevent.h>
00018
00019 // Forward declarations
00020 class MHTTPFilter;
00021
00029 //##ModelId=3C4C187D0188
00030 class THTTPFilterRegistration
00031     {
00032  public:
00034     //##ModelId=3C4C187D020B
00035     THTTPFilterRegistration();
00037     //##ModelId=3C4C187D0214
00038     THTTPFilterRegistration(MHTTPFilter& aFilter, THTTPEvent aEvent,
00039                         RStringTokenF aHeader, TInt aStatusCode,
00040                         TInt aPosition, RStringTokenF aName, TInt aHandle);
00042     //##ModelId=3C4C187D0201
00043     TBool operator==(THTTPFilterRegistration& aThat);
00045     //##ModelId=3C4C187D01F9
00046     TBool operator!=(THTTPFilterRegistration& aThat);
00047
00048  public:
00050     //##ModelId=3C4C187D01F6
00051     TInt                iPosition; // This MUST be first!
00053     //##ModelId=3C4C187D01E4
00054     MHTTPFilter*        iFilter;
00056     //##ModelId=3C4C187D01D8
00057     THTTPEvent          iEvent;
00059     //##ModelId=3C4C187D01C6
00060     RStringTokenF   iHeader;
00062     //##ModelId=3C4C187D01BC
00063     TInt                iStatus;
00065     //##ModelId=3C4C187D01B2
00066     RStringTokenF    iName;
00068     //##ModelId=3C4C187D01A8
00069     TInt                iHandle;
00070     };
00071
00072 inline THTTPFilterRegistration::THTTPFilterRegistration()
00073         : iEvent(THTTPEvent::EAll)
00074     {
00075     }
00076
00077 inline THTTPFilterRegistration::THTTPFilterRegistration(MHTTPFilter& aFilter,
00078                                                         THTTPEvent aEvent,
00079                                                         RStringTokenF aHeader,
00080                                                         TInt aStatusCode,
00081                                                         TInt aPosition,
00082                                                         RStringTokenF aName,
00083                                                         TInt aHandle)
00084         :iPosition(aPosition), iFilter(&aFilter), iEvent(aEvent),
00085     iHeader(aHeader), iStatus(aStatusCode) , iName(aName), iHandle(aHandle)
00086     {
00087     }
00088
00089
00090
00091 #endif // __THTTPFILTERREGISTRATION_H__


thttphdrfielditer.h Source File

thttphdrfielditer.h

00001 // THTTPHdrFieldIter.h
00002 //
00003 // Copyright (C) 2001 Symbian Ltd.
00004
00011 #ifndef __THTTPHDRFIELDITER_H__
00012 #define __THTTPHDRFIELDITER_H__
00013
00014 // System includes
00015 #include <e32std.h>
00016 #include <stringpool.h>
00017
00018 // Forward declarations
00019 class CHeaders;
00020
00028 //##ModelId=3A914DFD005C
00029 class THTTPHdrFieldIter
00030     {
00031 public:
00035     //##ModelId=3A914DFD0087
00036     THTTPHdrFieldIter(const CHeaders* aHeaders);
00039     //##ModelId=3A914DFD0086
00040     IMPORT_C ~THTTPHdrFieldIter();
00041
00044     //##ModelId=3A914DFD0085
00045     IMPORT_C void First();
00046
00052     //##ModelId=3A914DFD0084
00053     IMPORT_C TBool AtEnd() const;
00054
00059     //##ModelId=3A914DFD007E
00060     IMPORT_C void operator++();
00061
00067     //##ModelId=3A914DFD007D
00068     IMPORT_C RStringTokenF operator()();
00069
00070 private:
00071
00074     //##ModelId=3BA613240002
00075     void CheckInvalidation();
00076
00079     //##ModelId=3A914DFD007A
00080     const CHeaders* iHeaders;
00084     //##ModelId=3A914DFD0072
00085     TInt iPosIdx;
00086     };
00087
00088 inline THTTPHdrFieldIter::THTTPHdrFieldIter(const CHeaders* aHeaders)
00089     : iHeaders(aHeaders)
00090     {
00091     First();
00092     }
00093
00094
00095 #endif // __THTTPHDRFIELDITER_H__


thttphdrval.h Source File

thttphdrval.h

00001 // THTTPHdrVal.h
00002 //
00003 // Copyright (C) 2001 Symbian Ltd.
00004
00011 #ifndef __THTTPHDRVAL_H__
00012 #define __THTTPHDRVAL_H__
00013
00014 // System includes
00015 #include <e32std.h>
00016 #include <stringpool.h>
00017
00034 //##ModelId=3C4C187E027A
00035 class THTTPHdrVal
00036     {
00037 public:
00041     typedef enum {
00042     KTIntVal = 0x00,
00043     KStrVal  = 0x01,
00044     KDateVal = 0x02,
00045     KStrFVal = 0x03,
00046     KNoType =  0x04
00047     } THTTPValType;
00048
00049 public: // classes
00050
00051     // A converter for 'q' parameter values; apparently real numbers in the HTTP RFC but here passed as fixed point
00052 //##ModelId=3B1E66F2024E
00053     class TQConv
00054         {
00055     public:
00057     //##ModelId=3B1E66F20282
00058         TQConv(TReal aQ);
00059
00061     //##ModelId=3B1E66F2028C
00062         TQConv(TInt aQ);
00063
00065     //##ModelId=3B1E66F20281
00066         operator TInt() const;
00067
00069     //##ModelId=3B1E66F20280
00070         operator TReal() const;
00071     private:
00073     //##ModelId=3B1E66F2027A
00074         TReal iQ;
00076     //##ModelId=3B1E66F2026E
00077         TInt iFQ;
00078         };
00079
00080 public:
00085     IMPORT_C THTTPHdrVal();
00086
00090     IMPORT_C THTTPHdrVal(TInt aIntVal);
00091
00095     IMPORT_C THTTPHdrVal(RStringF aStrVal);
00099     IMPORT_C THTTPHdrVal(RString aStrVal);
00100
00104     IMPORT_C THTTPHdrVal(TDateTime aDateVal);
00105
00110     //##ModelId=3C4C187E02F3
00111     IMPORT_C THTTPHdrVal Copy() const;
00112
00116     //##ModelId=3C4C187E02F2
00117     IMPORT_C THTTPValType Type() const;
00118
00124     //##ModelId=3C4C187E02EA
00125     IMPORT_C TInt Int() const;
00126
00132     //##ModelId=3C4C187E02E9
00133     inline operator TInt() const;
00134
00140     //##ModelId=3C4C187E02E8
00141     IMPORT_C RStringF StrF() const;
00142     //##ModelId=3C4C187E02E0
00143     IMPORT_C RString Str() const;
00144
00150     //##ModelId=3C4C187E02DF
00151     inline operator RStringF() const;
00157     //##ModelId=3C4C187E02DE
00158     inline operator RString() const;
00159
00165     //##ModelId=3C4C187E02D6
00166     IMPORT_C TDateTime DateTime() const;
00167
00173     //##ModelId=3C4C187E02D5
00174     inline operator TDateTime() const;
00175
00180     //##ModelId=3C4C187E02CC
00181     IMPORT_C void SetInt(TInt aIntVal);
00182
00187     //##ModelId=3C4C187E02CA
00188     IMPORT_C void SetStrF(RStringF aStrVal);
00192     //##ModelId=3C4C187E02C2
00193     IMPORT_C void SetStr(RString aStrVal);
00194
00198     //##ModelId=3C4C187E02C0
00199     IMPORT_C void SetDateTime(TDateTime aDateVal);
00200
00203     //##ModelId=3C4C187E02B8
00204     IMPORT_C TBool operator==(THTTPHdrVal aVal) const;
00205
00208     //##ModelId=3C4C187E02B6
00209     IMPORT_C TBool operator!=(THTTPHdrVal aVal) const;
00210
00211 private:
00216     //##ModelId=3C4C187E02AC
00217     THTTPValType iType;
00218
00220     //##ModelId=3C4C187E02A4
00221     TInt iVal;
00222     //##ModelId=3C4C187E029A
00223     TInt iMoreSpace;
00224     };
00225
00226 inline THTTPHdrVal::TQConv::TQConv(TReal aQ)
00227     : iQ(aQ), iFQ((TInt)(iQ*1000))
00228     {
00229     }
00230
00231 inline THTTPHdrVal::TQConv::TQConv(TInt aFQ)
00232     : iQ((TReal)(aFQ/1000.)), iFQ(aFQ)
00233     {
00234     }
00235
00236 inline THTTPHdrVal::TQConv::operator TInt() const
00237     {
00238     return iFQ;
00239     }
00240
00241 inline THTTPHdrVal::TQConv::operator TReal() const
00242     {
00243     return iQ;
00244     }
00245
00246 inline THTTPHdrVal::operator TInt() const
00247     {
00248     return Int();
00249     }
00250
00251 inline THTTPHdrVal::operator RStringF() const
00252     {
00253     return StrF();
00254     }
00255
00256 inline THTTPHdrVal::operator RString() const
00257     {
00258     return Str();
00259     }
00260
00261 inline THTTPHdrVal::operator TDateTime() const
00262     {
00263     return DateTime();
00264     }
00265
00266
00267
00268 #endif // __THTTPHDRVAL_H__