FreeRDP
server/cliprdr.h
1 
22 #ifndef FREERDP_CHANNEL_CLIPRDR_SERVER_CLIPRDR_H
23 #define FREERDP_CHANNEL_CLIPRDR_SERVER_CLIPRDR_H
24 
25 #include <freerdp/api.h>
26 #include <freerdp/types.h>
27 #include <freerdp/channels/wtsvc.h>
28 
29 #include <freerdp/channels/cliprdr.h>
30 #include <freerdp/client/cliprdr.h>
31 
32 #ifdef __cplusplus
33 extern "C"
34 {
35 #endif
36 
41  typedef struct s_cliprdr_server_context CliprdrServerContext;
42 
43  typedef UINT (*psCliprdrOpen)(CliprdrServerContext* context);
44  typedef UINT (*psCliprdrClose)(CliprdrServerContext* context);
45  typedef UINT (*psCliprdrStart)(CliprdrServerContext* context);
46  typedef UINT (*psCliprdrStop)(CliprdrServerContext* context);
47  typedef HANDLE (*psCliprdrGetEventHandle)(CliprdrServerContext* context);
48  typedef UINT (*psCliprdrCheckEventHandle)(CliprdrServerContext* context);
49 
50  typedef UINT (*psCliprdrServerCapabilities)(CliprdrServerContext* context,
51  const CLIPRDR_CAPABILITIES* capabilities);
52  typedef UINT (*psCliprdrClientCapabilities)(CliprdrServerContext* context,
53  const CLIPRDR_CAPABILITIES* capabilities);
54  typedef UINT (*psCliprdrMonitorReady)(CliprdrServerContext* context,
55  const CLIPRDR_MONITOR_READY* monitorReady);
56  typedef UINT (*psCliprdrTempDirectory)(CliprdrServerContext* context,
57  const CLIPRDR_TEMP_DIRECTORY* tempDirectory);
58  typedef UINT (*psCliprdrClientFormatList)(CliprdrServerContext* context,
59  const CLIPRDR_FORMAT_LIST* formatList);
60  typedef UINT (*psCliprdrServerFormatList)(CliprdrServerContext* context,
61  const CLIPRDR_FORMAT_LIST* formatList);
62  typedef UINT (*psCliprdrClientFormatListResponse)(
63  CliprdrServerContext* context, const CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse);
64  typedef UINT (*psCliprdrServerFormatListResponse)(
65  CliprdrServerContext* context, const CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse);
66  typedef UINT (*psCliprdrClientLockClipboardData)(
67  CliprdrServerContext* context, const CLIPRDR_LOCK_CLIPBOARD_DATA* lockClipboardData);
68  typedef UINT (*psCliprdrServerLockClipboardData)(
69  CliprdrServerContext* context, const CLIPRDR_LOCK_CLIPBOARD_DATA* lockClipboardData);
70  typedef UINT (*psCliprdrClientUnlockClipboardData)(
71  CliprdrServerContext* context, const CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData);
72  typedef UINT (*psCliprdrServerUnlockClipboardData)(
73  CliprdrServerContext* context, const CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData);
74  typedef UINT (*psCliprdrClientFormatDataRequest)(
75  CliprdrServerContext* context, const CLIPRDR_FORMAT_DATA_REQUEST* formatDataRequest);
76  typedef UINT (*psCliprdrServerFormatDataRequest)(
77  CliprdrServerContext* context, const CLIPRDR_FORMAT_DATA_REQUEST* formatDataRequest);
78  typedef UINT (*psCliprdrClientFormatDataResponse)(
79  CliprdrServerContext* context, const CLIPRDR_FORMAT_DATA_RESPONSE* formatDataResponse);
80  typedef UINT (*psCliprdrServerFormatDataResponse)(
81  CliprdrServerContext* context, const CLIPRDR_FORMAT_DATA_RESPONSE* formatDataResponse);
82  typedef UINT (*psCliprdrClientFileContentsRequest)(
83  CliprdrServerContext* context, const CLIPRDR_FILE_CONTENTS_REQUEST* fileContentsRequest);
84  typedef UINT (*psCliprdrServerFileContentsRequest)(
85  CliprdrServerContext* context, const CLIPRDR_FILE_CONTENTS_REQUEST* fileContentsRequest);
86  typedef UINT (*psCliprdrClientFileContentsResponse)(
87  CliprdrServerContext* context, const CLIPRDR_FILE_CONTENTS_RESPONSE* fileContentsResponse);
88  typedef UINT (*psCliprdrServerFileContentsResponse)(
89  CliprdrServerContext* context, const CLIPRDR_FILE_CONTENTS_RESPONSE* fileContentsResponse);
90 
92  {
93  void* handle;
94  void* custom;
95 
96  /* server clipboard capabilities - set by server - updated by the channel after client
97  * capability exchange */
98  BOOL useLongFormatNames;
99  BOOL streamFileClipEnabled;
100  BOOL fileClipNoFilePaths;
101  BOOL canLockClipData;
102 
103  psCliprdrOpen Open;
104  psCliprdrClose Close;
105  psCliprdrStart Start;
106  psCliprdrStop Stop;
107  psCliprdrGetEventHandle GetEventHandle;
108  psCliprdrCheckEventHandle CheckEventHandle;
109 
110  psCliprdrServerCapabilities ServerCapabilities;
111  psCliprdrClientCapabilities ClientCapabilities;
112  psCliprdrMonitorReady MonitorReady;
113  psCliprdrTempDirectory TempDirectory;
114  psCliprdrClientFormatList ClientFormatList;
115  psCliprdrServerFormatList ServerFormatList;
116  psCliprdrClientFormatListResponse ClientFormatListResponse;
117  psCliprdrServerFormatListResponse ServerFormatListResponse;
118  psCliprdrClientLockClipboardData ClientLockClipboardData;
119  psCliprdrServerLockClipboardData ServerLockClipboardData;
120  psCliprdrClientUnlockClipboardData ClientUnlockClipboardData;
121  psCliprdrServerUnlockClipboardData ServerUnlockClipboardData;
122  psCliprdrClientFormatDataRequest ClientFormatDataRequest;
123  psCliprdrServerFormatDataRequest ServerFormatDataRequest;
124  psCliprdrClientFormatDataResponse ClientFormatDataResponse;
125  psCliprdrServerFormatDataResponse ServerFormatDataResponse;
126  psCliprdrClientFileContentsRequest ClientFileContentsRequest;
127  psCliprdrServerFileContentsRequest ServerFileContentsRequest;
128  psCliprdrClientFileContentsResponse ClientFileContentsResponse;
129  psCliprdrServerFileContentsResponse ServerFileContentsResponse;
130 
131  rdpContext* rdpcontext;
132  BOOL autoInitializationSequence;
133  UINT32 lastRequestedFormatId;
134  BOOL hasHugeFileSupport;
135  };
136 
137  FREERDP_API void cliprdr_server_context_free(CliprdrServerContext* context);
138 
139  WINPR_ATTR_MALLOC(cliprdr_server_context_free, 1)
140  FREERDP_API CliprdrServerContext* cliprdr_server_context_new(HANDLE vcm);
141 
142 #ifdef __cplusplus
143 }
144 #endif
145 
146 #endif /* FREERDP_CHANNEL_CLIPRDR_SERVER_CLIPRDR_H */