Skip to content

Commit 90cbfee

Browse files
committed
Add irecv_version() function to interface
1 parent 447ae09 commit 90cbfee

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

include/libirecovery.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ IRECV_API const char* irecv_strerror(irecv_error_t error);
127127
IRECV_API void irecv_init(void); /* deprecated: libirecovery has constructor now */
128128
IRECV_API void irecv_exit(void); /* deprecated: libirecovery has destructor now */
129129

130+
IRECV_API const char* irecv_version();
131+
130132
/* device connectivity */
131133
IRECV_API irecv_error_t irecv_open_with_ecid(irecv_client_t* client, uint64_t ecid);
132134
IRECV_API irecv_error_t irecv_open_with_ecid_and_attempts(irecv_client_t* pclient, uint64_t ecid, int attempts);

src/libirecovery.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3053,6 +3053,15 @@ void irecv_set_debug_level(int level)
30533053
#endif
30543054
}
30553055

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+
30563065
#ifndef USE_DUMMY
30573066
static irecv_error_t irecv_send_command_raw(irecv_client_t client, const char* command, uint8_t b_request)
30583067
{

0 commit comments

Comments
 (0)