summaryrefslogtreecommitdiff
path: root/client/gdaemonfile.c
diff options
context:
space:
mode:
authorChristian Kellner <gicmo@gnome.org>2011-05-12 10:47:36 +0200
committerChristian Kellner <gicmo@gnome.org>2011-05-12 11:21:47 +0200
commit7a2942f7bdf39ebfc31ea90c0685b5890d30964d (patch)
tree0c36327710d74ac62f356eccad5219f13459f5f5 /client/gdaemonfile.c
parent66bc0189d836130768df41900f3cf29723bbd870 (diff)
downloadgvfs-7a2942f7bdf39ebfc31ea90c0685b5890d30964d.tar.gz
Pass mount_info to async_path_call callbacks
Modify all callbacks do_async_path_call () to receive an additional GMountInfo parameter.
Diffstat (limited to 'client/gdaemonfile.c')
-rw-r--r--client/gdaemonfile.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/client/gdaemonfile.c b/client/gdaemonfile.c
index ccb06827..26b88da0 100644
--- a/client/gdaemonfile.c
+++ b/client/gdaemonfile.c
@@ -551,6 +551,7 @@ do_sync_2_path_call (GFile *file1,
typedef void (*AsyncPathCallCallback) (DBusMessage *reply,
DBusConnection *connection,
+ GMountInfo *mount_info,
GSimpleAsyncResult *result,
GCancellable *cancellable,
gpointer callback_data);
@@ -565,6 +566,7 @@ typedef struct {
AsyncPathCallCallback callback;
gpointer callback_data;
GDestroyNotify notify;
+ GMountInfo *mount_info;
} AsyncPathCall;
static void
@@ -581,6 +583,8 @@ async_path_call_free (AsyncPathCall *data)
g_object_unref (data->cancellable);
if (data->args)
dbus_message_unref (data->args);
+ if (data->mount_info)
+ g_mount_info_unref (data->mount_info);
g_free (data);
}
@@ -605,7 +609,9 @@ async_path_call_done (DBusMessage *reply,
g_object_weak_ref (G_OBJECT (result), (GWeakNotify)async_path_call_free, data);
data->result = NULL;
- data->callback (reply, connection,
+ data->callback (reply,
+ connection,
+ data->mount_info,
result,
data->cancellable,
data->callback_data);
@@ -634,6 +640,8 @@ do_async_path_call_callback (GMountInfo *mount_info,
return;
}
+ data->mount_info = g_mount_info_ref (mount_info);
+
message =
dbus_message_new_method_call (mount_info->dbus_id,
mount_info->object_path,
@@ -882,6 +890,7 @@ g_daemon_file_query_info (GFile *file,
static void
query_info_async_cb (DBusMessage *reply,
DBusConnection *connection,
+ GMountInfo *mount_info,
GSimpleAsyncResult *result,
GCancellable *cancellable,
gpointer callback_data)
@@ -999,6 +1008,7 @@ read_async_get_fd_cb (int fd,
static void
read_async_cb (DBusMessage *reply,
DBusConnection *connection,
+ GMountInfo *mount_info,
GSimpleAsyncResult *result,
GCancellable *cancellable,
gpointer callback_data)
@@ -1324,6 +1334,7 @@ mount_mountable_location_mounted_cb (GObject *source_object,
static void
mount_mountable_async_cb (DBusMessage *reply,
DBusConnection *connection,
+ GMountInfo *mount_info,
GSimpleAsyncResult *result,
GCancellable *cancellable,
gpointer callback_data)
@@ -1440,6 +1451,7 @@ g_daemon_file_mount_mountable_finish (GFile *file,
static void
start_mountable_async_cb (DBusMessage *reply,
DBusConnection *connection,
+ GMountInfo *mount_info,
GSimpleAsyncResult *result,
GCancellable *cancellable,
gpointer callback_data)
@@ -1490,6 +1502,7 @@ g_daemon_file_start_mountable_finish (GFile *file,
static void
stop_mountable_async_cb (DBusMessage *reply,
DBusConnection *connection,
+ GMountInfo *mount_info,
GSimpleAsyncResult *result,
GCancellable *cancellable,
gpointer callback_data)
@@ -1543,6 +1556,7 @@ g_daemon_file_stop_mountable_finish (GFile *file,
static void
eject_mountable_async_cb (DBusMessage *reply,
DBusConnection *connection,
+ GMountInfo *mount_info,
GSimpleAsyncResult *result,
GCancellable *cancellable,
gpointer callback_data)
@@ -1613,6 +1627,7 @@ g_daemon_file_eject_mountable_finish (GFile *file,
static void
unmount_mountable_async_cb (DBusMessage *reply,
DBusConnection *connection,
+ GMountInfo *mount_info,
GSimpleAsyncResult *result,
GCancellable *cancellable,
gpointer callback_data)
@@ -1665,6 +1680,7 @@ g_daemon_file_unmount_mountable_with_operation_finish (GFile *file
static void
poll_mountable_async_cb (DBusMessage *reply,
DBusConnection *connection,
+ GMountInfo *mount_info,
GSimpleAsyncResult *result,
GCancellable *cancellable,
gpointer callback_data)
@@ -1862,6 +1878,7 @@ g_daemon_file_query_filesystem_info (GFile *file,
static void
query_fs_info_async_cb (DBusMessage *reply,
DBusConnection *connection,
+ GMountInfo *mount_info,
GSimpleAsyncResult *result,
GCancellable *cancellable,
gpointer callback_data)
@@ -2630,6 +2647,7 @@ out:
static void
append_to_async_cb (DBusMessage *reply,
DBusConnection *connection,
+ GMountInfo *mount_info,
GSimpleAsyncResult *result,
GCancellable *cancellable,
gpointer callback_data)
@@ -2714,6 +2732,7 @@ g_daemon_file_append_to_finish (GFile *file,
static void
create_async_cb (DBusMessage *reply,
DBusConnection *connection,
+ GMountInfo *mount_info,
GSimpleAsyncResult *result,
GCancellable *cancellable,
gpointer callback_data)
@@ -2796,6 +2815,7 @@ g_daemon_file_create_finish (GFile *file,
static void
enumerate_children_async_cb (DBusMessage *reply,
DBusConnection *connection,
+ GMountInfo *mount_info,
GSimpleAsyncResult *result,
GCancellable *cancellable,
gpointer callback_data)
@@ -2977,6 +2997,7 @@ g_daemon_file_find_enclosing_mount_finish (GFile *file,
static void
replace_async_cb (DBusMessage *reply,
DBusConnection *connection,
+ GMountInfo *mount_info,
GSimpleAsyncResult *result,
GCancellable *cancellable,
gpointer callback_data)
@@ -3058,6 +3079,7 @@ g_daemon_file_replace_finish (GFile *file,
static void
set_display_name_async_cb (DBusMessage *reply,
DBusConnection *connection,
+ GMountInfo *mount_info,
GSimpleAsyncResult *result,
GCancellable *cancellable,
gpointer callback_data)