Add libusbmuxd_version() function to interface

This commit is contained in:
Nikias Bassen
2024-03-26 21:21:55 +01:00
parent 07cd6f774f
commit a435ebf661
2 changed files with 15 additions and 0 deletions
+7
View File
@@ -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
+8
View File
@@ -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;
}