VirtualBox

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

Last change on this file since 34014 was 28800, checked in by vboxsync, 15 years ago

Automated rebranding to Oracle copyright/license strings via filemuncher

  • 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 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#define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD
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
75
76/*
77 * Platform dependent functions.
78 */
79int vboxClipboardInit (void);
80void vboxClipboardDestroy (void);
81
82int vboxClipboardConnect (VBOXCLIPBOARDCLIENTDATA *pClient);
83void vboxClipboardDisconnect (VBOXCLIPBOARDCLIENTDATA *pClient);
84
85void vboxClipboardFormatAnnounce (VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Formats);
86
87int vboxClipboardReadData (VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Format, void *pv, uint32_t cb, uint32_t *pcbActual);
88
89void vboxClipboardWriteData (VBOXCLIPBOARDCLIENTDATA *pClient, void *pv, uint32_t cb, uint32_t u32Format);
90
91int vboxClipboardSync (VBOXCLIPBOARDCLIENTDATA *pClient);
92
93#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