VirtualBox

source: vbox/trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-internal.h@ 100237

Last change on this file since 100237 was 100205, checked in by vboxsync, 21 months ago

Shared Clipboard: Unified root list entry code to also use the generic list entry code, a lot of updates for the cross OS transfer handling code, more updates for HTTP server transfer handling. This also changed the handling of how that transfers are being initiated, as we needed to have this for X11: Before, transfers were initiated as soon as on side announced the URI list format -- now we postpone initiating the transfer until the receiving side requests the data as URI list [build fix]. ​bugref:9437

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 20.6 KB
Line 
1/* $Id: VBoxSharedClipboardSvc-internal.h 100205 2023-06-19 10:25:09Z vboxsync $ */
2/** @file
3 * Shared Clipboard Service - Internal header.
4 */
5
6/*
7 * Copyright (C) 2006-2023 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28#ifndef VBOX_INCLUDED_SRC_SharedClipboard_VBoxSharedClipboardSvc_internal_h
29#define VBOX_INCLUDED_SRC_SharedClipboard_VBoxSharedClipboardSvc_internal_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34#include <algorithm>
35#include <list>
36#include <map>
37
38#include <iprt/cpp/list.h> /* For RTCList. */
39#include <iprt/list.h>
40#include <iprt/semaphore.h>
41
42#include <VBox/hgcmsvc.h>
43#include <VBox/log.h>
44
45#include <VBox/HostServices/Service.h>
46#include <VBox/GuestHost/SharedClipboard.h>
47#include <VBox/GuestHost/SharedClipboard-transfers.h>
48
49using namespace HGCM;
50
51#ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
52struct SHCLCLIENTSTATE;
53#endif /* VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS */
54
55/**
56 * A queued message for the guest.
57 */
58typedef struct _SHCLCLIENTMSG
59{
60 /** The queue list entry. */
61 RTLISTNODE ListEntry;
62 /** Stored message ID (VBOX_SHCL_HOST_MSG_XXX). */
63 uint32_t idMsg;
64 /** Context ID. */
65 uint64_t idCtx;
66 /** Number of stored parameters in aParms. */
67 uint32_t cParms;
68 /** HGCM parameters. */
69 RT_FLEXIBLE_ARRAY_EXTENSION
70 VBOXHGCMSVCPARM aParms[RT_FLEXIBLE_ARRAY];
71} SHCLCLIENTMSG;
72/** Pointer to a queue message for the guest. */
73typedef SHCLCLIENTMSG *PSHCLCLIENTMSG;
74
75typedef struct SHCLCLIENTTRANSFERSTATE
76{
77 /** Directory of the transfer to start. */
78 SHCLTRANSFERDIR enmTransferDir;
79} SHCLCLIENTTRANSFERSTATE, *PSHCLCLIENTTRANSFERSTATE;
80
81/**
82 * Structure for holding a single POD (plain old data) transfer.
83 *
84 * This mostly is plain text, but also can be stuff like bitmap (BMP) or other binary data.
85 */
86typedef struct SHCLCLIENTPODSTATE
87{
88 /** POD transfer direction. */
89 SHCLTRANSFERDIR enmDir;
90 /** Format of the data to be read / written. */
91 SHCLFORMAT uFormat;
92 /** How much data (in bytes) to read/write for the current operation. */
93 uint64_t cbToReadWriteTotal;
94 /** How much data (in bytes) already has been read/written for the current operation. */
95 uint64_t cbReadWritten;
96 /** Timestamp (in ms) of Last read/write operation. */
97 uint64_t tsLastReadWrittenMs;
98} SHCLCLIENTPODSTATE, *PSHCLCLIENTPODSTATE;
99
100/** @name SHCLCLIENTSTATE_FLAGS_XXX
101 * @note Part of saved state!
102 * @{ */
103/** No Shared Clipboard client flags defined. */
104#define SHCLCLIENTSTATE_FLAGS_NONE 0
105/** Client has a guest read operation active. Currently unused. */
106#define SHCLCLIENTSTATE_FLAGS_READ_ACTIVE RT_BIT(0)
107/** Client has a guest write operation active. Currently unused. */
108#define SHCLCLIENTSTATE_FLAGS_WRITE_ACTIVE RT_BIT(1)
109/** @} */
110
111/**
112 * Structure needed to support backwards compatbility for old(er) Guest Additions (< 6.1),
113 * which did not know the context ID concept then.
114 */
115typedef struct SHCLCLIENTLEGACYCID
116{
117 /** List node. */
118 RTLISTNODE Node;
119 /** The actual context ID. */
120 uint64_t uCID;
121 /** Not used yet; useful to have it in the saved state though. */
122 uint32_t enmType;
123 /** @todo Add an union here as soon as we utilize \a enmType. */
124 SHCLFORMAT uFormat;
125} SHCLCLIENTLEGACYCID;
126/** Pointer to a SHCLCLIENTLEGACYCID struct. */
127typedef SHCLCLIENTLEGACYCID *PSHCLCLIENTLEGACYCID;
128
129/**
130 * Structure for keeping legacy state, required for keeping backwards compatibility
131 * to old(er) Guest Additions.
132 */
133typedef struct SHCLCLIENTLEGACYSTATE
134{
135 /** List of context IDs (of type SHCLCLIENTLEGACYCID) for older Guest Additions which (< 6.1)
136 * which did not know the concept of context IDs. */
137 RTLISTANCHOR lstCID;
138 /** Number of context IDs currently in \a lstCID. */
139 uint16_t cCID;
140} SHCLCLIENTLEGACYSTATE;
141
142/**
143 * Structure for keeping generic client state data within the Shared Clipboard host service.
144 * This structure needs to be serializable by SSM (must be a POD type).
145 */
146typedef struct SHCLCLIENTSTATE
147{
148 struct SHCLCLIENTSTATE *pNext;
149 struct SHCLCLIENTSTATE *pPrev;
150
151 /** Backend-dependent opaque context structure.
152 * This contains data only known to a certain backend implementation.
153 * Optional and can be NULL. */
154 SHCLCONTEXT *pCtx;
155 /** The client's HGCM ID. Not related to the session ID below! */
156 uint32_t uClientID;
157 /** The client's session ID. */
158 SHCLSESSIONID uSessionID;
159 /** Guest feature flags, VBOX_SHCL_GF_0_XXX. */
160 uint64_t fGuestFeatures0;
161 /** Guest feature flags, VBOX_SHCL_GF_1_XXX. */
162 uint64_t fGuestFeatures1;
163 /** Chunk size to use for data transfers. */
164 uint32_t cbChunkSize;
165 /** Where the transfer sources its data from. */
166 SHCLSOURCE enmSource;
167 /** Client state flags of type SHCLCLIENTSTATE_FLAGS_. */
168 uint32_t fFlags;
169 /** POD (plain old data) state. */
170 SHCLCLIENTPODSTATE POD;
171 /** The client's transfers state. */
172 SHCLCLIENTTRANSFERSTATE Transfers;
173} SHCLCLIENTSTATE, *PSHCLCLIENTSTATE;
174
175typedef struct _SHCLCLIENTCMDCTX
176{
177 uint64_t uContextID;
178} SHCLCLIENTCMDCTX, *PSHCLCLIENTCMDCTX;
179
180#ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
181/**
182 * Structure for keeping transfer-related data per HGCM client.
183 */
184typedef struct _SHCLIENTTRANSFERS
185{
186 /** Transfer context. */
187 SHCLTRANSFERCTX Ctx;
188 /** Transfers callbacks to use. */
189 SHCLTRANSFERCALLBACKS Callbacks;
190} SHCLIENTTRANSFERS, *PSHCLIENTTRANSFERS;
191#endif /* VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS */
192
193/** Prototypes for the Shared Clipboard backend. */
194struct SHCLBACKEND;
195typedef SHCLBACKEND *PSHCLBACKEND;
196
197/**
198 * Structure for keeping data per (connected) HGCM client.
199 */
200typedef struct _SHCLCLIENT
201{
202 /** Pointer to associated backend, if any.
203 * Might be NULL if not being used. */
204 PSHCLBACKEND pBackend;
205 /** General client state data. */
206 SHCLCLIENTSTATE State;
207 /** The critical section protecting the queue, event source and whatnot. */
208 RTCRITSECT CritSect;
209 /** The client's message queue (SHCLCLIENTMSG). */
210 RTLISTANCHOR MsgQueue;
211 /** Number of allocated messages (updated atomically, not under critsect). */
212 uint32_t volatile cMsgAllocated;
213 /** Legacy cruft we have to keep to support old(er) Guest Additions. */
214 SHCLCLIENTLEGACYSTATE Legacy;
215 /** The client's own event source.
216 * Needed for events which are not bound to a specific transfer. */
217 SHCLEVENTSOURCE EventSrc;
218#ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
219 SHCLIENTTRANSFERS Transfers;
220#endif
221 /** Structure for keeping the client's pending (deferred return) state.
222 * A client is in a deferred state when it asks for the next HGCM message,
223 * but the service can't provide it yet. That way a client will block (on the guest side, does not return)
224 * until the service can complete the call. */
225 struct
226 {
227 /** The client's HGCM call handle. Needed for completing a deferred call. */
228 VBOXHGCMCALLHANDLE hHandle;
229 /** Message type (function number) to use when completing the deferred call.
230 * A non-0 value means the client is in pending mode. */
231 uint32_t uType;
232 /** Parameter count to use when completing the deferred call. */
233 uint32_t cParms;
234 /** Parameters to use when completing the deferred call. */
235 PVBOXHGCMSVCPARM paParms;
236 } Pending;
237} SHCLCLIENT, *PSHCLCLIENT;
238
239/**
240 * Structure for keeping a single event source map entry.
241 * Currently empty.
242 */
243typedef struct _SHCLEVENTSOURCEMAPENTRY
244{
245} SHCLEVENTSOURCEMAPENTRY;
246
247/** Map holding information about connected HGCM clients. Key is the (unique) HGCM client ID.
248 * The value is a weak pointer to PSHCLCLIENT, which is owned by HGCM. */
249typedef std::map<uint32_t, PSHCLCLIENT> ClipboardClientMap;
250
251/** Map holding information about event sources. Key is the (unique) event source ID. */
252typedef std::map<SHCLEVENTSOURCEID, SHCLEVENTSOURCEMAPENTRY> ClipboardEventSourceMap;
253
254/** Simple queue (list) which holds deferred (waiting) clients. */
255typedef std::list<uint32_t> ClipboardClientQueue;
256
257/**
258 * Structure for keeping the Shared Clipboard service extension state.
259 *
260 * A service extension is optional, and can be installed by a host component
261 * to communicate with the Shared Clipboard host service.
262 */
263typedef struct _SHCLEXTSTATE
264{
265 /** Pointer to the actual service extension handle. */
266 PFNHGCMSVCEXT pfnExtension;
267 /** Opaque pointer to extension-provided data. Don't touch. */
268 void *pvExtension;
269 /** The HGCM client ID currently assigned to this service extension.
270 * At the moment only one HGCM client can be assigned per extension. */
271 uint32_t uClientID;
272 /** Whether the host service is reading clipboard data currently. */
273 bool fReadingData;
274 /** Whether the service extension has sent the clipboard formats while
275 * the the host service is reading clipboard data from it. */
276 bool fDelayedAnnouncement;
277 /** The actual clipboard formats announced while the host service
278 * is reading clipboard data from the extension. */
279 uint32_t fDelayedFormats;
280} SHCLEXTSTATE, *PSHCLEXTSTATE;
281
282extern SHCLEXTSTATE g_ExtState;
283
284int shClSvcSetSource(PSHCLCLIENT pClient, SHCLSOURCE enmSource);
285
286void shClSvcMsgQueueReset(PSHCLCLIENT pClient);
287PSHCLCLIENTMSG shClSvcMsgAlloc(PSHCLCLIENT pClient, uint32_t uMsg, uint32_t cParms);
288void shClSvcMsgFree(PSHCLCLIENT pClient, PSHCLCLIENTMSG pMsg);
289void shClSvcMsgAdd(PSHCLCLIENT pClient, PSHCLCLIENTMSG pMsg, bool fAppend);
290int shClSvcMsgAddAndWakeupClient(PSHCLCLIENT pClient, PSHCLCLIENTMSG pMsg);
291
292int shClSvcClientInit(PSHCLCLIENT pClient, uint32_t uClientID);
293void shClSvcClientDestroy(PSHCLCLIENT pClient);
294void shClSvcClientLock(PSHCLCLIENT pClient);
295void shClSvcClientUnlock(PSHCLCLIENT pClient);
296void shClSvcClientReset(PSHCLCLIENT pClient);
297
298int shClSvcClientStateInit(PSHCLCLIENTSTATE pClientState, uint32_t uClientID);
299int shClSvcClientStateDestroy(PSHCLCLIENTSTATE pClientState);
300void shclSvcClientStateReset(PSHCLCLIENTSTATE pClientState);
301
302int shClSvcClientWakeup(PSHCLCLIENT pClient);
303
304# ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
305int shClSvcTransferModeSet(uint32_t fMode);
306int shClSvcTransferInit(PSHCLCLIENT pClient, SHCLTRANSFERDIR enmDir, SHCLSOURCE enmSource, PSHCLTRANSFER *ppTransfer);
307int shClSvcTransferStart(PSHCLCLIENT pClient, PSHCLTRANSFER pTransfer);
308int shClSvcTransferStop(PSHCLCLIENT pClient, PSHCLTRANSFER pTransfer, bool fWaitForGuest);
309bool shClSvcTransferMsgIsAllowed(uint32_t uMode, uint32_t uMsg);
310void shClSvcClientTransfersReset(PSHCLCLIENT pClient);
311#endif /* VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS */
312
313/** @name Service functions, accessible by the backends.
314 * Locking is between the (host) service thread and the platform-dependent (window) thread.
315 * @{
316 */
317int ShClSvcReadDataFromGuestAsync(PSHCLCLIENT pClient, SHCLFORMATS fFormats, PSHCLEVENT *ppEvent);
318int ShClSvcGuestDataSignal(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, SHCLFORMAT uFormat, void *pvData, uint32_t cbData);
319int ShClSvcHostReportFormats(PSHCLCLIENT pClient, SHCLFORMATS fFormats);
320PSHCLBACKEND ShClSvcGetBackend(void);
321uint32_t ShClSvcGetMode(void);
322bool ShClSvcGetHeadless(void);
323bool ShClSvcLock(void);
324void ShClSvcUnlock(void);
325
326/**
327 * Checks if the backend is active (@c true), or if VRDE is in control of
328 * the host side.
329 */
330DECLINLINE(bool) ShClSvcIsBackendActive(void)
331{
332 return g_ExtState.pfnExtension == NULL;
333}
334/** @} */
335
336/** @name Platform-dependent implementations for the Shared Clipboard host service ("backends"),
337 * called *only* by the host service.
338 * @{
339 */
340/**
341 * Structure for keeping Shared Clipboard backend instance data.
342 */
343typedef struct SHCLBACKEND
344{
345 /** Callback table to use.
346 * Some callbacks might be optional and therefore NULL -- see the table for more details. */
347 SHCLCALLBACKS Callbacks;
348} SHCLBACKEND;
349/** Pointer to a Shared Clipboard backend. */
350typedef SHCLBACKEND *PSHCLBACKEND;
351
352/**
353 * Called on initialization.
354 *
355 * @param pBackend Shared Clipboard backend to initialize.
356 * @param pTable The HGCM service call and parameter table. Mainly for
357 * adjusting the limits.
358 */
359int ShClBackendInit(PSHCLBACKEND pBackend, VBOXHGCMSVCFNTABLE *pTable);
360
361/**
362 * Called on destruction.
363 *
364 * @param pBackend Shared Clipboard backend to destroy.
365 */
366void ShClBackendDestroy(PSHCLBACKEND pBackend);
367
368/**
369 * Called when a new HGCM client connects.
370 *
371 * @param pBackend Shared Clipboard backend to set callbacks for.
372 * @param pCallbacks Backend callbacks to use.
373 * When NULL is specified, the backend's default callbacks are being used.
374 */
375void ShClBackendSetCallbacks(PSHCLBACKEND pBackend, PSHCLCALLBACKS pCallbacks);
376
377/**
378 * Called when a new HGCM client connects.
379 *
380 * @returns VBox status code.
381 * @param pBackend Shared Clipboard backend to connect to.
382 * @param pClient Shared Clipboard client context.
383 * @param fHeadless Whether this is a headless connection or not.
384 */
385int ShClBackendConnect(PSHCLBACKEND pBackend, PSHCLCLIENT pClient, bool fHeadless);
386
387/**
388 * Called when a HGCM client disconnects.
389 *
390 * @returns VBox status code.
391 * @param pBackend Shared Clipboard backend to disconnect from.
392 * @param pClient Shared Clipboard client context.
393 */
394int ShClBackendDisconnect(PSHCLBACKEND pBackend, PSHCLCLIENT pClient);
395
396/**
397 * Called when the guest reports available clipboard formats to the host OS.
398 *
399 * @returns VBox status code.
400 * @param pBackend Shared Clipboard backend to announce formats to.
401 * @param pClient Shared Clipboard client context.
402 * @param fFormats The announced formats from the guest,
403 * VBOX_SHCL_FMT_XXX.
404 */
405int ShClBackendReportFormats(PSHCLBACKEND pBackend, PSHCLCLIENT pClient, SHCLFORMATS fFormats);
406
407/**
408 * Called when the guest wants to read host clipboard data.
409 *
410 * @returns VBox status code.
411 * @param pBackend Shared Clipboard backend to read data from.
412 * @param pClient Shared Clipboard client context.
413 * @param pCmdCtx Shared Clipboard command context.
414 * @param uFormat Clipboard format to read.
415 * @param pvData Where to return the read clipboard data.
416 * @param cbData Size (in bytes) of buffer where to return the clipboard data.
417 * @param pcbActual Where to return the amount of bytes read.
418 *
419 * @todo Document: Can return VINF_HGCM_ASYNC_EXECUTE to defer returning read
420 * data
421 */
422int ShClBackendReadData(PSHCLBACKEND pBackend, PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, SHCLFORMAT uFormat,
423 void *pvData, uint32_t cbData, uint32_t *pcbActual);
424
425/**
426 * Called when the guest writes clipboard data to the host.
427 *
428 * @returns VBox status code.
429 * @param pBackend Shared Clipboard backend to write data to.
430 * @param pClient Shared Clipboard client context.
431 * @param pCmdCtx Shared Clipboard command context.
432 * @param uFormat Clipboard format to write.
433 * @param pvData Clipboard data to write.
434 * @param cbData Size (in bytes) of buffer clipboard data to write.
435 */
436int ShClBackendWriteData(PSHCLBACKEND pBackend, PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, SHCLFORMAT uFormat, void *pvData, uint32_t cbData);
437
438/**
439 * Called when synchronization of the clipboard contents of the host clipboard with the guest is needed.
440 *
441 * @returns VBox status code.
442 * @param pBackend Shared Clipboard backend to synchronize.
443 * @param pClient Shared Clipboard client context.
444 */
445int ShClBackendSync(PSHCLBACKEND pBackend, PSHCLCLIENT pClient);
446/** @} */
447
448#ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
449/** @name Host implementations for Shared Clipboard transfers.
450 * @{
451 */
452/**
453 * Called after a transfer got created.
454 *
455 * @returns VBox status code.
456 * @param pBackend Shared Clipboard backend to use.
457 * @param pClient Shared Clipboard client context.
458 * @param pTransfer Shared Clipboard transfer created.
459 */
460int ShClBackendTransferCreate(PSHCLBACKEND pBackend, PSHCLCLIENT pClient, PSHCLTRANSFER pTransfer);
461/**
462 * Called before a transfer gets destroyed.
463 *
464 * @returns VBox status code.
465 * @param pBackend Shared Clipboard backend to use.
466 * @param pClient Shared Clipboard client context.
467 * @param pTransfer Shared Clipboard transfer to destroy.
468 */
469int ShClBackendTransferDestroy(PSHCLBACKEND pBackend, PSHCLCLIENT pClient, PSHCLTRANSFER pTransfer);
470/**
471 * Called when getting (determining) the transfer roots on the host side.
472 *
473 * @returns VBox status code.
474 * @param pBackend Shared Clipboard backend to use.
475 * @param pClient Shared Clipboard client context.
476 * @param pTransfer Shared Clipboard transfer to get roots for.
477 */
478int ShClBackendTransferGetRoots(PSHCLBACKEND pBackend, PSHCLCLIENT pClient, PSHCLTRANSFER pTransfer);
479/** @} */
480#endif
481
482#ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
483/** @name Internal Shared Clipboard transfer host service functions.
484 * @{
485 */
486int shClSvcTransferHandler(PSHCLCLIENT pClient, VBOXHGCMCALLHANDLE callHandle, uint32_t u32Function,
487 uint32_t cParms, VBOXHGCMSVCPARM paParms[], uint64_t tsArrival);
488int shClSvcTransferHostHandler(uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM paParms[]);
489/** @} */
490
491/** @name Shared Clipboard transfer interface implementations for the host service.
492 * @{
493 */
494#ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS_HTTP
495
496#endif /* VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS_HTTP */
497
498int shClSvcTransferIfaceRootsGet(PSHCLTXPROVIDERCTX pCtx, PSHCLLIST pRootList);
499int shClSvcTransferIfaceListOpen(PSHCLTXPROVIDERCTX pCtx, PSHCLLISTOPENPARMS pOpenParms, PSHCLLISTHANDLE phList);
500int shClSvcTransferIfaceListClose(PSHCLTXPROVIDERCTX pCtx, SHCLLISTHANDLE hList);
501int shClSvcTransferIfaceListHdrRead(PSHCLTXPROVIDERCTX pCtx, SHCLLISTHANDLE hList, PSHCLLISTHDR pListHdr);
502int shClSvcTransferIfaceListHdrWrite(PSHCLTXPROVIDERCTX pCtx, SHCLLISTHANDLE hList, PSHCLLISTHDR pListHdr);
503int shClSvcTransferIfaceListEntryRead(PSHCLTXPROVIDERCTX pCtx, SHCLLISTHANDLE hList, PSHCLLISTENTRY pListEntry);
504int shClSvcTransferIfaceListEntryWrite(PSHCLTXPROVIDERCTX pCtx, SHCLLISTHANDLE hList, PSHCLLISTENTRY pListEntry);
505
506int shClSvcTransferIfaceObjOpen(PSHCLTXPROVIDERCTX pCtx, PSHCLOBJOPENCREATEPARMS pCreateParms,
507 PSHCLOBJHANDLE phObj);
508int shClSvcTransferIfaceObjClose(PSHCLTXPROVIDERCTX pCtx, SHCLOBJHANDLE hObj);
509int shClSvcTransferIfaceObjRead(PSHCLTXPROVIDERCTX pCtx, SHCLOBJHANDLE hObj,
510 void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbRead);
511int shClSvcTransferIfaceObjWrite(PSHCLTXPROVIDERCTX pCtx, SHCLOBJHANDLE hObj,
512 void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbWritten);
513/** @} */
514
515/** @name Shared Clipboard transfer callbacks for the host service.
516 * @{
517 */
518DECLCALLBACK(void) VBoxSvcClipboardTransferPrepareCallback(PSHCLTXPROVIDERCTX pCtx);
519DECLCALLBACK(void) VBoxSvcClipboardDataHeaderCompleteCallback(PSHCLTXPROVIDERCTX pCtx);
520DECLCALLBACK(void) VBoxSvcClipboardDataCompleteCallback(PSHCLTXPROVIDERCTX pCtx);
521DECLCALLBACK(void) VBoxSvcClipboardTransferCompleteCallback(PSHCLTXPROVIDERCTX pCtx, int rc);
522DECLCALLBACK(void) VBoxSvcClipboardTransferCanceledCallback(PSHCLTXPROVIDERCTX pCtx);
523DECLCALLBACK(void) VBoxSvcClipboardTransferErrorCallback(PSHCLTXPROVIDERCTX pCtx, int rc);
524/** @} */
525#endif /* VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS */
526
527/* Host unit testing interface */
528#ifdef UNIT_TEST
529uint32_t TestClipSvcGetMode(void);
530#endif
531
532#endif /* !VBOX_INCLUDED_SRC_SharedClipboard_VBoxSharedClipboardSvc_internal_h */
533
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette