#include <ct/tcttokenobjecthandle.h>
Link against: ctframework.lib
class TCTTokenObjectHandle |
Public Attributes | |
---|---|
TInt | iObjectId |
TCTTokenHandle | iTokenHandle |
Public Member Functions | |
---|---|
TCTTokenObjectHandle() | |
TCTTokenObjectHandle(TCTTokenHandle, TInt) | |
TCTTokenObjectHandle(const TCTTokenObjectHandle &) | |
TBool | operator!=(const TCTTokenObjectHandle &) |
IMPORT_C TBool | operator==(const TCTTokenObjectHandle &) |
Defines a handle to an object represented by a class which is a subclass of the MCTTokenObject class.
The handle identifies the object, not the instance of the subclass of MCTTokenObject used to manage that object. It is guaranteed to be unique within the context of a specific device (e.g. mobile phone, etc.) at a specific point in time. This limitation in time is due to the fact that objects can be created and destroyed. We cannot guarantee that a handle will still point to the same object after we add or remove one or more objects from the store from which the object comes. However, it is guaranteed that the addition of objects to the store will not affect the validity of the handles that were obtained previously. For instance, if the object is a certificate in a certificate store, the subclass of MCTTokenObject will be CCTCertInfo and the handle will identify the certificate in the certificate store, not the instance of CCTCertInfo.
The handle is especially useful for communication across process boundaries. For example: a process (A) can get a handle to an object, and then give the handle to another process (B). This process (B) can then try to get the same object using that handle.
TInt | iObjectId |
The identifier of the object within the Token.
This is unique within the context of a particular Token and only at a specific point in time.
TCTTokenHandle | iTokenHandle |
The handle that identifies the Token where the object is stored.
IMPORT_C | TCTTokenObjectHandle | ( | ) |
Creates an invalid handle.
An invalid handle has an invalid iTokenHandle and an iObjectId equal to 0.
IMPORT_C | TCTTokenObjectHandle | ( | TCTTokenHandle | aTokenHandle, |
TInt | aObjectId | |||
) |
Creates a handle.
Parameters | |
---|---|
aTokenHandle | The handle that identifies the Token where the object is stored. |
aObjectId | The identifier of the object within the Token. |
IMPORT_C | TCTTokenObjectHandle | ( | const TCTTokenObjectHandle & | aTokenHandle | ) |
Copy Constructor.
Parameters | |
---|---|
aTokenHandle | The handle to copy. |
IMPORT_C TBool | operator== | ( | const TCTTokenObjectHandle & | aTokenHandle | ) | const |
Equality operator.
Tests whether this TCTTokenObjectHandle object is equal to the specified TCTTokenObjectHandle object.
Parameters | |
---|---|
aTokenHandle | The TCTTokenObjectHandle object to be compared. |