VirtualBox

source: vbox/trunk/src/VBox/HostServices/SharedClipboard/VBoxClipboard.h@ 77807

Last change on this file since 77807 was 76570, checked in by vboxsync, 6 years ago

HostServices: Use VBOX_INCLUDED_SRC_ as header guard prefix with scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.9 KB
Line 
1/* $Id: VBoxClipboard.h 76570 2019-01-01 04:36:36Z vboxsync $ */
2/** @file
3 * Shared Clipboard Service - Internal Header.
4 */
5
6/*
7 * Copyright (C) 2006-2019 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef VBOX_INCLUDED_SRC_SharedClipboard_VBoxClipboard_h
19#define VBOX_INCLUDED_SRC_SharedClipboard_VBoxClipboard_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24#include <VBox/hgcmsvc.h>
25#include <VBox/log.h>
26
27struct _VBOXCLIPBOARDCONTEXT;
28typedef struct _VBOXCLIPBOARDCONTEXT VBOXCLIPBOARDCONTEXT;
29
30
31typedef struct _VBOXCLIPBOARDCLIENTDATA
32{
33 struct _VBOXCLIPBOARDCLIENTDATA *pNext;
34 struct _VBOXCLIPBOARDCLIENTDATA *pPrev;
35
36 VBOXCLIPBOARDCONTEXT *pCtx;
37
38 uint32_t u32ClientID;
39
40 bool fAsync; /* Guest is waiting for a message. */
41 bool fReadPending; /* The guest is waiting for data from the host */
42
43 bool fMsgQuit;
44 bool fMsgReadData;
45 bool fMsgFormats;
46
47 struct {
48 VBOXHGCMCALLHANDLE callHandle;
49 VBOXHGCMSVCPARM *paParms;
50 } async;
51
52 struct {
53 VBOXHGCMCALLHANDLE callHandle;
54 VBOXHGCMSVCPARM *paParms;
55 } asyncRead;
56
57 struct {
58 void *pv;
59 uint32_t cb;
60 uint32_t u32Format;
61 } data;
62
63 uint32_t u32AvailableFormats;
64 uint32_t u32RequestedFormat;
65
66} VBOXCLIPBOARDCLIENTDATA;
67
68/*
69 * The service functions. Locking is between the service thread and the platform dependent windows thread.
70 */
71bool vboxSvcClipboardLock (void);
72void vboxSvcClipboardUnlock (void);
73
74void vboxSvcClipboardReportMsg (VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Msg, uint32_t u32Formats);
75
76void vboxSvcClipboardCompleteReadData(VBOXCLIPBOARDCLIENTDATA *pClient, int rc, uint32_t cbActual);
77
78bool vboxSvcClipboardGetHeadless(void);
79
80/*
81 * Platform dependent functions.
82 */
83int vboxClipboardInit (void);
84void vboxClipboardDestroy (void);
85
86int vboxClipboardConnect (VBOXCLIPBOARDCLIENTDATA *pClient, bool fHeadless);
87void vboxClipboardDisconnect (VBOXCLIPBOARDCLIENTDATA *pClient);
88
89void vboxClipboardFormatAnnounce (VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Formats);
90
91int vboxClipboardReadData (VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Format, void *pv, uint32_t cb, uint32_t *pcbActual);
92
93void vboxClipboardWriteData (VBOXCLIPBOARDCLIENTDATA *pClient, void *pv, uint32_t cb, uint32_t u32Format);
94
95int vboxClipboardSync (VBOXCLIPBOARDCLIENTDATA *pClient);
96
97/* Host unit testing interface */
98#ifdef UNIT_TEST
99uint32_t TestClipSvcGetMode(void);
100#endif
101
102#endif /* !VBOX_INCLUDED_SRC_SharedClipboard_VBoxClipboard_h */
103
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