CSensrvTransactionQueue Class Reference

class CSensrvTransactionQueue : public CBase

Simple to use transaction queue.

Since
S60 5.0

Inherits from

  • CSensrvTransactionQueue

Constructor & Destructor Documentation

CSensrvTransactionQueue(TBool)

CSensrvTransactionQueue(TBoolaOwned)[private]

C++ constructor

Since
S60 5.0

Parameters

TBool aOwned

~CSensrvTransactionQueue()

~CSensrvTransactionQueue()[virtual]

Destructor.

Member Functions Documentation

Add(CSensrvTransaction *, TBool)

TInt Add(CSensrvTransaction *aTransaction,
TBoolaLast = ETrue
)

Adds transaction to the the queue

Since
S60 5.0

Parameters

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

ConstructL()

voidConstructL()[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 * aTransactionThe 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(TBoolaOwned)[static]

Two phase constructor.

Since
S60 5.0
Exceptions
KErrNoMemory

Out of memory.

Parameters

TBool aOwnedIndicates 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)

voidRemove(CSensrvTransaction *aTransaction,
TRemovalTypeaRemovalType = 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 * aTransactionThe transaction to be removed.
TRemovalType aRemovalType = ERemovalTypeUndefinedDetermines removal type.

Remove(CSensrvSession *)

voidRemove(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 * aSessionThe session to match.

RemoveAll()

voidRemoveAll()

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 & aCutoffTimeTransactions older that this time will be removed.

RemovePtr(TLinkableTransactionPtr *, TRemovalType)

voidRemovePtr(TLinkableTransactionPtr *aPtr,
TRemovalTypeaRemovalType
)[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 * aPtrLinkable transaction pointer to remove
TRemovalType aRemovalTypeDetermines 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.