1 | /** @file
|
---|
2 | * Shared Clipboard - Common header for host service and guest clients.
|
---|
3 | *
|
---|
4 | * Protocol history notes (incomplete):
|
---|
5 | *
|
---|
6 | * - VirtualBox 6.1.0 betas: Started work on adding support for copying &
|
---|
7 | * pasting files and directories, refactoring the protocol in the process.
|
---|
8 | * - Adds guest/host feature flags.
|
---|
9 | * - Adds context IDs (via guest feature flags).
|
---|
10 | * - Borrowed the message handling from guest controls.
|
---|
11 | * - Adds a multitude of functions and messages for dealing with file & dir
|
---|
12 | * copying, most inte
|
---|
13 | *
|
---|
14 | * - VirtualBox x.x.x: Missing a lot of gradual improvements here.
|
---|
15 | *
|
---|
16 | * - VirtualBox 1.3.2 (r17182): Initial implementation, supporting text.
|
---|
17 | */
|
---|
18 |
|
---|
19 | /*
|
---|
20 | * Copyright (C) 2006-2020 Oracle Corporation
|
---|
21 | *
|
---|
22 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
23 | * available from http://www.virtualbox.org. This file is free software;
|
---|
24 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
25 | * General Public License (GPL) as published by the Free Software
|
---|
26 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
27 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
28 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
29 | *
|
---|
30 | * The contents of this file may alternatively be used under the terms
|
---|
31 | * of the Common Development and Distribution License Version 1.0
|
---|
32 | * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
|
---|
33 | * VirtualBox OSE distribution, in which case the provisions of the
|
---|
34 | * CDDL are applicable instead of those of the GPL.
|
---|
35 | *
|
---|
36 | * You may elect to license modified versions of this file under the
|
---|
37 | * terms and conditions of either the GPL or the CDDL or both.
|
---|
38 | */
|
---|
39 |
|
---|
40 | #ifndef VBOX_INCLUDED_HostServices_VBoxClipboardSvc_h
|
---|
41 | #define VBOX_INCLUDED_HostServices_VBoxClipboardSvc_h
|
---|
42 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
43 | # pragma once
|
---|
44 | #endif
|
---|
45 |
|
---|
46 | #include <VBox/VMMDevCoreTypes.h>
|
---|
47 | #include <VBox/VBoxGuestCoreTypes.h>
|
---|
48 | #include <VBox/hgcmsvc.h>
|
---|
49 |
|
---|
50 |
|
---|
51 | /** @name VBOX_SHCL_MODE_XXX - The Shared Clipboard modes of operation.
|
---|
52 | * @{
|
---|
53 | */
|
---|
54 | /** Shared Clipboard is disabled completely. */
|
---|
55 | #define VBOX_SHCL_MODE_OFF 0
|
---|
56 | /** Only transfers from host to the guest are possible. */
|
---|
57 | #define VBOX_SHCL_MODE_HOST_TO_GUEST 1
|
---|
58 | /** Only transfers from guest to the host are possible. */
|
---|
59 | #define VBOX_SHCL_MODE_GUEST_TO_HOST 2
|
---|
60 | /** Bidirectional transfers between guest and host are possible. */
|
---|
61 | #define VBOX_SHCL_MODE_BIDIRECTIONAL 3
|
---|
62 | /** @} */
|
---|
63 |
|
---|
64 | /** @name VBOX_SHCL_TRANSFER_MODE_XXX - The Shared Clipboard file transfer mode (bit field).
|
---|
65 | * @{
|
---|
66 | */
|
---|
67 | /** Shared Clipboard file transfers are disabled. */
|
---|
68 | #define VBOX_SHCL_TRANSFER_MODE_DISABLED UINT32_C(0)
|
---|
69 | /** Shared Clipboard file transfers are enabled. */
|
---|
70 | #define VBOX_SHCL_TRANSFER_MODE_ENABLED RT_BIT(0)
|
---|
71 | /** Shared Clipboard file transfer mode valid mask. */
|
---|
72 | #define VBOX_SHCL_TRANSFER_MODE_VALID_MASK UINT32_C(0x1)
|
---|
73 | /** @} */
|
---|
74 |
|
---|
75 |
|
---|
76 | /** @name VBOX_SHCL_HOST_FN_XXX - The service functions which are callable by host.
|
---|
77 | * @note These are not sacred and can be modified at will as long as all host
|
---|
78 | * clients are updated accordingly (probably just Main).
|
---|
79 | * @{
|
---|
80 | */
|
---|
81 | /** Sets the current Shared Clipboard operation mode. */
|
---|
82 | #define VBOX_SHCL_HOST_FN_SET_MODE 1
|
---|
83 | /** Sets the current Shared Clipboard (file) transfers mode.
|
---|
84 | * Operates on the VBOX_SHCL_TRANSFERS_XXX defines.
|
---|
85 | * @since 6.1 */
|
---|
86 | #define VBOX_SHCL_HOST_FN_SET_TRANSFER_MODE 2
|
---|
87 | /** Run headless on the host, i.e. do not touch the host clipboard. */
|
---|
88 | #define VBOX_SHCL_HOST_FN_SET_HEADLESS 3
|
---|
89 |
|
---|
90 | /** Reports cancellation of the current operation to the guest.
|
---|
91 | * @since 6.1 - still a todo */
|
---|
92 | #define VBOX_SHCL_HOST_FN_CANCEL 4
|
---|
93 | /** Reports an error to the guest.
|
---|
94 | * @since 6.1 - still a todo */
|
---|
95 | #define VBOX_SHCL_HOST_FN_ERROR 5
|
---|
96 | /** Reports that a new clipboard area has been registered.
|
---|
97 | * @since 6.1 - not implemented */
|
---|
98 | #define VBOX_SHCL_HOST_FN_AREA_REGISTER 6
|
---|
99 | /** Reports that a clipboard area has been unregistered.
|
---|
100 | * @since 6.1 - not implemented */
|
---|
101 | #define VBOX_SHCL_HOST_FN_AREA_UNREGISTER 7
|
---|
102 | /** Reports that a client (host / guest) has attached to a clipboard area.
|
---|
103 | * @since 6.1 - not implemented */
|
---|
104 | #define VBOX_SHCL_HOST_FN_AREA_ATTACH 8
|
---|
105 | /** Reports that a client (host / guest) has detached from a clipboard area.
|
---|
106 | * @since 6.1 - not implemented */
|
---|
107 | #define VBOX_SHCL_HOST_FN_AREA_DETACH 9
|
---|
108 | /** @} */
|
---|
109 |
|
---|
110 |
|
---|
111 | /** @name VBOX_SHCL_HOST_MSG_XXX - The host messages for the guest.
|
---|
112 | * @{
|
---|
113 | */
|
---|
114 | /** Returned only when the HGCM client session is closed (by different thread).
|
---|
115 | *
|
---|
116 | * This can require no futher host interaction since the session has been
|
---|
117 | * closed.
|
---|
118 | *
|
---|
119 | * @since 1.3.2
|
---|
120 | */
|
---|
121 | #define VBOX_SHCL_HOST_MSG_QUIT 1
|
---|
122 | /** Request data for a specific format from the guest.
|
---|
123 | *
|
---|
124 | * Two parameters, first the 32-bit message ID followed by a 32-bit format bit
|
---|
125 | * (VBOX_SHCL_FMT_XXX). The guest will respond by issuing a
|
---|
126 | * VBOX_SHCL_GUEST_FN_DATA_WRITE.
|
---|
127 | *
|
---|
128 | * @note The host may sometimes incorrectly set more than one format bit, in
|
---|
129 | * which case it's up to the guest to pick which to write back.
|
---|
130 | * @since 1.3.2
|
---|
131 | */
|
---|
132 | #define VBOX_SHCL_HOST_MSG_READ_DATA 2
|
---|
133 | /** Reports available clipboard format on the host to the guest.
|
---|
134 | *
|
---|
135 | * Two parameters, first the 32-bit message ID followed by a 32-bit format mask
|
---|
136 | * containing zero or more VBOX_SHCL_FMT_XXX flags. The guest is not require to
|
---|
137 | * respond to the host when receiving this message.
|
---|
138 | *
|
---|
139 | * @since 1.3.2
|
---|
140 | */
|
---|
141 | #define VBOX_SHCL_HOST_MSG_FORMATS_REPORT 3
|
---|
142 | /** Message PEEK or GET operation was canceled, try again.
|
---|
143 | *
|
---|
144 | * This is returned by VBOX_SHCL_GUEST_FN_MSG_PEEK_WAIT and
|
---|
145 | * VBOX_SHCL_GUEST_FN_MSG_OLD_GET_WAIT in response to the guest calling
|
---|
146 | * VBOX_SHCL_GUEST_FN_MSG_CANCEL. The 2nd parameter is set to zero (be it
|
---|
147 | * thought of as a parameter count or a format mask).
|
---|
148 | *
|
---|
149 | * @since 6.1.0
|
---|
150 | */
|
---|
151 | #define VBOX_SHCL_HOST_MSG_CANCELED 4
|
---|
152 |
|
---|
153 | /** Request data for a specific format from the guest with context ID.
|
---|
154 | *
|
---|
155 | * This is send instead of the VBOX_SHCL_HOST_MSG_READ_DATA message to guest
|
---|
156 | * that advertises VBOX_SHCL_GF_0_CONTEXT_ID. The first parameter is a 64-bit
|
---|
157 | * context ID which is to be used when issuing VBOX_SHCL_GUEST_F_DATA_WRITE, and
|
---|
158 | * the second parameter is a 32-bit format bit (VBOX_SHCL_FMT_XXX). The guest
|
---|
159 | * will respond by issuing a VBOX_SHCL_GUEST_F_DATA_WRITE.
|
---|
160 | *
|
---|
161 | * @note The host may sometimes incorrectly set more than one format bit, in
|
---|
162 | * which case it's up to the guest to pick which to write back.
|
---|
163 | * @since 6.1.2
|
---|
164 | */
|
---|
165 | #define VBOX_SHCL_HOST_MSG_READ_DATA_CID 5
|
---|
166 |
|
---|
167 | /** Sends a transfer status to the guest side.
|
---|
168 | * @since 6.1.?
|
---|
169 | */
|
---|
170 | #define VBOX_SHCL_HOST_MSG_TRANSFER_STATUS 50
|
---|
171 | /** Reads the root list header from the guest.
|
---|
172 | * @since 6.1.?
|
---|
173 | */
|
---|
174 | #define VBOX_SHCL_HOST_MSG_TRANSFER_ROOT_LIST_HDR_READ 51
|
---|
175 | /** Writes the root list header to the guest.
|
---|
176 | * @since 6.1.?
|
---|
177 | */
|
---|
178 | #define VBOX_SHCL_HOST_MSG_TRANSFER_ROOT_LIST_HDR_WRITE 52
|
---|
179 | /** Reads a root list entry from the guest.
|
---|
180 | * @since 6.1.?
|
---|
181 | */
|
---|
182 | #define VBOX_SHCL_HOST_MSG_TRANSFER_ROOT_LIST_ENTRY_READ 53
|
---|
183 | /** Writes a root list entry to the guest.
|
---|
184 | * @since 6.1.?
|
---|
185 | */
|
---|
186 | #define VBOX_SHCL_HOST_MSG_TRANSFER_ROOT_LIST_ENTRY_WRITE 54
|
---|
187 | /** Open a transfer list on the guest side.
|
---|
188 | * @since 6.1.?
|
---|
189 | */
|
---|
190 | #define VBOX_SHCL_HOST_MSG_TRANSFER_LIST_OPEN 55
|
---|
191 | /** Closes a formerly opened transfer list on the guest side.
|
---|
192 | * @since 6.1.?
|
---|
193 | */
|
---|
194 | #define VBOX_SHCL_HOST_MSG_TRANSFER_LIST_CLOSE 56
|
---|
195 | /** Reads a list header from the guest.
|
---|
196 | * @since 6.1.?
|
---|
197 | */
|
---|
198 | #define VBOX_SHCL_HOST_MSG_TRANSFER_LIST_HDR_READ 57
|
---|
199 | /** Writes a list header to the guest.
|
---|
200 | * @since 6.1.?
|
---|
201 | */
|
---|
202 | #define VBOX_SHCL_HOST_MSG_TRANSFER_LIST_HDR_WRITE 58
|
---|
203 | /** Reads a list entry from the guest.
|
---|
204 | * @since 6.1.?
|
---|
205 | */
|
---|
206 | #define VBOX_SHCL_HOST_MSG_TRANSFER_LIST_ENTRY_READ 59
|
---|
207 | /** Writes a list entry to the guest.
|
---|
208 | * @since 6.1.?
|
---|
209 | */
|
---|
210 | #define VBOX_SHCL_HOST_MSG_TRANSFER_LIST_ENTRY_WRITE 60
|
---|
211 | /** Open a transfer object on the guest side.
|
---|
212 | * @since 6.1.?
|
---|
213 | */
|
---|
214 | #define VBOX_SHCL_HOST_MSG_TRANSFER_OBJ_OPEN 61
|
---|
215 | /** Closes a formerly opened transfer object on the guest side.
|
---|
216 | * @since 6.1.?
|
---|
217 | */
|
---|
218 | #define VBOX_SHCL_HOST_MSG_TRANSFER_OBJ_CLOSE 62
|
---|
219 | /** Reads from an object on the guest side.
|
---|
220 | * @since 6.1.?
|
---|
221 | */
|
---|
222 | #define VBOX_SHCL_HOST_MSG_TRANSFER_OBJ_READ 63
|
---|
223 | /** Writes to an object on the guest side.
|
---|
224 | * @since 6.1.?
|
---|
225 | */
|
---|
226 | #define VBOX_SHCL_HOST_MSG_TRANSFER_OBJ_WRITE 64
|
---|
227 | /** Indicates that the host has canceled a transfer.
|
---|
228 | * @since 6.1.?
|
---|
229 | */
|
---|
230 | #define VBOX_SHCL_HOST_MSG_TRANSFER_CANCEL 65
|
---|
231 | /** Indicates that the an unrecoverable error on the host occurred.
|
---|
232 | * @since 6.1.?
|
---|
233 | */
|
---|
234 | #define VBOX_SHCL_HOST_MSG_TRANSFER_ERROR 66
|
---|
235 | /** @} */
|
---|
236 |
|
---|
237 |
|
---|
238 | /** @name VBOX_SHCL_GUEST_FN_XXX - The service functions which are called by guest.
|
---|
239 | * @{
|
---|
240 | */
|
---|
241 | /** Calls the host and waits (blocking) for an host event VBOX_SHCL_HOST_MSG_XXX.
|
---|
242 | *
|
---|
243 | * @deprecated Replaced by VBOX_SHCL_GUEST_FN_MSG_PEEK_WAIT,
|
---|
244 | * VBOX_SHCL_GUEST_FN_MSG_GET, VBOX_SHCL_GUEST_FN_MSG_CANCEL.
|
---|
245 | * @since 1.3.2
|
---|
246 | */
|
---|
247 | #define VBOX_SHCL_GUEST_FN_MSG_OLD_GET_WAIT 1
|
---|
248 | /** Sends a list of available formats to the host.
|
---|
249 | *
|
---|
250 | * This function takes a single parameter, a 32-bit set of formats
|
---|
251 | * (VBOX_SHCL_FMT_XXX), this can be zero if the clipboard is empty or previously
|
---|
252 | * reported formats are no longer avaible (logout, shutdown, whatever).
|
---|
253 | *
|
---|
254 | * There was a period during 6.1 development where it would take three
|
---|
255 | * parameters, a 64-bit context ID preceeded the formats and a 32-bit MBZ flags
|
---|
256 | * parameter was appended. This is still accepted, though deprecated.
|
---|
257 | *
|
---|
258 | * @returns May return informational statuses indicating partial success, just
|
---|
259 | * ignore it.
|
---|
260 | * @retval VINF_SUCCESS on success.
|
---|
261 | * @retval VERR_INVALID_CLIENT_ID
|
---|
262 | * @retval VERR_WRONG_PARAMETER_COUNT
|
---|
263 | * @retval VERR_WRONG_PARAMETER_TYPE
|
---|
264 | * @retval VERR_NOT_SUPPORTED if all the formats are unsupported, host
|
---|
265 | * clipboard will be empty.
|
---|
266 | * @since 1.3.2
|
---|
267 | */
|
---|
268 | #define VBOX_SHCL_GUEST_FN_REPORT_FORMATS 2
|
---|
269 | /** Reads data in specified format from the host.
|
---|
270 | *
|
---|
271 | * This function takes three parameters, a 32-bit format bit
|
---|
272 | * (VBOX_SHCL_FMT_XXX), a buffer and 32-bit number of bytes read (output).
|
---|
273 | *
|
---|
274 | * There was a period during 6.1 development where it would take five parameters
|
---|
275 | * when VBOX_SHCL_GF_0_CONTEXT_ID was reported by the guest. A 64-bit context
|
---|
276 | * ID (ignored as purpose undefined), a 32-bit unused flag (MBZ), then the
|
---|
277 | * 32-bit format bits, number of bytes read (output), and the buffer. This
|
---|
278 | * format is still accepted.
|
---|
279 | *
|
---|
280 | * @retval VINF_SUCCESS on success.
|
---|
281 | * @retval VINF_BUFFER_OVERLFLOW (VBox >= 6.1 only) if not enough buffer space
|
---|
282 | * has been given to retrieve the actual data, no data actually copied.
|
---|
283 | * The call then must be repeated with a buffer size returned from the
|
---|
284 | * host in cbData.
|
---|
285 | * @retval VERR_INVALID_CLIENT_ID
|
---|
286 | * @retval VERR_WRONG_PARAMETER_COUNT
|
---|
287 | * @retval VERR_WRONG_PARAMETER_TYPE
|
---|
288 | * @since 1.3.2
|
---|
289 | */
|
---|
290 | #define VBOX_SHCL_GUEST_FN_DATA_READ 3
|
---|
291 | /** Writes requested data to the host.
|
---|
292 | *
|
---|
293 | * This function takes either 2 or 3 parameters. The last two parameters are a
|
---|
294 | * 32-bit format bit (VBOX_SHCL_FMT_XXX) and a data buffer holding the related
|
---|
295 | * data. The three parameter variant have a context ID first, which shall be a
|
---|
296 | * copy of the ID in the data request message.
|
---|
297 | *
|
---|
298 | * There was a period during 6.1 development where there would be a 5 parameter
|
---|
299 | * version of this, inserting an unused flags parameter between the context ID
|
---|
300 | * and the format bit, as well as a 32-bit data buffer size repate between the
|
---|
301 | * format bit and the data buffer. This format is still accepted, though
|
---|
302 | * deprecated.
|
---|
303 | *
|
---|
304 | * @retval VINF_SUCCESS on success.
|
---|
305 | * @retval VERR_INVALID_CLIENT_ID
|
---|
306 | * @retval VERR_WRONG_PARAMETER_COUNT
|
---|
307 | * @retval VERR_WRONG_PARAMETER_TYPE
|
---|
308 | * @retval VERR_INVALID_CONTEXT if the context ID didn't match up.
|
---|
309 | * @since 1.3.2
|
---|
310 | */
|
---|
311 | #define VBOX_SHCL_GUEST_FN_DATA_WRITE 4
|
---|
312 |
|
---|
313 | /** This is a left-over from the 6.1 dev cycle and will always fail.
|
---|
314 | *
|
---|
315 | * It used to take three 32-bit parameters, only one of which was actually used.
|
---|
316 | *
|
---|
317 | * It was replaced by VBOX_SHCL_GUEST_FN_REPORT_FEATURES and
|
---|
318 | * VBOX_SHCL_GUEST_FN_NEGOTIATE_CHUNK_SIZE.
|
---|
319 | *
|
---|
320 | * @retval VERR_NOT_IMPLEMENTED
|
---|
321 | * @since 6.1
|
---|
322 | */
|
---|
323 | #define VBOX_SHCL_GUEST_FN_CONNECT 5
|
---|
324 | /** Report guest side feature flags and retrieve the host ones.
|
---|
325 | *
|
---|
326 | * Two 64-bit parameters are passed in from the guest with the guest features
|
---|
327 | * (VBOX_SHCL_GF_XXX), the host replies by replacing the parameter values with
|
---|
328 | * the host ones (VBOX_SHCL_HF_XXX).
|
---|
329 | *
|
---|
330 | * @retval VINF_SUCCESS on success.
|
---|
331 | * @retval VERR_INVALID_CLIENT_ID
|
---|
332 | * @retval VERR_WRONG_PARAMETER_COUNT
|
---|
333 | * @retval VERR_WRONG_PARAMETER_TYPE
|
---|
334 | * @since 6.1.0
|
---|
335 | */
|
---|
336 | #define VBOX_SHCL_GUEST_FN_REPORT_FEATURES 6
|
---|
337 | /** Query the host ones feature masks.
|
---|
338 | *
|
---|
339 | * That way the guest (client) can get hold of the features from the host.
|
---|
340 | * Again, it is prudent to set the 127 bit and observe it being cleared on
|
---|
341 | * success, as older hosts might return success without doing anything.
|
---|
342 | *
|
---|
343 | * @retval VINF_SUCCESS on success.
|
---|
344 | * @retval VERR_INVALID_CLIENT_ID
|
---|
345 | * @retval VERR_WRONG_PARAMETER_COUNT
|
---|
346 | * @retval VERR_WRONG_PARAMETER_TYPE
|
---|
347 | * @since 6.1.0
|
---|
348 | */
|
---|
349 | #define VBOX_SHCL_GUEST_FN_QUERY_FEATURES 7
|
---|
350 | /** Peeks at the next message, returning immediately.
|
---|
351 | *
|
---|
352 | * Returns two 32-bit parameters, first is the message ID and the second the
|
---|
353 | * parameter count. May optionally return additional 32-bit parameters with the
|
---|
354 | * sizes of respective message parameters. To distinguish buffer sizes from
|
---|
355 | * integer parameters, the latter gets their sizes inverted (uint32_t is ~4U,
|
---|
356 | * uint64_t is ~8U).
|
---|
357 | *
|
---|
358 | * Does also support the VM restore checking as in VBOX_SHCL_GUEST_FN_MSG_PEEK_WAIT
|
---|
359 | * (64-bit param \# 0), see documentation there.
|
---|
360 | *
|
---|
361 | * @retval VINF_SUCCESS if a message was pending and is being returned.
|
---|
362 | * @retval VERR_TRY_AGAIN if no message pending.
|
---|
363 | * @retval VERR_VM_RESTORED if first parameter is a non-zero 64-bit value that
|
---|
364 | * does not match VbglR3GetSessionId() any more. The new value is
|
---|
365 | * returned.
|
---|
366 | * @retval VERR_INVALID_CLIENT_ID
|
---|
367 | * @retval VERR_WRONG_PARAMETER_COUNT
|
---|
368 | * @retval VERR_WRONG_PARAMETER_TYPE
|
---|
369 | * @since 6.1.0
|
---|
370 | */
|
---|
371 | #define VBOX_SHCL_GUEST_FN_MSG_PEEK_NOWAIT 8
|
---|
372 | /** Peeks at the next message, waiting for one to arrive.
|
---|
373 | *
|
---|
374 | * Returns two 32-bit parameters, first is the message ID and the second the
|
---|
375 | * parameter count. May optionally return additional 32-bit parameters with the
|
---|
376 | * sizes of respective message parameters. To distinguish buffer sizes from
|
---|
377 | * integer parameters, the latter gets their sizes inverted (uint32_t is ~4U,
|
---|
378 | * uint64_t is ~8U).
|
---|
379 | *
|
---|
380 | * To facilitate VM restore checking, the first parameter can be a 64-bit
|
---|
381 | * integer holding the VbglR3GetSessionId() value the guest knowns. The
|
---|
382 | * function will then check this before going to sleep and return
|
---|
383 | * VERR_VM_RESTORED if it doesn't match, same thing happens when the VM is
|
---|
384 | * restored.
|
---|
385 | *
|
---|
386 | * @retval VINF_SUCCESS if info about an pending message is being returned.
|
---|
387 | * @retval VINF_TRY_AGAIN and message set to VBOX_SHCL_HOST_MSG_CANCELED if
|
---|
388 | * cancelled by VBOX_SHCL_GUEST_FN_MSG_CANCEL.
|
---|
389 | * @retval VERR_RESOURCE_BUSY if another thread already made a waiting call.
|
---|
390 | * @retval VERR_VM_RESTORED if first parameter is a non-zero 64-bit value that
|
---|
391 | * does not match VbglR3GetSessionId() any more. The new value is
|
---|
392 | * returned.
|
---|
393 | * @retval VERR_INVALID_CLIENT_ID
|
---|
394 | * @retval VERR_WRONG_PARAMETER_COUNT
|
---|
395 | * @retval VERR_WRONG_PARAMETER_TYPE
|
---|
396 | * @note This replaces VBOX_SHCL_GUEST_FN_MSG_OLD_GET_WAIT.
|
---|
397 | * @since 6.1.0
|
---|
398 | */
|
---|
399 | #define VBOX_SHCL_GUEST_FN_MSG_PEEK_WAIT 9
|
---|
400 | /** Gets the next message, returning immediately.
|
---|
401 | *
|
---|
402 | * All parameters are specific to the message being retrieved, however if the
|
---|
403 | * first one is an integer value it shall be an input parameter holding the
|
---|
404 | * ID of the message being retrieved. While it would be nice to add a separate
|
---|
405 | * parameter for this purpose, this is done so because the code was liften from
|
---|
406 | * Guest Controls which had backwards compatibilities to consider and we just
|
---|
407 | * kept it like that.
|
---|
408 | *
|
---|
409 | * @retval VINF_SUCCESS if message retrieved and removed from the pending queue.
|
---|
410 | * @retval VERR_TRY_AGAIN if no message pending.
|
---|
411 | * @retval VERR_MISMATCH if the incoming message ID does not match the pending.
|
---|
412 | * @retval VERR_BUFFER_OVERFLOW if a parmeter buffer is too small. The buffer
|
---|
413 | * size was updated to reflect the required size.
|
---|
414 | * @retval VERR_INVALID_CLIENT_ID
|
---|
415 | * @retval VERR_WRONG_PARAMETER_COUNT
|
---|
416 | * @retval VERR_WRONG_PARAMETER_TYPE
|
---|
417 | * @note This replaces VBOX_SHCL_GUEST_FN_MSG_OLD_GET_WAIT.
|
---|
418 | * @since 6.1.0
|
---|
419 | */
|
---|
420 | #define VBOX_SHCL_GUEST_FN_MSG_GET 10
|
---|
421 | /** Cancels pending calls for this client session.
|
---|
422 | *
|
---|
423 | * This should be used if a VBOX_SHCL_GUEST_FN__MSG_PEEK_WAIT or
|
---|
424 | * VBOX_SHCL_GUEST_FN_MSG_OLD_GET_WAIT call gets interrupted on the client end,
|
---|
425 | * so as to prevent being rebuffed with VERR_RESOURCE_BUSY when restarting the
|
---|
426 | * call.
|
---|
427 | *
|
---|
428 | * @retval VINF_SUCCESS if cancelled any calls.
|
---|
429 | * @retval VWRN_NOT_FOUND if no callers.
|
---|
430 | * @retval VERR_INVALID_CLIENT_ID
|
---|
431 | * @retval VERR_WRONG_PARAMETER_COUNT
|
---|
432 | * @since 6.1.0
|
---|
433 | */
|
---|
434 | #define VBOX_SHCL_GUEST_FN_MSG_CANCEL 26
|
---|
435 |
|
---|
436 | /** Replies to a function from the host.
|
---|
437 | *
|
---|
438 | * @retval VINF_SUCCESS on success.
|
---|
439 | * @retval VERR_INVALID_CLIENT_ID
|
---|
440 | * @retval VERR_WRONG_PARAMETER_COUNT
|
---|
441 | * @retval VERR_WRONG_PARAMETER_TYPE
|
---|
442 | * @since 6.1.x
|
---|
443 | */
|
---|
444 | #define VBOX_SHCL_GUEST_FN_REPLY 11
|
---|
445 | /** Gets the root list header from the host.
|
---|
446 | *
|
---|
447 | * @retval VINF_SUCCESS on success.
|
---|
448 | * @retval VERR_INVALID_CLIENT_ID
|
---|
449 | * @retval VERR_WRONG_PARAMETER_COUNT
|
---|
450 | * @retval VERR_WRONG_PARAMETER_TYPE
|
---|
451 | * @since 6.1.x
|
---|
452 | */
|
---|
453 | #define VBOX_SHCL_GUEST_FN_ROOT_LIST_HDR_READ 12
|
---|
454 | /** Sends the root list header to the host.
|
---|
455 | *
|
---|
456 | * @retval VINF_SUCCESS on success.
|
---|
457 | * @retval VERR_INVALID_CLIENT_ID
|
---|
458 | * @retval VERR_WRONG_PARAMETER_COUNT
|
---|
459 | * @retval VERR_WRONG_PARAMETER_TYPE
|
---|
460 | * @since 6.1.x
|
---|
461 | */
|
---|
462 | #define VBOX_SHCL_GUEST_FN_ROOT_LIST_HDR_WRITE 13
|
---|
463 | /** Gets a root list root entry from the host.
|
---|
464 | *
|
---|
465 | * @retval VINF_SUCCESS on success.
|
---|
466 | * @retval VERR_INVALID_CLIENT_ID
|
---|
467 | * @retval VERR_WRONG_PARAMETER_COUNT
|
---|
468 | * @retval VERR_WRONG_PARAMETER_TYPE
|
---|
469 | * @since 6.1.x
|
---|
470 | */
|
---|
471 | #define VBOX_SHCL_GUEST_FN_ROOT_LIST_ENTRY_READ 14
|
---|
472 | /** Sends a root list root entry to the host.
|
---|
473 | *
|
---|
474 | * @retval VINF_SUCCESS on success.
|
---|
475 | * @retval VERR_INVALID_CLIENT_ID
|
---|
476 | * @retval VERR_WRONG_PARAMETER_COUNT
|
---|
477 | * @retval VERR_WRONG_PARAMETER_TYPE
|
---|
478 | * @since 6.1.x
|
---|
479 | */
|
---|
480 | #define VBOX_SHCL_GUEST_FN_ROOT_LIST_ENTRY_WRITE 15
|
---|
481 | /** Opens / gets a list handle from the host.
|
---|
482 | *
|
---|
483 | * @retval VINF_SUCCESS on success.
|
---|
484 | * @retval VERR_INVALID_CLIENT_ID
|
---|
485 | * @retval VERR_WRONG_PARAMETER_COUNT
|
---|
486 | * @retval VERR_WRONG_PARAMETER_TYPE
|
---|
487 | * @since 6.1.x
|
---|
488 | */
|
---|
489 | #define VBOX_SHCL_GUEST_FN_LIST_OPEN 16
|
---|
490 | /** Closes a list handle from the host.
|
---|
491 | *
|
---|
492 | * @retval VINF_SUCCESS on success.
|
---|
493 | * @retval VERR_INVALID_CLIENT_ID
|
---|
494 | * @retval VERR_WRONG_PARAMETER_COUNT
|
---|
495 | * @retval VERR_WRONG_PARAMETER_TYPE
|
---|
496 | * @since 6.1.x
|
---|
497 | */
|
---|
498 | #define VBOX_SHCL_GUEST_FN_LIST_CLOSE 17
|
---|
499 | /** Reads a list header from the host.
|
---|
500 | *
|
---|
501 | * @retval VINF_SUCCESS on success.
|
---|
502 | * @retval VERR_INVALID_CLIENT_ID
|
---|
503 | * @retval VERR_WRONG_PARAMETER_COUNT
|
---|
504 | * @retval VERR_WRONG_PARAMETER_TYPE
|
---|
505 | * @since 6.1.x
|
---|
506 | */
|
---|
507 | #define VBOX_SHCL_GUEST_FN_LIST_HDR_READ 18
|
---|
508 | /** Writes a list header to the host.
|
---|
509 | *
|
---|
510 | * @retval VINF_SUCCESS on success.
|
---|
511 | * @retval VERR_INVALID_CLIENT_ID
|
---|
512 | * @retval VERR_WRONG_PARAMETER_COUNT
|
---|
513 | * @retval VERR_WRONG_PARAMETER_TYPE
|
---|
514 | * @since 6.1.x
|
---|
515 | */
|
---|
516 | #define VBOX_SHCL_GUEST_FN_LIST_HDR_WRITE 19
|
---|
517 | /** Reads a list entry from the host.
|
---|
518 | *
|
---|
519 | * @retval VINF_SUCCESS on success.
|
---|
520 | * @retval VERR_INVALID_CLIENT_ID
|
---|
521 | * @retval VERR_WRONG_PARAMETER_COUNT
|
---|
522 | * @retval VERR_WRONG_PARAMETER_TYPE
|
---|
523 | * @since 6.1.x
|
---|
524 | */
|
---|
525 | #define VBOX_SHCL_GUEST_FN_LIST_ENTRY_READ 20
|
---|
526 | /** Sends a list entry to the host.
|
---|
527 | *
|
---|
528 | * @retval VINF_SUCCESS on success.
|
---|
529 | * @retval VERR_INVALID_CLIENT_ID
|
---|
530 | * @retval VERR_WRONG_PARAMETER_COUNT
|
---|
531 | * @retval VERR_WRONG_PARAMETER_TYPE
|
---|
532 | * @since 6.1.x
|
---|
533 | */
|
---|
534 | #define VBOX_SHCL_GUEST_FN_LIST_ENTRY_WRITE 21
|
---|
535 | /** Opens an object on the host.
|
---|
536 | *
|
---|
537 | * @retval VINF_SUCCESS on success.
|
---|
538 | * @retval VERR_INVALID_CLIENT_ID
|
---|
539 | * @retval VERR_WRONG_PARAMETER_COUNT
|
---|
540 | * @retval VERR_WRONG_PARAMETER_TYPE
|
---|
541 | * @since 6.1.x
|
---|
542 | */
|
---|
543 | #define VBOX_SHCL_GUEST_FN_OBJ_OPEN 22
|
---|
544 | /** Closes an object on the host.
|
---|
545 | *
|
---|
546 | * @retval VINF_SUCCESS on success.
|
---|
547 | * @retval VERR_INVALID_CLIENT_ID
|
---|
548 | * @retval VERR_WRONG_PARAMETER_COUNT
|
---|
549 | * @retval VERR_WRONG_PARAMETER_TYPE
|
---|
550 | * @since 6.1.x
|
---|
551 | */
|
---|
552 | #define VBOX_SHCL_GUEST_FN_OBJ_CLOSE 23
|
---|
553 | /** Reads from an object on the host.
|
---|
554 | *
|
---|
555 | * @retval VINF_SUCCESS on success.
|
---|
556 | * @retval VERR_INVALID_CLIENT_ID
|
---|
557 | * @retval VERR_WRONG_PARAMETER_COUNT
|
---|
558 | * @retval VERR_WRONG_PARAMETER_TYPE
|
---|
559 | * @since 6.1.x
|
---|
560 | */
|
---|
561 | #define VBOX_SHCL_GUEST_FN_OBJ_READ 24
|
---|
562 | /** Writes to an object on the host.
|
---|
563 | *
|
---|
564 | * @retval VINF_SUCCESS on success.
|
---|
565 | * @retval VERR_INVALID_CLIENT_ID
|
---|
566 | * @retval VERR_WRONG_PARAMETER_COUNT
|
---|
567 | * @retval VERR_WRONG_PARAMETER_TYPE
|
---|
568 | * @since 6.1.x
|
---|
569 | */
|
---|
570 | #define VBOX_SHCL_GUEST_FN_OBJ_WRITE 25
|
---|
571 | /** Reports an error to the host.
|
---|
572 | *
|
---|
573 | * @todo r=bird: Smells like GUEST_MSG_SKIP
|
---|
574 | *
|
---|
575 | * @retval VINF_SUCCESS on success.
|
---|
576 | * @retval VERR_INVALID_CLIENT_ID
|
---|
577 | * @retval VERR_WRONG_PARAMETER_COUNT
|
---|
578 | * @retval VERR_WRONG_PARAMETER_TYPE
|
---|
579 | * @since 6.1
|
---|
580 | */
|
---|
581 | #define VBOX_SHCL_GUEST_FN_ERROR 27
|
---|
582 |
|
---|
583 | /** For negotiating a chunk size between the guest and host.
|
---|
584 | *
|
---|
585 | * Takes two 32-bit parameters both being byte counts, the first one gives the
|
---|
586 | * maximum chunk size the guest can handle and the second the preferred choice
|
---|
587 | * of the guest. Upon return, the host will have updated both of them to
|
---|
588 | * reflect the maximum and default chunk sizes this client connect. The guest
|
---|
589 | * may set the 2nd value to zero and let the host choose.
|
---|
590 | *
|
---|
591 | * @retval VINF_SUCCESS on success.
|
---|
592 | * @retval VERR_INVALID_CLIENT_ID
|
---|
593 | * @retval VERR_WRONG_PARAMETER_COUNT
|
---|
594 | * @retval VERR_WRONG_PARAMETER_TYPE
|
---|
595 | * @retval VERR_INVALID_PARAMETER if the 2nd parameter is larger than the
|
---|
596 | * first one
|
---|
597 | * @since 6.1
|
---|
598 | */
|
---|
599 | #define VBOX_SHCL_GUEST_FN_NEGOTIATE_CHUNK_SIZE 28
|
---|
600 |
|
---|
601 | /** The last function number (used for validation/sanity). */
|
---|
602 | #define VBOX_SHCL_GUEST_FN_LAST VBOX_SHCL_GUEST_FN_NEGOTIATE_CHUNK_SIZE
|
---|
603 | /** @} */
|
---|
604 |
|
---|
605 |
|
---|
606 | /** Maximum chunk size for a single data transfer. */
|
---|
607 | #define VBOX_SHCL_MAX_CHUNK_SIZE VMMDEV_MAX_HGCM_DATA_SIZE - _4K
|
---|
608 | /** Default chunk size for a single data transfer. */
|
---|
609 | #define VBOX_SHCL_DEFAULT_CHUNK_SIZE RT_MIN(_64K, VBOX_SHCL_MAX_CHUNK_SIZE);
|
---|
610 |
|
---|
611 |
|
---|
612 | /** @name VBOX_SHCL_GF_XXX - Guest features.
|
---|
613 | * @sa VBOX_SHCL_GUEST_FN_REPORT_FEATURES
|
---|
614 | * @{ */
|
---|
615 | /** No flags set. */
|
---|
616 | #define VBOX_SHCL_GF_NONE 0
|
---|
617 | /** The guest can handle context IDs where applicable. */
|
---|
618 | #define VBOX_SHCL_GF_0_CONTEXT_ID RT_BIT_64(0)
|
---|
619 | /** The guest can copy & paste files and directories.
|
---|
620 | * @since 6.1.? */
|
---|
621 | #define VBOX_SHCL_GF_0_TRANSFERS RT_BIT_64(1)
|
---|
622 | /** Bit that must be set in the 2nd parameter, will be cleared if the host reponds
|
---|
623 | * correctly (old hosts might not). */
|
---|
624 | #define VBOX_SHCL_GF_1_MUST_BE_ONE RT_BIT_64(63)
|
---|
625 | /** @} */
|
---|
626 |
|
---|
627 | /** @name VBOX_GUESTCTRL_HF_XXX - Host features.
|
---|
628 | * @sa VBOX_SHCL_GUEST_FN_REPORT_FEATURES
|
---|
629 | * @{ */
|
---|
630 | /** No flags set. */
|
---|
631 | #define VBOX_SHCL_HF_NONE 0
|
---|
632 | /** The host can handle context IDs where applicable as well as the new
|
---|
633 | * message handling functions. */
|
---|
634 | #define VBOX_SHCL_HF_0_CONTEXT_ID RT_BIT_64(0)
|
---|
635 | /** The host can copy & paste files and directories.
|
---|
636 | * This includes messages like
|
---|
637 | * @since 6.1.? */
|
---|
638 | #define VBOX_SHCL_HF_0_TRANSFERS RT_BIT_64(1)
|
---|
639 | /** @} */
|
---|
640 |
|
---|
641 |
|
---|
642 | /** @name VBOX_SHCL_FMT_XXX - Data formats (flags) for Shared Clipboard.
|
---|
643 | * @{
|
---|
644 | */
|
---|
645 | /** No format set. */
|
---|
646 | #define VBOX_SHCL_FMT_NONE 0
|
---|
647 | /** Shared Clipboard format is an Unicode text. */
|
---|
648 | #define VBOX_SHCL_FMT_UNICODETEXT RT_BIT(0)
|
---|
649 | /** Shared Clipboard format is bitmap (BMP / DIB). */
|
---|
650 | #define VBOX_SHCL_FMT_BITMAP RT_BIT(1)
|
---|
651 | /** Shared Clipboard format is HTML. */
|
---|
652 | #define VBOX_SHCL_FMT_HTML RT_BIT(2)
|
---|
653 | #ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
|
---|
654 | /** Shared Clipboard format is a transfer list. */
|
---|
655 | # define VBOX_SHCL_FMT_URI_LIST RT_BIT(3)
|
---|
656 | #endif
|
---|
657 | /** @} */
|
---|
658 |
|
---|
659 |
|
---|
660 | /** @name Context ID related macros and limits
|
---|
661 | * @{ */
|
---|
662 | /**
|
---|
663 | * Creates a context ID out of a client ID, a transfer ID and an event ID (count).
|
---|
664 | */
|
---|
665 | #define VBOX_SHCL_CONTEXTID_MAKE(a_idSession, a_idTransfer, a_idEvent) \
|
---|
666 | ( ((uint64_t)((a_idSession) & 0xffff) << 48) \
|
---|
667 | | ((uint64_t)((a_idTransfer) & 0xffff) << 32) \
|
---|
668 | | ((uint32_t) (a_idEvent)) \
|
---|
669 | )
|
---|
670 | /** Creates a context ID out of a session ID. */
|
---|
671 | #define VBOX_SHCL_CONTEXTID_MAKE_SESSION(a_idSession) VBOX_SHCL_CONTEXTID_MAKE(a_idSession, 0, 0)
|
---|
672 | /** Gets the session ID out of a context ID. */
|
---|
673 | #define VBOX_SHCL_CONTEXTID_GET_SESSION(a_idContext) ( (uint16_t)(((a_idContext) >> 48) & UINT16_MAX) )
|
---|
674 | /** Gets the transfer ID out of a context ID. */
|
---|
675 | #define VBOX_SHCL_CONTEXTID_GET_TRANSFER(a_idContext) ( (uint16_t)(((a_idContext) >> 32) & UINT16_MAX) )
|
---|
676 | /** Gets the transfer event out of a context ID. */
|
---|
677 | #define VBOX_SHCL_CONTEXTID_GET_EVENT(a_idContext) ( (uint32_t)( (a_idContext) & UINT32_MAX) )
|
---|
678 |
|
---|
679 | /** Maximum number of concurrent Shared Clipboard client sessions a VM can have. */
|
---|
680 | #define VBOX_SHCL_MAX_SESSIONS (UINT16_MAX - 1)
|
---|
681 | /** Maximum number of concurrent Shared Clipboard transfers a single client can have. */
|
---|
682 | #define VBOX_SHCL_MAX_TRANSFERS (UINT16_MAX - 1)
|
---|
683 | /** Maximum number of events a single Shared Clipboard transfer can have. */
|
---|
684 | #define VBOX_SHCL_MAX_EVENTS (UINT32_MAX - 1)
|
---|
685 | /** @} */
|
---|
686 |
|
---|
687 |
|
---|
688 | /*
|
---|
689 | * HGCM parameter structures.
|
---|
690 | */
|
---|
691 | /** @todo r=bird: These structures are mostly pointless, as they're only
|
---|
692 | * ever used by the VbglR3 part. The host service does not use these
|
---|
693 | * structures for decoding guest requests, instead it's all hardcoded. */
|
---|
694 | #pragma pack(1)
|
---|
695 | /**
|
---|
696 | * Waits (blocking) for a new host message to arrive.
|
---|
697 | * Deprecated; do not use anymore.
|
---|
698 | * Kept for maintaining compatibility with older Guest Additions.
|
---|
699 | */
|
---|
700 | typedef struct _VBoxShClGetHostMsgOld
|
---|
701 | {
|
---|
702 | VBGLIOCHGCMCALL hdr;
|
---|
703 |
|
---|
704 | /** uint32_t, out: Host message type. */
|
---|
705 | HGCMFunctionParameter msg;
|
---|
706 | /** uint32_t, out: VBOX_SHCL_FMT_*, depends on the 'msg'.
|
---|
707 | * r=andy This actual can have *different* meanings, depending on the host message type. */
|
---|
708 | HGCMFunctionParameter formats; /* OUT uint32_t */
|
---|
709 | } VBoxShClGetHostMsgOld;
|
---|
710 |
|
---|
711 | #define VBOX_SHCL_CPARMS_GET_HOST_MSG_OLD 2
|
---|
712 |
|
---|
713 | /** @name VBOX_SHCL_GUEST_FN_REPORT_FORMATS
|
---|
714 | * @{ */
|
---|
715 | /** VBOX_SHCL_GUEST_FN_REPORT_FORMATS parameters. */
|
---|
716 | typedef struct VBoxShClParmReportFormats
|
---|
717 | {
|
---|
718 | /** uint32_t, int: Zero or more VBOX_SHCL_FMT_XXX bits. */
|
---|
719 | HGCMFunctionParameter f32Formats;
|
---|
720 | } VBoxShClParmReportFormats;
|
---|
721 |
|
---|
722 | #define VBOX_SHCL_CPARMS_REPORT_FORMATS 1 /**< The parameter count for VBOX_SHCL_GUEST_FN_REPORT_FORMATS. */
|
---|
723 | #define VBOX_SHCL_CPARMS_REPORT_FORMATS_61B 3 /**< The 6.1 dev cycle variant, see VBOX_SHCL_GUEST_FN_REPORT_FORMATS. */
|
---|
724 | /** @} */
|
---|
725 |
|
---|
726 | /** @name VBOX_SHCL_GUEST_FN_DATA_READ
|
---|
727 | * @{ */
|
---|
728 | /** VBOX_SHCL_GUEST_FN_DATA_READ parameters. */
|
---|
729 | typedef struct VBoxShClParmDataRead
|
---|
730 | {
|
---|
731 | /** uint32_t, in: Requested format (VBOX_SHCL_FMT_XXX). */
|
---|
732 | HGCMFunctionParameter f32Format;
|
---|
733 | /** ptr, out: The data buffer to put the data in on success. */
|
---|
734 | HGCMFunctionParameter pData;
|
---|
735 | /** uint32_t, out: Size of returned data, if larger than the buffer, then no
|
---|
736 | * data was actually transferred and the guest must repeat the call. */
|
---|
737 | HGCMFunctionParameter cb32Needed;
|
---|
738 | } VBoxShClParmDataRead;
|
---|
739 |
|
---|
740 | #define VBOX_SHCL_CPARMS_DATA_READ 3 /**< The parameter count for VBOX_SHCL_GUEST_FN_DATA_READ. */
|
---|
741 | #define VBOX_SHCL_CPARMS_DATA_READ_61B 5 /**< The 6.1 dev cycle variant, see VBOX_SHCL_GUEST_FN_DATA_READ. */
|
---|
742 | /** @} */
|
---|
743 |
|
---|
744 | /** @name
|
---|
745 | * @{ */
|
---|
746 |
|
---|
747 | /** VBOX_SHCL_GUEST_FN_DATA_WRITE parameters. */
|
---|
748 | typedef struct VBoxShClParmDataWrite
|
---|
749 | {
|
---|
750 | /** uint64_t, in: Context ID from VBOX_SHCL_HOST_MSG_READ_DATA. */
|
---|
751 | HGCMFunctionParameter id64Context;
|
---|
752 | /** uint32_t, in: The data format (VBOX_SHCL_FMT_XXX). */
|
---|
753 | HGCMFunctionParameter f32Format;
|
---|
754 | /** ptr, in: The data. */
|
---|
755 | HGCMFunctionParameter pData;
|
---|
756 | } VBoxShClParmDataWrite;
|
---|
757 |
|
---|
758 | /** Old VBOX_SHCL_GUEST_FN_DATA_WRITE parameters. */
|
---|
759 | typedef struct VBoxShClParmDataWriteOld
|
---|
760 | {
|
---|
761 | /** uint32_t, in: The data format (VBOX_SHCL_FMT_XXX). */
|
---|
762 | HGCMFunctionParameter f32Format;
|
---|
763 | /** ptr, in: The data. */
|
---|
764 | HGCMFunctionParameter pData;
|
---|
765 | } VBoxShClParmDataWriteOld;
|
---|
766 |
|
---|
767 | #define VBOX_SHCL_CPARMS_DATA_WRITE 3 /**< The variant used when VBOX_SHCL_GF_0_CONTEXT_ID is reported. */
|
---|
768 | #define VBOX_SHCL_CPARMS_DATA_WRITE_OLD 2 /**< The variant used when VBOX_SHCL_GF_0_CONTEXT_ID isn't reported. */
|
---|
769 | #define VBOX_SHCL_CPARMS_DATA_WRITE_61B 5 /**< The 6.1 dev cycle variant, see VBOX_SHCL_GUEST_FN_DATA_WRITE. */
|
---|
770 | /** @} */
|
---|
771 |
|
---|
772 | /**
|
---|
773 | * Reports a transfer status.
|
---|
774 | */
|
---|
775 | typedef struct _VBoxShClTransferStatusMsg
|
---|
776 | {
|
---|
777 | VBGLIOCHGCMCALL hdr;
|
---|
778 |
|
---|
779 | /** uint64_t, out: Context ID. */
|
---|
780 | HGCMFunctionParameter uContext;
|
---|
781 | /** uint32_t, out: Direction of transfer; of type SHCLTRANSFERDIR_. */
|
---|
782 | HGCMFunctionParameter enmDir;
|
---|
783 | /** uint32_t, out: Status to report; of type SHCLTRANSFERSTATUS_. */
|
---|
784 | HGCMFunctionParameter enmStatus;
|
---|
785 | /** uint32_t, out: Result code to report. Optional. */
|
---|
786 | HGCMFunctionParameter rc;
|
---|
787 | /** uint32_t, out: Reporting flags. Currently unused and must be 0. */
|
---|
788 | HGCMFunctionParameter fFlags;
|
---|
789 | } VBoxShClTransferStatusMsg;
|
---|
790 |
|
---|
791 | #define VBOX_SHCL_CPARMS_TRANSFER_STATUS 5
|
---|
792 |
|
---|
793 | /**
|
---|
794 | * Asks the host for the next command to process, along
|
---|
795 | * with the needed amount of parameters and an optional blocking
|
---|
796 | * flag.
|
---|
797 | *
|
---|
798 | * Used by: VBOX_SHCL_GUEST_FN_GET_HOST_MSG
|
---|
799 | *
|
---|
800 | */
|
---|
801 | typedef struct _VBoxShClGetHostMsg
|
---|
802 | {
|
---|
803 | VBGLIOCHGCMCALL hdr;
|
---|
804 |
|
---|
805 | /** uint32_t, out: Message ID. */
|
---|
806 | HGCMFunctionParameter uMsg;
|
---|
807 | /** uint32_t, out: Number of parameters the message needs. */
|
---|
808 | HGCMFunctionParameter cParms;
|
---|
809 | /** uint32_t, in: Whether or not to block (wait) for a new message to arrive. */
|
---|
810 | HGCMFunctionParameter fBlock;
|
---|
811 | } VBoxShClPeekMsg;
|
---|
812 |
|
---|
813 | #define VBOX_SHCL_CPARMS_GET_HOST_MSG 3
|
---|
814 |
|
---|
815 | /** No listing flags specified. */
|
---|
816 | #define VBOX_SHCL_LIST_FLAG_NONE 0
|
---|
817 | /** Only returns one entry per read. */
|
---|
818 | #define VBOX_SHCL_LIST_FLAG_RETURN_ONE RT_BIT(0)
|
---|
819 | /** Restarts reading a list from the beginning. */
|
---|
820 | #define VBOX_SHCL_LIST_FLAG_RESTART RT_BIT(1)
|
---|
821 |
|
---|
822 | #define VBOX_SHCL_LISTHDR_FLAG_NONE 0
|
---|
823 |
|
---|
824 | /** No additional information provided. */
|
---|
825 | #define VBOX_SHCL_INFO_FLAG_NONE 0
|
---|
826 | /** Get object information of type SHCLFSOBJINFO. */
|
---|
827 | #define VBOX_SHCL_INFO_FLAG_FSOBJINFO RT_BIT(0)
|
---|
828 |
|
---|
829 | /**
|
---|
830 | * Status message for lists and objects.
|
---|
831 | */
|
---|
832 | typedef struct _VBoxShClStatusMsg
|
---|
833 | {
|
---|
834 | VBGLIOCHGCMCALL hdr;
|
---|
835 |
|
---|
836 | /** uint64_t, in: Context ID. */
|
---|
837 | HGCMFunctionParameter uContext;
|
---|
838 | /** uint32_t, in: Transfer status of type SHCLTRANSFERSTATUS. */
|
---|
839 | HGCMFunctionParameter uStatus;
|
---|
840 | /** pointer, in: Optional payload of this status, based on the status type. */
|
---|
841 | HGCMFunctionParameter pvPayload;
|
---|
842 | } VBoxShClStatusMsg;
|
---|
843 |
|
---|
844 | #define VBOX_SHCL_CPARMS_STATUS 3
|
---|
845 |
|
---|
846 | /** Invalid message type, do not use. */
|
---|
847 | #define VBOX_SHCL_REPLYMSGTYPE_INVALID 0
|
---|
848 | /** Replies a transfer status. */
|
---|
849 | #define VBOX_SHCL_REPLYMSGTYPE_TRANSFER_STATUS 1
|
---|
850 | /** Replies a list open status. */
|
---|
851 | #define VBOX_SHCL_REPLYMSGTYPE_LIST_OPEN 2
|
---|
852 | /** Replies a list close status. */
|
---|
853 | #define VBOX_SHCL_REPLYMSGTYPE_LIST_CLOSE 3
|
---|
854 | /** Replies an object open status. */
|
---|
855 | #define VBOX_SHCL_REPLYMSGTYPE_OBJ_OPEN 4
|
---|
856 | /** Replies an object close status. */
|
---|
857 | #define VBOX_SHCL_REPLYMSGTYPE_OBJ_CLOSE 5
|
---|
858 |
|
---|
859 | /**
|
---|
860 | * Generic reply message.
|
---|
861 | */
|
---|
862 | typedef struct _VBoxShClReplyMsg
|
---|
863 | {
|
---|
864 | VBGLIOCHGCMCALL hdr;
|
---|
865 |
|
---|
866 | /** uint64_t, out: Context ID. */
|
---|
867 | HGCMFunctionParameter uContext;
|
---|
868 | /** uint32_t, out: Message type of type VBOX_SHCL_REPLYMSGTYPE_XXX. */
|
---|
869 | HGCMFunctionParameter enmType;
|
---|
870 | /** uint32_t, out: IPRT result of overall operation. */
|
---|
871 | HGCMFunctionParameter rc;
|
---|
872 | /** pointer, out: Optional payload of this reply, based on the message type. */
|
---|
873 | HGCMFunctionParameter pvPayload;
|
---|
874 | union
|
---|
875 | {
|
---|
876 | struct
|
---|
877 | {
|
---|
878 | HGCMFunctionParameter enmStatus;
|
---|
879 | } TransferStatus;
|
---|
880 | struct
|
---|
881 | {
|
---|
882 | HGCMFunctionParameter uHandle;
|
---|
883 | } ListOpen;
|
---|
884 | struct
|
---|
885 | {
|
---|
886 | HGCMFunctionParameter uHandle;
|
---|
887 | } ObjOpen;
|
---|
888 | struct
|
---|
889 | {
|
---|
890 | HGCMFunctionParameter uHandle;
|
---|
891 | } ObjClose;
|
---|
892 | } u;
|
---|
893 | } VBoxShClReplyMsg;
|
---|
894 |
|
---|
895 | /** Minimum parameters (HGCM function parameters minus the union) a reply message must have. */
|
---|
896 | #define VBOX_SHCL_CPARMS_REPLY_MIN 4
|
---|
897 |
|
---|
898 | /**
|
---|
899 | * Structure for keeping root list message parameters.
|
---|
900 | */
|
---|
901 | typedef struct _VBoxShClRootListParms
|
---|
902 | {
|
---|
903 | /** uint64_t, in: Context ID. */
|
---|
904 | HGCMFunctionParameter uContext;
|
---|
905 | /** uint32_t, in: Roots listing flags; unused at the moment. */
|
---|
906 | HGCMFunctionParameter fRoots;
|
---|
907 | } VBoxShClRootListParms;
|
---|
908 |
|
---|
909 | #define VBOX_SHCL_CPARMS_ROOT_LIST 2
|
---|
910 |
|
---|
911 | /**
|
---|
912 | * Requests to read the root list header.
|
---|
913 | */
|
---|
914 | typedef struct _VBoxShClRootListReadReqMsg
|
---|
915 | {
|
---|
916 | VBGLIOCHGCMCALL hdr;
|
---|
917 |
|
---|
918 | VBoxShClRootListParms ReqParms;
|
---|
919 | } VBoxShClRootListReadReqMsg;
|
---|
920 |
|
---|
921 | #define VBOX_SHCL_CPARMS_ROOT_LIST_HDR_READ_REQ VBOX_SHCL_CPARMS_ROOT_LIST
|
---|
922 |
|
---|
923 | /**
|
---|
924 | * Reads / Writes a root list header.
|
---|
925 | */
|
---|
926 | typedef struct _VBoxShClRootListHdrMsg
|
---|
927 | {
|
---|
928 | VBGLIOCHGCMCALL hdr;
|
---|
929 |
|
---|
930 | VBoxShClRootListParms ReqParms;
|
---|
931 | /** uint64_t, in/out: Number of total root list entries. */
|
---|
932 | HGCMFunctionParameter cRoots;
|
---|
933 | } VBoxShClRootListHdrMsg;
|
---|
934 |
|
---|
935 | #define VBOX_SHCL_CPARMS_ROOT_LIST_HDR_READ VBOX_SHCL_CPARMS_ROOT_LIST + 1
|
---|
936 | #define VBOX_SHCL_CPARMS_ROOT_LIST_HDR_WRITE VBOX_SHCL_CPARMS_ROOT_LIST + 1
|
---|
937 |
|
---|
938 | /**
|
---|
939 | * Structure for keeping list entry message parameters.
|
---|
940 | */
|
---|
941 | typedef struct _VBoxShClRootListEntryParms
|
---|
942 | {
|
---|
943 | /** uint64_t, in: Context ID. */
|
---|
944 | HGCMFunctionParameter uContext;
|
---|
945 | /** uint32_t, in: VBOX_SHCL_INFO_FLAG_XXX. */
|
---|
946 | HGCMFunctionParameter fInfo;
|
---|
947 | /** uint32_t, in: Index of root list entry to get (zero-based). */
|
---|
948 | HGCMFunctionParameter uIndex;
|
---|
949 | } VBoxShClRootListEntryParms;
|
---|
950 |
|
---|
951 | #define VBOX_SHCL_CPARMS_ROOT_LIST_ENTRY 3
|
---|
952 |
|
---|
953 | /**
|
---|
954 | * Request to read a list root entry.
|
---|
955 | */
|
---|
956 | typedef struct _VBoxShClRootListEntryReadReqMsg
|
---|
957 | {
|
---|
958 | VBGLIOCHGCMCALL hdr;
|
---|
959 |
|
---|
960 | /** in: Request parameters. */
|
---|
961 | VBoxShClRootListEntryParms Parms;
|
---|
962 | } VBoxShClRootListEntryReadReqMsg;
|
---|
963 |
|
---|
964 | #define VBOX_SHCL_CPARMS_ROOT_LIST_ENTRY_READ_REQ VBOX_SHCL_CPARMS_ROOT_LIST_ENTRY
|
---|
965 |
|
---|
966 | /**
|
---|
967 | * Reads / Writes a root list entry.
|
---|
968 | */
|
---|
969 | typedef struct _VBoxShClRootListEntryMsg
|
---|
970 | {
|
---|
971 | VBGLIOCHGCMCALL hdr;
|
---|
972 |
|
---|
973 | /** in/out: Request parameters. */
|
---|
974 | VBoxShClRootListEntryParms Parms;
|
---|
975 | /** pointer, in/out: Entry name. */
|
---|
976 | HGCMFunctionParameter szName;
|
---|
977 | /** uint32_t, out: Bytes to be used for information/How many bytes were used. */
|
---|
978 | HGCMFunctionParameter cbInfo;
|
---|
979 | /** pointer, in/out: Information to be set/get (SHCLFSOBJINFO only currently).
|
---|
980 | * Do not forget to set the SHCLFSOBJINFO::Attr::enmAdditional for Get operation as well. */
|
---|
981 | HGCMFunctionParameter pvInfo;
|
---|
982 | } VBoxShClRootListEntryMsg;
|
---|
983 |
|
---|
984 | #define VBOX_SHCL_CPARMS_ROOT_LIST_ENTRY_READ VBOX_SHCL_CPARMS_ROOT_LIST_ENTRY + 3
|
---|
985 | #define VBOX_SHCL_CPARMS_ROOT_LIST_ENTRY_WRITE VBOX_SHCL_CPARMS_ROOT_LIST_ENTRY + 3
|
---|
986 |
|
---|
987 | /**
|
---|
988 | * Opens a list.
|
---|
989 | */
|
---|
990 | typedef struct _VBoxShClListOpenMsg
|
---|
991 | {
|
---|
992 | VBGLIOCHGCMCALL hdr;
|
---|
993 |
|
---|
994 | /** uint64_t, in: Context ID. */
|
---|
995 | HGCMFunctionParameter uContext;
|
---|
996 | /** uint32_t, in: Listing flags (see VBOX_SHCL_LIST_FLAG_XXX). */
|
---|
997 | HGCMFunctionParameter fList;
|
---|
998 | /** pointer, in: Filter string. */
|
---|
999 | HGCMFunctionParameter pvFilter;
|
---|
1000 | /** pointer, in: Listing poth. If empty or NULL the listing's root path will be opened. */
|
---|
1001 | HGCMFunctionParameter pvPath;
|
---|
1002 | /** uint64_t, out: List handle. */
|
---|
1003 | HGCMFunctionParameter uHandle;
|
---|
1004 | } VBoxShClListOpenMsg;
|
---|
1005 |
|
---|
1006 | #define VBOX_SHCL_CPARMS_LIST_OPEN 5
|
---|
1007 |
|
---|
1008 | /**
|
---|
1009 | * Closes a list.
|
---|
1010 | */
|
---|
1011 | typedef struct _VBoxShClListCloseMsg
|
---|
1012 | {
|
---|
1013 | VBGLIOCHGCMCALL hdr;
|
---|
1014 |
|
---|
1015 | /** uint64_t, in/out: Context ID. */
|
---|
1016 | HGCMFunctionParameter uContext;
|
---|
1017 | /** uint64_t, in: List handle. */
|
---|
1018 | HGCMFunctionParameter uHandle;
|
---|
1019 | } VBoxShClListCloseMsg;
|
---|
1020 |
|
---|
1021 | #define VBOX_SHCL_CPARMS_LIST_CLOSE 2
|
---|
1022 |
|
---|
1023 | typedef struct _VBoxShClListHdrReqParms
|
---|
1024 | {
|
---|
1025 | /** uint64_t, in: Context ID. */
|
---|
1026 | HGCMFunctionParameter uContext;
|
---|
1027 | /** uint64_t, in: List handle. */
|
---|
1028 | HGCMFunctionParameter uHandle;
|
---|
1029 | /** uint32_t, in: Flags of type VBOX_SHCL_LISTHDR_FLAG_XXX. */
|
---|
1030 | HGCMFunctionParameter fFlags;
|
---|
1031 | } VBoxShClListHdrReqParms;
|
---|
1032 |
|
---|
1033 | #define VBOX_SHCL_CPARMS_LIST_HDR_REQ 3
|
---|
1034 |
|
---|
1035 | /**
|
---|
1036 | * Request to read a list header.
|
---|
1037 | */
|
---|
1038 | typedef struct _VBoxShClListHdrReadReqMsg
|
---|
1039 | {
|
---|
1040 | VBGLIOCHGCMCALL hdr;
|
---|
1041 |
|
---|
1042 | VBoxShClListHdrReqParms ReqParms;
|
---|
1043 | } VBoxShClListHdrReadReqMsg;
|
---|
1044 |
|
---|
1045 | #define VBOX_SHCL_CPARMS_LIST_HDR_READ_REQ VBOX_SHCL_CPARMS_LIST_HDR_REQ
|
---|
1046 |
|
---|
1047 | /**
|
---|
1048 | * Reads / Writes a list header.
|
---|
1049 | */
|
---|
1050 | typedef struct _VBoxShClListHdrMsg
|
---|
1051 | {
|
---|
1052 | VBGLIOCHGCMCALL hdr;
|
---|
1053 |
|
---|
1054 | VBoxShClListHdrReqParms ReqParms;
|
---|
1055 | /** uint32_t, in/out: Feature flags (see VBOX_SHCL_FEATURE_FLAG_XXX). */
|
---|
1056 | HGCMFunctionParameter fFeatures;
|
---|
1057 | /** uint64_t, in/out: Number of total objects to transfer. */
|
---|
1058 | HGCMFunctionParameter cTotalObjects;
|
---|
1059 | /** uint64_t, in/out: Number of total bytes to transfer. */
|
---|
1060 | HGCMFunctionParameter cbTotalSize;
|
---|
1061 | } VBoxShClListHdrMsg;
|
---|
1062 |
|
---|
1063 | #define VBOX_SHCL_CPARMS_LIST_HDR VBOX_SHCL_CPARMS_LIST_HDR_REQ + 3
|
---|
1064 |
|
---|
1065 | typedef struct _VBoxShClListEntryReqParms
|
---|
1066 | {
|
---|
1067 | /** uint64_t, in: Context ID. */
|
---|
1068 | HGCMFunctionParameter uContext;
|
---|
1069 | /** uint64_t, in: List handle. */
|
---|
1070 | HGCMFunctionParameter uHandle;
|
---|
1071 | /** uint32_t, in: VBOX_SHCL_INFO_FLAG_XXX. */
|
---|
1072 | HGCMFunctionParameter fInfo;
|
---|
1073 | } VBoxShClListEntryReqParms;
|
---|
1074 |
|
---|
1075 | #define VBOX_SHCL_CPARMS_LIST_ENTRY_REQ 3
|
---|
1076 |
|
---|
1077 | /**
|
---|
1078 | * Request to read a list entry.
|
---|
1079 | */
|
---|
1080 | typedef struct _VBoxShClListEntryReadReqMsg
|
---|
1081 | {
|
---|
1082 | VBGLIOCHGCMCALL hdr;
|
---|
1083 |
|
---|
1084 | VBoxShClListEntryReqParms ReqParms;
|
---|
1085 | } VBoxShClListEntryReadReqMsg;
|
---|
1086 |
|
---|
1087 | #define VBOX_SHCL_CPARMS_LIST_ENTRY_READ VBOX_SHCL_CPARMS_LIST_ENTRY_REQ
|
---|
1088 |
|
---|
1089 | /**
|
---|
1090 | * Reads / Writes a list entry.
|
---|
1091 | */
|
---|
1092 | typedef struct _VBoxShClListEntryMsg
|
---|
1093 | {
|
---|
1094 | VBGLIOCHGCMCALL hdr;
|
---|
1095 |
|
---|
1096 | /** in/out: Request parameters. */
|
---|
1097 | VBoxShClListEntryReqParms ReqParms;
|
---|
1098 | /** pointer, in/out: Entry name. */
|
---|
1099 | HGCMFunctionParameter szName;
|
---|
1100 | /** uint32_t, out: Bytes to be used for information/How many bytes were used. */
|
---|
1101 | HGCMFunctionParameter cbInfo;
|
---|
1102 | /** pointer, in/out: Information to be set/get (SHCLFSOBJINFO only currently).
|
---|
1103 | * Do not forget to set the SHCLFSOBJINFO::Attr::enmAdditional for Get operation as well. */
|
---|
1104 | HGCMFunctionParameter pvInfo;
|
---|
1105 | } VBoxShClListEntryMsg;
|
---|
1106 |
|
---|
1107 | #define VBOX_SHCL_CPARMS_LIST_ENTRY VBOX_SHCL_CPARMS_LIST_ENTRY_REQ + 3
|
---|
1108 |
|
---|
1109 | /**
|
---|
1110 | * Opens a Shared Clipboard object.
|
---|
1111 | */
|
---|
1112 | typedef struct _VBoxShClObjOpenMsg
|
---|
1113 | {
|
---|
1114 | VBGLIOCHGCMCALL hdr;
|
---|
1115 |
|
---|
1116 | /** uint64_t, in/out: Context ID. */
|
---|
1117 | HGCMFunctionParameter uContext;
|
---|
1118 | /** uint64_t, out: Object handle. */
|
---|
1119 | HGCMFunctionParameter uHandle;
|
---|
1120 | /** pointer, in: Absoulte path of object to open/create. */
|
---|
1121 | HGCMFunctionParameter szPath;
|
---|
1122 | /** uint32_t in: Open / Create flags of type SHCL_OBJ_CF_. */
|
---|
1123 | HGCMFunctionParameter fCreate;
|
---|
1124 | } VBoxShClObjOpenMsg;
|
---|
1125 |
|
---|
1126 | #define VBOX_SHCL_CPARMS_OBJ_OPEN 4
|
---|
1127 |
|
---|
1128 | /**
|
---|
1129 | * Closes a Shared Clipboard object.
|
---|
1130 | */
|
---|
1131 | typedef struct _VBoxShClObjCloseMsg
|
---|
1132 | {
|
---|
1133 | VBGLIOCHGCMCALL hdr;
|
---|
1134 |
|
---|
1135 | /** uint64_t, in/out: Context ID. */
|
---|
1136 | HGCMFunctionParameter uContext;
|
---|
1137 | /** uint64_t, in: SHCLOBJHANDLE of object to close. */
|
---|
1138 | HGCMFunctionParameter uHandle;
|
---|
1139 | } VBoxShClObjCloseMsg;
|
---|
1140 |
|
---|
1141 | #define VBOX_SHCL_CPARMS_OBJ_CLOSE 2
|
---|
1142 |
|
---|
1143 | /**
|
---|
1144 | * Structure for keeping read parameters of a Shared Clipboard object.
|
---|
1145 | */
|
---|
1146 | typedef struct _VBoxShClObjReadReqParms
|
---|
1147 | {
|
---|
1148 | /** uint64_t, in: Context ID. */
|
---|
1149 | HGCMFunctionParameter uContext;
|
---|
1150 | /** uint64_t, in: SHCLOBJHANDLE of object to write to. */
|
---|
1151 | HGCMFunctionParameter uHandle;
|
---|
1152 | /** uint32_t, in: How many bytes to read. */
|
---|
1153 | HGCMFunctionParameter cbToRead;
|
---|
1154 | /** uint32_t, in: Read flags. Currently unused and must be 0. */
|
---|
1155 | HGCMFunctionParameter fRead;
|
---|
1156 | } VBoxShClObjReadReqParms;
|
---|
1157 |
|
---|
1158 | /**
|
---|
1159 | * Reads from a Shared Clipboard object.
|
---|
1160 | */
|
---|
1161 | typedef struct _VBoxShClObjReadReqMsg
|
---|
1162 | {
|
---|
1163 | VBGLIOCHGCMCALL hdr;
|
---|
1164 |
|
---|
1165 | VBoxShClObjReadReqParms ReqParms;
|
---|
1166 | } VBoxShClObjReadReqMsg;
|
---|
1167 |
|
---|
1168 | #define VBOX_SHCL_CPARMS_OBJ_READ_REQ 4
|
---|
1169 |
|
---|
1170 | /**
|
---|
1171 | * Reads / writes data of / to an object.
|
---|
1172 | *
|
---|
1173 | * Used by:
|
---|
1174 | * VBOX_SHCL_FN_OBJ_READ
|
---|
1175 | * VBOX_SHCL_FN_OBJ_WRITE
|
---|
1176 | */
|
---|
1177 | typedef struct _VBoxShClObjReadWriteMsg
|
---|
1178 | {
|
---|
1179 | VBGLIOCHGCMCALL hdr;
|
---|
1180 |
|
---|
1181 | /** uint64_t, in/out: Context ID. */
|
---|
1182 | HGCMFunctionParameter uContext;
|
---|
1183 | /** uint64_t, in/out: SHCLOBJHANDLE of object to write to. */
|
---|
1184 | HGCMFunctionParameter uHandle;
|
---|
1185 | /** uint32_t, out: Size (in bytes) read/written. */
|
---|
1186 | HGCMFunctionParameter cbData;
|
---|
1187 | /** pointer, in/out: Current data chunk. */
|
---|
1188 | HGCMFunctionParameter pvData;
|
---|
1189 | /** uint32_t, in/out: Size (in bytes) of current data chunk checksum. */
|
---|
1190 | HGCMFunctionParameter cbChecksum;
|
---|
1191 | /** pointer, in/out: Checksum of data block, based on the checksum
|
---|
1192 | * type in the data header. Optional. */
|
---|
1193 | HGCMFunctionParameter pvChecksum;
|
---|
1194 | } VBoxShClObjReadWriteMsg;
|
---|
1195 |
|
---|
1196 | #define VBOX_SHCL_CPARMS_OBJ_READ 6
|
---|
1197 | #define VBOX_SHCL_CPARMS_OBJ_WRITE 6
|
---|
1198 |
|
---|
1199 | /**
|
---|
1200 | * Sends an error event.
|
---|
1201 | *
|
---|
1202 | * Used by:
|
---|
1203 | * VBOX_SHCL_FN_WRITE_ERROR
|
---|
1204 | */
|
---|
1205 | typedef struct _VBoxShClErrorMsg
|
---|
1206 | {
|
---|
1207 | VBGLIOCHGCMCALL hdr;
|
---|
1208 |
|
---|
1209 | /** uint64_t, in: Context ID. */
|
---|
1210 | HGCMFunctionParameter uContext;
|
---|
1211 | /** uint32_t, in: The error code (IPRT-style). */
|
---|
1212 | HGCMFunctionParameter rc;
|
---|
1213 | } VBoxShClWriteErrorMsg;
|
---|
1214 |
|
---|
1215 | #define VBOX_SHCL_CPARMS_ERROR 2
|
---|
1216 |
|
---|
1217 | /** @name VBOX_SHCL_GUEST_FN_NEGOTIATE_CHUNK_SIZE
|
---|
1218 | * @{ */
|
---|
1219 | /** VBOX_SHCL_GUEST_FN_NEGOTIATE_CHUNK_SIZE parameters. */
|
---|
1220 | typedef struct _VBoxShClParmNegotiateChunkSize
|
---|
1221 | {
|
---|
1222 | VBGLIOCHGCMCALL hdr;
|
---|
1223 |
|
---|
1224 | /** uint32_t, in: Maximum chunk size. */
|
---|
1225 | HGCMFunctionParameter cb32MaxChunkSize;
|
---|
1226 | /** uint32_t, in: Default chunk size. */
|
---|
1227 | HGCMFunctionParameter cb32ChunkSize;
|
---|
1228 | } VBoxShClParmNegotiateChunkSize;
|
---|
1229 |
|
---|
1230 | #define VBOX_SHCL_CPARMS_NEGOTIATE_CHUNK_SIZE 2
|
---|
1231 | /** @} */
|
---|
1232 |
|
---|
1233 | #pragma pack()
|
---|
1234 |
|
---|
1235 | #endif /* !VBOX_INCLUDED_HostServices_VBoxClipboardSvc_h */
|
---|
1236 |
|
---|