TCapabilitySet Class Reference

class TCapabilitySet

Class representing an arbitrary set of capabilities.

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

Public Member Functions
TCapabilitySet()
TCapabilitySet(TCapability)
TCapabilitySet(TCapability, TCapability)
IMPORT_C voidAddCapability(TCapability)
IMPORT_C TBoolHasCapabilities(const TCapabilitySet &)
IMPORT_C TBoolHasCapability(TCapability)
IMPORT_C voidIntersection(const TCapabilitySet &)
TBool NotEmpty()
IMPORT_C voidRemove(const TCapabilitySet &)
IMPORT_C voidRemoveCapability(TCapability)
voidSet(TCapability)
voidSet(TCapability, TCapability)
IMPORT_C voidSetAllSupported()
IMPORT_C voidSetDisabled()
IMPORT_C voidSetEmpty()
IMPORT_C voidUnion(const TCapabilitySet &)
Private Attributes
TUint32 iCaps

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.

Parameters

TCapability aCapabilityThe single capability

TCapabilitySet(TCapability, TCapability)

IMPORT_CTCapabilitySet(TCapabilityaCapability1,
TCapabilityaCapability2
)

Construct a set consisting of two capabilities.

Parameters

TCapability aCapability1The first capability.
TCapability aCapability2The second capability.

Member Functions 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. TCapabilitySet::SetAllSupported()

Parameters

TCapability 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

Parameters

const TCapabilitySet & aCapabilitiesThe capability set to test

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.

Parameters

TCapability aCapabilityThe capability to test

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'.

Parameters

const TCapabilitySet & aCapabilitiesA capability set

NotEmpty()

TBool NotEmpty()const

Remove(const TCapabilitySet &)

IMPORT_C voidRemove(const TCapabilitySet &aCapabilities)

Remove a set of capabilities from this set.

Parameters

const TCapabilitySet & aCapabilitiesThe set of capabilities to remove

RemoveCapability(TCapability)

IMPORT_C voidRemoveCapability(TCapabilityaCapability)

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

Parameters

TCapability aCapabilityCapability to remove.

Set(TCapability)

voidSet(TCapabilityaCapability)[inline]

Make this set consist of a single capability.

Parameters

TCapability aCapabilityThe single capability.

Set(TCapability, TCapability)

voidSet(TCapabilityaCapability1,
TCapabilityaCapability2
)[inline]

Make this set consist of two capabilities.

Parameters

TCapability aCapability1The first capability.
TCapability 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'.

Parameters

const TCapabilitySet & aCapabilitiesA cpability set

Member Data Documentation

TUint32 iCaps

TUint32 iCaps[private]