spice-gtk/doc/reference/spice-gtk.types
Jonathon Jongsma 2c26ee3c37 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.
2015-10-09 15:42:56 -05:00

50 lines
1.4 KiB
Plaintext

#include "spice-audio.h"
#include "spice-client.h"
#include "spice-types.h"
#include "spice-session.h"
#include "spice-channel.h"
#include "spice-glib-enums.h"
#include "spice-util.h"
#include "channel-main.h"
#include "channel-display.h"
#include "channel-cursor.h"
#include "channel-inputs.h"
#include "channel-playback.h"
#include "channel-record.h"
#include "channel-smartcard.h"
#include "channel-usbredir.h"
#include "channel-webdav.h"
#include "spice-gtk-session.h"
#include "spice-widget.h"
#include "spice-grabsequence.h"
#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
spice_channel_get_type
spice_cursor_channel_get_type
spice_display_channel_get_type
spice_display_get_type
spice_grab_sequence_get_type
spice_gtk_session_get_type
spice_inputs_channel_get_type
spice_inputs_lock_get_type
spice_main_channel_get_type
spice_playback_channel_get_type
spice_record_channel_get_type
spice_session_get_type
spice_session_verify_get_type
spice_smartcard_channel_get_type
spice_smartcard_manager_get_type
spice_session_verify_get_type
spice_usbredir_channel_get_type
spice_usb_device_get_type
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