diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2018-12-01 16:01:54 +0100 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2018-12-01 16:01:54 +0100 |
commit | 1236bcee420da713e373a4a6b8cec279749c3d74 (patch) | |
tree | a35c578a6b5666d96bb3733ee868028ddd1acd88 /NK_C_API.cc | |
parent | 57773ad5f7b6eb5e6a2020dd1bd4264bdd823808 (diff) | |
download | libnitrokey-1236bcee420da713e373a4a6b8cec279749c3d74.tar.gz libnitrokey-1236bcee420da713e373a4a6b8cec279749c3d74.tar.bz2 |
Connect with serialconnect_with_serial
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'NK_C_API.cc')
-rw-r--r-- | NK_C_API.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/NK_C_API.cc b/NK_C_API.cc index 7d0a10e..396171c 100644 --- a/NK_C_API.cc +++ b/NK_C_API.cc @@ -125,6 +125,13 @@ extern "C" { return _copy; } + NK_C_API int NK_login_with_serial(const char *serial) { + auto m = NitrokeyManager::instance(); + return get_with_result([&]() { + return m->connect_with_serial(serial); + }); + } + NK_C_API int NK_login(const char *device_model) { auto m = NitrokeyManager::instance(); try { |