Debian Codegraph @

channels/cliprdr/client/cliprdr_format.c

raw symbols SCIP
1 /**
2 * FreeRDP: A Remote Desktop Protocol Implementation
3 * Clipboard Virtual Channel
4 *
5 * Copyright 2009-2011 Jay Sorg
6 * Copyright 2010-2011 Vic Lee
7 * Copyright 2015 Thincast Technologies GmbH
8 * Copyright 2015 DI (FH) Martin Haimberger <[email protected]>
9 *
10 * Licensed under the Apache License, Version 2.0 (the "License");
11 * you may not use this file except in compliance with the License.
12 * You may obtain a copy of the License at
13 *
14 * http://www.apache.org/licenses/LICENSE-2.0
15 *
16 * Unless required by applicable law or agreed to in writing, software
17 * distributed under the License is distributed on an "AS IS" BASIS,
18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 * See the License for the specific language governing permissions and
20 * limitations under the License.
21 */
22
23 #include <freerdp/config.h>cxx . . $ `<file>/build/include/freerdp/config.h`/
24
25 #include <winpr/crt.h>cxx . . $ `<file>/winpr/include/winpr/crt.h`/
26 #include <winpr/print.h>cxx . . $ `<file>/winpr/include/winpr/print.h`/
27 #include <winpr/clipboard.h>cxx . . $ `<file>/winpr/include/winpr/clipboard.h`/
28
29 #include <freerdp/types.h>cxx . . $ `<file>/include/freerdp/types.h`/
30 #include <freerdp/freerdp.h>cxx . . $ `<file>/include/freerdp/freerdp.h`/
31 #include <freerdp/settings.h>cxx . . $ `<file>/include/freerdp/settings.h`/
32 #include <freerdp/constants.h>cxx . . $ `<file>/include/freerdp/constants.h`/
33 #include <freerdp/client/cliprdr.h>cxx . . $ `<file>/include/freerdp/client/cliprdr.h`/
34
35 #include "cliprdr_main.h"cxx . . $ `<file>/channels/cliprdr/client/cliprdr_main.h`/
36 #include "cliprdr_format.h"cxx . . $ `<file>/channels/cliprdr/client/cliprdr_format.h`/
37 #include "../cliprdr_common.h"cxx . . $ `<file>/channels/cliprdr/cliprdr_common.h`/
38
39 CLIPRDR_FORMAT_LISTcxx . . $ CLIPRDR_FORMAT_LIST# cliprdr_filter_format_listcxx . . $ cliprdr_filter_format_list(4c97506d0336c598).(const CLIPRDR_FORMAT_LISTcxx . . $ CLIPRDR_FORMAT_LIST#* list, UINT32cxx . . $ UINT32# mask,
40 UINT32cxx . . $ UINT32# checkMask)
41 {
42 const UINT32cxx . . $ UINT32# maskData =
43 checkMask & (CLIPRDR_FLAG_LOCAL_TO_REMOTEcxx . . $ `include/freerdp/settings_types.h:343:9`! | CLIPRDR_FLAG_REMOTE_TO_LOCALcxx . . $ `include/freerdp/settings_types.h:345:9`!);
44 const UINT32cxx . . $ UINT32# maskFiles =
45 checkMask & (CLIPRDR_FLAG_LOCAL_TO_REMOTE_FILEScxx . . $ `include/freerdp/settings_types.h:344:9`! | CLIPRDR_FLAG_REMOTE_TO_LOCAL_FILEScxx . . $ `include/freerdp/settings_types.h:346:9`!);
46 WINPR_ASSERTcxx . . $ `winpr/include/winpr/assert-api.h:76:9`!(list);
47
48 CLIPRDR_FORMAT_LISTcxx . . $ CLIPRDR_FORMAT_LIST# filtered = WINPR_C_ARRAY_INITcxx . . $ `winpr/include/winpr/platform.h:87:9`!;
49 filtered.commoncxx . . $ $anonymous_type_67eca9c3bb6f2114_9#common..msgTypecxx . . $ $anonymous_type_67eca9c3bb6f2114_2#msgType. = CB_FORMAT_LISTcxx . . $ CB_FORMAT_LIST.;
50 filtered.numFormatscxx . . $ $anonymous_type_67eca9c3bb6f2114_9#numFormats. = list->numFormatscxx . . $ $anonymous_type_67eca9c3bb6f2114_9#numFormats.;
51 if (filtered.numFormatscxx . . $ $anonymous_type_67eca9c3bb6f2114_9#numFormats. > 0)
52 {
53 filtered.formatscxx . . $ $anonymous_type_67eca9c3bb6f2114_9#formats. = calloccxx . . $ calloc(63a7bf2941bfcd7a).(filtered.numFormatscxx . . $ $anonymous_type_67eca9c3bb6f2114_9#numFormats., sizeof(CLIPRDR_FORMATcxx . . $ CLIPRDR_FORMAT#));
54 if (!filtered.formatscxx . . $ $anonymous_type_67eca9c3bb6f2114_9#formats.)
55 {
56 const CLIPRDR_FORMAT_LISTcxx . . $ CLIPRDR_FORMAT_LIST# empty = WINPR_C_ARRAY_INITcxx . . $ `winpr/include/winpr/platform.h:87:9`!;
57 return empty;
58 }
59 }
60
61 size_t wpos = 0;
62 if ((mask & checkMask) == checkMask)
63 {
64 for (size_t x = 0; x < list->numFormatscxx . . $ $anonymous_type_67eca9c3bb6f2114_9#numFormats.; x++)
65 {
66 const CLIPRDR_FORMATcxx . . $ CLIPRDR_FORMAT#* format = &list->formatscxx . . $ $anonymous_type_67eca9c3bb6f2114_9#formats.[x];
67 CLIPRDR_FORMATcxx . . $ CLIPRDR_FORMAT#* cur = &filtered.formatscxx . . $ $anonymous_type_67eca9c3bb6f2114_9#formats.[x];
68 cur->formatIdcxx . . $ $anonymous_type_67eca9c3bb6f2114_8#formatId. = format->formatIdcxx . . $ $anonymous_type_67eca9c3bb6f2114_8#formatId.;
69 if (format->formatNamecxx . . $ $anonymous_type_67eca9c3bb6f2114_8#formatName.)
70 cur->formatNamecxx . . $ $anonymous_type_67eca9c3bb6f2114_8#formatName. = _strdupcxx . . $ _strdup(a8b8e32347182212).(format->formatNamecxx . . $ $anonymous_type_67eca9c3bb6f2114_8#formatName.);
71 wpos++;
72 }
73 }
74 else if ((mask & maskFiles) != 0)
75 {
76 for (size_t x = 0; x < list->numFormatscxx . . $ $anonymous_type_67eca9c3bb6f2114_9#numFormats.; x++)
77 {
78 const CLIPRDR_FORMATcxx . . $ CLIPRDR_FORMAT#* format = &list->formatscxx . . $ $anonymous_type_67eca9c3bb6f2114_9#formats.[x];
79 CLIPRDR_FORMATcxx . . $ CLIPRDR_FORMAT#* cur = &filtered.formatscxx . . $ $anonymous_type_67eca9c3bb6f2114_9#formats.[wpos];
80
81 if (!format->formatNamecxx . . $ $anonymous_type_67eca9c3bb6f2114_8#formatName.)
82 continue;
83 if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(format->formatNamecxx . . $ $anonymous_type_67eca9c3bb6f2114_8#formatName., type_FileGroupDescriptorWcxx . . $ type_FileGroupDescriptorW.) == 0 ||
84 strcmpcxx . . $ strcmp(5ae29d726ae57f88).(format->formatNamecxx . . $ $anonymous_type_67eca9c3bb6f2114_8#formatName., type_FileContentscxx . . $ type_FileContents.) == 0)
85 {
86 cur->formatIdcxx . . $ $anonymous_type_67eca9c3bb6f2114_8#formatId. = format->formatIdcxx . . $ $anonymous_type_67eca9c3bb6f2114_8#formatId.;
87 cur->formatNamecxx . . $ $anonymous_type_67eca9c3bb6f2114_8#formatName. = _strdupcxx . . $ _strdup(a8b8e32347182212).(format->formatNamecxx . . $ $anonymous_type_67eca9c3bb6f2114_8#formatName.);
88 wpos++;
89 }
90 }
91 }
92 else if ((mask & maskData) != 0)
93 {
94 for (size_t x = 0; x < list->numFormatscxx . . $ $anonymous_type_67eca9c3bb6f2114_9#numFormats.; x++)
95 {
96 const CLIPRDR_FORMATcxx . . $ CLIPRDR_FORMAT#* format = &list->formatscxx . . $ $anonymous_type_67eca9c3bb6f2114_9#formats.[x];
97 CLIPRDR_FORMATcxx . . $ CLIPRDR_FORMAT#* cur = &filtered.formatscxx . . $ $anonymous_type_67eca9c3bb6f2114_9#formats.[wpos];
98
99 if (!format->formatNamecxx . . $ $anonymous_type_67eca9c3bb6f2114_8#formatName. ||
100 (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(format->formatNamecxx . . $ $anonymous_type_67eca9c3bb6f2114_8#formatName., type_FileGroupDescriptorWcxx . . $ type_FileGroupDescriptorW.) != 0 &&
101 strcmpcxx . . $ strcmp(5ae29d726ae57f88).(format->formatNamecxx . . $ $anonymous_type_67eca9c3bb6f2114_8#formatName., type_FileContentscxx . . $ type_FileContents.) != 0))
102 {
103 cur->formatIdcxx . . $ $anonymous_type_67eca9c3bb6f2114_8#formatId. = format->formatIdcxx . . $ $anonymous_type_67eca9c3bb6f2114_8#formatId.;
104 if (format->formatNamecxx . . $ $anonymous_type_67eca9c3bb6f2114_8#formatName.)
105 cur->formatNamecxx . . $ $anonymous_type_67eca9c3bb6f2114_8#formatName. = _strdupcxx . . $ _strdup(a8b8e32347182212).(format->formatNamecxx . . $ $anonymous_type_67eca9c3bb6f2114_8#formatName.);
106 wpos++;
107 }
108 }
109 }
110 WINPR_ASSERTcxx . . $ `winpr/include/winpr/assert-api.h:76:9`!(wpos <= UINT32_MAXcxx . . $ `<external>/3415975807581488833/stdint.h:124:10`!);
111 filtered.numFormatscxx . . $ $anonymous_type_67eca9c3bb6f2114_9#numFormats. = (UINT32cxx . . $ UINT32#)wpos;
112 return filtered;
113 }
114
115 /**
116 * Function description
117 *
118 * @return 0 on success, otherwise a Win32 error code
119 */
120 UINTcxx . . $ UINT# cliprdr_process_format_listcxx . . $ cliprdr_process_format_list(61a974653c29fc08).(cliprdrPlugincxx . . $ cliprdrPlugin#* cliprdr, wStreamcxx . . $ wStream#* s, UINT32cxx . . $ UINT32# dataLen,
121 UINT16cxx . . $ UINT16# msgFlags)
122 {
123 CLIPRDR_FORMAT_LISTcxx . . $ CLIPRDR_FORMAT_LIST# formatList = WINPR_C_ARRAY_INITcxx . . $ `winpr/include/winpr/platform.h:87:9`!;
124 CLIPRDR_FORMAT_LISTcxx . . $ CLIPRDR_FORMAT_LIST# filteredFormatList = WINPR_C_ARRAY_INITcxx . . $ `winpr/include/winpr/platform.h:87:9`!;
125 CliprdrClientContextcxx . . $ CliprdrClientContext#* context = cliprdr_get_client_interfacecxx . . $ cliprdr_get_client_interface(14d320342f8b895a).(cliprdr);
126 UINTcxx . . $ UINT# error = CHANNEL_RC_OKcxx . . $ `winpr/include/winpr/wtsapi.h:159:9`!;
127
128 formatList.commoncxx . . $ $anonymous_type_67eca9c3bb6f2114_9#common..msgTypecxx . . $ $anonymous_type_67eca9c3bb6f2114_2#msgType. = CB_FORMAT_LISTcxx . . $ CB_FORMAT_LIST.;
129 formatList.commoncxx . . $ $anonymous_type_67eca9c3bb6f2114_9#common..msgFlagscxx . . $ $anonymous_type_67eca9c3bb6f2114_2#msgFlags. = msgFlags;
130 formatList.commoncxx . . $ $anonymous_type_67eca9c3bb6f2114_9#common..dataLencxx . . $ $anonymous_type_67eca9c3bb6f2114_2#dataLen. = dataLen;
131
132 if ((error =
133 cliprdr_read_format_listcxx . . $ cliprdr_read_format_list(4a0bd1012e473f14).(cliprdr->logcxx . . $ $anonymous_type_fe5a4fc9107b85dc_0#log., s, &formatList, cliprdr->useLongFormatNamescxx . . $ $anonymous_type_fe5a4fc9107b85dc_0#useLongFormatNames.)))
134 goto error_out;
135
136 {
137 const UINT32cxx . . $ UINT32# mask = freerdp_settings_get_uint32cxx . . $ freerdp_settings_get_uint32(94c9870a51b00def).(context->rdpcontextcxx . . $ s_cliprdr_client_context#rdpcontext.->settingscxx . . $ rdp_context#settings.,
138 FreeRDP_ClipboardFeatureMaskcxx . . $ FreeRDP_ClipboardFeatureMask.);
139 filteredFormatList = cliprdr_filter_format_listcxx . . $ cliprdr_filter_format_list(4c97506d0336c598).(
140 &formatList, mask, CLIPRDR_FLAG_REMOTE_TO_LOCALcxx . . $ `include/freerdp/settings_types.h:345:9`! | CLIPRDR_FLAG_REMOTE_TO_LOCAL_FILEScxx . . $ `include/freerdp/settings_types.h:346:9`!);
141 }
142
143 if (filteredFormatList.numFormatscxx . . $ $anonymous_type_67eca9c3bb6f2114_9#numFormats. == 0)
144 goto error_out;
145
146 {
147 const DWORDcxx . . $ DWORD# level = WLOG_DEBUGcxx . . $ WLOG_DEBUG.;
148 if (WLog_IsLevelActivecxx . . $ WLog_IsLevelActive(be4366e4f452978f).(cliprdr->logcxx . . $ $anonymous_type_fe5a4fc9107b85dc_0#log., level))
149 {
150 WLog_Printcxx . . $ `winpr/include/winpr/wlog.h:256:9`!(cliprdr->log, level, "ServerFormatList: numFormats: %" PRIu32cxx . . $ `<external>/15933738808807975373/inttypes.h:109:10`! "",
151 formatList.numFormats);
152 for (size_t x = 0; x < formatList.numFormatscxx . . $ $anonymous_type_67eca9c3bb6f2114_9#numFormats.; x++)
153 {
154 const CLIPRDR_FORMATcxx . . $ CLIPRDR_FORMAT#* format = &formatList.formatscxx . . $ $anonymous_type_67eca9c3bb6f2114_9#formats.[x];
155 WLog_Printcxx . . $ `winpr/include/winpr/wlog.h:256:9`!(cliprdr->log, level, "[%" PRIuzcxx . . $ `winpr/include/winpr/wtypes.h:485:9`! "]: id=0x%08" PRIx32cxx . . $ `<external>/15933738808807975373/inttypes.h:125:10`! " [%s|%s]", x,
156 format->formatId, ClipboardGetFormatIdString(format->formatId),
157 format->formatName);
158 }
159
160 WLog_Printcxx . . $ `winpr/include/winpr/wlog.h:256:9`!(cliprdr->log, level, "ServerFormatList [filtered]: numFormats: %" PRIu32cxx . . $ `<external>/15933738808807975373/inttypes.h:109:10`! "",
161 filteredFormatList.numFormats);
162 for (size_t x = 0; x < filteredFormatList.numFormatscxx . . $ $anonymous_type_67eca9c3bb6f2114_9#numFormats.; x++)
163 {
164 const CLIPRDR_FORMATcxx . . $ CLIPRDR_FORMAT#* format = &filteredFormatList.formatscxx . . $ $anonymous_type_67eca9c3bb6f2114_9#formats.[x];
165 WLog_Printcxx . . $ `winpr/include/winpr/wlog.h:256:9`!(cliprdr->log, level, "[%" PRIuzcxx . . $ `winpr/include/winpr/wtypes.h:485:9`! "]: id=0x%08" PRIx32cxx . . $ `<external>/15933738808807975373/inttypes.h:125:10`! " [%s|%s]", x,
166 format->formatId, ClipboardGetFormatIdString(format->formatId),
167 format->formatName);
168 }
169 }
170 }
171
172 if (context->ServerFormatListcxx . . $ s_cliprdr_client_context#ServerFormatList.)
173 {
174 if ((error = context->ServerFormatListcxx . . $ s_cliprdr_client_context#ServerFormatList.(context, &filteredFormatList)))
175 WLog_Printcxx . . $ `winpr/include/winpr/wlog.h:256:9`!(cliprdr->log, WLOG_ERROR, "ServerFormatList failed with error %" PRIu32cxx . . $ `<external>/15933738808807975373/inttypes.h:109:10`! "",
176 error);
177 }
178
179 error_out:
180 cliprdr_free_format_listcxx . . $ cliprdr_free_format_list(9f42d674bcb26e84).(&filteredFormatList);
181 cliprdr_free_format_listcxx . . $ cliprdr_free_format_list(9f42d674bcb26e84).(&formatList);
182 return error;
183 }
184
185 /**
186 * Function description
187 *
188 * @return 0 on success, otherwise a Win32 error code
189 */
190 UINTcxx . . $ UINT# cliprdr_process_format_list_responsecxx . . $ cliprdr_process_format_list_response(61a974653c29fc08).(cliprdrPlugincxx . . $ cliprdrPlugin#* cliprdr, WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! wStreamcxx . . $ wStream#* s,
191 UINT32cxx . . $ UINT32# dataLen, UINT16cxx . . $ UINT16# msgFlags)
192 {
193 CLIPRDR_FORMAT_LIST_RESPONSEcxx . . $ CLIPRDR_FORMAT_LIST_RESPONSE# formatListResponse = WINPR_C_ARRAY_INITcxx . . $ `winpr/include/winpr/platform.h:87:9`!;
194 CliprdrClientContextcxx . . $ CliprdrClientContext#* context = cliprdr_get_client_interfacecxx . . $ cliprdr_get_client_interface(14d320342f8b895a).(cliprdr);
195 UINTcxx . . $ UINT# error = CHANNEL_RC_OKcxx . . $ `winpr/include/winpr/wtsapi.h:159:9`!;
196
197 WLog_Printcxx . . $ `winpr/include/winpr/wlog.h:256:9`!(cliprdr->log, WLOG_DEBUG, "ServerFormatListResponse");
198
199 formatListResponse.commoncxx . . $ $anonymous_type_67eca9c3bb6f2114_10#common..msgTypecxx . . $ $anonymous_type_67eca9c3bb6f2114_2#msgType. = CB_FORMAT_LIST_RESPONSEcxx . . $ CB_FORMAT_LIST_RESPONSE.;
200 formatListResponse.commoncxx . . $ $anonymous_type_67eca9c3bb6f2114_10#common..msgFlagscxx . . $ $anonymous_type_67eca9c3bb6f2114_2#msgFlags. = msgFlags;
201 formatListResponse.commoncxx . . $ $anonymous_type_67eca9c3bb6f2114_10#common..dataLencxx . . $ $anonymous_type_67eca9c3bb6f2114_2#dataLen. = dataLen;
202
203 IFCALLRETcxx . . $ `include/freerdp/api.h:96:9`!(context->ServerFormatListResponse, error, context, &formatListResponse);
204 if (error)
205 WLog_Printcxx . . $ `winpr/include/winpr/wlog.h:256:9`!(cliprdr->log, WLOG_ERROR,
206 "ServerFormatListResponse failed with error %" PRIu32cxx . . $ `<external>/15933738808807975373/inttypes.h:109:10`! "!", error);
207
208 return error;
209 }
210
211 /**
212 * Function description
213 *
214 * @return 0 on success, otherwise a Win32 error code
215 */
216 UINTcxx . . $ UINT# cliprdr_process_format_data_requestcxx . . $ cliprdr_process_format_data_request(61a974653c29fc08).(cliprdrPlugincxx . . $ cliprdrPlugin#* cliprdr, wStreamcxx . . $ wStream#* s, UINT32cxx . . $ UINT32# dataLen,
217 UINT16cxx . . $ UINT16# msgFlags)
218 {
219 CLIPRDR_FORMAT_DATA_REQUESTcxx . . $ CLIPRDR_FORMAT_DATA_REQUEST# formatDataRequest = WINPR_C_ARRAY_INITcxx . . $ `winpr/include/winpr/platform.h:87:9`!;
220 CliprdrClientContextcxx . . $ CliprdrClientContext#* context = cliprdr_get_client_interfacecxx . . $ cliprdr_get_client_interface(14d320342f8b895a).(cliprdr);
221 UINTcxx . . $ UINT# error = CHANNEL_RC_OKcxx . . $ `winpr/include/winpr/wtsapi.h:159:9`!;
222
223 formatDataRequest.commoncxx . . $ $anonymous_type_67eca9c3bb6f2114_13#common..msgTypecxx . . $ $anonymous_type_67eca9c3bb6f2114_2#msgType. = CB_FORMAT_DATA_REQUESTcxx . . $ CB_FORMAT_DATA_REQUEST.;
224 formatDataRequest.commoncxx . . $ $anonymous_type_67eca9c3bb6f2114_13#common..msgFlagscxx . . $ $anonymous_type_67eca9c3bb6f2114_2#msgFlags. = msgFlags;
225 formatDataRequest.commoncxx . . $ $anonymous_type_67eca9c3bb6f2114_13#common..dataLencxx . . $ $anonymous_type_67eca9c3bb6f2114_2#dataLen. = dataLen;
226
227 if ((error = cliprdr_read_format_data_requestcxx . . $ cliprdr_read_format_data_request(feb167b8bed6d8cf).(s, &formatDataRequest)))
228 return error;
229
230 WLog_Printcxx . . $ `winpr/include/winpr/wlog.h:256:9`!(cliprdr->log, WLOG_DEBUG, "ServerFormatDataRequest (0x%08" PRIx32cxx . . $ `<external>/15933738808807975373/inttypes.h:125:10`! " [%s])",
231 formatDataRequest.requestedFormatId,
232 ClipboardGetFormatIdString(formatDataRequest.requestedFormatId));
233
234 const UINT32cxx . . $ UINT32# mask =
235 freerdp_settings_get_uint32cxx . . $ freerdp_settings_get_uint32(94c9870a51b00def).(context->rdpcontextcxx . . $ s_cliprdr_client_context#rdpcontext.->settingscxx . . $ rdp_context#settings., FreeRDP_ClipboardFeatureMaskcxx . . $ FreeRDP_ClipboardFeatureMask.);
236 if ((mask & (CLIPRDR_FLAG_LOCAL_TO_REMOTEcxx . . $ `include/freerdp/settings_types.h:343:9`! | CLIPRDR_FLAG_LOCAL_TO_REMOTE_FILEScxx . . $ `include/freerdp/settings_types.h:344:9`!)) == 0)
237 {
238 return cliprdr_send_error_responsecxx . . $ cliprdr_send_error_response(6041f19010b6d781).(cliprdr, CB_FORMAT_DATA_RESPONSEcxx . . $ CB_FORMAT_DATA_RESPONSE.);
239 }
240
241 context->lastRequestedFormatIdcxx . . $ s_cliprdr_client_context#lastRequestedFormatId. = formatDataRequest.requestedFormatIdcxx . . $ $anonymous_type_67eca9c3bb6f2114_13#requestedFormatId.;
242 IFCALLRETcxx . . $ `include/freerdp/api.h:96:9`!(context->ServerFormatDataRequest, error, context, &formatDataRequest);
243 if (error)
244 WLog_Printcxx . . $ `winpr/include/winpr/wlog.h:256:9`!(cliprdr->log, WLOG_ERROR,
245 "ServerFormatDataRequest failed with error %" PRIu32cxx . . $ `<external>/15933738808807975373/inttypes.h:109:10`! "!", error);
246
247 return error;
248 }
249
250 /**
251 * Function description
252 *
253 * @return 0 on success, otherwise a Win32 error code
254 */
255 UINTcxx . . $ UINT# cliprdr_process_format_data_responsecxx . . $ cliprdr_process_format_data_response(61a974653c29fc08).(cliprdrPlugincxx . . $ cliprdrPlugin#* cliprdr, wStreamcxx . . $ wStream#* s, UINT32cxx . . $ UINT32# dataLen,
256 UINT16cxx . . $ UINT16# msgFlags)
257 {
258 CLIPRDR_FORMAT_DATA_RESPONSEcxx . . $ CLIPRDR_FORMAT_DATA_RESPONSE# formatDataResponse = WINPR_C_ARRAY_INITcxx . . $ `winpr/include/winpr/platform.h:87:9`!;
259 CliprdrClientContextcxx . . $ CliprdrClientContext#* context = cliprdr_get_client_interfacecxx . . $ cliprdr_get_client_interface(14d320342f8b895a).(cliprdr);
260 UINTcxx . . $ UINT# error = CHANNEL_RC_OKcxx . . $ `winpr/include/winpr/wtsapi.h:159:9`!;
261
262 WLog_Printcxx . . $ `winpr/include/winpr/wlog.h:256:9`!(cliprdr->log, WLOG_DEBUG,
263 "ServerFormatDataResponse: msgFlags=0x%08" PRIx32cxx . . $ `<external>/15933738808807975373/inttypes.h:125:10`! ", dataLen=%" PRIu32cxx . . $ `<external>/15933738808807975373/inttypes.h:109:10`!, msgFlags,
264 dataLen);
265
266 formatDataResponse.commoncxx . . $ $anonymous_type_67eca9c3bb6f2114_14#common..msgTypecxx . . $ $anonymous_type_67eca9c3bb6f2114_2#msgType. = CB_FORMAT_DATA_RESPONSEcxx . . $ CB_FORMAT_DATA_RESPONSE.;
267 formatDataResponse.commoncxx . . $ $anonymous_type_67eca9c3bb6f2114_14#common..msgFlagscxx . . $ $anonymous_type_67eca9c3bb6f2114_2#msgFlags. = msgFlags;
268 formatDataResponse.commoncxx . . $ $anonymous_type_67eca9c3bb6f2114_14#common..dataLencxx . . $ $anonymous_type_67eca9c3bb6f2114_2#dataLen. = dataLen;
269
270 if ((error = cliprdr_read_format_data_responsecxx . . $ cliprdr_read_format_data_response(7e66d52d024692ca).(s, &formatDataResponse)))
271 return error;
272
273 const UINT32cxx . . $ UINT32# mask =
274 freerdp_settings_get_uint32cxx . . $ freerdp_settings_get_uint32(94c9870a51b00def).(context->rdpcontextcxx . . $ s_cliprdr_client_context#rdpcontext.->settingscxx . . $ rdp_context#settings., FreeRDP_ClipboardFeatureMaskcxx . . $ FreeRDP_ClipboardFeatureMask.);
275 if ((mask & (CLIPRDR_FLAG_REMOTE_TO_LOCALcxx . . $ `include/freerdp/settings_types.h:345:9`! | CLIPRDR_FLAG_REMOTE_TO_LOCAL_FILEScxx . . $ `include/freerdp/settings_types.h:346:9`!)) == 0)
276 {
277 WLog_Printcxx . . $ `winpr/include/winpr/wlog.h:256:9`!(cliprdr->log, WLOG_WARN,
278 "Received ServerFormatDataResponse but remote -> local clipboard is disabled");
279 return CHANNEL_RC_OKcxx . . $ `winpr/include/winpr/wtsapi.h:159:9`!;
280 }
281
282 IFCALLRETcxx . . $ `include/freerdp/api.h:96:9`!(context->ServerFormatDataResponse, error, context, &formatDataResponse);
283 if (error)
284 WLog_Printcxx . . $ `winpr/include/winpr/wlog.h:256:9`!(cliprdr->log, WLOG_ERROR,
285 "ServerFormatDataResponse failed with error %" PRIu32cxx . . $ `<external>/15933738808807975373/inttypes.h:109:10`! "!", error);
286
287 return error;
288 }