summaryrefslogtreecommitdiff
path: root/monitor
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2013-06-11 13:33:23 +0200
committerOndrej Holy <oholy@redhat.com>2013-06-18 17:15:16 +0200
commit80d83ce120fc0af69ef61abfeea96604c0190cad (patch)
tree5e0f4c9a2ae40aef9ef219d6bfe9e9232af758d6 /monitor
parent6c61bf71944952ff7e71e92bb3c1c972053f5f7a (diff)
downloadgvfs-80d83ce120fc0af69ef61abfeea96604c0190cad.tar.gz
afc: Update to libimobiledevice new api
https://bugzilla.redhat.com/show_bug.cgi?id=951731
Diffstat (limited to 'monitor')
-rw-r--r--monitor/afc/afcvolume.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/monitor/afc/afcvolume.c b/monitor/afc/afcvolume.c
index 9829077c..4801254d 100644
--- a/monitor/afc/afcvolume.c
+++ b/monitor/afc/afcvolume.c
@@ -80,6 +80,12 @@ _g_vfs_afc_volume_update_metadata (GVfsAfcVolume *self)
guint retries;
plist_t value;
char *model, *display_name;
+#ifdef HAVE_LIBIMOBILEDEVICE_1_1_5
+ lockdownd_service_descriptor_t lockdown_service = NULL;
+#else
+ guint16 port;
+#endif
+ lockdownd_error_t lerr;
retries = 0;
do {
@@ -94,14 +100,18 @@ _g_vfs_afc_volume_update_metadata (GVfsAfcVolume *self)
if (self->service != NULL)
{
- guint16 port;
-
if (lockdownd_client_new_with_handshake (dev, &lockdown_cli, "gvfs-afc-volume-monitor") != LOCKDOWN_E_SUCCESS)
{
idevice_free (dev);
return 0;
}
- if (lockdownd_start_service(lockdown_cli, "com.apple.mobile.house_arrest", &port) != LOCKDOWN_E_SUCCESS)
+#ifdef HAVE_LIBIMOBILEDEVICE_1_1_5
+ lerr = lockdownd_start_service(lockdown_cli, "com.apple.mobile.house_arrest", &lockdown_service);
+ lockdownd_service_descriptor_free (lockdown_service);
+#else
+ lerr = lockdownd_start_service(lockdown_cli, "com.apple.mobile.house_arrest", &port);
+#endif
+ if (lerr != LOCKDOWN_E_SUCCESS)
{
idevice_free (dev);
return 0;