VirtualBox

source: vbox/trunk/include/VBox/dbus-calls.h@ 106165

Last change on this file since 106165 was 106061, checked in by vboxsync, 2 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 8.8 KB
Line 
1/** @file
2 * Stubs for dynamically loading libdbus-1 and the symbols which are needed by
3 * VirtualBox.
4 */
5
6/*
7 * Copyright (C) 2008-2024 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * The contents of this file may alternatively be used under the terms
26 * of the Common Development and Distribution License Version 1.0
27 * (CDDL), a copy of it is provided in the "COPYING.CDDL" file included
28 * in the VirtualBox distribution, in which case the provisions of the
29 * CDDL are applicable instead of those of the GPL.
30 *
31 * You may elect to license modified versions of this file under the
32 * terms and conditions of either the GPL or the CDDL or both.
33 *
34 * SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0
35 */
36
37/** The file name of the DBus library */
38#define RT_RUNTIME_LOADER_LIB_NAME "libdbus-1.so.3"
39
40/** The name of the loader function */
41#define RT_RUNTIME_LOADER_FUNCTION RTDBusLoadLib
42
43/** The following are the symbols which we need from the DBus library. */
44#define RT_RUNTIME_LOADER_INSERT_SYMBOLS \
45 RT_PROXY_STUB(dbus_error_init, void, (DBusError *error), \
46 (error)) \
47 RT_PROXY_STUB(dbus_error_is_set, dbus_bool_t, (const DBusError *error), \
48 (error)) \
49 RT_PROXY_STUB(dbus_bus_get, DBusConnection *, \
50 (DBusBusType type, DBusError *error), (type, error)) \
51 RT_PROXY_STUB(dbus_bus_get_private, DBusConnection *, \
52 (DBusBusType type, DBusError *error), (type, error)) \
53 RT_PROXY_STUB(dbus_error_free, void, (DBusError *error), \
54 (error)) \
55 RT_PROXY_STUB(dbus_free_string_array, void, (char **str_array), \
56 (str_array)) \
57 RT_PROXY_STUB(dbus_connection_ref, DBusConnection *, (DBusConnection *connection), \
58 (connection)) \
59 RT_PROXY_STUB(dbus_connection_unref, void, (DBusConnection *connection), \
60 (connection)) \
61 RT_PROXY_STUB(dbus_connection_close, void, (DBusConnection *connection), \
62 (connection)) \
63 RT_PROXY_STUB(dbus_connection_send, dbus_bool_t, \
64 (DBusConnection *connection, DBusMessage *message, dbus_uint32_t *serial), \
65 (connection, message, serial)) \
66 RT_PROXY_STUB(dbus_connection_flush, void, (DBusConnection *connection), \
67 (connection)) \
68 RT_PROXY_STUB(dbus_connection_set_exit_on_disconnect, void, \
69 (DBusConnection *connection, dbus_bool_t boolean), \
70 (connection, boolean)) \
71 RT_PROXY_STUB(dbus_bus_name_has_owner, dbus_bool_t, \
72 (DBusConnection *connection, const char *string, DBusError *error), \
73 (connection, string, error)) \
74 RT_PROXY_STUB(dbus_bus_add_match, void, \
75 (DBusConnection *connection, const char *string, \
76 DBusError *error), \
77 (connection, string, error)) \
78 RT_PROXY_STUB(dbus_bus_remove_match, void, \
79 (DBusConnection *connection, const char *string, \
80 DBusError *error), \
81 (connection, string, error)) \
82 RT_PROXY_STUB(dbus_message_append_args_valist, dbus_bool_t, \
83 (DBusMessage *message, int first_arg_type, va_list var_args), \
84 (message, first_arg_type, var_args)) \
85 RT_PROXY_STUB(dbus_message_get_args_valist, dbus_bool_t, \
86 (DBusMessage *message, DBusError *error, int first_arg_type, va_list var_args), \
87 (message, error, first_arg_type, var_args)) \
88 RT_PROXY_STUB(dbus_message_get_type, int, \
89 (DBusMessage *message), \
90 (message)) \
91 RT_PROXY_STUB(dbus_message_iter_open_container, dbus_bool_t, \
92 (DBusMessageIter *iter, int type, const char *contained_signature, DBusMessageIter *sub), \
93 (iter, type, contained_signature, sub)) \
94 RT_PROXY_STUB(dbus_message_iter_close_container, dbus_bool_t, \
95 (DBusMessageIter *iter, DBusMessageIter *sub), \
96 (iter, sub)) \
97 RT_PROXY_STUB(dbus_message_iter_append_fixed_array, dbus_bool_t, \
98 (DBusMessageIter *iter, int element_type, const void *value, int n_elements), \
99 (iter, element_type, value, n_elements)) \
100 RT_PROXY_STUB(dbus_message_unref, void, (DBusMessage *message), \
101 (message)) \
102 RT_PROXY_STUB(dbus_message_new_method_call, DBusMessage*, \
103 (const char *string1, const char *string2, const char *string3, \
104 const char *string4), \
105 (string1, string2, string3, string4)) \
106 RT_PROXY_STUB(dbus_message_iter_init_append, void, \
107 (DBusMessage *message, DBusMessageIter *iter), \
108 (message, iter)) \
109 RT_PROXY_STUB(dbus_message_iter_append_basic, dbus_bool_t, \
110 (DBusMessageIter *iter, int val, const void *string), \
111 (iter, val, string)) \
112 RT_PROXY_STUB(dbus_connection_send_with_reply_and_block, DBusMessage *, \
113 (DBusConnection *connection, DBusMessage *message, int val, \
114 DBusError *error), \
115 (connection, message, val, error)) \
116 RT_PROXY_STUB(dbus_message_iter_init, dbus_bool_t, \
117 (DBusMessage *message, DBusMessageIter *iter), \
118 (message, iter)) \
119 RT_PROXY_STUB(dbus_message_get_signature, char *, (DBusMessage *message), \
120 (message)) \
121 RT_PROXY_STUB(dbus_message_iter_get_signature, char *, (DBusMessageIter *iter), \
122 (iter)) \
123 RT_PROXY_STUB(dbus_message_iter_get_arg_type, int, (DBusMessageIter *iter), \
124 (iter)) \
125 RT_PROXY_STUB(dbus_message_iter_get_element_type, int, \
126 (DBusMessageIter *iter), (iter)) \
127 RT_PROXY_STUB(dbus_message_iter_recurse, void, \
128 (DBusMessageIter *iter1, DBusMessageIter *iter2), \
129 (iter1, iter2)) \
130 RT_PROXY_STUB(dbus_message_iter_get_basic, void, \
131 (DBusMessageIter *iter, void *pvoid), (iter, pvoid)) \
132 RT_PROXY_STUB(dbus_message_iter_has_next, dbus_bool_t, \
133 (DBusMessageIter *iter), (iter)) \
134 RT_PROXY_STUB(dbus_message_iter_next, dbus_bool_t, (DBusMessageIter *iter), \
135 (iter)) \
136 RT_PROXY_STUB(dbus_message_iter_abandon_container_if_open, void, \
137 (DBusMessageIter *iter, DBusMessageIter *sub), (iter, sub)) \
138 RT_PROXY_STUB(dbus_connection_add_filter, dbus_bool_t, \
139 (DBusConnection *connection, \
140 DBusHandleMessageFunction function1, void *pvoid, \
141 DBusFreeFunction function2), \
142 (connection, function1, pvoid, function2)) \
143 RT_PROXY_STUB(dbus_connection_remove_filter, void, \
144 (DBusConnection *connection, \
145 DBusHandleMessageFunction function, void *pvoid), \
146 (connection, function, pvoid)) \
147 RT_PROXY_STUB(dbus_connection_read_write, dbus_bool_t, \
148 (DBusConnection *connection, int val), (connection, val)) \
149 RT_PROXY_STUB(dbus_connection_read_write_dispatch, dbus_bool_t, \
150 (DBusConnection *connection, int val), (connection, val)) \
151 RT_PROXY_STUB(dbus_message_is_signal, dbus_bool_t, \
152 (DBusMessage *message, const char *string1, \
153 const char *string2), \
154 (message, string1, string2)) \
155 RT_PROXY_STUB(dbus_connection_pop_message, DBusMessage *, \
156 (DBusConnection *connection), (connection)) \
157 RT_PROXY_STUB(dbus_set_error_from_message, dbus_bool_t, \
158 (DBusError *error, DBusMessage *message), (error, message)) \
159 RT_PROXY_STUB(dbus_free, void, \
160 (void *memory), (memory))
161
162#ifdef VBOX_DBUS_GENERATE_HEADER
163# define RT_RUNTIME_LOADER_GENERATE_HEADER
164# define RT_RUNTIME_LOADER_GENERATE_DECLS
165# include <iprt/runtime-loader.h>
166# undef RT_RUNTIME_LOADER_GENERATE_HEADER
167# undef RT_RUNTIME_LOADER_GENERATE_DECLS
168
169#elif defined(VBOX_DBUS_GENERATE_BODY)
170# define RT_RUNTIME_LOADER_GENERATE_BODY_STUBS
171# include <iprt/runtime-loader.h>
172# undef RT_RUNTIME_LOADER_GENERATE_BODY_STUBS
173
174#else
175# error This file should only be included to generate stubs for loading the DBus library at runtime
176#endif
177
178#undef RT_RUNTIME_LOADER_LIB_NAME
179#undef RT_RUNTIME_LOADER_INSERT_SYMBOLS
180
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