Changeset 16006 in vbox
- Timestamp:
- Jan 17, 2009 4:08:38 PM (16 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/vbox-dbus.h
r15468 r16006 85 85 86 86 /** The following are the symbols which we need from libdbus-1. */ 87 extern void (*dbus_error_init)(DBusError *); 88 extern DBusConnection *(*dbus_bus_get)(DBusBusType, DBusError *); 89 extern DBusConnection *(*dbus_bus_get_private)(DBusBusType, DBusError *); 90 extern void (*dbus_error_free)(DBusError *); 91 extern void (*dbus_connection_unref)(DBusConnection *); 92 extern void (*dbus_connection_close)(DBusConnection *); 93 extern void (*dbus_connection_set_exit_on_disconnect)(DBusConnection *, dbus_bool_t); 94 extern dbus_bool_t (*dbus_bus_name_has_owner)(DBusConnection *, const char *, 95 DBusError *); 96 extern void (*dbus_bus_add_match)(DBusConnection *, const char *, DBusError *); 97 extern void (*dbus_bus_remove_match)(DBusConnection *, const char *, DBusError *); 98 extern void (*dbus_message_unref)(DBusMessage *); 99 extern DBusMessage* (*dbus_message_new_method_call)(const char *, const char *, 100 const char *, const char *); 101 extern void (*dbus_message_iter_init_append)(DBusMessage *, DBusMessageIter *); 102 extern dbus_bool_t (*dbus_message_iter_append_basic)(DBusMessageIter *, int, 103 const void *); 104 extern DBusMessage * (*dbus_connection_send_with_reply_and_block)(DBusConnection *, 105 DBusMessage *, int, 106 DBusError *error); 107 extern dbus_bool_t (*dbus_message_iter_init) (DBusMessage *, DBusMessageIter *); 108 extern int (*dbus_message_iter_get_arg_type) (DBusMessageIter *); 109 extern int (*dbus_message_iter_get_element_type) (DBusMessageIter *); 110 extern void (*dbus_message_iter_recurse) (DBusMessageIter *, DBusMessageIter *); 111 extern void (*dbus_message_iter_get_basic) (DBusMessageIter *, void *); 112 extern dbus_bool_t (*dbus_message_iter_next) (DBusMessageIter *); 113 extern dbus_bool_t (*dbus_connection_add_filter) (DBusConnection *, DBusHandleMessageFunction, 114 void *, DBusFreeFunction); 115 extern void (*dbus_connection_remove_filter) (DBusConnection *, DBusHandleMessageFunction, 116 void *); 117 extern dbus_bool_t (*dbus_connection_read_write_dispatch) (DBusConnection *, int); 118 extern dbus_bool_t (*dbus_message_is_signal) (DBusMessage *, const char *, const char *); 119 extern DBusMessage *(*dbus_connection_pop_message)(DBusConnection *); 87 extern void (*vbox_dbus_error_init)(DBusError *); 88 inline void dbus_error_init(DBusError *error) 89 { vbox_dbus_error_init(error); } 90 extern DBusConnection *(*vbox_dbus_bus_get)(DBusBusType, DBusError *); 91 inline DBusConnection *dbus_bus_get(DBusBusType type, DBusError *error) 92 { return vbox_dbus_bus_get(type, error); } 93 extern DBusConnection *(*vbox_dbus_bus_get_private)(DBusBusType, DBusError *); 94 inline DBusConnection *dbus_bus_get_private(DBusBusType type, DBusError *error) 95 { return vbox_dbus_bus_get_private(type, error); } 96 extern void (*vbox_dbus_error_free)(DBusError *); 97 inline void dbus_error_free(DBusError *error) 98 { vbox_dbus_error_free(error); } 99 extern void (*vbox_dbus_connection_unref)(DBusConnection *); 100 inline void dbus_connection_unref(DBusConnection *connection) 101 { vbox_dbus_connection_unref(connection); } 102 extern void (*vbox_dbus_connection_close)(DBusConnection *); 103 inline void dbus_connection_close(DBusConnection *connection) 104 { vbox_dbus_connection_close(connection); } 105 extern void (*vbox_dbus_connection_set_exit_on_disconnect)(DBusConnection *, dbus_bool_t); 106 inline void dbus_connection_set_exit_on_disconnect(DBusConnection *connection, dbus_bool_t boolean) 107 { vbox_dbus_connection_set_exit_on_disconnect(connection, boolean); } 108 extern dbus_bool_t (*vbox_dbus_bus_name_has_owner)(DBusConnection *, const char *, 109 DBusError *); 110 inline dbus_bool_t dbus_bus_name_has_owner(DBusConnection *connection, const char *string, 111 DBusError *error) 112 { return vbox_dbus_bus_name_has_owner(connection, string, error); } 113 extern void (*vbox_dbus_bus_add_match)(DBusConnection *, const char *, DBusError *); 114 inline void dbus_bus_add_match(DBusConnection *connection, const char *string, DBusError *error) 115 { vbox_dbus_bus_add_match(connection, string, error); } 116 extern void (*vbox_dbus_bus_remove_match)(DBusConnection *, const char *, DBusError *); 117 inline void dbus_bus_remove_match(DBusConnection *connection, const char *string, DBusError *error) 118 { vbox_dbus_bus_remove_match(connection, string, error); } 119 extern void (*vbox_dbus_message_unref)(DBusMessage *); 120 inline void dbus_message_unref(DBusMessage *message) 121 { vbox_dbus_message_unref(message); } 122 extern DBusMessage* (*vbox_dbus_message_new_method_call)(const char *, const char *, 123 const char *, const char *); 124 inline DBusMessage* dbus_message_new_method_call(const char *string1, const char *string2, 125 const char *string3, const char *string4) 126 { return vbox_dbus_message_new_method_call(string1, string2, string3, string4); } 127 extern void (*vbox_dbus_message_iter_init_append)(DBusMessage *, DBusMessageIter *); 128 inline void dbus_message_iter_init_append(DBusMessage *message, DBusMessageIter *iter) 129 { vbox_dbus_message_iter_init_append(message, iter); } 130 extern dbus_bool_t (*vbox_dbus_message_iter_append_basic)(DBusMessageIter *, int, 131 const void *); 132 inline dbus_bool_t dbus_message_iter_append_basic(DBusMessageIter *iter, int val, 133 const void *string) 134 { return vbox_dbus_message_iter_append_basic(iter, val, string); } 135 extern DBusMessage * (*vbox_dbus_connection_send_with_reply_and_block)(DBusConnection *, 136 DBusMessage *, int, 137 DBusError *error); 138 inline DBusMessage * dbus_connection_send_with_reply_and_block(DBusConnection *connection, 139 DBusMessage *message, int val, 140 DBusError *error) 141 { return vbox_dbus_connection_send_with_reply_and_block(connection, message, val, error); } 142 extern dbus_bool_t (*vbox_dbus_message_iter_init) (DBusMessage *, DBusMessageIter *); 143 inline dbus_bool_t dbus_message_iter_init(DBusMessage *message, DBusMessageIter *iter) 144 { return vbox_dbus_message_iter_init(message, iter); } 145 extern int (*vbox_dbus_message_iter_get_arg_type) (DBusMessageIter *); 146 inline int dbus_message_iter_get_arg_type(DBusMessageIter *iter) 147 { return vbox_dbus_message_iter_get_arg_type(iter); } 148 extern int (*vbox_dbus_message_iter_get_element_type) (DBusMessageIter *); 149 inline int dbus_message_iter_get_element_type(DBusMessageIter *iter) 150 { return vbox_dbus_message_iter_get_element_type(iter); } 151 extern void (*vbox_dbus_message_iter_recurse) (DBusMessageIter *, DBusMessageIter *); 152 inline void dbus_message_iter_recurse(DBusMessageIter *iter1, DBusMessageIter *iter2) 153 { vbox_dbus_message_iter_recurse(iter1, iter2); } 154 extern void (*vbox_dbus_message_iter_get_basic) (DBusMessageIter *, void *); 155 inline void dbus_message_iter_get_basic(DBusMessageIter *iter, void *pvoid) 156 { vbox_dbus_message_iter_get_basic(iter, pvoid); } 157 extern dbus_bool_t (*vbox_dbus_message_iter_next) (DBusMessageIter *); 158 inline dbus_bool_t dbus_message_iter_next(DBusMessageIter *iter) 159 { return vbox_dbus_message_iter_next(iter); } 160 extern dbus_bool_t (*vbox_dbus_connection_add_filter) (DBusConnection *, DBusHandleMessageFunction, 161 void *, DBusFreeFunction); 162 inline dbus_bool_t dbus_connection_add_filter(DBusConnection *connection, 163 DBusHandleMessageFunction function1, 164 void *pvoid, DBusFreeFunction function2) 165 { return vbox_dbus_connection_add_filter(connection, function1, pvoid, function2); } 166 extern void (*vbox_dbus_connection_remove_filter) (DBusConnection *, DBusHandleMessageFunction, 167 void *); 168 inline void dbus_connection_remove_filter(DBusConnection *connection, 169 DBusHandleMessageFunction function, void *pvoid) 170 { vbox_dbus_connection_remove_filter(connection, function, pvoid); } 171 extern dbus_bool_t (*vbox_dbus_connection_read_write_dispatch) (DBusConnection *, int); 172 inline dbus_bool_t dbus_connection_read_write_dispatch(DBusConnection *connection, int val) 173 { return vbox_dbus_connection_read_write_dispatch(connection, val); } 174 extern dbus_bool_t (*vbox_dbus_message_is_signal) (DBusMessage *, const char *, const char *); 175 inline dbus_bool_t dbus_message_is_signal(DBusMessage *message, const char *string1, const char *string2) 176 { return vbox_dbus_message_is_signal(message, string1, string2); } 177 extern DBusMessage *(*vbox_dbus_connection_pop_message)(DBusConnection *); 178 inline DBusMessage *dbus_connection_pop_message(DBusConnection *connection) 179 { return vbox_dbus_connection_pop_message(connection); } 120 180 121 181 /** … … 135 195 #endif /* ____H_VBOX_DBUS not defined */ 136 196 /* vi: set tabstop=4 shiftwidth=4 expandtab: */ 197 -
trunk/src/VBox/Main/linux/vbox-dbus.cpp
r15465 r16006 40 40 41 41 /** The following are the symbols which we need from libdbus. */ 42 void (* dbus_error_init)(DBusError *);43 DBusConnection *(* dbus_bus_get)(DBusBusType, DBusError *);44 DBusConnection *(* dbus_bus_get_private)(DBusBusType, DBusError *);45 void (* dbus_error_free)(DBusError *);46 void (* dbus_connection_unref)(DBusConnection *);47 void (* dbus_connection_close)(DBusConnection *);48 void (* dbus_connection_set_exit_on_disconnect)(DBusConnection *, dbus_bool_t);49 dbus_bool_t (* dbus_bus_name_has_owner)(DBusConnection *, const char *,50 DBusError *);51 void (* dbus_bus_add_match)(DBusConnection *, const char *, DBusError *);52 void (* dbus_bus_remove_match)(DBusConnection *, const char *, DBusError *);53 void (* dbus_message_unref)(DBusMessage *);54 DBusMessage* (* dbus_message_new_method_call)(const char *, const char *,55 const char *, const char *);56 void (* dbus_message_iter_init_append)(DBusMessage *, DBusMessageIter *);57 dbus_bool_t (* dbus_message_iter_append_basic)(DBusMessageIter *, int,58 const void *);59 DBusMessage * (* dbus_connection_send_with_reply_and_block)(DBusConnection *,60 DBusMessage *, int,61 DBusError *error);62 dbus_bool_t (* dbus_message_iter_init) (DBusMessage *, DBusMessageIter *);63 int (* dbus_message_iter_get_arg_type) (DBusMessageIter *);64 int (* dbus_message_iter_get_element_type) (DBusMessageIter *);65 void (* dbus_message_iter_recurse) (DBusMessageIter *, DBusMessageIter *);66 void (* dbus_message_iter_get_basic) (DBusMessageIter *, void *);67 dbus_bool_t (* dbus_message_iter_next) (DBusMessageIter *);68 dbus_bool_t (* dbus_connection_add_filter) (DBusConnection *, DBusHandleMessageFunction,69 void *, DBusFreeFunction);70 void (* dbus_connection_remove_filter) (DBusConnection *, DBusHandleMessageFunction,71 void *);72 dbus_bool_t (* dbus_connection_read_write_dispatch) (DBusConnection *, int);73 dbus_bool_t (* dbus_message_is_signal) (DBusMessage *, const char *, const char *);74 DBusMessage *(* dbus_connection_pop_message)(DBusConnection *);42 void (*vbox_dbus_error_init)(DBusError *); 43 DBusConnection *(*vbox_dbus_bus_get)(DBusBusType, DBusError *); 44 DBusConnection *(*vbox_dbus_bus_get_private)(DBusBusType, DBusError *); 45 void (*vbox_dbus_error_free)(DBusError *); 46 void (*vbox_dbus_connection_unref)(DBusConnection *); 47 void (*vbox_dbus_connection_close)(DBusConnection *); 48 void (*vbox_dbus_connection_set_exit_on_disconnect)(DBusConnection *, dbus_bool_t); 49 dbus_bool_t (*vbox_dbus_bus_name_has_owner)(DBusConnection *, const char *, 50 DBusError *); 51 void (*vbox_dbus_bus_add_match)(DBusConnection *, const char *, DBusError *); 52 void (*vbox_dbus_bus_remove_match)(DBusConnection *, const char *, DBusError *); 53 void (*vbox_dbus_message_unref)(DBusMessage *); 54 DBusMessage* (*vbox_dbus_message_new_method_call)(const char *, const char *, 55 const char *, const char *); 56 void (*vbox_dbus_message_iter_init_append)(DBusMessage *, DBusMessageIter *); 57 dbus_bool_t (*vbox_dbus_message_iter_append_basic)(DBusMessageIter *, int, 58 const void *); 59 DBusMessage * (*vbox_dbus_connection_send_with_reply_and_block)(DBusConnection *, 60 DBusMessage *, int, 61 DBusError *error); 62 dbus_bool_t (*vbox_dbus_message_iter_init) (DBusMessage *, DBusMessageIter *); 63 int (*vbox_dbus_message_iter_get_arg_type) (DBusMessageIter *); 64 int (*vbox_dbus_message_iter_get_element_type) (DBusMessageIter *); 65 void (*vbox_dbus_message_iter_recurse) (DBusMessageIter *, DBusMessageIter *); 66 void (*vbox_dbus_message_iter_get_basic) (DBusMessageIter *, void *); 67 dbus_bool_t (*vbox_dbus_message_iter_next) (DBusMessageIter *); 68 dbus_bool_t (*vbox_dbus_connection_add_filter) (DBusConnection *, DBusHandleMessageFunction, 69 void *, DBusFreeFunction); 70 void (*vbox_dbus_connection_remove_filter) (DBusConnection *, DBusHandleMessageFunction, 71 void *); 72 dbus_bool_t (*vbox_dbus_connection_read_write_dispatch) (DBusConnection *, int); 73 dbus_bool_t (*vbox_dbus_message_is_signal) (DBusMessage *, const char *, const char *); 74 DBusMessage *(*vbox_dbus_connection_pop_message)(DBusConnection *); 75 75 76 76 bool VBoxDBusCheckPresence(void) … … 88 88 } 89 89 if ( RT_SUCCESS(RTLdrGetSymbol(hLibDBus, "dbus_error_init", 90 (void **) & dbus_error_init))90 (void **) &vbox_dbus_error_init)) 91 91 && RT_SUCCESS(RTLdrGetSymbol(hLibDBus, "dbus_bus_get", 92 (void **) & dbus_bus_get))92 (void **) &vbox_dbus_bus_get)) 93 93 && RT_SUCCESS(RTLdrGetSymbol(hLibDBus, "dbus_bus_get_private", 94 (void **) & dbus_bus_get_private))94 (void **) &vbox_dbus_bus_get_private)) 95 95 && RT_SUCCESS(RTLdrGetSymbol(hLibDBus, "dbus_error_free", 96 (void **) & dbus_error_free))96 (void **) &vbox_dbus_error_free)) 97 97 && RT_SUCCESS(RTLdrGetSymbol(hLibDBus, "dbus_connection_unref", 98 (void **) & dbus_connection_unref))98 (void **) &vbox_dbus_connection_unref)) 99 99 && RT_SUCCESS(RTLdrGetSymbol(hLibDBus, "dbus_connection_close", 100 (void **) & dbus_connection_close))100 (void **) &vbox_dbus_connection_close)) 101 101 && RT_SUCCESS(RTLdrGetSymbol(hLibDBus, "dbus_connection_set_exit_on_disconnect", 102 (void **) & dbus_connection_set_exit_on_disconnect))102 (void **) &vbox_dbus_connection_set_exit_on_disconnect)) 103 103 && RT_SUCCESS(RTLdrGetSymbol(hLibDBus, "dbus_bus_name_has_owner", 104 (void **) & dbus_bus_name_has_owner))104 (void **) &vbox_dbus_bus_name_has_owner)) 105 105 && RT_SUCCESS(RTLdrGetSymbol(hLibDBus, "dbus_bus_add_match", 106 (void **) & dbus_bus_add_match))106 (void **) &vbox_dbus_bus_add_match)) 107 107 && RT_SUCCESS(RTLdrGetSymbol(hLibDBus, "dbus_bus_remove_match", 108 (void **) & dbus_bus_remove_match))108 (void **) &vbox_dbus_bus_remove_match)) 109 109 && RT_SUCCESS(RTLdrGetSymbol(hLibDBus, "dbus_message_unref", 110 (void **) & dbus_message_unref))110 (void **) &vbox_dbus_message_unref)) 111 111 && RT_SUCCESS(RTLdrGetSymbol(hLibDBus, "dbus_message_new_method_call", 112 (void **) & dbus_message_new_method_call))112 (void **) &vbox_dbus_message_new_method_call)) 113 113 && RT_SUCCESS(RTLdrGetSymbol(hLibDBus, "dbus_message_iter_init_append", 114 (void **) & dbus_message_iter_init_append))114 (void **) &vbox_dbus_message_iter_init_append)) 115 115 && RT_SUCCESS(RTLdrGetSymbol(hLibDBus, "dbus_message_iter_append_basic", 116 (void **) & dbus_message_iter_append_basic))116 (void **) &vbox_dbus_message_iter_append_basic)) 117 117 && RT_SUCCESS(RTLdrGetSymbol(hLibDBus, "dbus_connection_send_with_reply_and_block", 118 (void **) & dbus_connection_send_with_reply_and_block))118 (void **) &vbox_dbus_connection_send_with_reply_and_block)) 119 119 && RT_SUCCESS(RTLdrGetSymbol(hLibDBus, "dbus_message_iter_init", 120 (void **) & dbus_message_iter_init))120 (void **) &vbox_dbus_message_iter_init)) 121 121 && RT_SUCCESS(RTLdrGetSymbol(hLibDBus, "dbus_message_iter_get_arg_type", 122 (void **) & dbus_message_iter_get_arg_type))122 (void **) &vbox_dbus_message_iter_get_arg_type)) 123 123 && RT_SUCCESS(RTLdrGetSymbol(hLibDBus, "dbus_message_iter_get_element_type", 124 (void **) & dbus_message_iter_get_element_type))124 (void **) &vbox_dbus_message_iter_get_element_type)) 125 125 && RT_SUCCESS(RTLdrGetSymbol(hLibDBus, "dbus_message_iter_recurse", 126 (void **) & dbus_message_iter_recurse))126 (void **) &vbox_dbus_message_iter_recurse)) 127 127 && RT_SUCCESS(RTLdrGetSymbol(hLibDBus, "dbus_message_iter_get_basic", 128 (void **) & dbus_message_iter_get_basic))128 (void **) &vbox_dbus_message_iter_get_basic)) 129 129 && RT_SUCCESS(RTLdrGetSymbol(hLibDBus, "dbus_message_iter_next", 130 (void **) & dbus_message_iter_next))130 (void **) &vbox_dbus_message_iter_next)) 131 131 && RT_SUCCESS(RTLdrGetSymbol(hLibDBus, "dbus_connection_add_filter", 132 (void **) & dbus_connection_add_filter))132 (void **) &vbox_dbus_connection_add_filter)) 133 133 && RT_SUCCESS(RTLdrGetSymbol(hLibDBus, "dbus_connection_remove_filter", 134 (void **) & dbus_connection_remove_filter))134 (void **) &vbox_dbus_connection_remove_filter)) 135 135 && RT_SUCCESS(RTLdrGetSymbol(hLibDBus, "dbus_connection_read_write_dispatch", 136 (void **) & dbus_connection_read_write_dispatch))136 (void **) &vbox_dbus_connection_read_write_dispatch)) 137 137 && RT_SUCCESS(RTLdrGetSymbol(hLibDBus, "dbus_message_is_signal", 138 (void **) & dbus_message_is_signal))138 (void **) &vbox_dbus_message_is_signal)) 139 139 && RT_SUCCESS(RTLdrGetSymbol(hLibDBus, "dbus_connection_pop_message", 140 (void **) & dbus_connection_pop_message))140 (void **) &vbox_dbus_connection_pop_message)) 141 141 ) 142 142 {
Note:
See TracChangeset
for help on using the changeset viewer.