VirtualBox

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

Last change on this file since 13584 was 8155, checked in by vboxsync, 17 years ago

The Big Sun Rebranding Header Change

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 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_HGCM
26#include <VBox/log.h>
27
28enum {
29 /** The number of milliseconds before the clipboard times out. */
30 CLIPBOARDTIMEOUT = 2000
31};
32
33struct _VBOXCLIPBOARDCONTEXT;
34typedef struct _VBOXCLIPBOARDCONTEXT VBOXCLIPBOARDCONTEXT;
35
36
37typedef struct _VBOXCLIPBOARDCLIENTDATA
38{
39 struct _VBOXCLIPBOARDCLIENTDATA *pNext;
40 struct _VBOXCLIPBOARDCLIENTDATA *pPrev;
41
42 VBOXCLIPBOARDCONTEXT *pCtx;
43
44 uint32_t u32ClientID;
45
46 bool fAsync: 1; /* Guest is waiting for a message. */
47
48 bool fMsgQuit: 1;
49 bool fMsgReadData: 1;
50 bool fMsgFormats: 1;
51
52 struct {
53 VBOXHGCMCALLHANDLE callHandle;
54 VBOXHGCMSVCPARM *paParms;
55 } async;
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
76
77/*
78 * Platform dependent functions.
79 */
80int vboxClipboardInit (void);
81void vboxClipboardDestroy (void);
82
83int vboxClipboardConnect (VBOXCLIPBOARDCLIENTDATA *pClient);
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#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