VirtualBox

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

Last change on this file since 46197 was 44529, checked in by vboxsync, 12 years ago

header (C) fixes

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 7.7 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-2012 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_unref, void, (DBusConnection *connection), \
48 (connection)) \
49 RT_PROXY_STUB(dbus_connection_close, void, (DBusConnection *connection), \
50 (connection)) \
51 RT_PROXY_STUB(dbus_connection_send, dbus_bool_t, \
52 (DBusConnection *connection, DBusMessage *message, dbus_uint32_t *serial), \
53 (connection, message, serial)) \
54 RT_PROXY_STUB(dbus_connection_flush, void, (DBusConnection *connection), \
55 (connection)) \
56 RT_PROXY_STUB(dbus_connection_set_exit_on_disconnect, void, \
57 (DBusConnection *connection, dbus_bool_t boolean), \
58 (connection, boolean)) \
59 RT_PROXY_STUB(dbus_bus_name_has_owner, dbus_bool_t, \
60 (DBusConnection *connection, const char *string, DBusError *error), \
61 (connection, string, error)) \
62 RT_PROXY_STUB(dbus_bus_add_match, void, \
63 (DBusConnection *connection, const char *string, \
64 DBusError *error), \
65 (connection, string, error)) \
66 RT_PROXY_STUB(dbus_bus_remove_match, void, \
67 (DBusConnection *connection, const char *string, \
68 DBusError *error), \
69 (connection, string, error)) \
70 RT_PROXY_STUB(dbus_message_append_args_valist, dbus_bool_t, \
71 (DBusMessage *message, int first_arg_type, va_list var_args), \
72 (message, first_arg_type, var_args)) \
73 RT_PROXY_STUB(dbus_message_get_args_valist, dbus_bool_t, \
74 (DBusMessage *message, DBusError *error, int first_arg_type, va_list var_args), \
75 (message, error, first_arg_type, var_args)) \
76 RT_PROXY_STUB(dbus_message_get_type, int, \
77 (DBusMessage *message), \
78 (message)) \
79 RT_PROXY_STUB(dbus_message_iter_open_container, dbus_bool_t, \
80 (DBusMessageIter *iter, int type, const char *contained_signature, DBusMessageIter *sub), \
81 (iter, type, contained_signature, sub)) \
82 RT_PROXY_STUB(dbus_message_iter_close_container, dbus_bool_t, \
83 (DBusMessageIter *iter, DBusMessageIter *sub), \
84 (iter, sub)) \
85 RT_PROXY_STUB(dbus_message_iter_append_fixed_array, dbus_bool_t, \
86 (DBusMessageIter *iter, int element_type, const void *value, int n_elements), \
87 (iter, element_type, value, n_elements)) \
88 RT_PROXY_STUB(dbus_message_unref, void, (DBusMessage *message), \
89 (message)) \
90 RT_PROXY_STUB(dbus_message_new_method_call, DBusMessage*, \
91 (const char *string1, const char *string2, const char *string3, \
92 const char *string4), \
93 (string1, string2, string3, string4)) \
94 RT_PROXY_STUB(dbus_message_iter_init_append, void, \
95 (DBusMessage *message, DBusMessageIter *iter), \
96 (message, iter)) \
97 RT_PROXY_STUB(dbus_message_iter_append_basic, dbus_bool_t, \
98 (DBusMessageIter *iter, int val, const void *string), \
99 (iter, val, string)) \
100 RT_PROXY_STUB(dbus_connection_send_with_reply_and_block, DBusMessage *, \
101 (DBusConnection *connection, DBusMessage *message, int val, \
102 DBusError *error), \
103 (connection, message, val, error)) \
104 RT_PROXY_STUB(dbus_message_iter_init, dbus_bool_t, \
105 (DBusMessage *message, DBusMessageIter *iter), \
106 (message, iter)) \
107 RT_PROXY_STUB(dbus_message_iter_get_arg_type, int, (DBusMessageIter *iter), \
108 (iter)) \
109 RT_PROXY_STUB(dbus_message_iter_get_element_type, int, \
110 (DBusMessageIter *iter), (iter)) \
111 RT_PROXY_STUB(dbus_message_iter_recurse, void, \
112 (DBusMessageIter *iter1, DBusMessageIter *iter2), \
113 (iter1, iter2)) \
114 RT_PROXY_STUB(dbus_message_iter_get_basic, void, \
115 (DBusMessageIter *iter, void *pvoid), (iter, pvoid)) \
116 RT_PROXY_STUB(dbus_message_iter_next, dbus_bool_t, (DBusMessageIter *iter), \
117 (iter)) \
118 RT_PROXY_STUB(dbus_connection_add_filter, dbus_bool_t, \
119 (DBusConnection *connection, \
120 DBusHandleMessageFunction function1, void *pvoid, \
121 DBusFreeFunction function2), \
122 (connection, function1, pvoid, function2)) \
123 RT_PROXY_STUB(dbus_connection_remove_filter, void, \
124 (DBusConnection *connection, \
125 DBusHandleMessageFunction function, void *pvoid), \
126 (connection, function, pvoid)) \
127 RT_PROXY_STUB(dbus_connection_read_write_dispatch, dbus_bool_t, \
128 (DBusConnection *connection, int val), (connection, val)) \
129 RT_PROXY_STUB(dbus_message_is_signal, dbus_bool_t, \
130 (DBusMessage *message, const char *string1, \
131 const char *string2), \
132 (message, string1, string2)) \
133 RT_PROXY_STUB(dbus_connection_pop_message, DBusMessage *, \
134 (DBusConnection *connection), (connection)) \
135 RT_PROXY_STUB(dbus_set_error_from_message, dbus_bool_t, \
136 (DBusError *error, DBusMessage *message), (error, message))
137
138#ifdef VBOX_DBUS_GENERATE_HEADER
139# define RT_RUNTIME_LOADER_GENERATE_HEADER
140# define RT_RUNTIME_LOADER_GENERATE_DECLS
141# include <iprt/runtime-loader.h>
142# undef RT_RUNTIME_LOADER_GENERATE_HEADER
143# undef RT_RUNTIME_LOADER_GENERATE_DECLS
144
145#elif defined(VBOX_DBUS_GENERATE_BODY)
146# define RT_RUNTIME_LOADER_GENERATE_BODY_STUBS
147# include <iprt/runtime-loader.h>
148# undef RT_RUNTIME_LOADER_GENERATE_BODY_STUBS
149
150#else
151# error This file should only be included to generate stubs for loading the DBus library at runtime
152#endif
153
154#undef RT_RUNTIME_LOADER_LIB_NAME
155#undef RT_RUNTIME_LOADER_INSERT_SYMBOLS
156
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