summaryrefslogtreecommitdiffstats
path: root/doc
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 /doc
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 'doc')
-rw-r--r--doc/reference/spice-gtk-docs.xml1
-rw-r--r--doc/reference/spice-gtk-sections.txt21
-rw-r--r--doc/reference/spice-gtk.types2
3 files changed, 24 insertions, 0 deletions
diff --git a/doc/reference/spice-gtk-docs.xml b/doc/reference/spice-gtk-docs.xml
index de68004..db5dd3d 100644
--- a/doc/reference/spice-gtk-docs.xml
+++ b/doc/reference/spice-gtk-docs.xml
@@ -55,6 +55,7 @@
<xi:include href="xml/spice-util.xml"/>
<xi:include href="xml/spice-version.xml"/>
<xi:include href="xml/spice-uri.xml"/>
+ <xi:include href="xml/file-transfer-task.xml"/>
</chapter>
</part>
diff --git a/doc/reference/spice-gtk-sections.txt b/doc/reference/spice-gtk-sections.txt
index fe24f9f..d8c4c79 100644
--- a/doc/reference/spice-gtk-sections.txt
+++ b/doc/reference/spice-gtk-sections.txt
@@ -495,3 +495,24 @@ spice_webdav_channel_get_type
<SUBSECTION Private>
SpiceWebdavChannelPrivate
</SECTION>
+
+<SECTION>
+<FILE>file-transfer-task</FILE>
+<TITLE>SpiceFileTransferTask</TITLE>
+SpiceFileTransferTask
+SpiceFileTransferTaskClass
+<SUBSECTION>
+spice_file_transfer_task_get_progress
+spice_file_transfer_task_get_filename
+spice_file_transfer_task_cancel
+<SUBSECTION Standard>
+SPICE_FILE_TRANSFER_TASK
+SPICE_IS_FILE_TRANSFER_TASK
+SPICE_TYPE_FILE_TRANSFER_TASK
+spice_file_transfer_task_get_type
+SPICE_FILE_TRANSFER_TASK_CLASS
+SPICE_IS_FILE_TRANSFER_TASK_CLASS
+SPICE_FILE_TRANSFER_TASK_GET_CLASS
+<SUBSECTION Private>
+SpiceFileTransferTaskPrivate
+</SECTION>
diff --git a/doc/reference/spice-gtk.types b/doc/reference/spice-gtk.types
index acd616d..e14ae1b 100644
--- a/doc/reference/spice-gtk.types
+++ b/doc/reference/spice-gtk.types
@@ -20,6 +20,7 @@
#include "smartcard-manager.h"
#include "usb-device-manager.h"
#include "usb-device-widget.h"
+#include "spice-file-transfer-task.h"
spice_audio_get_type
spice_channel_event_get_type
@@ -45,3 +46,4 @@ spice_usb_device_manager_get_type
spice_usb_device_widget_get_type
spice_port_channel_get_type
spice_webdav_channel_get_type
+spice_file_transfer_task_get_type