VirtualBox

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

Last change on this file since 75969 was 75498, checked in by vboxsync, 6 years ago

HGCM,Main,SharedFolder,SharedClipboard,GuestProperties: Added HGCM service helpers for statistics and dbg info registration/deregistration. A PUVM is passed to HGCMService (where the helpers are implemented) when the service is loaded. Since this drags in both dbg.h and stam.h, LOG_GROUP defines now have to be at the top of the include list as everywhere else (i.e. hgcmsvc.h will define LOG_GROUP default by dragging in log.h). Added generic statistics of HGCM message processing and function level statistics to the shared folder service. [missing files, ++]

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.7 KB
Line 
1/* $Id: VBoxClipboard.h 75498 2018-11-16 00:03:41Z vboxsync $ */
2/** @file
3 * Shared Clipboard Service - Internal Header.
4 */
5
6/*
7 * Copyright (C) 2006-2017 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 ___VBOXCLIPBOARD_H
19#define ___VBOXCLIPBOARD_H
20
21#include <VBox/hgcmsvc.h>
22#include <VBox/log.h>
23
24struct _VBOXCLIPBOARDCONTEXT;
25typedef struct _VBOXCLIPBOARDCONTEXT VBOXCLIPBOARDCONTEXT;
26
27
28typedef struct _VBOXCLIPBOARDCLIENTDATA
29{
30 struct _VBOXCLIPBOARDCLIENTDATA *pNext;
31 struct _VBOXCLIPBOARDCLIENTDATA *pPrev;
32
33 VBOXCLIPBOARDCONTEXT *pCtx;
34
35 uint32_t u32ClientID;
36
37 bool fAsync; /* Guest is waiting for a message. */
38 bool fReadPending; /* The guest is waiting for data from the host */
39
40 bool fMsgQuit;
41 bool fMsgReadData;
42 bool fMsgFormats;
43
44 struct {
45 VBOXHGCMCALLHANDLE callHandle;
46 VBOXHGCMSVCPARM *paParms;
47 } async;
48
49 struct {
50 VBOXHGCMCALLHANDLE callHandle;
51 VBOXHGCMSVCPARM *paParms;
52 } asyncRead;
53
54 struct {
55 void *pv;
56 uint32_t cb;
57 uint32_t u32Format;
58 } data;
59
60 uint32_t u32AvailableFormats;
61 uint32_t u32RequestedFormat;
62
63} VBOXCLIPBOARDCLIENTDATA;
64
65/*
66 * The service functions. Locking is between the service thread and the platform dependent windows thread.
67 */
68bool vboxSvcClipboardLock (void);
69void vboxSvcClipboardUnlock (void);
70
71void vboxSvcClipboardReportMsg (VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Msg, uint32_t u32Formats);
72
73void vboxSvcClipboardCompleteReadData(VBOXCLIPBOARDCLIENTDATA *pClient, int rc, uint32_t cbActual);
74
75bool vboxSvcClipboardGetHeadless(void);
76
77/*
78 * Platform dependent functions.
79 */
80int vboxClipboardInit (void);
81void vboxClipboardDestroy (void);
82
83int vboxClipboardConnect (VBOXCLIPBOARDCLIENTDATA *pClient, bool fHeadless);
84void vboxClipboardDisconnect (VBOXCLIPBOARDCLIENTDATA *pClient);
85
86void vboxClipboardFormatAnnounce (VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Formats);
87
88int vboxClipboardReadData (VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Format, void *pv, uint32_t cb, uint32_t *pcbActual);
89
90void vboxClipboardWriteData (VBOXCLIPBOARDCLIENTDATA *pClient, void *pv, uint32_t cb, uint32_t u32Format);
91
92int vboxClipboardSync (VBOXCLIPBOARDCLIENTDATA *pClient);
93
94/* Host unit testing interface */
95#ifdef UNIT_TEST
96uint32_t TestClipSvcGetMode(void);
97#endif
98
99#endif /* !___VBOXCLIPBOARD_H */
100
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