|
|
|
Location:
http\rhttpsession.h
Link against: http.lib
class RHTTPSession
Supported from 7.0
A transport framework session handle.
A session is a set of transactions using the same connection settings (e.g. proxy) and the same set of filters.
Note that RHTTPSession depends on the active scheduler; a scheduler must be installed when the session is opened, and it must be running for transactions to be processed.
Defined in RHTTPSession:
Close(), ConnectL(), ConnectionInfo(), DisconnectL(), FailSessionEvent(), FilterCollection(), GetTable(), ListAvailableProtocolsL(), OpenL(), OpenL(), OpenL(), OpenTransactionL(), RHTTPSession(), RequestSessionHeadersL(), ResponseSessionHeadersL(), SendSessionEventL(), ServerCert(), SetSessionEventCallback(), StringPool(), iImplementation, operator(), operator==()
void SetSessionEventCallback(MHTTPSessionEventCallback* aSessionEventCallback);
Sets the session event callback.
The callback passes session events to a client. Until it is set, all incoming session events are consumed by the session.
|
void SendSessionEventL(THTTPSessionEvent aStatus, THTTPSessionEvent::TDirection aDirection, THTTPFilterHandle aStart=THTTPFilterHandle::EClient);
Sends a session event.
|
void FailSessionEvent(THTTPFilterHandle aStart = THTTPFilterHandle::EClient);
Indicate that sending a session event has failed.
|
void OpenL();
Opens the session using the default protocol, HTTP over TCP.
|
void OpenL(const TDesC8& aProtocol);
Opens the session using the specified protocol.
|
|
void OpenL(const TDesC8& aProtocol, MHTTPFilterCreationCallback* aSessionCallback);
Opens the session using the specified protocol, and receives a filter configuration callback.
This method should be used if configuring the installed filters is required. Once construction of the session is complete, aSessionCallback is called passing in a TFilterConfigurationIterator to allow the filters that are installed to be configured.
|
|
static void ListAvailableProtocolsL(RPointerArray<HBufC8>& aProtocolArray);
Lists all the available protocols.
Descriptors for each protocol are added to the descriptor array passed in. Any existing data in the descriptor array is deleted.
|
|
RHTTPTransaction OpenTransactionL(const TUriC8& aURI, MHTTPTransactionCallback& aCallback, RStringF aMethod=RStringF());
Creates a transaction.
|
|
|
static const TStringTable& GetTable();
Gets the framework's string pool table.
|
RStringPool StringPool() const;
Gets the framework's string pool.
|
RHTTPConnectionInfo ConnectionInfo() const;
Gets the connection information for this session,
These settings are used for all transactions in the session. Note that typically the connection information should be set up before the first transaction is created.
|
inline RHTTPFilterCollection FilterCollection() const;
Gets the filter collection.
Note that the filter collection cannot be edited after the first transaction has been created.
|
RHTTPHeaders RequestSessionHeadersL();
Gets the request session headers.
These headers 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.
|
RHTTPHeaders ResponseSessionHeadersL();
Gets the response session headers.
These headers will get added to each response if the corresponding header does not already exist.
|
TBool operator ==(RHTTPSession aTrans) const;
Equality operator.
|
|
TBool operator !=(RHTTPSession aTrans) const;
Inequality operator.
|
|
TInt ServerCert(TCertInfo& aServerCert);
Gets the server certificate information for this session.
This function should only be used for WSP sessions. For HTTP, use RHttpTransaction::ServerCert().
|
|
void ConnectL();
Connects a session.
This function is required for WSP. It does nothing when used with HTTP.
void DisconnectL();
Disconnects a session.
This function is required for WSP. It does nothing when used with HTTP.
private: CHTTPSession* iImplementation;
This is internal and not intended for use.