5fb89985f0
To handle a new format we should first be able to transform the format name from the local clipboard owner into its remote representation. In our case this will be trasforming the "text/uri-list" target into the "FileGroupDescriptorW" named format. Add CB_FORMAT_TEXTURILIST to identify the local format by its ID during the data conversion step. This numeric ID has nothing to do with the ID which will be sent to server. It's a bit weird, but that's how XFreeRDP works. After that add a new client format with this ID and appropriate local and remote format names (in atom and formatName fields respectively). Do this only if wClipboard actually supports "text/uri-list" format. (It could fail to initialize the local file subsystem, in which case it will fail all file-related requests and there would be no point in advertising the file format support in the first place.) Finally, handle the actual format data request for a new named format in xf_cliprdr_process_requested_data(). Remember to convert the FILEDESCRIPTOR array we receive from wClipboard into the CLIPRDR_FILELIST expected by the server. Also take care to not leak memory during this conversion. Note that this handles only the CLIPRDR_FORMAT_DATA_REQUEST. The server is still not able to retrieve the file content as this is done via a separate request-reply sequence. |
||
---|---|---|
.. | ||
audin.h | ||
channels.h | ||
cliprdr.h | ||
encomsp.h | ||
log.h | ||
rail.h | ||
rdpdr.h | ||
rdpei.h | ||
rdpgfx.h | ||
rdpsnd.h | ||
remdesk.h | ||
tsmf.h | ||
wtsvc.h |