1 commit 119c9c27ac74d4e0f2941a66143afde2b3c64870
2 Author: David Sansome <me@davidsansome.com>
3 Date: Tue Mar 27 21:24:38 2012 +0100
5 Detect libimobiledevice 1.1.2 and use its new "udid" field instead of "uuid".
7 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
8 index c250704..3339ba1 100644
9 --- a/src/CMakeLists.txt
10 +++ b/src/CMakeLists.txt
11 @@ -25,6 +25,10 @@ if (QT_VERSION_MINOR GREATER 5)
12 endif(QT_VERSION_MINOR GREATER 7)
13 endif(QT_VERSION_MINOR GREATER 5)
15 +if(ENABLE_IMOBILEDEVICE AND IMOBILEDEVICE_VERSION VERSION_GREATER 1.1.1)
16 + set(IMOBILEDEVICE_USES_UDIDS ON)
19 include_directories(${CMAKE_BINARY_DIR})
20 include_directories(${GLIB_INCLUDE_DIRS})
21 include_directories(${LIBXML_INCLUDE_DIRS})
22 @@ -1079,6 +1083,7 @@ if(HAVE_IMOBILEDEVICE)
26 + link_directories(${IMOBILEDEVICE_LIBRARY_DIRS})
27 link_directories(${USBMUXD_LIBRARY_DIRS})
28 endif(HAVE_IMOBILEDEVICE)
30 diff --git a/src/config.h.in b/src/config.h.in
31 index aae8b77..e2b1ce5 100644
35 #cmakedefine HAVE_SPOTIFY
36 #cmakedefine HAVE_STATIC_SQLITE
37 #cmakedefine HAVE_WIIMOTEDEV
38 +#cmakedefine IMOBILEDEVICE_USES_UDIDS
40 #cmakedefine SNOW_LEOPARD
41 #cmakedefine USE_INSTALL_PREFIX
42 diff --git a/src/devices/ilister.cpp b/src/devices/ilister.cpp
43 index c0140d9..a27f37b 100644
44 --- a/src/devices/ilister.cpp
45 +++ b/src/devices/ilister.cpp
49 #include "imobiledeviceconnection.h"
51 @@ -17,7 +18,11 @@ void iLister::Init() {
52 void iLister::EventCallback(const idevice_event_t* event, void* context) {
53 iLister* me = reinterpret_cast<iLister*>(context);
55 +#ifdef IMOBILEDEVICE_USES_UDIDS
56 + const char* uuid = event->udid;
58 const char* uuid = event->uuid;
61 switch (event->event) {
62 case IDEVICE_DEVICE_ADD: