Interface to "session" object.
More...
#include <DigitalAuthenticationFramework.h>
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 |
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.
- Parameters
-
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. |
- Returns
- Pointer to a key object, or NULL if error. The caller doesn't own this pointer, and shouldn't try to delete it.
virtual DAKey* DASession::getKey |
( |
const std::string & |
serial | ) |
|
|
pure virtual |
Get key by serial number.
- Parameters
-
serial | - serial number string; if the call succeeds this will exactly match the DA_SERIAL attribute from the returned key. |
- Returns
- Pointer to a key object, or NULL if error. The caller doesn't own this pointer, and shouldn't try to delete it.
virtual int DASession::getKeyCount |
( |
| ) |
|
|
pure virtual |
Get number of keys that this session has access to.
- Returns
- Number of keys (>=0), or < 0 if error.
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.
The documentation for this class was generated from the following file: