64 lines
1.9 KiB
Diff
64 lines
1.9 KiB
Diff
|
commit 119c9c27ac74d4e0f2941a66143afde2b3c64870
|
||
|
Author: David Sansome <m...@davidsansome.com>
|
||
|
Date: Tue Mar 27 21:24:38 2012 +0100
|
||
|
|
||
|
Detect libimobiledevice 1.1.2 and use its new "udid" field instead of "uuid".
|
||
|
|
||
|
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||
|
index c250704..3339ba1 100644
|
||
|
--- a/src/CMakeLists.txt
|
||
|
+++ b/src/CMakeLists.txt
|
||
|
@@ -25,6 +25,10 @@ if (QT_VERSION_MINOR GREATER 5)
|
||
|
endif(QT_VERSION_MINOR GREATER 7)
|
||
|
endif(QT_VERSION_MINOR GREATER 5)
|
||
|
|
||
|
+if(ENABLE_IMOBILEDEVICE AND IMOBILEDEVICE_VERSION VERSION_GREATER 1.1.1)
|
||
|
+ set(IMOBILEDEVICE_USES_UDIDS ON)
|
||
|
+endif()
|
||
|
+
|
||
|
include_directories(${CMAKE_BINARY_DIR})
|
||
|
include_directories(${GLIB_INCLUDE_DIRS})
|
||
|
include_directories(${LIBXML_INCLUDE_DIRS})
|
||
|
@@ -1079,6 +1083,7 @@ if(HAVE_IMOBILEDEVICE)
|
||
|
${USBMUXD_LIBRARIES}
|
||
|
gstafcsrc
|
||
|
)
|
||
|
+ link_directories(${IMOBILEDEVICE_LIBRARY_DIRS})
|
||
|
link_directories(${USBMUXD_LIBRARY_DIRS})
|
||
|
endif(HAVE_IMOBILEDEVICE)
|
||
|
|
||
|
diff --git a/src/config.h.in b/src/config.h.in
|
||
|
index aae8b77..e2b1ce5 100644
|
||
|
--- a/src/config.h.in
|
||
|
+++ b/src/config.h.in
|
||
|
@@ -39,6 +39,7 @@
|
||
|
#cmakedefine HAVE_SPOTIFY
|
||
|
#cmakedefine HAVE_STATIC_SQLITE
|
||
|
#cmakedefine HAVE_WIIMOTEDEV
|
||
|
+#cmakedefine IMOBILEDEVICE_USES_UDIDS
|
||
|
#cmakedefine LEOPARD
|
||
|
#cmakedefine SNOW_LEOPARD
|
||
|
#cmakedefine USE_INSTALL_PREFIX
|
||
|
diff --git a/src/devices/ilister.cpp b/src/devices/ilister.cpp
|
||
|
index c0140d9..a27f37b 100644
|
||
|
--- a/src/devices/ilister.cpp
|
||
|
+++ b/src/devices/ilister.cpp
|
||
|
@@ -1,3 +1,4 @@
|
||
|
+#include "config.h"
|
||
|
#include "ilister.h"
|
||
|
#include "imobiledeviceconnection.h"
|
||
|
|
||
|
@@ -17,7 +18,11 @@ void iLister::Init() {
|
||
|
void iLister::EventCallback(const idevice_event_t* event, void* context) {
|
||
|
iLister* me = reinterpret_cast<iLister*>(context);
|
||
|
|
||
|
+#ifdef IMOBILEDEVICE_USES_UDIDS
|
||
|
+ const char* uuid = event->udid;
|
||
|
+#else
|
||
|
const char* uuid = event->uuid;
|
||
|
+#endif
|
||
|
|
||
|
switch (event->event) {
|
||
|
case IDEVICE_DEVICE_ADD:
|
||
|
|