diff options
-rw-r--r-- | include/libimobiledevice/libimobiledevice.h | 7 | ||||
-rw-r--r-- | src/idevice.c | 8 |
2 files changed, 15 insertions, 0 deletions
diff --git a/include/libimobiledevice/libimobiledevice.h b/include/libimobiledevice/libimobiledevice.h index 66b4145..a9d270b 100644 --- a/include/libimobiledevice/libimobiledevice.h +++ b/include/libimobiledevice/libimobiledevice.h | |||
@@ -400,6 +400,13 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_get_handle(idevice_t device, uint32 | |||
400 | */ | 400 | */ |
401 | LIBIMOBILEDEVICE_API idevice_error_t idevice_get_udid(idevice_t device, char **udid); | 401 | LIBIMOBILEDEVICE_API idevice_error_t idevice_get_udid(idevice_t device, char **udid); |
402 | 402 | ||
403 | /** | ||
404 | * Returns a static string of the libimobiledevice version. | ||
405 | * | ||
406 | * @return The libimobiledevice version as static ascii string | ||
407 | */ | ||
408 | LIBIMOBILEDEVICE_API const char* libimobiledevice_version(); | ||
409 | |||
403 | #ifdef __cplusplus | 410 | #ifdef __cplusplus |
404 | } | 411 | } |
405 | #endif | 412 | #endif |
diff --git a/src/idevice.c b/src/idevice.c index ed1cf3c..b9bbb1f 100644 --- a/src/idevice.c +++ b/src/idevice.c | |||
@@ -219,6 +219,14 @@ BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpReserved) | |||
219 | #warning No compiler support for constructor/destructor attributes, some features might not be available. | 219 | #warning No compiler support for constructor/destructor attributes, some features might not be available. |
220 | #endif | 220 | #endif |
221 | 221 | ||
222 | const char* libimobiledevice_version() | ||
223 | { | ||
224 | #ifndef PACKAGE_VERSION | ||
225 | #error PACKAGE_VERSION is not defined! | ||
226 | #endif | ||
227 | return PACKAGE_VERSION; | ||
228 | } | ||
229 | |||
222 | struct idevice_subscription_context { | 230 | struct idevice_subscription_context { |
223 | idevice_event_cb_t callback; | 231 | idevice_event_cb_t callback; |
224 | void *user_data; | 232 | void *user_data; |