VirtualBox

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

Last change on this file since 28374 was 23885, checked in by vboxsync, 15 years ago

SharedClipboard: Replaced the SSMR3PutMem with a struct descriptor.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.7 KB
Line 
1/** @file
2 *
3 * Shared Clipboard
4 */
5
6/*
7 * Copyright (C) 2006-2007 Sun Microsystems, Inc.
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 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18 * Clara, CA 95054 USA or visit http://www.sun.com if you need
19 * additional information or have any questions.
20 */
21
22#ifndef __VBOXCLIPBOARD__H
23#define __VBOXCLIPBOARD__H
24
25#define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD
26#include <VBox/log.h>
27
28struct _VBOXCLIPBOARDCONTEXT;
29typedef struct _VBOXCLIPBOARDCONTEXT VBOXCLIPBOARDCONTEXT;
30
31
32typedef struct _VBOXCLIPBOARDCLIENTDATA
33{
34 struct _VBOXCLIPBOARDCLIENTDATA *pNext;
35 struct _VBOXCLIPBOARDCLIENTDATA *pPrev;
36
37 VBOXCLIPBOARDCONTEXT *pCtx;
38
39 uint32_t u32ClientID;
40
41 bool fAsync; /* Guest is waiting for a message. */
42 bool fReadPending; /* The guest is waiting for data from the host */
43
44 bool fMsgQuit;
45 bool fMsgReadData;
46 bool fMsgFormats;
47
48 struct {
49 VBOXHGCMCALLHANDLE callHandle;
50 VBOXHGCMSVCPARM *paParms;
51 } async;
52
53 struct {
54 VBOXHGCMCALLHANDLE callHandle;
55 VBOXHGCMSVCPARM *paParms;
56 } asyncRead;
57
58 struct {
59 void *pv;
60 uint32_t cb;
61 uint32_t u32Format;
62 } data;
63
64 uint32_t u32AvailableFormats;
65 uint32_t u32RequestedFormat;
66
67} VBOXCLIPBOARDCLIENTDATA;
68
69/*
70 * The service functions. Locking is between the service thread and the platform dependent windows thread.
71 */
72bool vboxSvcClipboardLock (void);
73void vboxSvcClipboardUnlock (void);
74
75void vboxSvcClipboardReportMsg (VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Msg, uint32_t u32Formats);
76
77void vboxSvcClipboardCompleteReadData(VBOXCLIPBOARDCLIENTDATA *pClient, int rc, uint32_t cbActual);
78
79
80/*
81 * Platform dependent functions.
82 */
83int vboxClipboardInit (void);
84void vboxClipboardDestroy (void);
85
86int vboxClipboardConnect (VBOXCLIPBOARDCLIENTDATA *pClient);
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#endif /* __VBOXCLIPBOARD__H */
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