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
Since
S60 5.0

Inherits from

Constructor & Destructor Documentation

CSensrvChannelConditionSet()

CSensrvChannelConditionSet ( )

Default constructor.

Member Functions Documentation

AddChannelConditionL(CSensrvChannelCondition *)

void AddChannelConditionL ( 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.

Since
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 * aChannelCondition Channel 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.

Since
S60 5.0

ConditionSetType()

TSensrvConditionSetType ConditionSetType ( ) const [pure virtual]

Get condition set type.

NewL(TSensrvConditionSetType)

IMPORT_C CSensrvChannelConditionSet * NewL ( TSensrvConditionSetType aConditionSetType ) [static]

Two-phase constructor

Since
S60 5.0
leave
KErrNoMemory
leave
One of the system-wide error codes

Parameters

TSensrvConditionSetType aConditionSetType Defines logical operator to be used for the condition set.

NewLC(TSensrvConditionSetType)

IMPORT_C CSensrvChannelConditionSet * NewLC ( TSensrvConditionSetType aConditionSetType ) [static]

Two-phase constructor

Since
S60 5.0
leave
KErrNoMemory
leave
One of the system-wide error codes

Parameters

TSensrvConditionSetType aConditionSetType Defines logical operator to be used for the condition set.