CTransaction Class Reference

class CTransaction : private CActive

Inherits from

Public Member Functions
MHTTPTransactionCallback &Callback()
voidCancelTransaction(THTTPFilterHandle)
RString CipherSuite()
voidClose()
CHeaderCodec &Codec()
voidFail(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)
voidSendEventL(THTTPEvent &, TInt, THTTPFilterHandle)
TInt ServerCert(TCertInfo &)
const CCertificate *ServerCert()
RHTTPSession Session()
voidSetupHttpDataOptimiser(MHttpDataOptimiser &)
TBool SyncMode()
voidSynchronousSendEvent(THTTPEvent, TInt, THTTPFilterHandle)
voidUnblock()
Private Member Functions
CTransaction(MHTTPTransactionCallback &, CHTTPSession &)
voidActivate(TTransactionStates)
TInt AddEvent(THTTPEvent &, TInt, THTTPFilterHandle)
TInt AppendEvent(TEventRegistration &)
voidConstructL(const TUriC8 &, RStringF)
const TEventRegistration &CurrentEvent()
voidDoCancel()
TBool EventAvailable()
TTransactionStates FindFilterForThisEvent()
TTransactionStates FindNextFilter()
voidNextFilter()
CProtTransaction *ProtocolTransaction()
voidRemoveEvent()
TInt RunError(TInt)
voidRunL()
TBool RunOneFilterL()
voidSetProtocolTransaction(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
enumTTransactionStates {
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)

voidActivate(TTransactionStatesaStatus)[private]

Parameters

TTransactionStates aStatus

AddEvent(THTTPEvent &, TInt, THTTPFilterHandle)

TInt AddEvent(THTTPEvent &aEvent,
TIntaDirection,
THTTPFilterHandleaStart
)[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)

voidCancelTransaction(THTTPFilterHandleaStart)

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()

voidClose()

'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)

voidConstructL(const TUriC8 &aURI,
RStringFaMethod
)[private]

Parameters

const TUriC8 & aURI
RStringF aMethod

CurrentEvent()

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

DoCancel()

voidDoCancel()[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)

voidFail(THTTPFilterHandleaStart)[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(RHTTPTransactionaHandle)[static, inline]

Parameters

RHTTPTransaction aHandle

IsValid()

TBool IsValid()[inline]

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

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

Parameters

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

NextFilter()

voidNextFilter()[private, inline]

PropertySet()

RHTTPTransactionPropertySet PropertySet()const [inline]

ProtocolTransaction()

CProtTransaction *ProtocolTransaction()[private, inline]

RemoveEvent()

voidRemoveEvent()[private, inline]

Request()

CRequest &Request()const [inline]

Response()

CResponse &Response()const [inline]

RunError(TInt)

TInt RunError(TIntaError)[private, virtual]

Parameters

TInt aError

RunL()

voidRunL()[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,
TIntaDirection,
THTTPFilterHandleaStart
)

Parameters

THTTPEvent & aEvent
TInt aDirection
THTTPFilterHandle aStart

SendEventL(THTTPEvent &, TInt, THTTPFilterHandle)

voidSendEventL(THTTPEvent &aEvent,
TIntaDirection,
THTTPFilterHandleaStart
)

Parameters

THTTPEvent & aEvent
TInt aDirection
THTTPFilterHandle aStart

ServerCert(TCertInfo &)

TInt ServerCert(TCertInfo &aServerCert)[inline]

Get the Server Certificate for this transaction.

Parameters

TCertInfo & aServerCertA 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 *)

voidSetProtocolTransaction(CProtTransaction *aTrans)[private, inline]

Parameters

CProtTransaction * aTrans

SetupHttpDataOptimiser(MHttpDataOptimiser &)

voidSetupHttpDataOptimiser(MHttpDataOptimiser &aHttpOptimiser)

Parameters

MHttpDataOptimiser & aHttpOptimiser

SyncMode()

TBool SyncMode()const [inline]

SynchronousSendEvent(THTTPEvent, TInt, THTTPFilterHandle)

voidSynchronousSendEvent(THTTPEventaEvent,
TIntaDirection,
THTTPFilterHandleaStart
)

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()

voidUnblock()[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]