diff options
| author | Szczepan Zalega <szczepan@nitrokey.com> | 2018-06-19 15:08:13 +0200 | 
|---|---|---|
| committer | Szczepan Zalega <szczepan@nitrokey.com> | 2018-06-19 15:08:13 +0200 | 
| commit | b46dbfa63f344cd7e5323139cf71cd100a179682 (patch) | |
| tree | 211be3e046dc4b398f7653b78c226d61626e9e68 /NK_C_API.cc | |
| parent | 9eb759fc6fa0b41ecfbe366b56384e3eb97dd081 (diff) | |
| parent | 57c0b8c1235c5bff3640e85a8e17be20e8f422f3 (diff) | |
| download | libnitrokey-b46dbfa63f344cd7e5323139cf71cd100a179682.tar.gz libnitrokey-b46dbfa63f344cd7e5323139cf71cd100a179682.tar.bz2  | |
Merge branch 'pr_117'
Library version getter for C API
Fixes #117
Fixes #35
Fixes #62
Diffstat (limited to 'NK_C_API.cc')
| -rw-r--r-- | NK_C_API.cc | 13 | 
1 files changed, 13 insertions, 0 deletions
diff --git a/NK_C_API.cc b/NK_C_API.cc index f6a6153..00694c7 100644 --- a/NK_C_API.cc +++ b/NK_C_API.cc @@ -27,6 +27,7 @@  #include "libnitrokey/LibraryException.h"  #include "libnitrokey/cxx_semantics.h"  #include "libnitrokey/stick20_commands.h" +#include "version.h"  #ifdef _MSC_VER  #ifdef _WIN32 @@ -338,6 +339,18 @@ extern "C" {  		m->set_loglevel(level);  	} +	NK_C_API unsigned int NK_get_major_library_version() { +		return get_major_library_version(); +	} + +	NK_C_API unsigned int NK_get_minor_library_version() { +		return get_minor_library_version(); +	} + +	NK_C_API const char* NK_get_library_version() { +		return get_library_version(); +	} +  	NK_C_API int NK_totp_set_time(uint64_t time) {  		auto m = NitrokeyManager::instance();  		return get_without_result([&]() {  | 
