TCapabilitySet Class Reference

#include <e32cmn.h>

class TCapabilitySet

Detailed Description

Class representing an arbitrary set of capabilities.

This class can only contain capabilities supported by the current OS version.

Constructor & Destructor Documentation

TCapabilitySet ( )

TCapabilitySet()[inline]

Default constructor. This leaves the set in an undefned state.

TCapabilitySet ( TCapability )

TCapabilitySet(TCapabilityaCapability)[inline]

Construct a set consisting of a single capability.

ParameterDescription
aCapabilityThe single capability

TCapabilitySet ( TCapability, TCapability )

IMPORT_CTCapabilitySet(TCapabilityaCapability1,
TCapabilityaCapability2
)

Construct a set consisting of two capabilities.

ParameterDescription
aCapability1The first capability.
aCapability2The second capability.

Member Function Documentation

AddCapability ( TCapability )

IMPORT_C voidAddCapability(TCapabilityaCapability)

Add a single capability to the set. If the capability is not supported by this OS version then it is not added and the set is left unchanged.

See also: TCapabilitySet::SetAllSupported()

ParameterDescription
aCapabilityCapability to add.

HasCapabilities ( const TCapabilitySet & )

IMPORT_C TBoolHasCapabilities(const TCapabilitySet &aCapabilities)const

Test if all the capabilities in a given set are present in this set

ParameterDescription
aCapabilitiesThe capability set to test

Returns: A non-zero value if all the capabilities are present, zero otherwise.

HasCapability ( TCapability )

IMPORT_C TBoolHasCapability(TCapabilityaCapability)const

Test if a single capability is present in the set. The capability ECapability_None is always treated as being present.

ParameterDescription
aCapabilityThe capability to test

Returns: 1 if the capability is present, 0 if it is not.

Intersection ( const TCapabilitySet & )

IMPORT_C voidIntersection(const TCapabilitySet &aCapabilities)

Perform an intersection of this capability set with another. The result replaces the content of 'this'.

ParameterDescription
aCapabilitiesA capability set

NotEmpty ( )

TBool NotEmpty()const

Remove ( const TCapabilitySet & )

IMPORT_C voidRemove(const TCapabilitySet &aCapabilities)

Remove a set of capabilities from this set.

ParameterDescription
aCapabilitiesThe set of capabilities to remove

RemoveCapability ( TCapability )

IMPORT_C voidRemoveCapability(TCapabilityaCapability)

Remove a single capability from the set, if it is present.

ParameterDescription
aCapabilityCapability to remove.

Set ( TCapability )

voidSet(TCapabilityaCapability)[inline]

Make this set consist of a single capability.

ParameterDescription
aCapabilityThe single capability.

Set ( TCapability, TCapability )

voidSet(TCapabilityaCapability1,
TCapabilityaCapability2
)[inline]

Make this set consist of two capabilities.

ParameterDescription
aCapability1The first capability.
aCapability2The second capability.

SetAllSupported ( )

IMPORT_C voidSetAllSupported()

Make this set consist of all capabilities supported by this OS version.

SetDisabled ( )

IMPORT_C voidSetDisabled()

Make this set consist of the capabilities which are disabled on this platform.

SetEmpty ( )

IMPORT_C voidSetEmpty()

Make this set empty. I.e. Containing no capabilities.

Union ( const TCapabilitySet & )

IMPORT_C voidUnion(const TCapabilitySet &aCapabilities)

Perform a union of this capability set with another. The result replaces the content of 'this'.

ParameterDescription
aCapabilitiesA cpability set