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. |
||
---|---|---|
.. | ||
cache | ||
channels | ||
client | ||
codec | ||
crypto | ||
gdi | ||
locale | ||
server | ||
utils | ||
addin.h | ||
altsec.h | ||
api.h | ||
assistance.h | ||
autodetect.h | ||
build-config.h.in | ||
client.h | ||
codecs.h | ||
constants.h | ||
dvc.h | ||
error.h | ||
event.h | ||
extension.h | ||
freerdp.h | ||
graphics.h | ||
input.h | ||
listener.h | ||
log.h | ||
message.h | ||
metrics.h | ||
peer.h | ||
pointer.h | ||
primary.h | ||
primitives.h | ||
rail.h | ||
scancode.h | ||
secondary.h | ||
session.h | ||
settings.h | ||
svc.h | ||
types.h | ||
update.h | ||
version.h.in | ||
window.h |