VirtualBox

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

Last change on this file since 95440 was 93115, checked in by vboxsync, 3 years ago

scm --update-copyright-year

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 8.5 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-2022 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 * 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/** The file name of the DBus library */
28#define RT_RUNTIME_LOADER_LIB_NAME "libdbus-1.so.3"
29
30/** The name of the loader function */
31#define RT_RUNTIME_LOADER_FUNCTION RTDBusLoadLib
32
33/** The following are the symbols which we need from the DBus library. */
34#define RT_RUNTIME_LOADER_INSERT_SYMBOLS \
35 RT_PROXY_STUB(dbus_error_init, void, (DBusError *error), \
36 (error)) \
37 RT_PROXY_STUB(dbus_error_is_set, dbus_bool_t, (const DBusError *error), \
38 (error)) \
39 RT_PROXY_STUB(dbus_bus_get, DBusConnection *, \
40 (DBusBusType type, DBusError *error), (type, error)) \
41 RT_PROXY_STUB(dbus_bus_get_private, DBusConnection *, \
42 (DBusBusType type, DBusError *error), (type, error)) \
43 RT_PROXY_STUB(dbus_error_free, void, (DBusError *error), \
44 (error)) \
45 RT_PROXY_STUB(dbus_free_string_array, void, (char **str_array), \
46 (str_array)) \
47 RT_PROXY_STUB(dbus_connection_ref, DBusConnection *, (DBusConnection *connection), \
48 (connection)) \
49 RT_PROXY_STUB(dbus_connection_unref, void, (DBusConnection *connection), \
50 (connection)) \
51 RT_PROXY_STUB(dbus_connection_close, void, (DBusConnection *connection), \
52 (connection)) \
53 RT_PROXY_STUB(dbus_connection_send, dbus_bool_t, \
54 (DBusConnection *connection, DBusMessage *message, dbus_uint32_t *serial), \
55 (connection, message, serial)) \
56 RT_PROXY_STUB(dbus_connection_flush, void, (DBusConnection *connection), \
57 (connection)) \
58 RT_PROXY_STUB(dbus_connection_set_exit_on_disconnect, void, \
59 (DBusConnection *connection, dbus_bool_t boolean), \
60 (connection, boolean)) \
61 RT_PROXY_STUB(dbus_bus_name_has_owner, dbus_bool_t, \
62 (DBusConnection *connection, const char *string, DBusError *error), \
63 (connection, string, error)) \
64 RT_PROXY_STUB(dbus_bus_add_match, void, \
65 (DBusConnection *connection, const char *string, \
66 DBusError *error), \
67 (connection, string, error)) \
68 RT_PROXY_STUB(dbus_bus_remove_match, void, \
69 (DBusConnection *connection, const char *string, \
70 DBusError *error), \
71 (connection, string, error)) \
72 RT_PROXY_STUB(dbus_message_append_args_valist, dbus_bool_t, \
73 (DBusMessage *message, int first_arg_type, va_list var_args), \
74 (message, first_arg_type, var_args)) \
75 RT_PROXY_STUB(dbus_message_get_args_valist, dbus_bool_t, \
76 (DBusMessage *message, DBusError *error, int first_arg_type, va_list var_args), \
77 (message, error, first_arg_type, var_args)) \
78 RT_PROXY_STUB(dbus_message_get_type, int, \
79 (DBusMessage *message), \
80 (message)) \
81 RT_PROXY_STUB(dbus_message_iter_open_container, dbus_bool_t, \
82 (DBusMessageIter *iter, int type, const char *contained_signature, DBusMessageIter *sub), \
83 (iter, type, contained_signature, sub)) \
84 RT_PROXY_STUB(dbus_message_iter_close_container, dbus_bool_t, \
85 (DBusMessageIter *iter, DBusMessageIter *sub), \
86 (iter, sub)) \
87 RT_PROXY_STUB(dbus_message_iter_append_fixed_array, dbus_bool_t, \
88 (DBusMessageIter *iter, int element_type, const void *value, int n_elements), \
89 (iter, element_type, value, n_elements)) \
90 RT_PROXY_STUB(dbus_message_unref, void, (DBusMessage *message), \
91 (message)) \
92 RT_PROXY_STUB(dbus_message_new_method_call, DBusMessage*, \
93 (const char *string1, const char *string2, const char *string3, \
94 const char *string4), \
95 (string1, string2, string3, string4)) \
96 RT_PROXY_STUB(dbus_message_iter_init_append, void, \
97 (DBusMessage *message, DBusMessageIter *iter), \
98 (message, iter)) \
99 RT_PROXY_STUB(dbus_message_iter_append_basic, dbus_bool_t, \
100 (DBusMessageIter *iter, int val, const void *string), \
101 (iter, val, string)) \
102 RT_PROXY_STUB(dbus_connection_send_with_reply_and_block, DBusMessage *, \
103 (DBusConnection *connection, DBusMessage *message, int val, \
104 DBusError *error), \
105 (connection, message, val, error)) \
106 RT_PROXY_STUB(dbus_message_iter_init, dbus_bool_t, \
107 (DBusMessage *message, DBusMessageIter *iter), \
108 (message, iter)) \
109 RT_PROXY_STUB(dbus_message_get_signature, char *, (DBusMessage *message), \
110 (message)) \
111 RT_PROXY_STUB(dbus_message_iter_get_signature, char *, (DBusMessageIter *iter), \
112 (iter)) \
113 RT_PROXY_STUB(dbus_message_iter_get_arg_type, int, (DBusMessageIter *iter), \
114 (iter)) \
115 RT_PROXY_STUB(dbus_message_iter_get_element_type, int, \
116 (DBusMessageIter *iter), (iter)) \
117 RT_PROXY_STUB(dbus_message_iter_recurse, void, \
118 (DBusMessageIter *iter1, DBusMessageIter *iter2), \
119 (iter1, iter2)) \
120 RT_PROXY_STUB(dbus_message_iter_get_basic, void, \
121 (DBusMessageIter *iter, void *pvoid), (iter, pvoid)) \
122 RT_PROXY_STUB(dbus_message_iter_has_next, dbus_bool_t, \
123 (DBusMessageIter *iter), (iter)) \
124 RT_PROXY_STUB(dbus_message_iter_next, dbus_bool_t, (DBusMessageIter *iter), \
125 (iter)) \
126 RT_PROXY_STUB(dbus_message_iter_abandon_container_if_open, void, \
127 (DBusMessageIter *iter, DBusMessageIter *sub), (iter, sub)) \
128 RT_PROXY_STUB(dbus_connection_add_filter, dbus_bool_t, \
129 (DBusConnection *connection, \
130 DBusHandleMessageFunction function1, void *pvoid, \
131 DBusFreeFunction function2), \
132 (connection, function1, pvoid, function2)) \
133 RT_PROXY_STUB(dbus_connection_remove_filter, void, \
134 (DBusConnection *connection, \
135 DBusHandleMessageFunction function, void *pvoid), \
136 (connection, function, pvoid)) \
137 RT_PROXY_STUB(dbus_connection_read_write, dbus_bool_t, \
138 (DBusConnection *connection, int val), (connection, val)) \
139 RT_PROXY_STUB(dbus_connection_read_write_dispatch, dbus_bool_t, \
140 (DBusConnection *connection, int val), (connection, val)) \
141 RT_PROXY_STUB(dbus_message_is_signal, dbus_bool_t, \
142 (DBusMessage *message, const char *string1, \
143 const char *string2), \
144 (message, string1, string2)) \
145 RT_PROXY_STUB(dbus_connection_pop_message, DBusMessage *, \
146 (DBusConnection *connection), (connection)) \
147 RT_PROXY_STUB(dbus_set_error_from_message, dbus_bool_t, \
148 (DBusError *error, DBusMessage *message), (error, message)) \
149 RT_PROXY_STUB(dbus_free, void, \
150 (void *memory), (memory))
151
152#ifdef VBOX_DBUS_GENERATE_HEADER
153# define RT_RUNTIME_LOADER_GENERATE_HEADER
154# define RT_RUNTIME_LOADER_GENERATE_DECLS
155# include <iprt/runtime-loader.h>
156# undef RT_RUNTIME_LOADER_GENERATE_HEADER
157# undef RT_RUNTIME_LOADER_GENERATE_DECLS
158
159#elif defined(VBOX_DBUS_GENERATE_BODY)
160# define RT_RUNTIME_LOADER_GENERATE_BODY_STUBS
161# include <iprt/runtime-loader.h>
162# undef RT_RUNTIME_LOADER_GENERATE_BODY_STUBS
163
164#else
165# error This file should only be included to generate stubs for loading the DBus library at runtime
166#endif
167
168#undef RT_RUNTIME_LOADER_LIB_NAME
169#undef RT_RUNTIME_LOADER_INSERT_SYMBOLS
170
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