CSensrvTransaction Class Reference

class CSensrvTransaction : public CBase

Base class for Sensor Server transactions

Since
S60 5.0

Inherits from

Nested Classes and Structures

Public Member Functions
~CSensrvTransaction ()
CSensrvChannel * Channel ()
void Complete ()
TInt ErrorCode ()
CSensrvMessage * ExtractMessage ()
TBool IsMediatorType ()
CSensrvMessage * Message ()
CSensrvTransaction * NewL ( CSensrvMessage *, CSensrvPluginProxy *, CSensrvChannel *, TSensrvTransactionType )
CSensrvTransaction * NewLC ( CSensrvMessage *, CSensrvPluginProxy *, CSensrvChannel *, TSensrvTransactionType )
CSensrvPluginProxy * Proxy ()
const TTime & ResetTimeStamp ()
CSensrvSession * Session ()
void SetErrorCode ( TInt )
TInt SetMessageData ( TAny *)
void SetState ( TSensrvTransactionState )
TInt State ()
const TTime & TimeStamp ()
TSensrvTransactionType Type ()
Private Member Functions
CSensrvTransaction ( CSensrvMessage *, CSensrvPluginProxy *, CSensrvChannel *, TSensrvTransactionType )
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()
Public Member Enumerations
enum TSensrvTransactionState {
ETransStateUninitialized , ETransStateQueued , ETransStateExecuting , ETransStateHandledAtSsy , ETransStateNotifyFailed , ETransStateCompleted
}
enum TSensrvTransactionType {
ETransTypeNone , ETransTypeLoadSsy  = 1, ETransTypeDelayedInitialize , ETransTypeDelayedOpenChannel , ETransTypeClientQueryChannels , ETransTypeOpenChannel , ETransTypeCloseChannel , ETransTypeStartListening , ETransTypeStopListening , ETransTypeGetProperty , ETransTypeGetAllProperties , ETransTypeSetProperty , ETransTypeStartConditionListening , ETransTypeStopConditionListening , ETransTypeMediatorFirst  = 10000, ETransTypeMediatorNewDataAvailable , ETransTypeMediatorForceBufferFilled , ETransTypeMediatorForceChannelClose , ETransTypeMediatorPropertyChanged , ETransTypeMediatorChannelsChanged
}
Private Attributes
CSensrvChannel * iChannel
TInt iErrorCode
CSensrvMessage * iMessage
CSensrvPluginProxy * iProxy
TSensrvTransactionState iState
TTime iTimeStamp
TSensrvTransactionType iType

Constructor & Destructor Documentation

CSensrvTransaction(CSensrvMessage *, CSensrvPluginProxy *, CSensrvChannel *, TSensrvTransactionType)

CSensrvTransaction ( CSensrvMessage * aMessage,
CSensrvPluginProxy * aProxy,
CSensrvChannel * aChannel,
TSensrvTransactionType aType
) [private]

C++ constructor

Since
S60 5.0

Parameters

CSensrvMessage * aMessage The message related to this transaction. Can be NULL if transaction has no client.
CSensrvPluginProxy * aProxy The plugin proxy related to this transaction. Can be NULL if transaction is not related to a single proxy.
CSensrvChannel * aChannel The channel related to this transaction. Can be NULL if transaction is not related to a channel.
TSensrvTransactionType aType The transaction type.

~CSensrvTransaction()

~CSensrvTransaction ( ) [virtual]

Destructor.

Member Functions Documentation

Channel()

CSensrvChannel * Channel ( ) const [inline]

Gets related channel pointer.

Since
S60 5.0

Complete()

void Complete ( )

Completes the transaction and related message, if any.

Since
S60 5.0

ErrorCode()

TInt ErrorCode ( ) const [inline]

Gets transaction error.

Since
S60 5.0

ExtractMessage()

CSensrvMessage * ExtractMessage ( )

Extracts message from transaction. Message completion responsibility transfers to caller.

Since
S60 5.0

IsMediatorType()

TBool IsMediatorType ( ) const [inline]

Checks if transaction is a mediator transaction.

Since
S60 5.0

Message()

CSensrvMessage * Message ( ) const [inline]

Gets message related to this transaction.

Since
S60 5.0

NewL(CSensrvMessage *, CSensrvPluginProxy *, CSensrvChannel *, TSensrvTransactionType)

CSensrvTransaction * NewL ( CSensrvMessage * aMessage,
CSensrvPluginProxy * aProxy,
CSensrvChannel * aChannel,
TSensrvTransactionType aType
) [static]

Two phase constructor

Since
S60 5.0
Exceptions
KErrNoMemory

Out of memory

Parameters

CSensrvMessage * aMessage The message related to this transaction. Can be NULL if transaction has no client. Ownership of the message passes to this transaction.
CSensrvPluginProxy * aProxy The plugin proxy related to this transaction. Can be NULL if transaction is not related to a single proxy.
CSensrvChannel * aChannel The channel related to this transaction. Can be NULL if transaction is not related to a channel.
TSensrvTransactionType aType The transaction type.

NewLC(CSensrvMessage *, CSensrvPluginProxy *, CSensrvChannel *, TSensrvTransactionType)

CSensrvTransaction * NewLC ( CSensrvMessage * aMessage,
CSensrvPluginProxy * aProxy,
CSensrvChannel * aChannel,
TSensrvTransactionType aType
) [static]

Two phase constructor, leaves newly created object to cleanupstack.

Since
S60 5.0
Exceptions
KErrNoMemory

Out of memory

Parameters

CSensrvMessage * aMessage The message related to this transaction. Can be NULL if transaction has no client. Ownership of the message passes to this transaction.
CSensrvPluginProxy * aProxy The plugin proxy related to this transaction. Can be NULL if transaction is not related to a single proxy.
CSensrvChannel * aChannel The channel related to this transaction. Can be NULL if transaction is not related to a channel.
TSensrvTransactionType aType The transaction type.

Proxy()

CSensrvPluginProxy * Proxy ( ) const [inline]

Gets the plugin proxy related to transaction.

Since
S60 5.0

ResetTimeStamp()

const TTime & ResetTimeStamp ( ) [inline]

Resets transaction timestamp to current time.

Since
S60 5.0

Session()

CSensrvSession * Session ( ) const [inline]

Gets session related to this transaction.

Since
S60 5.0

SetErrorCode(TInt)

void SetErrorCode ( TInt aErrorCode )

Sets transaction error.

Since
S60 5.0

Parameters

TInt aErrorCode Error code

SetMessageData(TAny *)

TInt SetMessageData ( TAny * aData )

Sets data to message to be returned to client.

Since
S60 5.0

Parameters

TAny * aData Data to set to the message. How TAny pointer is interpreted depends on transaction type: ETransTypeClientQueryChannels - RSensrvChannelInfoList*, ETransTypeOpenChannel - TChannelOpenMessageData*

SetState(TSensrvTransactionState)

void SetState ( TSensrvTransactionState aState )

Sets transaction state.

Since
S60 5.0

Parameters

TSensrvTransactionState aState The new state for transaction.

State()

TInt State ( ) const [inline]

Gets transaction state.

Since
S60 5.0

TimeStamp()

const TTime & TimeStamp ( ) const [inline]

Gets transaction timestamp.

Since
S60 5.0

Type()

TSensrvTransactionType Type ( ) const [inline]

Gets the transaction type.

Since
S60 5.0

Member Enumerations Documentation

Enum TSensrvTransactionState

Transactino states

Enumerators

ETransStateUninitialized
ETransStateQueued
ETransStateExecuting
ETransStateHandledAtSsy
ETransStateNotifyFailed
ETransStateCompleted

Enum TSensrvTransactionType

Transaction types

Mediator transactions are never owned by transaction queues and are reused, even if the regular transactions are not. They are used for passing events internally between SSY and Server main thread.

Enumerators

ETransTypeNone
ETransTypeLoadSsy = 1
ETransTypeDelayedInitialize
ETransTypeDelayedOpenChannel
ETransTypeClientQueryChannels
ETransTypeOpenChannel
ETransTypeCloseChannel
ETransTypeStartListening
ETransTypeStopListening
ETransTypeGetProperty
ETransTypeGetAllProperties
ETransTypeSetProperty
ETransTypeStartConditionListening
ETransTypeStopConditionListening
ETransTypeMediatorFirst = 10000
ETransTypeMediatorNewDataAvailable
ETransTypeMediatorForceBufferFilled
ETransTypeMediatorForceChannelClose
ETransTypeMediatorPropertyChanged
ETransTypeMediatorChannelsChanged

Member Data Documentation

CSensrvChannel * iChannel

CSensrvChannel * iChannel [private]

Channel related to transaction. Can be NULL for transactions not related to a channel. Not Own.

TInt iErrorCode

TInt iErrorCode [private]

Error related to transaction.

CSensrvMessage * iMessage

CSensrvMessage * iMessage [private]

Message related to transaction. Can be NULL for clientless internal transactions. Not own, but is responsible for completion. All messages are owned by session objects.

CSensrvPluginProxy * iProxy

CSensrvPluginProxy * iProxy [private]

Plugin proxy related to transaction. Can be NULL for transactions not related to a single proxy. Not Own.

TSensrvTransactionState iState

TSensrvTransactionState iState [private]

Transaction state.

TTime iTimeStamp

TTime iTimeStamp [private]

Transaction creation time.

TSensrvTransactionType iType

TSensrvTransactionType iType [private]

Transaction type.