#include <ct/mcttokenobject.h>
class MCTTokenObject |
Public Member Functions | |
---|---|
pure virtual TCTTokenObjectHandle | Handle() |
pure virtual const TDesC & | Label() |
IMPORT_C void | Release() |
pure virtual MCTToken & | Token() |
pure virtual TUid | Type() |
Protected Member Functions | |
---|---|
MCTTokenObject(MCTToken &) | |
pure virtual | ~MCTTokenObject() |
IMPORT_C void | AddTokenRef() |
virtual IMPORT_C void | DoRelease() |
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.)
IMPORT_C | MCTTokenObject | ( | MCTToken & | aToken | ) | [protected] |
Constructor. This needs a token in order to increment the token's reference count.
Parameter | Description |
---|---|
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.
See also: TCTTokenObjectHandle for more details.
Returns: The handle of the Token Object.
const TDesC & | Label | ( | ) | const [pure virtual] |
Gets the object's human-readable label.
Returns: 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.
Returns: 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.
Returns: The UID representing the type of the token object.