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.

Parameters
aCapabilityThe single capability

TCapabilitySet ( TCapability, TCapability )

IMPORT_CTCapabilitySet(TCapabilityaCapability1,
TCapabilityaCapability2
)

Construct a set consisting of two capabilities.

Parameters
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()

Parameters
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
aCapabilitiesThe capability set to test
Return Value
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.

Parameters
aCapabilityThe capability to test
Return Value
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'.

Parameters
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
aCapabilitiesThe set of capabilities to remove

RemoveCapability ( TCapability )

IMPORT_C voidRemoveCapability(TCapabilityaCapability)

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

Parameters
aCapabilityCapability to remove.

Set ( TCapability )

voidSet(TCapabilityaCapability)[inline]

Make this set consist of a single capability.

Parameters
aCapabilityThe single capability.

Set ( TCapability, TCapability )

voidSet(TCapabilityaCapability1,
TCapabilityaCapability2
)[inline]

Make this set consist of two capabilities.

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

Parameters
aCapabilitiesA cpability set