diff options
| author | Robin Krahl <me@robin-krahl.de> | 2019-01-13 12:03:06 +0100 | 
|---|---|---|
| committer | Robin Krahl <me@robin-krahl.de> | 2019-01-13 12:03:06 +0100 | 
| commit | eb55579c1c0e03ea98372280a344c79bb52a1f1a (patch) | |
| tree | 3fbe9c0f64099ed48bd96558534ff22b9ff2f698 | |
| parent | 1f3da5c76acb20b2183ac52373ed3b0b63e1151e (diff) | |
| download | libnitrokey-eb55579c1c0e03ea98372280a344c79bb52a1f1a.tar.gz libnitrokey-eb55579c1c0e03ea98372280a344c79bb52a1f1a.tar.bz2 | |
Add DeviceInfo struct for enumeration
This is a preparation for a future patch that will change the enumerate
method to return a vector of DeviceInfo instances instead of a vector of
strings.
| -rw-r--r-- | libnitrokey/device.h | 21 | 
1 files changed, 21 insertions, 0 deletions
| diff --git a/libnitrokey/device.h b/libnitrokey/device.h index f6d2380..1183c9c 100644 --- a/libnitrokey/device.h +++ b/libnitrokey/device.h @@ -50,6 +50,27 @@ enum class DeviceModel{      STORAGE  }; +/** + * Information about a connected device. + * + * This struct contains the information about a connected device returned by + * hidapi when enumerating the connected devices. + */ +struct DeviceInfo { +    /** +     * The model of the connected device. +     */ +    DeviceModel m_deviceModel; +    /** +     * The USB connection path for the device. +     */ +    std::string m_path; +    /** +     * The serial number of the device. +     */ +    std::wstring m_serialNumber; +}; +  #include <atomic>  class Device { | 
