CHTTPSession Class Reference

class CHTTPSession : public CBase

Inherits from

Public Member Functions
~CHTTPSession()
voidAddTransactionL(CTransaction *)
voidBlock()
TBool CanAddFilters()
CHeaderCodec *Codec()
RHTTPConnectionInfo ConnectionInfo()
voidCreateProtocolHandlerL()
voidFailSessionEvent(THTTPFilterHandle)
TFilterConfigurationIterator *FilterConfigIterator()
RArray< THTTPFilterRegistration > &FilterQueue()
const RArray< THTTPFilterRegistration > &FilterQueue()
TInt FindTransaction(CTransaction *)
RHTTPSession Handle()
MHttpDataOptimiser *HttpDataOptimiser()
TBool IsBlocking()
voidListAvailableProtocolsL(RPointerArray< HBufC8 > &)
CHTTPManager &Manager()
const CHTTPManager &Manager()
CHTTPSession *NewL()
CHTTPSession *NewL(const TDesC8 &)
CHTTPSession *NewL(const TDesC8 &, MHTTPFilterCreationCallback *)
TInt NextFilterHandle()
TInt NextTransactionID()
voidRemoveTransaction(CTransaction *)
RHTTPHeaders RequestSessionHeadersL()
RHTTPHeaders ResponseSessionHeadersL()
voidSendSessionEventL(THTTPSessionEvent, THTTPSessionEvent::TDirection, THTTPFilterHandle)
TInt SessionServerCert(TCertInfo &)
const CCertificate *SessionServerCert()
voidSetSessionEventCallback(MHTTPSessionEventCallback *)
voidSetupDefaultProxyFromCommsDatL()
voidSetupHttpDataOptimiser(MHttpDataOptimiser &)
voidTransactionHasBlocked()
TInt TransactionServerCert(TCertInfo &, RHTTPTransaction)
const CCertificate *TransactionServerCert(RHTTPTransaction)
voidUnblock()
Private Member Functions
CHTTPSession()
voidCleanListImplementationArray(TAny *)
voidConstructL(const TDesC8 &, MHTTPFilterCreationCallback *)
voidCreateProtocolHandlerL(const TDesC8 &)
voidInitializeFiltersL(const TDesC8 &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Member Enumerations
enumTBlockingStates { ENormal = 0, EShouldBlock, EHasBlocked }
Private Attributes
TBlockingStates iBlockingState
TClientFilter iClientFilter
CHeaderFieldPart *iConnectionInfo
TDummyTransactionCallback iDummyTransactionCallback
RImplInfoPtrArray iEComFilterInfoArray
TFilterConfigurationIterator *iFilterConfigIter
RPointerArray< TSessionFilterInfo >iFilterInfoList
RArray< THTTPFilterRegistration >iFilterQueue
__DECLARE_PERFORMANCE_LOG MHttpDataOptimiser *iHttpDataOptimiser
CHTTPManager *iManager
TInt iNextFilterHandle
CProtocolHandler *iProtocolHandler
CHeaders *iRequestSessionHeaders
CHeaders *iResponseSessionHeaders
TBool iSessionClosing
CTransaction *iSessionEventTransaction
TInt iTransCount
RArray< CTransaction * >iTransactions

Constructor & Destructor Documentation

CHTTPSession()

CHTTPSession()[private]

~CHTTPSession()

~CHTTPSession()

Member Functions Documentation

AddTransactionL(CTransaction *)

voidAddTransactionL(CTransaction *aTransaction)

Parameters

CTransaction * aTransaction

Block()

voidBlock()[inline]

CanAddFilters()

TBool CanAddFilters()const [inline]

CleanListImplementationArray(TAny *)

voidCleanListImplementationArray(TAny *aArray)[private, static]

Parameters

TAny * aArray

Codec()

CHeaderCodec *Codec()const [inline]

ConnectionInfo()

RHTTPConnectionInfo ConnectionInfo()const [inline]

ConstructL(const TDesC8 &, MHTTPFilterCreationCallback *)

voidConstructL(const TDesC8 &aProtocol,
MHTTPFilterCreationCallback *aSessionCallback
)[private]

Parameters

const TDesC8 & aProtocol
MHTTPFilterCreationCallback * aSessionCallback

CreateProtocolHandlerL()

voidCreateProtocolHandlerL()

CreateProtocolHandlerL(const TDesC8 &)

voidCreateProtocolHandlerL(const TDesC8 &aProtocol)[private]

Parameters

const TDesC8 & aProtocol

FailSessionEvent(THTTPFilterHandle)

voidFailSessionEvent(THTTPFilterHandleaStart = THTTPFilterHandle::EClient)

Parameters

THTTPFilterHandle aStart = THTTPFilterHandle::EClient

FilterConfigIterator()

TFilterConfigurationIterator *FilterConfigIterator()const

FilterQueue()

RArray< THTTPFilterRegistration > &FilterQueue()[inline]

FilterQueue()

const RArray< THTTPFilterRegistration > &FilterQueue()const [inline]

FindTransaction(CTransaction *)

TInt FindTransaction(CTransaction *aTransaction)[inline]

Parameters

CTransaction * aTransaction

Handle()

RHTTPSession Handle()[inline]

HttpDataOptimiser()

MHttpDataOptimiser *HttpDataOptimiser()

InitializeFiltersL(const TDesC8 &)

voidInitializeFiltersL(const TDesC8 &aProtocol)[private]

Parameters

const TDesC8 & aProtocol

IsBlocking()

TBool IsBlocking()const [inline]

When 1 transaction runs, the session is blocked using the Block function. It is unblocked at the end with the Unblock function.

If a transaction has run, it must block, and must inform the session of this by calling TransactionHasBlocked

If at least 1 transaction has blocked then when Unblock is called on the session, CTransaction::Unblock will be called on all the transactions. Any transaction that had blocked must then unblock and other transactions must do nothing.

The purpose of this implementation is to be as simple as possible, especialy in terms of storage, but to minimise the ammount of extra code that gets executed in the normal case (when no transactions fire while the session is blocked). This is why the session does not remember which transactions have blocked (which would add complex storage requirements) but it does remember if any have (meaning that all transactions don't need to be unblocked in the normal case)

ListAvailableProtocolsL(RPointerArray< HBufC8 > &)

voidListAvailableProtocolsL(RPointerArray< HBufC8 > &aProtocolArray)[static]

This methods lists all of the available protocols on the device. These are identified by using the list of protocol handler plugins discovered by ECom and appending the data type descriptors to the array. Any existing data in the array is deleted.

Parameters

RPointerArray< HBufC8 > & aProtocolArray

Manager()

CHTTPManager &Manager()[inline]

Manager()

const CHTTPManager &Manager()const [inline]

NewL()

CHTTPSession *NewL()[static]

NewL(const TDesC8 &)

CHTTPSession *NewL(const TDesC8 &aProtocol)[static]

Parameters

const TDesC8 & aProtocol

NewL(const TDesC8 &, MHTTPFilterCreationCallback *)

CHTTPSession *NewL(const TDesC8 &aProtocol,
MHTTPFilterCreationCallback *aSessionCallback
)[static]

Constructs a session that allows filter configuration. This requires the callback interface of MHTTPFilterCreationCallback that is called during construction, so the client can determine the filters that are installed.

Parameters

const TDesC8 & aProtocol
MHTTPFilterCreationCallback * aSessionCallback

NextFilterHandle()

TInt NextFilterHandle()[inline]

NextTransactionID()

TInt NextTransactionID()[inline]

RemoveTransaction(CTransaction *)

voidRemoveTransaction(CTransaction *aTransaction)

Parameters

CTransaction * aTransaction

RequestSessionHeadersL()

RHTTPHeaders RequestSessionHeadersL()
Returns the request session headers. This will create the protocol handler if it doesn't already exist
leave
Leaves if protocol handler doesn't exist and fails to be created

ResponseSessionHeadersL()

RHTTPHeaders ResponseSessionHeadersL()
Returns the response session headers. This will create the protocol handler if it doesn't already exist
leave
KErrNoMemory if attempt to allocate memory fails

SendSessionEventL(THTTPSessionEvent, THTTPSessionEvent::TDirection, THTTPFilterHandle)

voidSendSessionEventL(THTTPSessionEventaStatus,
THTTPSessionEvent::TDirectionaDirection,
THTTPFilterHandleaStart = THTTPFilterHandle::EClient
)

Parameters

THTTPSessionEvent aStatus
THTTPSessionEvent::TDirection aDirection
THTTPFilterHandle aStart = THTTPFilterHandle::EClient

SessionServerCert(TCertInfo &)

TInt SessionServerCert(TCertInfo &aServerCert)[inline]

Get the Server Certificate for this session.

Parameters

TCertInfo & aServerCertA TCertInfo which will be filled with the certificate information

SessionServerCert()

const CCertificate *SessionServerCert()[inline]

Get the Server Certificate for the current session.

SetSessionEventCallback(MHTTPSessionEventCallback *)

voidSetSessionEventCallback(MHTTPSessionEventCallback *aSessionEventCallback)

Parameters

MHTTPSessionEventCallback * aSessionEventCallback

SetupDefaultProxyFromCommsDatL()

voidSetupDefaultProxyFromCommsDatL()

Get the default IAP from CommsDat. For this IAP retrieve Sevrice Id & Service Type. Using these retrieve the default proxy server name & port number. Add these to the properties set of current Http session.

SetupHttpDataOptimiser(MHttpDataOptimiser &)

voidSetupHttpDataOptimiser(MHttpDataOptimiser &aHttpOptimiser)

Parameters

MHttpDataOptimiser & aHttpOptimiser

TransactionHasBlocked()

voidTransactionHasBlocked()[inline]

TransactionServerCert(TCertInfo &, RHTTPTransaction)

TInt TransactionServerCert(TCertInfo &aServerCert,
RHTTPTransactionaTransaction
)[inline]

Get the Server Certificate for the specified transaction.

Parameters

TCertInfo & aServerCertA TCertInfo which will be filled with the certificate information
RHTTPTransaction aTransactionThe transaction for which the certificate is requested

TransactionServerCert(RHTTPTransaction)

const CCertificate *TransactionServerCert(RHTTPTransactionaTransaction)[inline]

Get the Server Certificate for the current session.

Parameters

RHTTPTransaction aTransactionThe transaction for which the certificate is requested

Unblock()

voidUnblock()

Called by transaction to indicate that other transactions should stop blocking (and if transaction have blocked, they should be awakened)

Indicates that transactions should stop blocking (and if transaction has blocked, they should be awakened)

Member Enumerations Documentation

Enum TBlockingStates

Enumerators

ENormal = 0
EShouldBlock
EHasBlocked

Member Data Documentation

TBlockingStates iBlockingState

TBlockingStates iBlockingState[private]

TClientFilter iClientFilter

TClientFilter iClientFilter[private]

CHeaderFieldPart * iConnectionInfo

CHeaderFieldPart *iConnectionInfo[private]

TDummyTransactionCallback iDummyTransactionCallback

TDummyTransactionCallback iDummyTransactionCallback[private]

RImplInfoPtrArray iEComFilterInfoArray

RImplInfoPtrArray iEComFilterInfoArray[private]

TFilterConfigurationIterator * iFilterConfigIter

TFilterConfigurationIterator *iFilterConfigIter[private]

RPointerArray< TSessionFilterInfo > iFilterInfoList

RPointerArray< TSessionFilterInfo >iFilterInfoList[private]

RArray< THTTPFilterRegistration > iFilterQueue

RArray< THTTPFilterRegistration >iFilterQueue[private]

__DECLARE_PERFORMANCE_LOG MHttpDataOptimiser * iHttpDataOptimiser

__DECLARE_PERFORMANCE_LOG MHttpDataOptimiser *iHttpDataOptimiser[private]

CHTTPManager * iManager

CHTTPManager *iManager[private]

TInt iNextFilterHandle

TInt iNextFilterHandle[private]

CProtocolHandler * iProtocolHandler

CProtocolHandler *iProtocolHandler[private]

CHeaders * iRequestSessionHeaders

CHeaders *iRequestSessionHeaders[private]

CHeaders * iResponseSessionHeaders

CHeaders *iResponseSessionHeaders[private]

TBool iSessionClosing

TBool iSessionClosing[private]

CTransaction * iSessionEventTransaction

CTransaction *iSessionEventTransaction[private]

TInt iTransCount

TInt iTransCount[private]

RArray< CTransaction * > iTransactions

RArray< CTransaction * >iTransactions[private]