aboutsummaryrefslogtreecommitdiff
path: root/NK_C_API.h
diff options
context:
space:
mode:
Diffstat (limited to 'NK_C_API.h')
-rw-r--r--NK_C_API.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/NK_C_API.h b/NK_C_API.h
index 27730c9..b78bde5 100644
--- a/NK_C_API.h
+++ b/NK_C_API.h
@@ -34,6 +34,21 @@
#ifdef __cplusplus
extern "C" {
#endif
+
+ /**
+ * The Nitrokey device models supported by the API.
+ */
+ enum NK_device_model {
+ /**
+ * Nitrokey Pro.
+ */
+ NK_PRO,
+ /**
+ * Nitrokey Storage.
+ */
+ NK_STORAGE
+ };
+
/**
* Set debug level of messages written on stderr
* @param state state=True - most messages, state=False - only errors level
@@ -54,6 +69,13 @@ extern "C" {
NK_C_API int NK_login(const char *device_model);
/**
+ * Connect to device of given model. Currently library can be connected only to one device at once.
+ * @param device_model NK_device_model: NK_PRO: Nitrokey Pro, NK_STORAGE: Nitrokey Storage
+ * @return 1 if connected, 0 if wrong model or cannot connect
+ */
+ NK_C_API int NK_login_enum(NK_device_model device_model);
+
+ /**
* Connect to first available device, starting checking from Pro 1st to Storage 2nd.
* @return 1 if connected, 0 if wrong model or cannot connect
*/