aboutsummaryrefslogtreecommitdiff
path: root/libnitrokey
diff options
context:
space:
mode:
authorRobin Krahl <me@robin-krahl.de>2019-01-13 12:04:12 +0100
committerRobin Krahl <me@robin-krahl.de>2019-01-13 12:04:12 +0100
commit6c52c50d59eafa5acc7ae650695f199b7a014841 (patch)
treee76c59dde7ddf2cba0873487901bdee4a31513df /libnitrokey
parentd0d934e8333cffe093569b9f48a10b3500d1ff60 (diff)
downloadlibnitrokey-6c52c50d59eafa5acc7ae650695f199b7a014841.tar.gz
libnitrokey-6c52c50d59eafa5acc7ae650695f199b7a014841.tar.bz2
Add product_id_to_model function
Diffstat (limited to 'libnitrokey')
-rw-r--r--libnitrokey/device.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libnitrokey/device.h b/libnitrokey/device.h
index 477640f..8fbb385 100644
--- a/libnitrokey/device.h
+++ b/libnitrokey/device.h
@@ -26,6 +26,7 @@
#include <cstdint>
#include <string>
#include <vector>
+#include "misc.h"
#define HID_REPORT_SIZE 65
@@ -64,6 +65,12 @@ extern const uint16_t NITROKEY_PRO_PID;
extern const uint16_t NITROKEY_STORAGE_PID;
/**
+ * Convert the given USB product ID to a Nitrokey model. If there is no model
+ * with that ID, return an absent value.
+ */
+misc::Option<DeviceModel> product_id_to_model(uint16_t product_id);
+
+/**
* Information about a connected device.
*
* This struct contains the information about a connected device returned by