aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2017-04-25 22:26:16 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2017-04-26 10:10:30 +0200
commit55473f8c6d8d623992f2fffcbcc28749c118ab6d (patch)
tree2f3e247e538b7e428927f84c85a330ff6a3285e9
parent214d9db2a3a2c28ee385454f80c53f7fab290bf8 (diff)
downloadlibnitrokey-55473f8c6d8d623992f2fffcbcc28749c118ab6d.tar.gz
libnitrokey-55473f8c6d8d623992f2fffcbcc28749c118ab6d.tar.bz2
Fix includes in C_API
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
-rw-r--r--NK_C_API.cc6
-rw-r--r--NK_C_API.h5
2 files changed, 5 insertions, 6 deletions
diff --git a/NK_C_API.cc b/NK_C_API.cc
index 5d8c3f4..0e3fa1f 100644
--- a/NK_C_API.cc
+++ b/NK_C_API.cc
@@ -1,5 +1,7 @@
-#include <cstring>
#include "NK_C_API.h"
+#include <iostream>
+#include "include/NitrokeyManager.h"
+#include <cstring>
#include "include/LibraryException.h"
#include "include/cxx_semantics.h"
@@ -8,7 +10,6 @@ using namespace nitrokey;
static uint8_t NK_last_command_status = 0;
static const int max_string_field_length = 100;
-
template <typename T>
T* duplicate_vector_and_clear(std::vector<T> &v){
auto d = new T[v.size()];
@@ -169,6 +170,7 @@ void clear_string(std::string &s){
std::fill(s.begin(), s.end(), ' ');
}
+
NK_C_API const char * NK_status() {
auto m = NitrokeyManager::instance();
return get_with_string_result([&](){
diff --git a/NK_C_API.h b/NK_C_API.h
index 97e9ea5..430fa38 100644
--- a/NK_C_API.h
+++ b/NK_C_API.h
@@ -1,10 +1,7 @@
#ifndef LIBNITROKEY_NK_C_API_H
#define LIBNITROKEY_NK_C_API_H
-#include <iostream>
-#include <string>
-#include "include/NitrokeyManager.h"
-#include "include/inttypes.h"
+#include <stdint.h>
#define NK_C_API