CTransaction Class Reference

class CTransaction : private CActive

Inherits from

Public Member Functions
MHTTPTransactionCallback & Callback ()
void CancelTransaction ( THTTPFilterHandle )
RString CipherSuite ()
void Close ()
CHeaderCodec & Codec ()
void Fail ( THTTPFilterHandle )
RHTTPTransaction Handle ()
MHttpDataOptimiser * HttpDataOptimiser ()
TInt Id ()
CTransaction * Implementation ( RHTTPTransaction )
TBool IsValid ()
CTransaction * NewL ( MHTTPTransactionCallback &, const TUriC8 &, CHTTPSession &, RStringF )
RHTTPTransactionPropertySet PropertySet ()
CRequest & Request ()
CResponse & Response ()
TInt SendEvent ( THTTPEvent &, TInt , THTTPFilterHandle )
void SendEventL ( THTTPEvent &, TInt , THTTPFilterHandle )
TInt ServerCert ( TCertInfo &)
const CCertificate * ServerCert ()
RHTTPSession Session ()
void SetupHttpDataOptimiser ( MHttpDataOptimiser &)
TBool SyncMode ()
void SynchronousSendEvent ( THTTPEvent , TInt , THTTPFilterHandle )
void Unblock ()
Private Member Functions
CTransaction ( MHTTPTransactionCallback &, CHTTPSession &)
void Activate ( TTransactionStates )
TInt AddEvent ( THTTPEvent &, TInt , THTTPFilterHandle )
TInt AppendEvent ( TEventRegistration &)
void ConstructL (const TUriC8 &, RStringF )
const TEventRegistration & CurrentEvent ()
void DoCancel ()
TBool EventAvailable ()
TTransactionStates FindFilterForThisEvent ()
TTransactionStates FindNextFilter ()
void NextFilter ()
CProtTransaction * ProtocolTransaction ()
void RemoveEvent ()
TInt RunError ( TInt )
void RunL ()
TBool RunOneFilterL ()
void SetProtocolTransaction ( CProtTransaction *)
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::Extension_(TUint,TAny *&,TAny *)
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::SetActive()
CActive::SetPriority(TInt)
CActive::~CActive()
CBase::CBase()
CBase::Delete(CBase *)
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
enum TTransactionStates {
EPassive  = 0, EFilter , EInFilter , EExiting , EBlocked , ECancelled , ESuspended
}
Inherited Enumerations
CActive:TPriority
Private Attributes
THTTPEvent iASyncEvent
MHTTPTransactionCallback & iCallback
CHTTPTransactionCodec * iCodec
TInt iCurrentASyncFilter
TInt iCurrentFilter
TEventRegistration iCurrentSyncEvent
__DECLARE_LOG RArray < TEventRegistration > iEventQueue
MHttpDataOptimiser * iHttpDataOptimiser
TInt iId
TDblQueLink iLink
TInt iNextFilter
TBool iProcessingSyncEvent
RHTTPTransactionPropertySet iPropertySet
CProtTransaction * iProtocolTransaction
CRequest * iRequest
CResponse * iResponse
CHTTPSession & iSession
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

CTransaction(MHTTPTransactionCallback &, CHTTPSession &)

CTransaction ( MHTTPTransactionCallback & aCallback,
CHTTPSession & aSession
) [private, inline]

Parameters

MHTTPTransactionCallback & aCallback
CHTTPSession & aSession

Member Functions Documentation

Activate(TTransactionStates)

void Activate ( TTransactionStates aStatus ) [private]

Parameters

TTransactionStates aStatus

AddEvent(THTTPEvent &, TInt, THTTPFilterHandle)

TInt AddEvent ( THTTPEvent & aEvent,
TInt aDirection,
THTTPFilterHandle aStart
) [private]

Parameters

THTTPEvent & aEvent
TInt aDirection
THTTPFilterHandle aStart

AppendEvent(TEventRegistration &)

TInt AppendEvent ( TEventRegistration & aEvent ) [private]

Parameters

TEventRegistration & aEvent

Callback()

MHTTPTransactionCallback & Callback ( ) const [inline]

CancelTransaction(THTTPFilterHandle)

void CancelTransaction ( THTTPFilterHandle aStart )

Cancels the transaction. This removes all outstanding events and sends a cancel event outward.

Parameters

THTTPFilterHandle aStart

CipherSuite()

RString CipherSuite ( )

Get the cipher suite for this transaction.

Close()

void Close ( )

'Closes the transaction'. This is essentialy the way other objects destroy the transaction. They don't directly call the destructor in order to cope with filters closing the transaction, in which situation the transaction will zombify itself, deleting itself when the stack is unwound.

Codec()

CHeaderCodec & Codec ( ) const [inline]

ConstructL(const TUriC8 &, RStringF)

void ConstructL ( const TUriC8 & aURI,
RStringF aMethod
) [private]

Parameters

const TUriC8 & aURI
RStringF aMethod

CurrentEvent()

const TEventRegistration & CurrentEvent ( ) const [private, inline]

DoCancel()

void DoCancel ( ) [private, virtual]

Implements cancellation of an outstanding request.

This function is called as part of the active object's Cancel() .

It must call the appropriate cancel function offered by the active object's asynchronous service provider. The asynchronous service provider's cancel is expected to act immediately.

DoCancel() must not wait for event completion; this is handled by Cancel() .

CActive::Cancel

EventAvailable()

TBool EventAvailable ( ) const [private, inline]

Fail(THTTPFilterHandle)

void Fail ( THTTPFilterHandle aStart ) [inline]

Fails the transaction. That is to say, cancel the transaction and send the synchronous events 'EUnrecoverableError' and 'EFailed'. It implements the RHTTPTransaction::Fail function.

Parameters

THTTPFilterHandle aStart

FindFilterForThisEvent()

TTransactionStates FindFilterForThisEvent ( ) [private]

Finds the next filter for the current event.

FindNextFilter()

TTransactionStates FindNextFilter ( ) [private]

Finds the next filter (possibly in another event).

Handle()

RHTTPTransaction Handle ( ) [inline]

HttpDataOptimiser()

MHttpDataOptimiser * HttpDataOptimiser ( )

Id()

TInt Id ( ) const [inline]

Implementation(RHTTPTransaction)

CTransaction * Implementation ( RHTTPTransaction aHandle ) [static, inline]

Parameters

RHTTPTransaction aHandle

IsValid()

TBool IsValid ( ) [inline]

NewL(MHTTPTransactionCallback &, const TUriC8 &, CHTTPSession &, RStringF)

CTransaction * NewL ( MHTTPTransactionCallback & aCallback,
const TUriC8 & aURI,
CHTTPSession & aSession,
RStringF aMethod
) [static, inline]

Parameters

MHTTPTransactionCallback & aCallback
const TUriC8 & aURI
CHTTPSession & aSession
RStringF aMethod

NextFilter()

void NextFilter ( ) [private, inline]

PropertySet()

RHTTPTransactionPropertySet PropertySet ( ) const [inline]

ProtocolTransaction()

CProtTransaction * ProtocolTransaction ( ) [private, inline]

RemoveEvent()

void RemoveEvent ( ) [private, inline]

Request()

CRequest & Request ( ) const [inline]

Response()

CResponse & Response ( ) const [inline]

RunError(TInt)

TInt RunError ( TInt aError ) [private, virtual]

Parameters

TInt aError

RunL()

void RunL ( ) [private, virtual]

Handles an active object's request completion event.

A derived class must provide an implementation to handle the completed request. If appropriate, it may issue another request.

The function is called by the active scheduler when a request completion event occurs, i.e. after the active scheduler's WaitForAnyRequest() function completes.

Before calling this active object's RunL() function, the active scheduler has:

1. decided that this is the highest priority active object with a completed request

2. marked this active object's request as complete (i.e. the request is no longer outstanding)

RunL() runs under a trap harness in the active scheduler. If it leaves, then the active scheduler calls RunError() to handle the leave.

Note that once the active scheduler's Start() function has been called, all user code is run under one of the program's active object's RunL() or RunError() functions.

CActiveScheduler::Start CActiveScheduler::Error CActiveScheduler::WaitForAnyRequest TRAPD

RunOneFilterL()

TBool RunOneFilterL ( ) [private]

SendEvent(THTTPEvent &, TInt, THTTPFilterHandle)

TInt SendEvent ( THTTPEvent & aEvent,
TInt aDirection,
THTTPFilterHandle aStart
)

Parameters

THTTPEvent & aEvent
TInt aDirection
THTTPFilterHandle aStart

SendEventL(THTTPEvent &, TInt, THTTPFilterHandle)

void SendEventL ( THTTPEvent & aEvent,
TInt aDirection,
THTTPFilterHandle aStart
)

Parameters

THTTPEvent & aEvent
TInt aDirection
THTTPFilterHandle aStart

ServerCert(TCertInfo &)

TInt ServerCert ( TCertInfo & aServerCert ) [inline]

Get the Server Certificate for this transaction.

Parameters

TCertInfo & aServerCert A TCertInfo which will be filled with the certificate information

ServerCert()

const CCertificate * ServerCert ( ) [inline]

Get the Server Certificate for this transaction.

Session()

RHTTPSession Session ( ) const [inline]

SetProtocolTransaction(CProtTransaction *)

void SetProtocolTransaction ( CProtTransaction * aTrans ) [private, inline]

Parameters

CProtTransaction * aTrans

SetupHttpDataOptimiser(MHttpDataOptimiser &)

void SetupHttpDataOptimiser ( MHttpDataOptimiser & aHttpOptimiser )

Parameters

MHttpDataOptimiser & aHttpOptimiser

SyncMode()

TBool SyncMode ( ) const [inline]

SynchronousSendEvent(THTTPEvent, TInt, THTTPFilterHandle)

void SynchronousSendEvent ( THTTPEvent aEvent,
TInt aDirection,
THTTPFilterHandle aStart
)

Sends an event syncronously. Only callable when there are no outstanding events. SendEventL __ASSERT_DEBUG will panic if there are outstanding events.

Parameters

THTTPEvent aEvent
TInt aDirection
THTTPFilterHandle aStart

Unblock()

void Unblock ( ) [inline]

If the transaction has previously blocked, set itself active and continue running.

Member Enumerations Documentation

Enum TTransactionStates

Enumerators

EPassive = 0
EFilter
EInFilter
EExiting

The transaction has been closed from within a filter's MHFRunL (detectable as the state is either EInFilter or ECancelled at the time of the close) and so is 'zombified' until the filter returns from its MHFRunL, at which point the transaction will delete itself.

EBlocked

The transaction's RunL has fired from within an active scheduler started from within a filter on another transaction. This transaction must be rescheduled once the other transaction has finished.

ECancelled
ESuspended

Member Data Documentation

THTTPEvent iASyncEvent

THTTPEvent iASyncEvent [private]

MHTTPTransactionCallback & iCallback

MHTTPTransactionCallback & iCallback [private]

CHTTPTransactionCodec * iCodec

CHTTPTransactionCodec * iCodec [private]

TInt iCurrentASyncFilter

TInt iCurrentASyncFilter [private]

TInt iCurrentFilter

TInt iCurrentFilter [private]

TEventRegistration iCurrentSyncEvent

TEventRegistration iCurrentSyncEvent [private]

__DECLARE_LOG RArray< TEventRegistration > iEventQueue

__DECLARE_LOG RArray < TEventRegistration > iEventQueue [private]

MHttpDataOptimiser * iHttpDataOptimiser

MHttpDataOptimiser * iHttpDataOptimiser [private]

TInt iId

TInt iId [private]

TDblQueLink iLink

TDblQueLink iLink [private]

TInt iNextFilter

TInt iNextFilter [private]

TBool iProcessingSyncEvent

TBool iProcessingSyncEvent [private]

RHTTPTransactionPropertySet iPropertySet

RHTTPTransactionPropertySet iPropertySet [private]

CProtTransaction * iProtocolTransaction

CProtTransaction * iProtocolTransaction [private]

CRequest * iRequest

CRequest * iRequest [private]

CResponse * iResponse

CResponse * iResponse [private]

CHTTPSession & iSession

CHTTPSession & iSession [private]