diff options
author | 2024-03-07 19:29:37 +0100 | |
---|---|---|
committer | 2024-03-07 19:29:37 +0100 | |
commit | 90cbfee714ff7ade4d004a05aa31b96bddfcd71f (patch) | |
tree | 309fe7f186a8486fb0a0041f187bfcfeb198b9af | |
parent | 447ae096e4debbcfe63a875154074159cbd551e0 (diff) | |
download | libirecovery-90cbfee714ff7ade4d004a05aa31b96bddfcd71f.tar.gz libirecovery-90cbfee714ff7ade4d004a05aa31b96bddfcd71f.tar.bz2 |
Add irecv_version() function to interface
-rw-r--r-- | include/libirecovery.h | 2 | ||||
-rw-r--r-- | src/libirecovery.c | 9 |
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); | |||
127 | IRECV_API void irecv_init(void); /* deprecated: libirecovery has constructor now */ | 127 | IRECV_API void irecv_init(void); /* deprecated: libirecovery has constructor now */ |
128 | IRECV_API void irecv_exit(void); /* deprecated: libirecovery has destructor now */ | 128 | IRECV_API void irecv_exit(void); /* deprecated: libirecovery has destructor now */ |
129 | 129 | ||
130 | IRECV_API const char* irecv_version(); | ||
131 | |||
130 | /* device connectivity */ | 132 | /* device connectivity */ |
131 | IRECV_API irecv_error_t irecv_open_with_ecid(irecv_client_t* client, uint64_t ecid); | 133 | IRECV_API irecv_error_t irecv_open_with_ecid(irecv_client_t* client, uint64_t ecid); |
132 | IRECV_API irecv_error_t irecv_open_with_ecid_and_attempts(irecv_client_t* pclient, uint64_t ecid, int attempts); | 134 | 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) | |||
3053 | #endif | 3053 | #endif |
3054 | } | 3054 | } |
3055 | 3055 | ||
3056 | const char* irecv_version() | ||
3057 | { | ||
3058 | #ifndef PACKAGE_VERSION | ||
3059 | #error PACKAGE_VERSION is not defined! | ||
3060 | #endif | ||
3061 | return PACKAGE_VERSION; | ||
3062 | } | ||
3063 | |||
3064 | |||
3056 | #ifndef USE_DUMMY | 3065 | #ifndef USE_DUMMY |
3057 | static irecv_error_t irecv_send_command_raw(irecv_client_t client, const char* command, uint8_t b_request) | 3066 | static irecv_error_t irecv_send_command_raw(irecv_client_t client, const char* command, uint8_t b_request) |
3058 | { | 3067 | { |