summaryrefslogtreecommitdiff
path: root/monitor
diff options
context:
space:
mode:
authorNikias Bassen <nikias@gmx.li>2010-01-31 12:54:44 +0100
committerBastien Nocera <hadess@hadess.net>2010-02-01 16:27:59 +0000
commit3f3f130072c94e38d6f07ef37d425a1c86bddd29 (patch)
treec717beaef2cc480b941cc8efacb657f6df0b1bc7 /monitor
parenta496883e99676e30e56280b7a43551c796552d5f (diff)
downloadgvfs-3f3f130072c94e38d6f07ef37d425a1c86bddd29.tar.gz
Update AFC backend and volume monitor for libimobiledevice 0.9.7
Diffstat (limited to 'monitor')
-rw-r--r--monitor/afc/afcvolume.c22
-rw-r--r--monitor/afc/afcvolumemonitor.c10
2 files changed, 16 insertions, 16 deletions
diff --git a/monitor/afc/afcvolume.c b/monitor/afc/afcvolume.c
index a0413ecb..26da41fd 100644
--- a/monitor/afc/afcvolume.c
+++ b/monitor/afc/afcvolume.c
@@ -9,9 +9,9 @@
#include <glib.h>
#include <gio/gio.h>
-#include <libiphone/libiphone.h>
-#include <libiphone/lockdown.h>
-#include <libiphone/afc.h>
+#include <libimobiledevice/libimobiledevice.h>
+#include <libimobiledevice/lockdown.h>
+#include <libimobiledevice/afc.h>
#include "afcvolume.h"
@@ -71,28 +71,28 @@ g_vfs_afc_volume_class_init (GVfsAfcVolumeClass *klass)
static int
_g_vfs_afc_volume_update_metadata (GVfsAfcVolume *self)
{
- iphone_device_t dev;
+ idevice_t dev;
afc_client_t afc_cli;
lockdownd_client_t lockdown_cli = NULL;
- iphone_error_t err;
+ idevice_error_t err;
guint retries;
char *model, *display_name;
guint16 port;
retries = 0;
do {
- err = iphone_device_new (&dev, self->uuid);
- if (err == IPHONE_E_SUCCESS)
+ err = idevice_new (&dev, self->uuid);
+ if (err == IDEVICE_E_SUCCESS)
break;
g_usleep (G_USEC_PER_SEC);
} while (retries++ < 10);
- if (err != IPHONE_E_SUCCESS)
+ if (err != IDEVICE_E_SUCCESS)
return 0;
if (lockdownd_client_new_with_handshake (dev, &lockdown_cli, "gvfs-afc-volume-monitor") != LOCKDOWN_E_SUCCESS)
{
- iphone_device_free (dev);
+ idevice_free (dev);
return 0;
}
@@ -106,7 +106,7 @@ _g_vfs_afc_volume_update_metadata (GVfsAfcVolume *self)
if (lockdownd_start_service (lockdown_cli, DEFAULT_SERVICE, &port) != LOCKDOWN_E_SUCCESS)
{
lockdownd_client_free (lockdown_cli);
- iphone_device_free (dev);
+ idevice_free (dev);
return 0;
}
@@ -127,7 +127,7 @@ _g_vfs_afc_volume_update_metadata (GVfsAfcVolume *self)
}
lockdownd_client_free (lockdown_cli);
- iphone_device_free (dev);
+ idevice_free (dev);
return 1;
}
diff --git a/monitor/afc/afcvolumemonitor.c b/monitor/afc/afcvolumemonitor.c
index 91b3e418..d10e862b 100644
--- a/monitor/afc/afcvolumemonitor.c
+++ b/monitor/afc/afcvolumemonitor.c
@@ -10,7 +10,7 @@
#include <gvfsproxyvolumemonitordaemon.h>
#include <stdio.h>
#include <gio/gio.h>
-#include <libiphone/libiphone.h>
+#include <libimobiledevice/libimobiledevice.h>
#include "afcvolume.h"
#include "afcvolumemonitor.h"
@@ -70,7 +70,7 @@ g_vfs_afc_monitor_remove_volume (GVfsAfcVolumeMonitor *self,
}
static void
-g_vfs_afc_monitor_iphone_event (const iphone_event_t *event, void *user_data)
+g_vfs_afc_monitor_idevice_event (const idevice_event_t *event, void *user_data)
{
GVfsAfcVolumeMonitor *self;
@@ -78,7 +78,7 @@ g_vfs_afc_monitor_iphone_event (const iphone_event_t *event, void *user_data)
self = G_VFS_AFC_VOLUME_MONITOR(user_data);
- if (event->event == IPHONE_DEVICE_ADD)
+ if (event->event == IDEVICE_DEVICE_ADD)
g_vfs_afc_monitor_create_volume (self, event->uuid);
else
g_vfs_afc_monitor_remove_volume (self, event->uuid);
@@ -95,7 +95,7 @@ g_vfs_afc_volume_monitor_constructor (GType type, guint ncps,
self->volumes = NULL;
- iphone_event_subscribe(g_vfs_afc_monitor_iphone_event, self);
+ idevice_event_subscribe(g_vfs_afc_monitor_idevice_event, self);
g_print ("Volume monitor alive\n");
@@ -119,7 +119,7 @@ g_vfs_afc_volume_monitor_finalize (GObject *_self)
if (self->volumes)
list_free (self->volumes);
- iphone_event_unsubscribe();
+ idevice_event_unsubscribe();
if (G_OBJECT_CLASS(g_vfs_afc_volume_monitor_parent_class)->finalize)
(*G_OBJECT_CLASS(g_vfs_afc_volume_monitor_parent_class)->finalize)( G_OBJECT(self));