summaryrefslogtreecommitdiff
path: root/client/gdaemonfile.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@gnome.org>2009-06-10 11:36:22 +0200
committerBenjamin Otte <otte@gnome.org>2009-06-10 17:06:41 +0200
commitdf5339b873f1f1e9dd1c1d9fe113a16b52808213 (patch)
treeaa608caef85ce21f3e67e59fa8b895706c982088 /client/gdaemonfile.c
parent060d792d9a47009e33ee01aac0706893deb80e9b (diff)
signal the need for updates (changes wire protocol and internal API)
Send a boolean send_progress to the daemon in the case of push/pull jobs that indicates if progress updates should be sent to the client. Oftentimes the daemons can avoid quite a bit of work (like querying file sizes or setting up and operating machinery required to send progress updates) when it's not required. Patch also includes fixes to daemons to ensure they don't call a NULL progress_callback (previously, NULL was not a possible value).
Diffstat (limited to 'client/gdaemonfile.c')
-rw-r--r--client/gdaemonfile.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/client/gdaemonfile.c b/client/gdaemonfile.c
index 9e8eb637..0071a5bd 100644
--- a/client/gdaemonfile.c
+++ b/client/gdaemonfile.c
@@ -1958,10 +1958,12 @@ file_transfer (GFile *source,
gboolean source_is_daemon;
gboolean dest_is_daemon;
gboolean native_transfer;
+ gboolean send_progress;
native_transfer = FALSE;
source_is_daemon = G_IS_DAEMON_FILE (source);
dest_is_daemon = G_IS_DAEMON_FILE (destination);
+ send_progress = progress_callback != NULL;
if (source_is_daemon && dest_is_daemon)
native_transfer = TRUE;
@@ -2028,6 +2030,7 @@ file_transfer (GFile *source,
obj_path, progress_callback_message, &data,
NULL, cancellable, error,
G_DBUS_TYPE_CSTRING, &local_path,
+ DBUS_TYPE_BOOLEAN, &send_progress,
DBUS_TYPE_UINT32, &flags_dbus,
DBUS_TYPE_OBJECT_PATH, &dbus_obj_path,
DBUS_TYPE_BOOLEAN, &dbus_remove_source,
@@ -2040,6 +2043,7 @@ file_transfer (GFile *source,
obj_path, progress_callback_message, &data,
NULL, cancellable, error,
G_DBUS_TYPE_CSTRING, &local_path,
+ DBUS_TYPE_BOOLEAN, &send_progress,
DBUS_TYPE_UINT32, &flags_dbus,
DBUS_TYPE_OBJECT_PATH, &dbus_obj_path,
DBUS_TYPE_BOOLEAN, &dbus_remove_source,