FreeRDP/winpr/libwinpr
ilammy 33719d24ce wClipboard/posix: implement file size retrieval
This is an example of wClipboardDelegate method implementation. POSIX
subsystem uses synchronous methods, but the interface can be used for
asynchronous request processing as well. The client should call a
Client* callback to request some action and the wClipboard will process
the request and report the result by calling an approriate Clipboard*
callback. Usually there will be two callbacks: one for reporting success
and one to report errors.

All callbacks have at least two arguments: the wClipboardDelegate itself
to pass the system context, and the wClipboard*Request structure with
the arguments to pass the call context. The request context is also
passed to the result callbacks by wClipboard so that the client can
match up the result with its previous request.

The fields of wClipboard*Request structures are heavily influenced by
the MS-RDPECLIP spec and mirror the respective fields of
CLIPRDR_FILECONTENTS_REQUEST. wClipboard should not depend on
MS-RDPECLIP, that's the reason we don't use CLIPRDR_FILECONTENTS_REQUEST
directly. However, I believe that we should not have void* fields in the
request structs so that they can be easily copied around if needed.
This is why have the weird 'streamId' field there which has nothing to
do with wClipboard and will be used only by the clients when sending
replies to the server.

Return values of the callbacks are to be used for reporting errors with
processing the request or reply per se, not for errors encountered while
performing the action requested. Thus, for example, we return NO_ERROR
from posix_file_request_size() even when we fail to report the result to
the client, because we have successfully performed the request and do
not care if the client could not handle our reply for some reason.

Also note that setup_delegate() fills in dummy implementations of
Clipboard* reply callbacks so that we do not crash in case the client
does not fill them and do not have to perform paranoid NULL checks
before calling every single callback.
2017-04-09 03:15:49 +03:00
..
asn1 First shot on fixing over linking 2016-03-29 18:14:34 +02:00
bcrypt First shot on fixing over linking 2016-03-29 18:14:34 +02:00
clipboard wClipboard/posix: implement file size retrieval 2017-04-09 03:15:49 +03:00
com First shot on fixing over linking 2016-03-29 18:14:34 +02:00
comm Added fallback for CMSPAR. (See debian #854689) 2017-02-09 19:58:26 +01:00
credentials Removed windows module.def files. 2016-02-29 15:18:47 +01:00
credui fix string format specifiers 2016-12-16 13:48:43 +01:00
crt Merge pull request #3864 from DavBfr/rewrite-disk-redirection 2017-04-06 17:32:21 +02:00
crypto Fixed memory leak and return value check issue. 2017-03-28 17:56:44 +02:00
dsparse fix string format specifiers 2016-12-16 13:48:43 +01:00
environment Fixed tests and dead store warnings. 2017-03-28 16:49:56 +02:00
error fix string format specifiers 2016-12-16 13:48:43 +01:00
file Fix indentation 2017-04-05 15:35:03 -07:00
handle Merge pull request #3163 from akallabeth/set_file_time 2016-03-02 09:43:46 +01:00
heap Removed windows module.def files. 2016-02-29 15:18:47 +01:00
input Several fixes for keyboard type 7 (japanese) 2016-02-11 21:40:50 +01:00
interlocked Fixed tests and dead store warnings. 2017-03-28 16:49:56 +02:00
io winpr: fix UWP portability 2016-12-02 13:18:55 -05:00
library ifdef's for Cygwin compilation 2017-02-10 18:06:20 +03:00
locale First shot on fixing over linking 2016-03-29 18:14:34 +02:00
memory First shot on fixing over linking 2016-03-29 18:14:34 +02:00
nt fix string format specifiers 2016-12-16 13:48:43 +01:00
path Misc Fixes 2017-03-17 14:07:33 -07:00
pipe Fixed tests and dead store warnings. 2017-03-28 16:49:56 +02:00
pool fix string format specifiers 2016-12-16 13:48:43 +01:00
registry fix string format specifiers 2016-12-16 13:48:43 +01:00
rpc fix string format specifiers 2016-12-16 13:48:43 +01:00
security First shot on fixing over linking 2016-03-29 18:14:34 +02:00
shell Fixed android build issues. 2016-02-01 15:21:07 +01:00
smartcard smartcard: implement ListReaderGroups 2017-02-16 16:59:03 +01:00
sspi Fixed GetEnvironmentVariable. 2017-03-03 12:43:00 +01:00
sspicli winpr/synch: remove the dependency on winsock.h 2015-07-14 11:39:41 +02:00
synch Fixed RPATH settings for OS X 2017-04-06 08:08:07 +02:00
sysinfo Added test for GetComputerName/GetComputerNameEx 2017-02-28 11:03:10 +01:00
thread Fixed tests and dead store warnings. 2017-03-28 16:49:56 +02:00
timezone Update timezone data to Dec 2016 2017-01-11 16:56:34 -05:00
utils Fixed tests and dead store warnings. 2017-03-28 16:49:56 +02:00
winhttp winpr: always build "monolitic" 2014-07-10 11:10:58 +02:00
winsock ifdef's for Cygwin compilation 2017-02-10 18:06:20 +03:00
wnd fix string format specifiers 2016-12-16 13:48:43 +01:00
wtsapi Fixed tests and dead store warnings. 2017-03-28 16:49:56 +02:00
CMakeLists.txt Build: Use correct pdb names when installing with symbols 2017-01-31 13:32:51 +01:00
dummy.c freerdp: various missing link dependencies and symbol exports 2013-09-03 21:48:26 -04:00
log.h Moved logging defines to main logger. 2014-09-09 16:32:04 +02:00