aboutsummaryrefslogtreecommitdiff
path: root/libnitrokey/NitrokeyManager.h
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2020-07-28 12:29:43 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2020-07-28 12:29:56 +0200
commitdc1cfa6252073ac345412e7df9c5cc0365bb7f11 (patch)
treea62eccae0fbc7317c3bf67db4cb8ceb79dfd96e7 /libnitrokey/NitrokeyManager.h
parent145149d65915e3f2eb068032b428ee5cfc0295c9 (diff)
downloadlibnitrokey-dc1cfa6252073ac345412e7df9c5cc0365bb7f11.tar.gz
libnitrokey-dc1cfa6252073ac345412e7df9c5cc0365bb7f11.tar.bz2
Extract Nitrokey Storage only features to separate unit
Diffstat (limited to 'libnitrokey/NitrokeyManager.h')
-rw-r--r--libnitrokey/NitrokeyManager.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/libnitrokey/NitrokeyManager.h b/libnitrokey/NitrokeyManager.h
index 163a799..ba61793 100644
--- a/libnitrokey/NitrokeyManager.h
+++ b/libnitrokey/NitrokeyManager.h
@@ -40,10 +40,15 @@ namespace nitrokey {
using namespace nitrokey::proto;
using namespace nitrokey::log;
+template <typename T>
+typename T::CommandPayload get_payload(){
+ //Create, initialize and return by value command payload
+ typename T::CommandPayload st;
+ bzero(&st, sizeof(st));
+ return st;
+}
-#ifdef __WIN32
-char * strndup(const char* str, size_t maxlen);
-#endif
+#include "nk_strndup.h"
class NitrokeyManager {
public: