[Spice-devel] [spice-gtk v3 00/16] separate SpiceFileTransferTask logic from channel-main

Victor Toso lists at victortoso.com
Mon May 30 09:58:27 UTC 2016


Hi,

One could test this with the following branch:
https://cgit.freedesktop.org/~victortoso/spice-gtk/log/?h=move-xfer

Cheers,
  toso

On Mon, May 30, 2016 at 11:54:56AM +0200, Victor Toso wrote:
> v2->v3
> * rebased
> * pushed v2 01/16 ~ 349a52ca2d6af4 - acked by Pavel and Jonathon
> * split v2 02/16 to have private helpers in different patch (Pavel)
> - v3 01/16 ~ file-xfer: get functions for SpiceFileTransferTask
> - v3 02/16 ~ file-xfer: introduce flush_callback and flush_done
> * change assert to return-if-fail in private helpers (Pavel)
> * created helper function to get task id (instead of using
>   a lot of g_object_get)
> * removed CHANNEL_DEBUG check for NULL channel and changed
>   the code to use SPICE_DEBUG instead (Pavel)
> * include a fix to the progress info which was not taking in
>   consideration transfers that were cancelled
> 
> v2:
> > The idea is mainly to have a design improvement over the current
> > file-transfer logic by trying to detach it from channel-main and the
> > agent logic plus a few simple tests.
> >
> > One interesting change is about creating a FileTransfereOperation per
> > drag-and-drop operation in channel-main, which removes the
> > progress_callback logic from SpiceFileTransferTask as we don't want to
> > call progress_callback on SpiceFileTransferTask but rather on
> > channel-main;
> >
> > We are also calling the application callback for each finalized
> > SpiceFileTransferTask which means that it could be several callback
> > calls per operation. I suggested to fix that on patch 07.
> >
> > Let me know your thoughts about this.
> >   Thanks
> 
> Victor Toso (16):
>   file-xfer: get functions for SpiceFileTransferTask
>   file-xfer: introduce flush_callback and flush_done
>   file-xfer: introduce create_tasks and start_task
>   file-xfer: introduce file-info signal
>   file-xfer: inform agent of errors only when task finished
>   file-xfer: a FileTransferOperation per transfer call
>   file-xfer: call user callback once per operation
>   file-xfer: fix progress info on cancelled transfers
>   file-xfer: move to spice-file-transfer-task.c
>   tests: fix build with smartcard enabled
>   tests: file-transfer include simple tests
>   tests: file-transfer cancel on task start
>   channel: avoid crash on spice_channel_wakeup due NULL channel
>   tests: file-transfer cancel on file-info
>   tests: file-transfer cancel on read file
>   tests: file-transfer agent send error/cancel
> 
>  src/Makefile.am                                 |   2 +
>  src/channel-main.c                              | 896 +++++++-----------------
>  src/spice-channel.c                             |   5 +-
>  src/spice-file-transfer-task-priv.h             |  58 ++
>  src/spice-file-transfer-task.c                  | 713 +++++++++++++++++++
>  src/tmp-introspect325cwcm0/SpiceClientGtk-3.0.c | 628 +++++++++++++++++
>  tests/Makefile.am                               |   3 +
>  tests/file-transfer.c                           | 412 +++++++++++
>  8 files changed, 2054 insertions(+), 663 deletions(-)
>  create mode 100644 src/spice-file-transfer-task-priv.h
>  create mode 100644 src/spice-file-transfer-task.c
>  create mode 100644 src/tmp-introspect325cwcm0/SpiceClientGtk-3.0.c
>  create mode 100644 tests/file-transfer.c
> 
> -- 
> 2.5.5
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel


More information about the Spice-devel mailing list