summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/libirecovery.h2
-rw-r--r--src/libirecovery.c9
2 files changed, 11 insertions, 0 deletions
diff --git a/include/libirecovery.h b/include/libirecovery.h
index f6b9971..7b89d1f 100644
--- a/include/libirecovery.h
+++ b/include/libirecovery.h
@@ -127,6 +127,8 @@ IRECV_API const char* irecv_strerror(irecv_error_t error);
IRECV_API void irecv_init(void); /* deprecated: libirecovery has constructor now */
IRECV_API void irecv_exit(void); /* deprecated: libirecovery has destructor now */
+IRECV_API const char* irecv_version();
+
/* device connectivity */
IRECV_API irecv_error_t irecv_open_with_ecid(irecv_client_t* client, uint64_t ecid);
IRECV_API irecv_error_t irecv_open_with_ecid_and_attempts(irecv_client_t* pclient, uint64_t ecid, int attempts);
diff --git a/src/libirecovery.c b/src/libirecovery.c
index 151cbae..e0b6f84 100644
--- a/src/libirecovery.c
+++ b/src/libirecovery.c
@@ -3053,6 +3053,15 @@ void irecv_set_debug_level(int level)
#endif
}
+const char* irecv_version()
+{
+#ifndef PACKAGE_VERSION
+#error PACKAGE_VERSION is not defined!
+#endif
+ return PACKAGE_VERSION;
+}
+
+
#ifndef USE_DUMMY
static irecv_error_t irecv_send_command_raw(irecv_client_t client, const char* command, uint8_t b_request)
{