Changeset 28357 in vbox for trunk/include/VBox
- Timestamp:
- Apr 15, 2010 1:11:23 PM (15 years ago)
- Location:
- trunk/include/VBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/dbus-calls.h
r25477 r28357 30 30 */ 31 31 32 #ifndef VBOX_PROXY_STUB 33 # error This file is a private header, intended to be included in specific places only 32 /** The file name of the DBus library */ 33 #define RT_RUNTIME_LOADER_LIB_NAME "libdbus-1.so.3" 34 35 /** The name of the loader function */ 36 #define RT_RUNTIME_LOADER_FUNCTION RTDBusLoadLib 37 38 /** The following are the symbols which we need from the DBus library. */ 39 #define RT_RUNTIME_LOADER_INSERT_SYMBOLS \ 40 RT_PROXY_STUB(dbus_error_init, void, (DBusError *error), \ 41 (error)) \ 42 RT_PROXY_STUB(dbus_error_is_set, dbus_bool_t, (const DBusError *error), \ 43 (error)) \ 44 RT_PROXY_STUB(dbus_bus_get, DBusConnection *, \ 45 (DBusBusType type, DBusError *error), (type, error)) \ 46 RT_PROXY_STUB(dbus_bus_get_private, DBusConnection *, \ 47 (DBusBusType type, DBusError *error), (type, error)) \ 48 RT_PROXY_STUB(dbus_error_free, void, (DBusError *error), \ 49 (error)) \ 50 RT_PROXY_STUB(dbus_connection_unref, void, (DBusConnection *connection), \ 51 (connection)) \ 52 RT_PROXY_STUB(dbus_connection_close, void, (DBusConnection *connection), \ 53 (connection)) \ 54 RT_PROXY_STUB(dbus_connection_send, dbus_bool_t, \ 55 (DBusConnection *connection, DBusMessage *message, dbus_uint32_t *serial), \ 56 (connection, message, serial)) \ 57 RT_PROXY_STUB(dbus_connection_flush, void, (DBusConnection *connection), \ 58 (connection)) \ 59 RT_PROXY_STUB(dbus_connection_set_exit_on_disconnect, void, \ 60 (DBusConnection *connection, dbus_bool_t boolean), \ 61 (connection, boolean)) \ 62 RT_PROXY_STUB(dbus_bus_name_has_owner, dbus_bool_t, \ 63 (DBusConnection *connection, const char *string, DBusError *error), \ 64 (connection, string, error)) \ 65 RT_PROXY_STUB(dbus_bus_add_match, void, \ 66 (DBusConnection *connection, const char *string, \ 67 DBusError *error), \ 68 (connection, string, error)) \ 69 RT_PROXY_STUB(dbus_bus_remove_match, void, \ 70 (DBusConnection *connection, const char *string, \ 71 DBusError *error), \ 72 (connection, string, error)) \ 73 RT_PROXY_STUB(dbus_message_append_args_valist, dbus_bool_t, \ 74 (DBusMessage *message, int first_arg_type, va_list var_args), \ 75 (message, first_arg_type, var_args)) \ 76 RT_PROXY_STUB(dbus_message_iter_open_container, dbus_bool_t, \ 77 (DBusMessageIter *iter, int type, const char *contained_signature, DBusMessageIter *sub), \ 78 (iter, type, contained_signature, sub)) \ 79 RT_PROXY_STUB(dbus_message_iter_close_container, dbus_bool_t, \ 80 (DBusMessageIter *iter, DBusMessageIter *sub), \ 81 (iter, sub)) \ 82 RT_PROXY_STUB(dbus_message_iter_append_fixed_array, dbus_bool_t, \ 83 (DBusMessageIter *iter, int element_type, const void *value, int n_elements), \ 84 (iter, element_type, value, n_elements)) \ 85 RT_PROXY_STUB(dbus_message_unref, void, (DBusMessage *message), \ 86 (message)) \ 87 RT_PROXY_STUB(dbus_message_new_method_call, DBusMessage*, \ 88 (const char *string1, const char *string2, const char *string3, \ 89 const char *string4), \ 90 (string1, string2, string3, string4)) \ 91 RT_PROXY_STUB(dbus_message_iter_init_append, void, \ 92 (DBusMessage *message, DBusMessageIter *iter), \ 93 (message, iter)) \ 94 RT_PROXY_STUB(dbus_message_iter_append_basic, dbus_bool_t, \ 95 (DBusMessageIter *iter, int val, const void *string), \ 96 (iter, val, string)) \ 97 RT_PROXY_STUB(dbus_connection_send_with_reply_and_block, DBusMessage *, \ 98 (DBusConnection *connection, DBusMessage *message, int val, \ 99 DBusError *error), \ 100 (connection, message, val, error)) \ 101 RT_PROXY_STUB(dbus_message_iter_init, dbus_bool_t, \ 102 (DBusMessage *message, DBusMessageIter *iter), \ 103 (message, iter)) \ 104 RT_PROXY_STUB(dbus_message_iter_get_arg_type, int, (DBusMessageIter *iter), \ 105 (iter)) \ 106 RT_PROXY_STUB(dbus_message_iter_get_element_type, int, \ 107 (DBusMessageIter *iter), (iter)) \ 108 RT_PROXY_STUB(dbus_message_iter_recurse, void, \ 109 (DBusMessageIter *iter1, DBusMessageIter *iter2), \ 110 (iter1, iter2)) \ 111 RT_PROXY_STUB(dbus_message_iter_get_basic, void, \ 112 (DBusMessageIter *iter, void *pvoid), (iter, pvoid)) \ 113 RT_PROXY_STUB(dbus_message_iter_next, dbus_bool_t, (DBusMessageIter *iter), \ 114 (iter)) \ 115 RT_PROXY_STUB(dbus_connection_add_filter, dbus_bool_t, \ 116 (DBusConnection *connection, \ 117 DBusHandleMessageFunction function1, void *pvoid, \ 118 DBusFreeFunction function2), \ 119 (connection, function1, pvoid, function2)) \ 120 RT_PROXY_STUB(dbus_connection_remove_filter, void, \ 121 (DBusConnection *connection, \ 122 DBusHandleMessageFunction function, void *pvoid), \ 123 (connection, function, pvoid)) \ 124 RT_PROXY_STUB(dbus_connection_read_write_dispatch, dbus_bool_t, \ 125 (DBusConnection *connection, int val), (connection, val)) \ 126 RT_PROXY_STUB(dbus_message_is_signal, dbus_bool_t, \ 127 (DBusMessage *message, const char *string1, \ 128 const char *string2), \ 129 (message, string1, string2)) \ 130 RT_PROXY_STUB(dbus_connection_pop_message, DBusMessage *, \ 131 (DBusConnection *connection), (connection)) 132 133 #ifdef VBOX_DBUS_GENERATE_HEADER 134 # define RT_RUNTIME_LOADER_GENERATE_HEADER 135 # define RT_RUNTIME_LOADER_GENERATE_DECLS 136 # include <iprt/runtime-loader.h> 137 # undef RT_RUNTIME_LOADER_GENERATE_HEADER 138 # undef RT_RUNTIME_LOADER_GENERATE_DECLS 139 #elif defined (VBOX_DBUS_GENERATE_BODY) 140 # define RT_RUNTIME_LOADER_GENERATE_BODY_STUBS 141 # include <iprt/runtime-loader.h> 142 # undef RT_RUNTIME_LOADER_GENERATE_BODY_STUBS 143 #else 144 # error This file should only be included to generate stubs for loading the \ 145 DBus library at runtime 34 146 #endif 35 147 36 /** The following are the symbols which we need from libdbus-1. */ 37 VBOX_PROXY_STUB(dbus_error_init, void, (DBusError *error), 38 (error)) 39 VBOX_PROXY_STUB(dbus_error_is_set, dbus_bool_t, (const DBusError *error), 40 (error)) 41 VBOX_PROXY_STUB(dbus_bus_get, DBusConnection *, 42 (DBusBusType type, DBusError *error), (type, error)) 43 VBOX_PROXY_STUB(dbus_bus_get_private, DBusConnection *, 44 (DBusBusType type, DBusError *error), (type, error)) 45 VBOX_PROXY_STUB(dbus_error_free, void, (DBusError *error), 46 (error)) 47 VBOX_PROXY_STUB(dbus_connection_unref, void, (DBusConnection *connection), 48 (connection)) 49 VBOX_PROXY_STUB(dbus_connection_close, void, (DBusConnection *connection), 50 (connection)) 51 VBOX_PROXY_STUB(dbus_connection_send, dbus_bool_t, 52 (DBusConnection *connection, DBusMessage *message, dbus_uint32_t *serial), 53 (connection, message, serial)) 54 VBOX_PROXY_STUB(dbus_connection_flush, void, (DBusConnection *connection), 55 (connection)) 56 VBOX_PROXY_STUB(dbus_connection_set_exit_on_disconnect, void, 57 (DBusConnection *connection, dbus_bool_t boolean), 58 (connection, boolean)) 59 VBOX_PROXY_STUB(dbus_bus_name_has_owner, dbus_bool_t, 60 (DBusConnection *connection, const char *string, DBusError *error), 61 (connection, string, error)) 62 VBOX_PROXY_STUB(dbus_bus_add_match, void, 63 (DBusConnection *connection, const char *string, 64 DBusError *error), 65 (connection, string, error)) 66 VBOX_PROXY_STUB(dbus_bus_remove_match, void, 67 (DBusConnection *connection, const char *string, 68 DBusError *error), 69 (connection, string, error)) 70 VBOX_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 VBOX_PROXY_STUB(dbus_message_iter_open_container, dbus_bool_t, 74 (DBusMessageIter *iter, int type, const char *contained_signature, DBusMessageIter *sub), 75 (iter, type, contained_signature, sub)) 76 VBOX_PROXY_STUB(dbus_message_iter_close_container, dbus_bool_t, 77 (DBusMessageIter *iter, DBusMessageIter *sub), 78 (iter, sub)) 79 VBOX_PROXY_STUB(dbus_message_iter_append_fixed_array, dbus_bool_t, 80 (DBusMessageIter *iter, int element_type, const void *value, int n_elements), 81 (iter, element_type, value, n_elements)) 82 VBOX_PROXY_STUB(dbus_message_unref, void, (DBusMessage *message), 83 (message)) 84 VBOX_PROXY_STUB(dbus_message_new_method_call, DBusMessage*, 85 (const char *string1, const char *string2, const char *string3, 86 const char *string4), 87 (string1, string2, string3, string4)) 88 VBOX_PROXY_STUB(dbus_message_iter_init_append, void, 89 (DBusMessage *message, DBusMessageIter *iter), 90 (message, iter)) 91 VBOX_PROXY_STUB(dbus_message_iter_append_basic, dbus_bool_t, 92 (DBusMessageIter *iter, int val, const void *string), 93 (iter, val, string)) 94 VBOX_PROXY_STUB(dbus_connection_send_with_reply_and_block, DBusMessage *, 95 (DBusConnection *connection, DBusMessage *message, int val, 96 DBusError *error), 97 (connection, message, val, error)) 98 VBOX_PROXY_STUB(dbus_message_iter_init, dbus_bool_t, 99 (DBusMessage *message, DBusMessageIter *iter), 100 (message, iter)) 101 VBOX_PROXY_STUB(dbus_message_iter_get_arg_type, int, (DBusMessageIter *iter), 102 (iter)) 103 VBOX_PROXY_STUB(dbus_message_iter_get_element_type, int, 104 (DBusMessageIter *iter), (iter)) 105 VBOX_PROXY_STUB(dbus_message_iter_recurse, void, 106 (DBusMessageIter *iter1, DBusMessageIter *iter2), 107 (iter1, iter2)) 108 VBOX_PROXY_STUB(dbus_message_iter_get_basic, void, 109 (DBusMessageIter *iter, void *pvoid), (iter, pvoid)) 110 VBOX_PROXY_STUB(dbus_message_iter_next, dbus_bool_t, (DBusMessageIter *iter), 111 (iter)) 112 VBOX_PROXY_STUB(dbus_connection_add_filter, dbus_bool_t, 113 (DBusConnection *connection, 114 DBusHandleMessageFunction function1, void *pvoid, 115 DBusFreeFunction function2), 116 (connection, function1, pvoid, function2)) 117 VBOX_PROXY_STUB(dbus_connection_remove_filter, void, 118 (DBusConnection *connection, 119 DBusHandleMessageFunction function, void *pvoid), 120 (connection, function, pvoid)) 121 VBOX_PROXY_STUB(dbus_connection_read_write_dispatch, dbus_bool_t, 122 (DBusConnection *connection, int val), (connection, val)) 123 VBOX_PROXY_STUB(dbus_message_is_signal, dbus_bool_t, 124 (DBusMessage *message, const char *string1, 125 const char *string2), 126 (message, string1, string2)) 127 VBOX_PROXY_STUB(dbus_connection_pop_message, DBusMessage *, 128 (DBusConnection *connection), (connection)) 129 148 #undef RT_RUNTIME_LOADER_LIB_NAME 149 #undef RT_RUNTIME_LOADER_INSERT_SYMBOLS -
trunk/include/VBox/dbus.h
r25477 r28357 35 35 #include <iprt/types.h> 36 36 #include <iprt/stdarg.h> 37 38 #define VBOX_DBUS_1_3_LIB "libdbus-1.so.3"39 37 40 38 /** Types and defines from the dbus header files which we need. These are … … 109 107 110 108 /* Declarations of the functions that we need from libdbus-1 */ 111 #define VBOX_PROXY_STUB(function, rettype, signature, shortsig) \ 112 RTR3DECL(rettype) ( function ) signature ; 109 #define VBOX_DBUS_GENERATE_HEADER 113 110 114 111 #include <VBox/dbus-calls.h> 115 112 116 #undef VBOX_PROXY_STUB 117 118 /** 119 * Try to dynamically load the DBus library. This function should be called 120 * before attempting to use any of the DBus functions. It is safe to call this 121 * function multiple times. 122 * 123 * @returns iprt status code 124 */ 125 RTR3DECL(int) RTDBusLoadLib(void); 113 #undef VBOX_DBUS_GENERATE_HEADER 126 114 127 115 #endif /* ___VBox_DBus_h not defined */
Note:
See TracChangeset
for help on using the changeset viewer.