diff options
Diffstat (limited to 'NK_C_API.h')
-rw-r--r-- | NK_C_API.h | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -41,14 +41,18 @@ extern "C" { * The Nitrokey device models supported by the API. */ enum NK_device_model { + /** + * Use, if no supported device is connected + */ + NK_DISCONNECTED = 0, /** * Nitrokey Pro. */ - NK_PRO, + NK_PRO = 1, /** * Nitrokey Storage. */ - NK_STORAGE + NK_STORAGE = 2 }; /** @@ -90,15 +94,12 @@ extern "C" { NK_C_API int NK_logout(); /** - * Query the model of the connected device. If the out argument is - * NULL or if there is no connected device, this function returns - * false. Otherwise it returns true and sets the target of the out - * pointer to the model of the connected device. + * Query the model of the connected device. + * Returns the model of the connected device or NK_DISCONNECTED. * - * @param out a pointer to write the model to * @return true if a device is connected and the out argument has been set */ - NK_C_API bool NK_get_device_model(enum NK_device_model *out); + NK_C_API enum NK_device_model NK_get_device_model(); /** * Return the debug status string. Debug purposes. |