-
When an app advertises the "text/uri-list" target, the user probably wants to copy/move files. Spice-gtk then sends a grab message to the vdagent advertising the VD_AGENT_CLIPBOARD_FILE_LIST type. Vdagent can then request clipboard data in this type. Spice-gtk tries to talk to the app that owns the clipboard in its native format in order to determine the preferred file operation (copy X move). For GNOME Nautilus, that's simply "UTF8_TEXT", for KDE Dolphin, "application/x-kde-cutselection". Otherwise the generic "text/uri-list" is used that does not provide any additional information. Once the uri list is obtained from the app, spice-gtk creates a unique virtual dir in the ".spice-clipboard" directory that is designated for this purpose. Each file is attached inside this virtual dir using phodav_virtual_dir_attach_real_child(), see phodav API for details. A list of paths in the phodav server is then sent to vdagent, as specified in the spice-protocol. Such path can for example look like this: /.spice-clipboard/b8f0249c-082a-4da9-9a38-2de3237a66f0/file It is up to the vdagent to ensure that the spice shared folder is accessible and to set the clipboard data in a format that other apps understand. This requires new phodav with PhodavVirtualDir API. Signed-off-by: Jakub Janků <jjanku@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
f33d589d