diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2017-12-04 19:21:09 +0100 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2018-02-28 19:23:05 +0100 |
commit | 388cf5fcb33f24bc04f79cd1fbea980214518d54 (patch) | |
tree | 1b57874287d02a1fe339f035ba84a54d3bf1f408 /include/NitrokeyManager.h | |
parent | 2faa8f6782a2e6294ed8849048a281d12d60da1c (diff) | |
download | libnitrokey-388cf5fcb33f24bc04f79cd1fbea980214518d54.tar.gz libnitrokey-388cf5fcb33f24bc04f79cd1fbea980214518d54.tar.bz2 |
List devices by unique SC:SD id
Add C API and tests
Add mutexes
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'include/NitrokeyManager.h')
-rw-r--r-- | include/NitrokeyManager.h | 3 |
1 files changed, 3 insertions, 0 deletions
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<std::string> list_devices(); + std::vector<std::string> 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 <NitrokeyManager> _instance; std::shared_ptr<Device> device; std::unordered_map<std::string, shared_ptr<Device> > connected_devices; + std::unordered_map<std::string, shared_ptr<Device> > connected_devices_byID; stick10::ReadSlot::ResponsePayload get_OTP_slot_data(const uint8_t slot_number); |