FreeRDP/winpr/libwinpr/clipboard
ilammy 907f21e720 wClipboard/posix: basic file list handling
Here you can see an outline of our approach to handling file lists put
on the clipboard. Typical usage of wClipboard by the clients sums up to
doing a ClipboardSetData() call followed by a ClipboardGetData() call
with appropriate format ID passed to them. Thus for files we would
expect the clients to first set the local format (like "text/uri-list")
and then to get the remote format (the "FileGroupDescriptorW").

MS-RDPECLIP has a concept of locally-stored list of files on the
clipboard. This is modeled by clipboard->localFiles ArrayList.  We need
to populate this list before we serialize it into CLIPRDR_FILELIST and
send it to the server. The easiest way to achieve this is a bit hacky,
but it works: we populate the file list from inside the synthesizer
callback registered for text/uri-list -> FileGroupDescriptorW
conversion.

So the client would first set the data it received from local clipboard
as "text/uri-list" format, then it gets a "FileGroupDescriptorW" format,
during that conversion we will prepare to serve file content requests,
and in the end we provide a FILEDESCRIPTOR array to the client as the
conversion result. The client will then serialize the array into
CLIPRDR_FILELIST and sent it to the server. (We cannot do serialization
in WinPR as WinPR should not know about cliprdr and its data formats.)

The subsystems are expected to store their private structures in the
clipboard->localFiles array. POSIX subsystem uses struct posix_file
which currently has bare minimum of fields: the local file name (for
open() and the like) and the remote file name (the one to put into
FILEDESCRIPTOR).
2017-04-09 03:15:48 +03:00
..
test Fixed tests and dead store warnings. 2017-03-28 16:49:56 +02:00
clipboard.c wClipboard/posix: basic file list handling 2017-04-09 03:15:48 +03:00
clipboard.h wClipboard/posix: basic file list handling 2017-04-09 03:15:48 +03:00
CMakeLists.txt wClipboard: local file subsystem boilerplate 2017-04-09 03:15:48 +03:00
ModuleOptions.cmake libwinpr-clipboard: initial commit 2014-10-17 15:19:05 -04:00
posix.c wClipboard/posix: basic file list handling 2017-04-09 03:15:48 +03:00
posix.h wClipboard: local file subsystem boilerplate 2017-04-09 03:15:48 +03:00
synthetic.c ctest for int format specifiers and usage doc 2016-12-16 14:20:30 +01:00