VirtualBox

source: vbox/trunk/src/VBox/Additions/darwin/VBoxClient/VBoxClientInternal.h@ 86649

Last change on this file since 86649 was 85121, checked in by vboxsync, 4 years ago

iprt/cdefs.h: Refactored the typedef use of DECLCALLBACK as well as DECLCALLBACKMEMBER to wrap the whole expression, similar to the DECLR?CALLBACKMEMBER macros. This allows adding a throw() at the end when compiling with the VC++ compiler to indicate that the callbacks won't throw anything, so we can stop supressing the C5039 warning about passing functions that can potential throw C++ exceptions to extern C code that can't necessarily cope with such (unwind,++). Introduced a few _EX variations that allows specifying different/no calling convention too, as that's handy when dynamically resolving host APIs. Fixed numerous places missing DECLCALLBACK and such. Left two angry @todos regarding use of CreateThread. bugref:9794

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.7 KB
Line 
1/** $Id: VBoxClientInternal.h 85121 2020-07-08 19:33:26Z vboxsync $ */
2/** @file
3 * VBoxClient - common definitions, Darwin.
4 */
5
6/*
7 * Copyright (C) 2007-2020 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 GA_INCLUDED_SRC_darwin_VBoxClient_VBoxClientInternal_h
19#define GA_INCLUDED_SRC_darwin_VBoxClient_VBoxClientInternal_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24#include <VBox/VBoxGuestLib.h>
25#include <Carbon/Carbon.h>
26
27/* Service description */
28typedef struct
29{
30 /** The service name. */
31 const char *pszName;
32
33 /**
34 * Start service.
35 * @returns VBox status code.
36 */
37 DECLCALLBACKMEMBER(int, pfnStart,(void));
38
39 /**
40 * Stop service.
41 * @returns VBox status code.
42 */
43 DECLCALLBACKMEMBER(int, pfnStop,(void));
44
45} VBOXCLIENTSERVICE;
46
47
48/*
49 * Services
50 */
51
52RT_C_DECLS_BEGIN
53
54extern VBOXCLIENTSERVICE g_ClipboardService;
55
56RT_C_DECLS_END
57
58
59/*
60 * Functions
61 */
62
63/**
64 * Displays a verbose message.
65 *
66 * @param iLevel Minimum log level required to display this message.
67 * @param pszFormat The message text.
68 * @param ... Format arguments.
69 */
70extern void VBoxClientVerbose(int iLevel, const char *pszFormat, ...);
71
72/**
73 * Walk through pasteboard items and report currently available item types.
74 *
75 * @param pPasteboard Reference to guest Pasteboard.
76 # @returns Available formats bit field.
77 */
78extern uint32_t vbclClipboardGetAvailableFormats(PasteboardRef pPasteboard);
79
80/**
81 * Read host's clipboard buffer and put its content to guest clipboard.
82 *
83 * @param u32ClientId Host connection.
84 * @param pPasteboard Guest PasteBoard reference.
85 * @param fFormats List of data formats (bit field) received from host.
86 *
87 * @returns IPRT status code.
88 */
89extern int vbclClipboardForwardToGuest(uint32_t u32ClientId, PasteboardRef pPasteboard, uint32_t fFormats);
90
91/**
92 * Read guest's clipboard buffer and forward its content to host.
93 *
94 * @param u32ClientId Host clipboard connection.
95 * @param pPasteboard Guest PasteBoard reference.
96 * @param fFormats List of data formats (bit field) received from host.
97 *
98 * @returns IPRT status code.
99 */
100extern int vbclClipboardForwardToHost(uint32_t u32ClientId, PasteboardRef pPasteboard, uint32_t fFormats);
101
102#endif /* !GA_INCLUDED_SRC_darwin_VBoxClient_VBoxClientInternal_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