From 388cf5fcb33f24bc04f79cd1fbea980214518d54 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Mon, 4 Dec 2017 19:21:09 +0100 Subject: List devices by unique SC:SD id Add C API and tests Add mutexes Signed-off-by: Szczepan Zalega --- include/NitrokeyManager.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/NitrokeyManager.h b/include/NitrokeyManager.h index 2a79922..7ce432f 100644 --- a/include/NitrokeyManager.h +++ b/include/NitrokeyManager.h @@ -69,6 +69,8 @@ char * strndup(const char* str, size_t maxlen); bool erase_totp_slot(uint8_t slot_number, const char *temporary_password); bool erase_hotp_slot(uint8_t slot_number, const char *temporary_password); std::vector list_devices(); + std::vector list_devices_by_cpuID(); + bool connect_with_ID(const std::string id); bool connect_with_path (std::string path); bool connect(const char *device_model); bool connect(); @@ -202,6 +204,7 @@ char * strndup(const char* str, size_t maxlen); static shared_ptr _instance; std::shared_ptr device; std::unordered_map > connected_devices; + std::unordered_map > connected_devices_byID; stick10::ReadSlot::ResponsePayload get_OTP_slot_data(const uint8_t slot_number); -- cgit v1.2.3