Skip to content

Commit

Permalink
Add libusbmuxd_version() function to interface
Browse files Browse the repository at this point in the history
  • Loading branch information
nikias committed Mar 26, 2024
1 parent 07cd6f7 commit a435ebf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/usbmuxd.h
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,13 @@ USBMUXD_API void libusbmuxd_set_use_inotify(int set);

USBMUXD_API void libusbmuxd_set_debug_level(int level);

/**
* Returns a static string of the libusbmuxd version.
*
* @return The libusbmuxd version as static ascii string
*/
USBMUXD_API const char* libusbmuxd_version();

#ifdef __cplusplus
}
#endif
Expand Down
8 changes: 8 additions & 0 deletions src/libusbmuxd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1803,3 +1803,11 @@ void libusbmuxd_set_debug_level(int level)
libusbmuxd_debug = level;
socket_set_verbose(level);
}

const char* libusbmuxd_version()
{
#ifndef PACKAGE_VERSION
#error PACKAGE_VERSION is not defined
#endif
return PACKAGE_VERSION;
}

0 comments on commit a435ebf

Please sign in to comment.