CSensrvTransactionQueue Class Reference

class CSensrvTransactionQueue : public CBase

Simple to use transaction queue.

Since
S60 5.0

Inherits from

Constructor & Destructor Documentation

CSensrvTransactionQueue(TBool)

CSensrvTransactionQueue ( TBool aOwned ) [private]

C++ constructor

Since
S60 5.0

Parameters

TBool aOwned

~CSensrvTransactionQueue()

~CSensrvTransactionQueue ( ) [virtual]

Destructor.

Member Functions Documentation

Add(CSensrvTransaction *, TBool)

TInt Add ( CSensrvTransaction * aTransaction,
TBool aLast = ETrue
)

Adds transaction to the the queue

Since
S60 5.0

Parameters

CSensrvTransaction * aTransaction The transaction to be added.
TBool aLast = ETrue If ETrue, transaction is added to the end of the queue, otherwise it is added to the beginning.

ConstructL()

void ConstructL ( ) [private]

2nd phase of construction

Since
S60 5.0

FindTransactionPtr(CSensrvTransaction *)

TLinkableTransactionPtr * FindTransactionPtr ( CSensrvTransaction * aTransaction ) [private]

Gets pointer to the TLinkableTransactionPtr in queue corresponding to specified transaction. Transaction stays in the queue.

Since
S60 5.0

Parameters

CSensrvTransaction * aTransaction The transaction to be found.

First()

CSensrvTransaction * First ( )

Gets pointer to first transaction in queue. Transaction stays in the queue.

Since
S60 5.0

IsEmpty()

TBool IsEmpty ( ) [inline]

Checks if queue is empty

Since
S60 5.0

NewL(TBool)

CSensrvTransactionQueue * NewL ( TBool aOwned ) [static]

Two phase constructor.

Since
S60 5.0
Exceptions
KErrNoMemory

Out of memory.

Parameters

TBool aOwned Indicates if queue owns transactions or is it used simply to store the pointers. If transactions are owned, deleting queue will also delete all transactions.

Remove(CSensrvTransaction *, TRemovalType)

void Remove ( CSensrvTransaction * aTransaction,
TRemovalType aRemovalType = ERemovalTypeUndefined
)

Removes specified transaction from queue, if it is there. If queue owns the transactions, the removed transaction may be completed and deleted, depending on removal type.

Since
S60 5.0
TRemovalType

Parameters

CSensrvTransaction * aTransaction The transaction to be removed.
TRemovalType aRemovalType = ERemovalTypeUndefined Determines removal type.

Remove(CSensrvSession *)

void Remove ( CSensrvSession * aSession )

Removes all transactions initiated by specified session from queue. If queue owns the transactions, the transactions are completed with KErrCancel and are deleted. Otherwise does not delete or complete transactions.

Since
S60 5.0

Parameters

CSensrvSession * aSession The session to match.

RemoveAll()

void RemoveAll ( )

Removes all transactions.

Since
S60 5.0

RemoveObsolete(const TTime &)

TInt RemoveObsolete ( const TTime & aCutoffTime )

Removes all transactions with timestamp older than specified cutoff time.

Since
S60 5.0

Parameters

const TTime & aCutoffTime Transactions older that this time will be removed.

RemovePtr(TLinkableTransactionPtr *, TRemovalType)

void RemovePtr ( TLinkableTransactionPtr * aPtr,
TRemovalType aRemovalType
) [private]

Removes linkable transaction pointer and deletes it. If transactions are owned, they are completed with KErrCancel or whatever error code they currently have.

Since
S60 5.0
TRemovalType

Parameters

TLinkableTransactionPtr * aPtr Linkable transaction pointer to remove
TRemovalType aRemovalType Determines removal type.

Member Enumerations Documentation

Enum TRemovalType

Removal type specifies what should be done to removed transaction.

Enumerators

ERemovalTypeUndefined
ERemovalTypeComplete
ERemovalTypeCancel
ERemovalTypeTransfer

Member Data Documentation

RHeap * iHeap

RHeap * iHeap [private]

Heap where the queue resides. Transactions must reside in the same heap. Not own.

TBool iOwned

TBool iOwned [private]

Indicates whether or not this queue owns the transactions it holds.

TSglQueIter< TLinkableTransactionPtr > iTransactionPtrIter

TSglQueIter < TLinkableTransactionPtr > iTransactionPtrIter [private]

Iterator for transaction queue

TSglQue< TLinkableTransactionPtr > iTransactionPtrList

TSglQue < TLinkableTransactionPtr > iTransactionPtrList [private]

Holds transaction pointers of transactions. Queued pointer objects are owned.