summaryrefslogtreecommitdiffstats
path: root/src/spice-glib-sym-file
diff options
context:
space:
mode:
authorJonathon Jongsma <jjongsma@redhat.com>2015-09-15 14:40:19 -0500
committerJonathon Jongsma <jjongsma@redhat.com>2015-10-09 15:42:56 -0500
commit2c26ee3c37691f51e1746d9d1004635dd356c28a (patch)
tree75eeca438128cf73be05f36718d0262d363466aa /src/spice-glib-sym-file
parent113093dd00a1cf10f6d3c3589b7589a184cec081 (diff)
downloadspice-gtk-2c26ee3c37691f51e1746d9d1004635dd356c28a.tar.gz
spice-gtk-2c26ee3c37691f51e1746d9d1004635dd356c28a.tar.xz
spice-gtk-2c26ee3c37691f51e1746d9d1004635dd356c28a.zip
New file transfer API
There were several shortcomings to the existing file transfer API, particularly in terms of monitoring ongoing file transfers. The major issue is that spice_main_file_copy_async() allows you to pass an array of files, but the progress callback does not provide a way to identify which file the callback is associated with. This makes it nearly impossible for an application to monitor file transfers. In addition, the SpiceDisplay widget automatically handles drag-and-drop actions on the widget, and initiates file transfers without allowing the application to specify a progress callback. So there's no way for an app to monitor file transfers that are initiated via drag and drop. http://lists.freedesktop.org/archives/spice-devel/2015-September/021931.html has a more detailed explanation of the issues. This change doesn't break the existing API, but adds some new API that will allow an application to monitor file transfer progress, even for transfers that are initiated within spice-gtk itself. - A new public SpiceFileTransferTask object is added. - The SpiceMainChannel object gains a "new-file-transfer" signal that is emitted whenever a new file transfer is initiated. The SpiceFileTransferTask object is passed to the signal handler. - The application can retain this object and monitor its 'progress' property to be notified when the progress of the file transfer changes. The SpiceFileTransferTask::finished signal indicates when the given file transfer has completed. The application can also cancel the file transfer by calling the _cancel() method. The 'spicy' test application has been updated to use this new API and display a simple dialog showing the progress of individual files.
Diffstat (limited to 'src/spice-glib-sym-file')
-rw-r--r--src/spice-glib-sym-file5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/spice-glib-sym-file b/src/spice-glib-sym-file
index 1d62716..3817a46 100644
--- a/src/spice-glib-sym-file
+++ b/src/spice-glib-sym-file
@@ -20,6 +20,11 @@ spice_client_error_quark
spice_cursor_channel_get_type
spice_display_channel_get_type
spice_display_get_primary
+spice_file_transfer_task_cancel
+spice_file_transfer_task_get_filename
+spice_file_transfer_task_get_finished
+spice_file_transfer_task_get_progress
+spice_file_transfer_task_get_type
spice_get_option_group
spice_g_signal_connect_object
spice_inputs_button_press