From eb55579c1c0e03ea98372280a344c79bb52a1f1a Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Sun, 13 Jan 2019 12:03:06 +0100 Subject: 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. --- libnitrokey/device.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) 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 class Device { -- cgit v1.2.3