CSensrvChannelCondition Class Reference

Link against: SensrvClient.lib


#include <
sensrvchannelcondition.h>

Detailed Description

CSensrvChannelCondition represents a channel condition item.

Channel conditions are added to a channel condition set. A channel condition set is met when all channel conditions are met at the same time, if it is AND-type set, or when single condition is met if it is OR-type set. Only one channel condition can be set for each data item in single channel condition set. Certain condition types (range conditions) require two condition objects (upper and lower limit) in a condition set for the set to be valid. The pair of conditions must both have the same index in the condition set and they are considered a single channel condition.

Each Condition has an ItemIndex associated with it. When a Condition is added to a Condition Set using CSensrvChannelConditionSet::AddChannelConditionL() this index must be different to all other conditions added to the set with the exception of range conditions as described above. If the index supplied already exists and the condition is not part of a range condition then CSensrvChannelConditionSet::AddChannelConditionL() leaves with KErrArgument.

See also:
CSensrvChannelConditionSet

TSensrvConditionType

TSensrvConditionOperator

Dll sensrvutil.lib
Since:
S60 5.0

Public Member Functions

virtual TInt ConditionType () const =0
 Get condition type.
virtual TInt ConditionOperator () const =0
 Get condition operator.
virtual TInt ConditionItemIndex () const =0
 Get condition item index.
virtual TInt GetConditionValue (TDes8 &aValue) const =0
 Get condition value.
virtual const TDesC8 & ConditionValue () const =0
 Get condition value as reference.
 CSensrvChannelCondition ()
 Default constructor.

Static Public Member Functions

static IMPORT_C CSensrvChannelConditionNewL (TInt aConditionType, TInt aConditionOperator, TInt aItemIndex, TDesC8 &aValue)
 Two-phase constructor.
static IMPORT_C CSensrvChannelConditionNewLC (TInt aConditionType, TInt aConditionOperator, TInt aItemIndex, TDesC8 &aValue)
 Two-phase constructor.

Constructor & Destructor Documentation

CSensrvChannelCondition::CSensrvChannelCondition  ) 
 

Default constructor.


Member Function Documentation

virtual TInt CSensrvChannelCondition::ConditionItemIndex  )  const [pure virtual]
 

Get condition item index.

Returns:
TInt Condition item index
virtual TInt CSensrvChannelCondition::ConditionOperator  )  const [pure virtual]
 

Get condition operator.

Returns:
TInt Condition operator
virtual TInt CSensrvChannelCondition::ConditionType  )  const [pure virtual]
 

Get condition type.

Returns:
Condition Type
virtual const TDesC8& CSensrvChannelCondition::ConditionValue  )  const [pure virtual]
 

Get condition value as reference.

Returns:
Reference to condition value descriptor.
virtual TInt CSensrvChannelCondition::GetConditionValue TDes8 &  aValue  )  const [pure virtual]
 

Get condition value.

Parameters:
aValue Value of the condition is copied to the supplied descriptor
Returns:
KErrOverflow if aData is the wrong size for data item or one of the system-wide error codes
static IMPORT_C CSensrvChannelCondition* CSensrvChannelCondition::NewL TInt  aConditionType,
TInt  aConditionOperator,
TInt  aItemIndex,
TDesC8 &  aValue
[static]
 

Two-phase constructor.

Parameters:
aConditionType Defines the type of the condition
aConditionOperator Defines the operator used in the condition
aItemIndex Item index to be used in the condition evaluation
aValue Value to be used in condition evaluation. By default this should be a packaged data object of the channel. If the channel type requires a different type of value, that must be indicated clearly in the channel specific header defining the channel.
Returns:
Pointer to created object
Leave:
KErrNoMemory
Leave:
KErrArgument if parameters are invalid or are less than 0
Leave:
One of the system-wide error codes
static IMPORT_C CSensrvChannelCondition* CSensrvChannelCondition::NewLC TInt  aConditionType,
TInt  aConditionOperator,
TInt  aItemIndex,
TDesC8 &  aValue
[static]
 

Two-phase constructor.

Parameters:
aConditionType Defines the type of the condition
aConditionOperator Defines the operator used in the condition
aItemIndex Item index to be used in the condition evaluation
aValue Value to be used in condition evaluation. By default this should be a packaged data object of the channel. If the channel type requires a different type of value, that must be indicated clearly in the channel specific header defining the channel.
Returns:
Pointer to created object
Leave:
KErrNoMemory
Leave:
KErrArgument if parameters are invalid or are less than 0
Leave:
One of the system-wide error codes

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2007
Back to top