CSensrvChannelConditionSet Class Reference

class CSensrvChannelConditionSet : public CBase

CSensrvChannelConditionSet represents a set of conditions. A condition set is a container for one or more conditions.

The data type of the value contained in each Condition, in a Condition Set, must have the same data type as the data for the channel to which it is added. By default this should be a packaged data object of the channel. See the channel specific headers in . If the channel type requires a different type of value, that must be indicated clearly in the channel specific header defining the channel.

The channel condition set combines channel conditions with either an AND-operator or an OR-operator. In an AND-set, all conditions need to be met by single data item before a condition set is met. In an OR-set, a single condition in the set needs to be met before a condition set is met. 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.

CSensrvChannelCondition sensrvutil.lib

S60 5.0

Inherits from

  • CSensrvChannelConditionSet

Constructor & Destructor Documentation

CSensrvChannelConditionSet()

CSensrvChannelConditionSet()

Default constructor.

Member Functions Documentation

AddChannelConditionL(CSensrvChannelCondition *)

voidAddChannelConditionL(CSensrvChannelCondition *aChannelCondition)[pure virtual]

Adds a channel condition to the condition set. Ownership of the CSensrvChannelCondition is transferred to the CSensrvChannelConditionSet. The channel condition is deleted when this condition set is destroyed.

Single conditions added to the Condition Set using this operation must each have a different item index. Range conditions must have the same item index and they must also have complimentary parts. When the second part of a range condition is added, i.e. the condition has the same item index as a condition already in the set, it is checked to ensure it is the complimentary partner of the already added part. If it is not complimentary then the operation will leave with KErrArgument. The conditions at each different index whether single or range is considered an individua condition.

Individual conditions do not need to have contiguous index values.

S60 5.0

leave

KErrArgument If the condition is NULL, there is already a condition for the same index in this set and the new condition is not a complementary part of range condition for that existing condition.

leave

One of the system-wide error codes

CSensrvChannelCondition

Parameters

CSensrvChannelCondition * aChannelConditionChannel condition to be added

AllConditions()

const RSensrvChannelConditionList &AllConditions()const [pure virtual]

Get all channel conditions in this condition set. Conditions with the same index (range conditions) are always in sequential slots in the returned array. Otherwise, conditions are in the order they were added.

S60 5.0

Reference to a list of condition pointers

ConditionSetType()

TSensrvConditionSetType ConditionSetType()const [pure virtual]

Get condition set type.

Type of the condition set

NewL(TSensrvConditionSetType)

IMPORT_C CSensrvChannelConditionSet *NewL(TSensrvConditionSetTypeaConditionSetType)[static]

Two-phase constructor

S60 5.0

Pointer to created object

leave

KErrNoMemory

leave

One of the system-wide error codes

Parameters

TSensrvConditionSetType aConditionSetTypeDefines logical operator to be used for the condition set.

NewLC(TSensrvConditionSetType)

IMPORT_C CSensrvChannelConditionSet *NewLC(TSensrvConditionSetTypeaConditionSetType)[static]

Two-phase constructor

S60 5.0

Pointer to created object

leave

KErrNoMemory

leave

One of the system-wide error codes

Parameters

TSensrvConditionSetType aConditionSetTypeDefines logical operator to be used for the condition set.