Location:
rhttpsession.h
Link against: http.lib
class RHTTPSession;
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.
Defined in RHTTPSession
:
Close()
, ConnectL()
, ConnectionInfo()
, DisconnectL()
, FailSessionEvent()
, FilterCollection()
, GetTable()
, ListAvailableProtocolsL()
, OpenL()
, OpenL()
, OpenL()
, OpenTransactionL()
, RHTTPSession()
, RequestSessionHeadersL()
, ResponseSessionHeadersL()
, SendSessionEventL()
, ServerCert()
, SetSessionEventCallback()
, StringPool()
, operator!=()
, operator==()
inline RHTTPSession();
Constructor.
The session is closed. (It must be opened with OpenL)
IMPORT_C void SetSessionEventCallback(MHTTPSessionEventCallback *aSessionEventCallback);
Sets the session event callback. Until it is set all incoming session events are consumed
|
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();
The session is closed. An active scheduler is installed.
Opens the session using the default protocol HTTP/TCP. This function leaves with an apropriate code if the open failed.
The session is open.
IMPORT_C void OpenL(const TDesC8 &aProtocol);
The session is closed. An active scheduler is installed.
Opens the session using the protocol indicated by the parameter passed in. This function leaves with an apropriate code if the open failed.
The session is open.
|
IMPORT_C void OpenL(const TDesC8 &aProtocol, MHTTPFilterCreationCallback *aSessionCallback);
The session is closed. An active scheduler is installed.
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.
The session is open.
|
static 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. 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.
|
IMPORT_C RHTTPTransaction OpenTransactionL(const TUriC8 &aURI, MHTTPTransactionCallback &aCallback, RStringF aMethod=RStringF());
The session is open
Creates a transaction.
|
|
|
IMPORT_C void Close();
Closes the session. All transactions will be stopped and closed
The session and all open transactions in it are closed.
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. Note that by and large, the connection info should be set up before the first transaction is created.
|
inline RHTTPFilterCollection FilterCollection() const;
Accessor for the filter collection. Note that the filter collection can't be edited after the first transaction has been created.
|
IMPORT_C RHTTPHeaders 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 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
|
inline TBool operator==(RHTTPSession aTrans) const;
Equality operator.
|
|
inline TBool operator!=(RHTTPSession aTrans) const;
Inequality operator
|
|
IMPORT_C TInt 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.
|
|
IMPORT_C void ConnectL();
Connect this WSP session. This function does nothing when called for text-mode.
IMPORT_C void DisconnectL();
Disconnect this WSP session. This function does nothing when called for text-mode.