Digital Authentication Framework 4.2.0.30
|
Interface to "session" object. More...
#include <DigitalAuthenticationFramework.h>
Public Member Functions | |
virtual | ~DASession () |
virtual destructor | |
virtual DADevice & | getDevice ()=0 |
Get reference to device object for this session. | |
virtual DAMetaData & | getInfo ()=0 |
Get metadata object describing connected device. | |
virtual bool | isConnected ()=0 |
Check if communication to device is currently working. | |
virtual int | getKeyCount ()=0 |
Get number of keys that this session has access to. | |
virtual DAKey * | getKey (int index)=0 |
Get key by index. | |
virtual DAKey * | getKey (const std::string &serial)=0 |
Get key by serial number. | |
virtual DAError & | getLastError ()=0 |
Return current error status. |
Interface to "session" object.
A session represents a live connection to a device. Keys are only visible when the device is connected.
virtual DASession.~DASession | ( | ) | [virtual] |
virtual destructor
virtual DAMetaData& DASession.getInfo | ( | ) | [pure virtual] |
Get metadata object describing connected device.
Note that at present, we don't have any attributes which are session-specific, so this can return the same information as DADevice.getInfo().
virtual DAKey* DASession.getKey | ( | int | index | ) | [pure virtual] |
Get key by index.
index | - Key index from 0 to DASession.GetKeyCount()-1 Note that there is no promise that key indices remain consistent between different sessions; this method is largely useful for enumerating all keys within one session. |
virtual DAKey* DASession.getKey | ( | const std::string & | serial | ) | [pure virtual] |
Get key by serial number.
serial | - serial number string; if the call succeeds this will exactly match the DA_SERIAL attribute from the returned key. |
virtual int DASession.getKeyCount | ( | ) | [pure virtual] |
Get number of keys that this session has access to.
virtual DAError& DASession.getLastError | ( | ) | [pure virtual] |
Return current error status.
You can check this at any time, even if no error has occurred.
virtual bool DASession.isConnected | ( | ) | [pure virtual] |
Check if communication to device is currently working.
May be used to poll for user-initiated device disconnection. Generally, you'll have to delete the session and recreate it once the connection has been dropped.