Digital Authentication Framework  6.0.1.37
Public Member Functions | List of all members
DASession Class Referenceabstract

Interface to "session" object. More...

#include <DigitalAuthenticationFramework.h>

Public Member Functions

virtual ~DASession ()
 virtual destructor More...
 
virtual DADevicegetDevice ()=0
 Get reference to device object for this session.
 
virtual DAMetaDatagetInfo ()=0
 Get metadata object describing connected device. More...
 
virtual bool isConnected ()=0
 Check if communication to device is currently working. More...
 
virtual int getKeyCount ()=0
 Get number of keys that this session has access to. More...
 
virtual DAKeygetKey (int index)=0
 Get key by index. More...
 
virtual DAKeygetKey (const std::string &serial)=0
 Get key by serial number. More...
 
virtual DAErrorgetLastError ()=0
 Return current error status. More...
 

Detailed Description

Interface to "session" object.

A session represents a live connection to a device. Keys are only visible when the device is connected.

Constructor & Destructor Documentation

virtual DASession::~DASession ( )
virtual

virtual destructor

Member Function Documentation

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.

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: