class MCTTokenObject |
The base class for all token objects.
Any object representing something managed via a particular token interface should be derived from this class. It provides certain common attributes that all objects must have (e.g. Label, Type, Token, Handle) and code to interact with the token's reference counting code. Token objects themselves are not reference counted, but the token will not be closed while token objects from it remain in existence. (Token objects can implement their own reference counting framework if required.)
v7.0
Public Member Functions | |
---|---|
TCTTokenObjectHandle | Handle() |
const TDesC & | Label() |
IMPORT_C void | Release() |
MCTToken & | Token() |
TUid | Type() |
Protected Member Functions | |
---|---|
MCTTokenObject(MCTToken &) | |
~MCTTokenObject() | |
IMPORT_C void | AddTokenRef() |
IMPORT_C void | DoRelease() |
IMPORT_C | MCTTokenObject | ( | MCTToken & | aToken | ) | [protected] |
Constructor. This needs a token in order to increment the token's reference count.
MCTToken & aToken | The associated token. |
~MCTTokenObject | ( | ) | [protected, inline, pure virtual] |
This destructor is protected as clients should use Release() instead.
Destructor.
Frees all resources owned by the object, prior to its destruction.
IMPORT_C void | DoRelease | ( | ) | [protected, virtual] |
Releases the object once the base-class framework work has been done.
The default implementation simply does a 'delete this', but derived classes can substitute their own behaviour; for instance, to implement reference counting of the token objects themselves.
TCTTokenObjectHandle | Handle | ( | ) | const [pure virtual] |
Gets a handle for the object.
The primary purpose of the handle is to allow token objects to be 'passed' between processes.
TCTTokenObjectHandle for more details.
The handle of the Token Object.
const TDesC & | Label | ( | ) | const [pure virtual] |
Gets the object's human-readable label.
A human-readable label of the object.
IMPORT_C void | Release | ( | ) |
Releases the MCTTokenObject object.
To be called when you have finished with the object.
MCTToken & | Token | ( | ) | const [pure virtual] |
Gets a reference to the associated token.
The associated token.
TUid | Type | ( | ) | const [pure virtual] |
Gets the UID representing the type of the token object.
The meanings of possible UIDs should be documented in the documentation for the interface that returns them.
The UID representing the type of the token object.