VirtualBox

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

Last change on this file since 7943 was 5999, checked in by vboxsync, 17 years ago

The Giant CDDL Dual-License Header Change.

  • Property svn:eol-style set to native
File size: 3.8 KB
Line 
1/** @file
2 * Shared Clipboard:
3 * Common header for host service and guest clients.
4 */
5
6/*
7 * Copyright (C) 2006-2007 innotek GmbH
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 * The contents of this file may alternatively be used under the terms
18 * of the Common Development and Distribution License Version 1.0
19 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20 * VirtualBox OSE distribution, in which case the provisions of the
21 * CDDL are applicable instead of those of the GPL.
22 *
23 * You may elect to license modified versions of this file under the
24 * terms and conditions of either the GPL or the CDDL or both.
25 */
26
27#ifndef ___VBox_HostService_VBoxClipboardSvc_h
28#define ___VBox_HostService_VBoxClipboardSvc_h
29
30#include <VBox/types.h>
31#include <VBox/VBoxGuest.h>
32#include <VBox/hgcmsvc.h>
33
34/*
35 * The mode of operations.
36 */
37#define VBOX_SHARED_CLIPBOARD_MODE_OFF 0
38#define VBOX_SHARED_CLIPBOARD_MODE_HOST_TO_GUEST 1
39#define VBOX_SHARED_CLIPBOARD_MODE_GUEST_TO_HOST 2
40#define VBOX_SHARED_CLIPBOARD_MODE_BIDIRECTIONAL 3
41
42/*
43 * Supported data formats. Bit mask.
44 */
45#define VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT 0x01
46#define VBOX_SHARED_CLIPBOARD_FMT_BITMAP 0x02
47#define VBOX_SHARED_CLIPBOARD_FMT_HTML 0x04
48
49/*
50 * The service functions which are callable by host.
51 */
52#define VBOX_SHARED_CLIPBOARD_HOST_FN_SET_MODE 1
53
54/*
55 * The service functions which are called by guest.
56 */
57/* Call host and wait blocking for an host event VBOX_SHARED_CLIPBOARD_HOST_MSG_* */
58#define VBOX_SHARED_CLIPBOARD_FN_GET_HOST_MSG 1
59/* Send list of available formats to host. */
60#define VBOX_SHARED_CLIPBOARD_FN_FORMATS 2
61/* Obtain data in specified format from host. */
62#define VBOX_SHARED_CLIPBOARD_FN_READ_DATA 3
63/* Send data in requested format to host. */
64#define VBOX_SHARED_CLIPBOARD_FN_WRITE_DATA 4
65
66/*
67 * The host messages for the guest.
68 */
69#define VBOX_SHARED_CLIPBOARD_HOST_MSG_QUIT 1
70#define VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA 2
71#define VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS 3
72
73/*
74 * HGCM parameter structures.
75 */
76#pragma pack (1)
77typedef struct _VBoxClipboardGetHostMsg
78{
79 VBoxGuestHGCMCallInfo hdr;
80
81 /* VBOX_SHARED_CLIPBOARD_HOST_MSG_* */
82 HGCMFunctionParameter msg; /* OUT uint32_t */
83
84 /* VBOX_SHARED_CLIPBOARD_FMT_*, depends on the 'msg'. */
85 HGCMFunctionParameter formats; /* OUT uint32_t */
86} VBoxClipboardGetHostMsg;
87
88typedef struct _VBoxClipboardFormats
89{
90 VBoxGuestHGCMCallInfo hdr;
91
92 /* VBOX_SHARED_CLIPBOARD_FMT_* */
93 HGCMFunctionParameter formats; /* OUT uint32_t */
94} VBoxClipboardFormats;
95
96typedef struct _VBoxClipboardReadData
97{
98 VBoxGuestHGCMCallInfo hdr;
99
100 /* Requested format. */
101 HGCMFunctionParameter format; /* IN uint32_t */
102
103 /* The data buffer. */
104 HGCMFunctionParameter ptr; /* IN linear pointer. */
105
106 /* Size of returned data, if > ptr->cb, then no data was
107 * actually transferred and the guest must repeat the call.
108 */
109 HGCMFunctionParameter size; /* OUT uint32_t */
110
111} VBoxClipboardReadData;
112
113typedef struct _VBoxClipboardWriteData
114{
115 VBoxGuestHGCMCallInfo hdr;
116
117 /* Returned format as requested in the VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA message. */
118 HGCMFunctionParameter format; /* IN uint32_t */
119
120 /* Data. */
121 HGCMFunctionParameter ptr; /* IN linear pointer. */
122} VBoxClipboardWriteData;
123#pragma pack ()
124
125#endif
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