aboutsummaryrefslogtreecommitdiff
path: root/NitrokeyManager.cc
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2017-03-09 17:33:56 +0100
committerSzczepan Zalega <szczepan@nitrokey.com>2017-03-11 15:41:53 +0100
commita9c42dea301329136f663ebc9482a1d38feada29 (patch)
treeac8d95ceeb6b79852b24055fa74e94f4e5023703 /NitrokeyManager.cc
parenta3303c491a6f3b9980a91cabe81d5fb643ec8d9a (diff)
downloadlibnitrokey-a9c42dea301329136f663ebc9482a1d38feada29.tar.gz
libnitrokey-a9c42dea301329136f663ebc9482a1d38feada29.tar.bz2
Allow to check is current device visible to the OS
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'NitrokeyManager.cc')
-rw-r--r--NitrokeyManager.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc
index 630a4e4..140d4d3 100644
--- a/NitrokeyManager.cc
+++ b/NitrokeyManager.cc
@@ -129,7 +129,15 @@ namespace nitrokey{
}
}
return false;
+ }
+
+ bool NitrokeyManager::could_current_device_be_enumerated() {
+ std::lock_guard<std::mutex> lock(mex_dev_com);
+ if (device != nullptr) {
+ return device->could_be_enumerated();
}
+ return false;
+ }
void NitrokeyManager::set_debug(bool state) {
if (state){