FreeRDP
Loading...
Searching...
No Matches
channels/cliprdr.h
1
20#ifndef FREERDP_CHANNEL_CLIPRDR_H
21#define FREERDP_CHANNEL_CLIPRDR_H
22
23#include <freerdp/api.h>
24#include <freerdp/types.h>
25#include <freerdp/utils/cliprdr_utils.h>
26
27#include <winpr/shell.h>
28
33#define CLIPRDR_CHANNEL_NAME "cliprdr"
34#define CLIPRDR_SVC_CHANNEL_NAME "cliprdr"
35
36/* CLIPRDR_HEADER.msgType */
37typedef enum
38{
39 CB_TYPE_NONE = 0x0000,
40 CB_MONITOR_READY = 0x0001,
41 CB_FORMAT_LIST = 0x0002,
42 CB_FORMAT_LIST_RESPONSE = 0x0003,
43 CB_FORMAT_DATA_REQUEST = 0x0004,
44 CB_FORMAT_DATA_RESPONSE = 0x0005,
45 CB_TEMP_DIRECTORY = 0x0006,
46 CB_CLIP_CAPS = 0x0007,
47 CB_FILECONTENTS_REQUEST = 0x0008,
48 CB_FILECONTENTS_RESPONSE = 0x0009,
49 CB_LOCK_CLIPDATA = 0x000A,
50 CB_UNLOCK_CLIPDATA = 0x000B
51} CliprdrMsgType;
52
53/* CLIPRDR_HEADER.msgFlags */
54#define CB_RESPONSE_OK 0x0001
55#define CB_RESPONSE_FAIL 0x0002
56#define CB_ASCII_NAMES 0x0004
57
58/* CLIPRDR_CAPS_SET.capabilitySetType */
59#define CB_CAPSTYPE_GENERAL 0x0001
60
61/* CLIPRDR_GENERAL_CAPABILITY.lengthCapability */
62#define CB_CAPSTYPE_GENERAL_LEN 12
63
64/* CLIPRDR_GENERAL_CAPABILITY.version */
65#define CB_CAPS_VERSION_1 0x00000001
66#define CB_CAPS_VERSION_2 0x00000002
67
68/* CLIPRDR_GENERAL_CAPABILITY.generalFlags */
69#define CB_USE_LONG_FORMAT_NAMES 0x00000002
70#define CB_STREAM_FILECLIP_ENABLED 0x00000004
71#define CB_FILECLIP_NO_FILE_PATHS 0x00000008
72#define CB_CAN_LOCK_CLIPDATA 0x00000010
73#define CB_HUGE_FILE_SUPPORT_ENABLED 0x00000020
74
75/* File Contents Request Flags */
76#define FILECONTENTS_SIZE 0x00000001
77#define FILECONTENTS_RANGE 0x00000002
78
79#ifdef __cplusplus
80extern "C"
81{
82#endif
83
84 /* Special Clipboard Response Formats */
85
86 typedef struct
87 {
88 UINT32 mappingMode;
89 UINT32 xExt;
90 UINT32 yExt;
91 UINT32 metaFileSize;
92 BYTE* metaFileData;
94
95 /* Clipboard Messages */
96
97 typedef struct
98 {
99 UINT16 msgType;
100 UINT16 msgFlags;
101 UINT32 dataLen;
103
104 typedef struct
105 {
106 UINT16 capabilitySetType;
107 UINT16 capabilitySetLength;
109
110 typedef struct
111 {
112 UINT16 capabilitySetType;
113 UINT16 capabilitySetLength;
114
115 UINT32 version;
116 UINT32 generalFlags;
118
119 typedef struct
120 {
121 CLIPRDR_HEADER common;
122
123 UINT32 cCapabilitiesSets;
124 CLIPRDR_CAPABILITY_SET* capabilitySets;
126
127 typedef struct
128 {
129 CLIPRDR_HEADER common;
131
132 typedef struct
133 {
134 CLIPRDR_HEADER common;
135
136 char szTempDir[520];
138
139 typedef struct
140 {
141 UINT32 formatId;
142 char* formatName;
144
145 typedef struct
146 {
147 CLIPRDR_HEADER common;
148
149 UINT32 numFormats;
150 CLIPRDR_FORMAT* formats;
152
153 typedef struct
154 {
155 CLIPRDR_HEADER common;
157
158 typedef struct
159 {
160 CLIPRDR_HEADER common;
161
162 UINT32 clipDataId;
164
165 typedef struct
166 {
167 CLIPRDR_HEADER common;
168
169 UINT32 clipDataId;
171
172 typedef struct
173 {
174 CLIPRDR_HEADER common;
175
176 UINT32 requestedFormatId;
178
179 typedef struct
180 {
181 CLIPRDR_HEADER common;
182
183 const BYTE* requestedFormatData;
185
186 typedef struct
187 {
188 CLIPRDR_HEADER common;
189
190 UINT32 streamId;
191 UINT32 listIndex;
192 UINT32 dwFlags;
193 UINT32 nPositionLow;
194 UINT32 nPositionHigh;
195 UINT32 cbRequested;
196 BOOL haveClipDataId;
197 UINT32 clipDataId;
199
200 typedef struct
201 {
202 CLIPRDR_HEADER common;
203
204 UINT32 streamId;
205 UINT32 cbRequested;
206 const BYTE* requestedData;
208
209#ifdef __cplusplus
210}
211#endif
212
213#endif /* FREERDP_CHANNEL_CLIPRDR_H */