Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: e32cmn.h
Link against: euser.lib

Class TCapabilitySet

class TCapabilitySet;

Description

Class representing an arbitrary set of capabilities.

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

Members

Defined in TCapabilitySet:
AddCapability(), HasCapabilities(), HasCapability(), Intersection(), Remove(), RemoveCapability(), Set(), Set(), SetAllSupported(), SetEmpty(), TCapabilitySet(), TCapabilitySet(), TCapabilitySet(), Union()


Construction and destruction


TCapabilitySet()

inline TCapabilitySet();

Description

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


TCapabilitySet()

inline TCapabilitySet(TCapability aCapability);

Description

Construct a set consisting of a single capability.

Parameters

TCapability aCapability

The single capability


TCapabilitySet()

IMPORT_C TCapabilitySet(TCapability aCapability1, TCapability aCapability2);

Description

Construct a set consisting of two capabilities.

Parameters

TCapability aCapability1

The first capability.

TCapability aCapability2

The second capability.

[Top]


Member functions


SetEmpty()

IMPORT_C void SetEmpty();

Description

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


Set()

inline void Set(TCapability aCapability);

Description

Make this set consist of a single capability.

Parameters

TCapability aCapability

The single capability.


Set()

inline void Set(TCapability aCapability1, TCapability aCapability2);

Description

Make this set consist of two capabilities.

Parameters

TCapability aCapability1

The first capability.

TCapability aCapability2

The second capability.


SetAllSupported()

IMPORT_C void SetAllSupported();

Description

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


AddCapability()

IMPORT_C void AddCapability(TCapability aCapability);

Description

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.

Parameters

TCapability aCapability

Capability to add.

See also:


RemoveCapability()

IMPORT_C void RemoveCapability(TCapability aCapability);

Description

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

Parameters

TCapability aCapability

Capability to remove.


Union()

IMPORT_C void Union(const TCapabilitySet &aCapabilities);

Description

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

Parameters

const TCapabilitySet &aCapabilities

A cpability set


Intersection()

IMPORT_C void Intersection(const TCapabilitySet &aCapabilities);

Description

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

Parameters

const TCapabilitySet &aCapabilities

A capability set


Remove()

IMPORT_C void Remove(const TCapabilitySet &aCapabilities);

Description

Remove a set of capabilities from this set.

Parameters

const TCapabilitySet &aCapabilities

The set of capabilities to remove


HasCapability()

IMPORT_C TBool HasCapability(TCapability aCapability) const;

Description

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

Parameters

TCapability aCapability

The capability to test

Return value

TBool

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


HasCapabilities()

IMPORT_C TBool HasCapabilities(const TCapabilitySet &aCapabilities) const;

Description

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

Parameters

const TCapabilitySet &aCapabilities

The capability set to test

Return value

TBool

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