VirtualBox

source: vbox/trunk/include/VBox/HostServices/VBoxClipboardSvc.h@ 2135

Last change on this file since 2135 was 1103, checked in by vboxsync, 18 years ago

Shared clipboard. Changelog update.

File size: 3.6 KB
Line 
1/** @file
2 *
3 * Shared Clipboard:
4 * Common header for host service and guest clients.
5 */
6
7/*
8 * Copyright (C) 2006-2007 InnoTek Systemberatung GmbH
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License as published by the Free Software Foundation,
14 * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
15 * distribution. VirtualBox OSE is distributed in the hope that it will
16 * be useful, but WITHOUT ANY WARRANTY of any kind.
17 *
18 * If you received this file as part of a commercial VirtualBox
19 * distribution, then only the terms of your commercial VirtualBox
20 * license agreement apply instead of the previous paragraph.
21 */
22
23#ifndef __VBOXCLIPBOARDSVC__H
24#define __VBOXCLIPBOARDSVC__H
25
26#include <VBox/types.h>
27#include <VBox/VBoxGuest.h>
28#include <VBox/hgcmsvc.h>
29
30/*
31 * The mode of operations.
32 */
33#define VBOX_SHARED_CLIPBOARD_MODE_OFF 0
34#define VBOX_SHARED_CLIPBOARD_MODE_HOST_TO_GUEST 1
35#define VBOX_SHARED_CLIPBOARD_MODE_GUEST_TO_HOST 2
36#define VBOX_SHARED_CLIPBOARD_MODE_BIDIRECTIONAL 3
37
38/*
39 * Supported data formats. Bit mask.
40 */
41#define VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT 0x01
42#define VBOX_SHARED_CLIPBOARD_FMT_BITMAP 0x02
43
44/*
45 * The service functions which are callable by host.
46 */
47#define VBOX_SHARED_CLIPBOARD_HOST_FN_SET_MODE 1
48
49/*
50 * The service functions which are called by guest.
51 */
52/* Call host and wait blocking for an host event VBOX_SHARED_CLIPBOARD_HOST_MSG_* */
53#define VBOX_SHARED_CLIPBOARD_FN_GET_HOST_MSG 1
54/* Send list of available formats to host. */
55#define VBOX_SHARED_CLIPBOARD_FN_FORMATS 2
56/* Obtain data in specified format from host. */
57#define VBOX_SHARED_CLIPBOARD_FN_READ_DATA 3
58/* Send data in requested format to host. */
59#define VBOX_SHARED_CLIPBOARD_FN_WRITE_DATA 4
60
61/*
62 * The host messages for the guest.
63 */
64#define VBOX_SHARED_CLIPBOARD_HOST_MSG_QUIT 1
65#define VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA 2
66#define VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS 3
67
68/*
69 * HGCM parameter structures.
70 */
71#pragma pack (1)
72typedef struct _VBoxClipboardGetHostMsg
73{
74 VBoxGuestHGCMCallInfo hdr;
75
76 /* VBOX_SHARED_CLIPBOARD_HOST_MSG_* */
77 HGCMFunctionParameter msg; /* OUT uint32_t */
78
79 /* VBOX_SHARED_CLIPBOARD_FMT_*, depends on the 'msg'. */
80 HGCMFunctionParameter formats; /* OUT uint32_t */
81} VBoxClipboardGetHostMsg;
82
83typedef struct _VBoxClipboardFormats
84{
85 VBoxGuestHGCMCallInfo hdr;
86
87 /* VBOX_SHARED_CLIPBOARD_FMT_* */
88 HGCMFunctionParameter formats; /* OUT uint32_t */
89} VBoxClipboardFormats;
90
91typedef struct _VBoxClipboardReadData
92{
93 VBoxGuestHGCMCallInfo hdr;
94
95 /* Requested format. */
96 HGCMFunctionParameter format; /* IN uint32_t */
97
98 /* The data buffer. */
99 HGCMFunctionParameter ptr; /* IN linear pointer. */
100
101 /* Size of returned data, if > ptr->cb, then no data was
102 * actually transferred and the guest must repeat the call.
103 */
104 HGCMFunctionParameter size; /* OUT uint32_t */
105
106} VBoxClipboardReadData;
107
108typedef struct _VBoxClipboardWriteData
109{
110 VBoxGuestHGCMCallInfo hdr;
111
112 /* Returned format as requested in the VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA message. */
113 HGCMFunctionParameter format; /* IN uint32_t */
114
115 /* Data. */
116 HGCMFunctionParameter ptr; /* IN linear pointer. */
117} VBoxClipboardWriteData;
118#pragma pack ()
119
120#endif /* __VBOXCLIPBOARDSVC__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