├── .gitignore ├── COPYING ├── Makefile ├── README ├── dbus-1.pcin ├── dbus-glib-1.pcin ├── include └── dbus-1.0 │ └── dbus │ ├── dbus-address.h │ ├── dbus-arch-deps.h │ ├── dbus-bus.h │ ├── dbus-connection.h │ ├── dbus-errors.h │ ├── dbus-glib-bindings.h │ ├── dbus-glib-lowlevel.h │ ├── dbus-glib.h │ ├── dbus-gtype-specialized.h │ ├── dbus-macros.h │ ├── dbus-memory.h │ ├── dbus-message.h │ ├── dbus-misc.h │ ├── dbus-pending-call.h │ ├── dbus-protocol.h │ ├── dbus-server.h │ ├── dbus-shared.h │ ├── dbus-signature.h │ ├── dbus-threads.h │ ├── dbus-types.h │ └── dbus.h └── stubs.c /.gitignore: -------------------------------------------------------------------------------- 1 | *.[oa] 2 | *.pc 3 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | Copyright (C) 2012 Lauri Kasanen 2 | 3 | This software is provided 'as-is', without any express or implied 4 | warranty. In no event will the authors be held liable for any damages 5 | arising from the use of this software. 6 | 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it 9 | freely, subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not 12 | claim that you wrote the original software. If you use this software 13 | in a product, an acknowledgment in the product documentation would be 14 | appreciated but is not required. 15 | 2. Altered source versions must be plainly marked as such, and must not be 16 | misrepresented as being the original software. 17 | 3. This notice may not be removed or altered from any source distribution. 18 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | NAME = libnobus.a 2 | SRC = stubs.c 3 | OBJ = stubs.o 4 | 5 | PREFIX ?= /usr/local 6 | DESTDIR ?= 7 | 8 | CFLAGS += -Iinclude/dbus-1.0 -Wall -fPIC 9 | CFLAGS += $(shell pkg-config --cflags glib-2.0) 10 | 11 | LDFLAGS += -Wl,-O1 12 | 13 | 14 | all: $(NAME) 15 | 16 | $(NAME): $(OBJ) 17 | ar cru $(NAME) $(OBJ) 18 | ranlib $(NAME) 19 | 20 | 21 | .PHONY: clean all install 22 | 23 | 24 | clean: 25 | rm -f *.o *.a *.pc 26 | 27 | install: all 28 | @echo Installing to $(DESTDIR)/$(PREFIX) 29 | mkdir -p $(DESTDIR)/$(PREFIX)/lib/pkgconfig 30 | cp -a include $(DESTDIR)/$(PREFIX) 31 | 32 | sed "s@/tmp/kai@$(PREFIX)@" dbus-glib-1.pcin > dbus-glib.pc 33 | sed "s@/tmp/kai@$(PREFIX)@" dbus-1.pcin > dbus-1.pc 34 | 35 | cp *.pc $(DESTDIR)/$(PREFIX)/lib/pkgconfig 36 | 37 | cp $(NAME) $(DESTDIR)/$(PREFIX)/lib 38 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | NoBus 2 | ===== 3 | 4 | Your favorite application requires dbus, uses it for nothing important, 5 | and gives no option to disable it? 6 | 7 | Forcing you to waste disk space and run an unnecessary daemon? 8 | 9 | 10 | Fear no more, for NoBus is here! 11 | 12 | 13 | Usage 14 | ===== 15 | 16 | NoBus is a compile-time solution containing dbus stubs. Install it before 17 | building your application, and the binary won't have any requirement 18 | on dbus. 19 | -------------------------------------------------------------------------------- /dbus-1.pcin: -------------------------------------------------------------------------------- 1 | prefix=/tmp/kai 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib 4 | includedir=${prefix}/include 5 | sysconfdir=/tmp/kai/etc 6 | session_bus_services_dir=/tmp/kai/share/dbus-1/services 7 | system_bus_services_dir=/tmp/kai/share/dbus-1/system-services 8 | interfaces_dir=/tmp/kai/share/dbus-1/interfaces 9 | daemondir=/tmp/kai/bin 10 | 11 | Name: dbus 12 | Description: D-bus replacement stub 13 | Version: 1.4.20 14 | Libs: -L${libdir} -lnobus 15 | Cflags: -I${includedir}/dbus-1.0 -I${libdir}/dbus-1.0/include 16 | -------------------------------------------------------------------------------- /dbus-glib-1.pcin: -------------------------------------------------------------------------------- 1 | prefix=/tmp/kai 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib 4 | includedir=${prefix}/include 5 | 6 | Name: dbus-glib 7 | Description: GLib integration for the free desktop message bus 8 | Version: 0.98 9 | Requires: dbus-1 glib-2.0 gobject-2.0 10 | Libs: -L${libdir} 11 | Cflags: -I${includedir}/dbus-1.0 12 | 13 | 14 | -------------------------------------------------------------------------------- /include/dbus-1.0/dbus/dbus-address.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ 2 | /* dbus-address.h Server address parser. 3 | * 4 | * Copyright (C) 2003 CodeFactory AB 5 | * 6 | * Licensed under the Academic Free License version 2.1 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | * 22 | */ 23 | #if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) 24 | #error "Only can be included directly, this file may disappear or change contents." 25 | #endif 26 | 27 | #ifndef DBUS_ADDRESS_H 28 | #define DBUS_ADDRESS_H 29 | 30 | #include 31 | #include 32 | 33 | DBUS_BEGIN_DECLS 34 | 35 | /** 36 | * @addtogroup DBusAddress 37 | * @{ 38 | */ 39 | 40 | /** Opaque type representing one of the semicolon-separated items in an address */ 41 | typedef struct DBusAddressEntry DBusAddressEntry; 42 | 43 | 44 | dbus_bool_t dbus_parse_address (const char *address, 45 | DBusAddressEntry ***entry, 46 | int *array_len, 47 | DBusError *error); 48 | 49 | const char *dbus_address_entry_get_value (DBusAddressEntry *entry, 50 | const char *key); 51 | 52 | const char *dbus_address_entry_get_method (DBusAddressEntry *entry); 53 | 54 | #define dbus_address_entries_free(e) ((void)0) 55 | 56 | char* dbus_address_escape_value (const char *value); 57 | 58 | char* dbus_address_unescape_value (const char *value, 59 | DBusError *error); 60 | 61 | /** @} */ 62 | 63 | DBUS_END_DECLS 64 | 65 | #endif /* DBUS_ADDRESS_H */ 66 | 67 | -------------------------------------------------------------------------------- /include/dbus-1.0/dbus/dbus-arch-deps.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-file-style: "gnu" -*- */ 2 | /* dbus-arch-deps.h Header with architecture/compiler specific information, installed to libdir 3 | * 4 | * Copyright (C) 2003 Red Hat, Inc. 5 | * 6 | * Licensed under the Academic Free License version 2.0 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | * 22 | */ 23 | #if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) 24 | #error "Only can be included directly, this file may disappear or change contents." 25 | #endif 26 | 27 | #ifndef DBUS_ARCH_DEPS_H 28 | #define DBUS_ARCH_DEPS_H 29 | 30 | #include 31 | 32 | DBUS_BEGIN_DECLS 33 | 34 | #if 1 35 | #define DBUS_HAVE_INT64 1 36 | _DBUS_GNUC_EXTENSION typedef long long dbus_int64_t; 37 | _DBUS_GNUC_EXTENSION typedef unsigned long long dbus_uint64_t; 38 | 39 | #define DBUS_INT64_CONSTANT(val) (_DBUS_GNUC_EXTENSION (val##L)) 40 | #define DBUS_UINT64_CONSTANT(val) (_DBUS_GNUC_EXTENSION (val##UL)) 41 | 42 | #else 43 | #undef DBUS_HAVE_INT64 44 | #undef DBUS_INT64_CONSTANT 45 | #undef DBUS_UINT64_CONSTANT 46 | #endif 47 | 48 | typedef int dbus_int32_t; 49 | typedef unsigned int dbus_uint32_t; 50 | 51 | typedef short dbus_int16_t; 52 | typedef unsigned short dbus_uint16_t; 53 | 54 | /* This is not really arch-dependent, but it's not worth 55 | * creating an additional generated header just for this 56 | */ 57 | #define DBUS_MAJOR_VERSION 1 58 | #define DBUS_MINOR_VERSION 4 59 | #define DBUS_MICRO_VERSION 20 60 | 61 | #define DBUS_VERSION_STRING "1.4.20" 62 | 63 | #define DBUS_VERSION ((1 << 16) | (4 << 8) | (20)) 64 | 65 | DBUS_END_DECLS 66 | 67 | #endif /* DBUS_ARCH_DEPS_H */ 68 | -------------------------------------------------------------------------------- /include/dbus-1.0/dbus/dbus-bus.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ 2 | /* dbus-bus.h Convenience functions for communicating with the bus. 3 | * 4 | * Copyright (C) 2003 CodeFactory AB 5 | * 6 | * Licensed under the Academic Free License version 2.1 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | * 22 | */ 23 | #if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) 24 | #error "Only can be included directly, this file may disappear or change contents." 25 | #endif 26 | 27 | #ifndef DBUS_BUS_H 28 | #define DBUS_BUS_H 29 | 30 | #include 31 | 32 | DBUS_BEGIN_DECLS 33 | 34 | /** 35 | * @addtogroup DBusBus 36 | * @{ 37 | */ 38 | 39 | 40 | DBusConnection *dbus_bus_get (DBusBusType type, 41 | DBusError *error); 42 | 43 | DBusConnection *dbus_bus_get_private (DBusBusType type, 44 | DBusError *error); 45 | 46 | 47 | dbus_bool_t dbus_bus_register (DBusConnection *connection, 48 | DBusError *error); 49 | 50 | dbus_bool_t dbus_bus_set_unique_name (DBusConnection *connection, 51 | const char *unique_name); 52 | 53 | const char* dbus_bus_get_unique_name (DBusConnection *connection); 54 | 55 | unsigned long dbus_bus_get_unix_user (DBusConnection *connection, 56 | const char *name, 57 | DBusError *error); 58 | 59 | char* dbus_bus_get_id (DBusConnection *connection, 60 | DBusError *error); 61 | 62 | int dbus_bus_request_name (DBusConnection *connection, 63 | const char *name, 64 | unsigned int flags, 65 | DBusError *error); 66 | 67 | int dbus_bus_release_name (DBusConnection *connection, 68 | const char *name, 69 | DBusError *error); 70 | 71 | dbus_bool_t dbus_bus_name_has_owner (DBusConnection *connection, 72 | const char *name, 73 | DBusError *error); 74 | 75 | 76 | dbus_bool_t dbus_bus_start_service_by_name (DBusConnection *connection, 77 | const char *name, 78 | dbus_uint32_t flags, 79 | dbus_uint32_t *reply, 80 | DBusError *error); 81 | 82 | 83 | #define dbus_bus_add_match(a, b, c) ((void)0) 84 | 85 | #define dbus_bus_remove_match(a, b, c) ((void)0) 86 | 87 | DBUS_END_DECLS 88 | 89 | #endif /* DBUS_BUS_H */ 90 | -------------------------------------------------------------------------------- /include/dbus-1.0/dbus/dbus-connection.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ 2 | /* dbus-connection.h DBusConnection object 3 | * 4 | * Copyright (C) 2002, 2003 Red Hat Inc. 5 | * 6 | * Licensed under the Academic Free License version 2.1 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | * 22 | */ 23 | #if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) 24 | #error "Only can be included directly, this file may disappear or change contents." 25 | #endif 26 | 27 | #ifndef DBUS_CONNECTION_H 28 | #define DBUS_CONNECTION_H 29 | 30 | #include 31 | #include 32 | #include 33 | #include 34 | 35 | DBUS_BEGIN_DECLS 36 | 37 | /** 38 | * @addtogroup DBusConnection 39 | * @{ 40 | */ 41 | 42 | /* documented in dbus-watch.c */ 43 | typedef struct DBusWatch DBusWatch; 44 | /* documented in dbus-timeout.c */ 45 | typedef struct DBusTimeout DBusTimeout; 46 | /** Opaque type representing preallocated resources so a message can be sent without further memory allocation. */ 47 | typedef struct DBusPreallocatedSend DBusPreallocatedSend; 48 | /** Opaque type representing a method call that has not yet received a reply. */ 49 | typedef struct DBusPendingCall DBusPendingCall; 50 | /** Opaque type representing a connection to a remote application and associated incoming/outgoing message queues. */ 51 | typedef struct DBusConnection DBusConnection; 52 | /** Set of functions that must be implemented to handle messages sent to a particular object path. */ 53 | typedef struct DBusObjectPathVTable DBusObjectPathVTable; 54 | 55 | /** 56 | * Indicates the status of a #DBusWatch. 57 | */ 58 | typedef enum 59 | { 60 | DBUS_WATCH_READABLE = 1 << 0, /**< As in POLLIN */ 61 | DBUS_WATCH_WRITABLE = 1 << 1, /**< As in POLLOUT */ 62 | DBUS_WATCH_ERROR = 1 << 2, /**< As in POLLERR (can't watch for 63 | * this, but can be present in 64 | * current state passed to 65 | * dbus_watch_handle()). 66 | */ 67 | DBUS_WATCH_HANGUP = 1 << 3 /**< As in POLLHUP (can't watch for 68 | * it, but can be present in current 69 | * state passed to 70 | * dbus_watch_handle()). 71 | */ 72 | } DBusWatchFlags; 73 | 74 | /** 75 | * Indicates the status of incoming data on a #DBusConnection. This determines whether 76 | * dbus_connection_dispatch() needs to be called. 77 | */ 78 | typedef enum 79 | { 80 | DBUS_DISPATCH_DATA_REMAINS, /**< There is more data to potentially convert to messages. */ 81 | DBUS_DISPATCH_COMPLETE, /**< All currently available data has been processed. */ 82 | DBUS_DISPATCH_NEED_MEMORY /**< More memory is needed to continue. */ 83 | } DBusDispatchStatus; 84 | 85 | /** Called when libdbus needs a new watch to be monitored by the main 86 | * loop. Returns #FALSE if it lacks enough memory to add the 87 | * watch. Set by dbus_connection_set_watch_functions() or 88 | * dbus_server_set_watch_functions(). 89 | */ 90 | typedef dbus_bool_t (* DBusAddWatchFunction) (DBusWatch *watch, 91 | void *data); 92 | /** Called when dbus_watch_get_enabled() may return a different value 93 | * than it did before. Set by dbus_connection_set_watch_functions() 94 | * or dbus_server_set_watch_functions(). 95 | */ 96 | typedef void (* DBusWatchToggledFunction) (DBusWatch *watch, 97 | void *data); 98 | /** Called when libdbus no longer needs a watch to be monitored by the 99 | * main loop. Set by dbus_connection_set_watch_functions() or 100 | * dbus_server_set_watch_functions(). 101 | */ 102 | typedef void (* DBusRemoveWatchFunction) (DBusWatch *watch, 103 | void *data); 104 | /** Called when libdbus needs a new timeout to be monitored by the main 105 | * loop. Returns #FALSE if it lacks enough memory to add the 106 | * watch. Set by dbus_connection_set_timeout_functions() or 107 | * dbus_server_set_timeout_functions(). 108 | */ 109 | typedef dbus_bool_t (* DBusAddTimeoutFunction) (DBusTimeout *timeout, 110 | void *data); 111 | /** Called when dbus_timeout_get_enabled() may return a different 112 | * value than it did before. 113 | * Set by dbus_connection_set_timeout_functions() or 114 | * dbus_server_set_timeout_functions(). 115 | */ 116 | typedef void (* DBusTimeoutToggledFunction) (DBusTimeout *timeout, 117 | void *data); 118 | /** Called when libdbus no longer needs a timeout to be monitored by the 119 | * main loop. Set by dbus_connection_set_timeout_functions() or 120 | * dbus_server_set_timeout_functions(). 121 | */ 122 | typedef void (* DBusRemoveTimeoutFunction) (DBusTimeout *timeout, 123 | void *data); 124 | /** Called when the return value of dbus_connection_get_dispatch_status() 125 | * may have changed. Set with dbus_connection_set_dispatch_status_function(). 126 | */ 127 | typedef void (* DBusDispatchStatusFunction) (DBusConnection *connection, 128 | DBusDispatchStatus new_status, 129 | void *data); 130 | /** 131 | * Called when the main loop's thread should be notified that there's now work 132 | * to do. Set with dbus_connection_set_wakeup_main_function(). 133 | */ 134 | typedef void (* DBusWakeupMainFunction) (void *data); 135 | 136 | /** 137 | * Called during authentication to check whether the given UNIX user 138 | * ID is allowed to connect, if the client tried to auth as a UNIX 139 | * user ID. Normally on Windows this would never happen. Set with 140 | * dbus_connection_set_unix_user_function(). 141 | */ 142 | typedef dbus_bool_t (* DBusAllowUnixUserFunction) (DBusConnection *connection, 143 | unsigned long uid, 144 | void *data); 145 | 146 | /** 147 | * Called during authentication to check whether the given Windows user 148 | * ID is allowed to connect, if the client tried to auth as a Windows 149 | * user ID. Normally on UNIX this would never happen. Set with 150 | * dbus_connection_set_windows_user_function(). 151 | */ 152 | typedef dbus_bool_t (* DBusAllowWindowsUserFunction) (DBusConnection *connection, 153 | const char *user_sid, 154 | void *data); 155 | 156 | 157 | /** 158 | * Called when a pending call now has a reply available. Set with 159 | * dbus_pending_call_set_notify(). 160 | */ 161 | typedef void (* DBusPendingCallNotifyFunction) (DBusPendingCall *pending, 162 | void *user_data); 163 | 164 | /** 165 | * Called when a message needs to be handled. The result indicates whether or 166 | * not more handlers should be run. Set with dbus_connection_add_filter(). 167 | */ 168 | typedef DBusHandlerResult (* DBusHandleMessageFunction) (DBusConnection *connection, 169 | DBusMessage *message, 170 | void *user_data); 171 | 172 | DBusConnection* dbus_connection_open (const char *address, 173 | DBusError *error); 174 | 175 | DBusConnection* dbus_connection_open_private (const char *address, 176 | DBusError *error); 177 | 178 | DBusConnection* dbus_connection_ref (DBusConnection *connection); 179 | 180 | #define dbus_connection_unref(c) ((void)0) 181 | 182 | #define dbus_connection_close(c) ((void)0) 183 | 184 | dbus_bool_t dbus_connection_get_is_connected (DBusConnection *connection); 185 | 186 | dbus_bool_t dbus_connection_get_is_authenticated (DBusConnection *connection); 187 | 188 | dbus_bool_t dbus_connection_get_is_anonymous (DBusConnection *connection); 189 | 190 | char* dbus_connection_get_server_id (DBusConnection *connection); 191 | 192 | dbus_bool_t dbus_connection_can_send_type (DBusConnection *connection, 193 | int type); 194 | 195 | 196 | #define dbus_connection_set_exit_on_disconnect(a, b) ((void)0) 197 | 198 | #define dbus_connection_flush(a) ((void)0) 199 | 200 | dbus_bool_t dbus_connection_read_write_dispatch (DBusConnection *connection, 201 | int timeout_milliseconds); 202 | 203 | dbus_bool_t dbus_connection_read_write (DBusConnection *connection, 204 | int timeout_milliseconds); 205 | 206 | DBusMessage* dbus_connection_borrow_message (DBusConnection *connection); 207 | 208 | #define dbus_connection_return_message(a, b) ((void)0) 209 | 210 | #define dbus_connection_steal_borrowed_message(a, b) ((void)0) 211 | 212 | DBusMessage* dbus_connection_pop_message (DBusConnection *connection); 213 | 214 | DBusDispatchStatus dbus_connection_get_dispatch_status (DBusConnection *connection); 215 | 216 | DBusDispatchStatus dbus_connection_dispatch (DBusConnection *connection); 217 | 218 | dbus_bool_t dbus_connection_has_messages_to_send (DBusConnection *connection); 219 | 220 | dbus_bool_t dbus_connection_send (DBusConnection *connection, 221 | DBusMessage *message, 222 | dbus_uint32_t *client_serial); 223 | 224 | dbus_bool_t dbus_connection_send_with_reply (DBusConnection *connection, 225 | DBusMessage *message, 226 | DBusPendingCall **pending_return, 227 | int timeout_milliseconds); 228 | 229 | DBusMessage * dbus_connection_send_with_reply_and_block (DBusConnection *connection, 230 | DBusMessage *message, 231 | int timeout_milliseconds, 232 | DBusError *error); 233 | 234 | dbus_bool_t dbus_connection_set_watch_functions (DBusConnection *connection, 235 | DBusAddWatchFunction add_function, 236 | DBusRemoveWatchFunction remove_function, 237 | DBusWatchToggledFunction toggled_function, 238 | void *data, 239 | DBusFreeFunction free_data_function); 240 | 241 | dbus_bool_t dbus_connection_set_timeout_functions (DBusConnection *connection, 242 | DBusAddTimeoutFunction add_function, 243 | DBusRemoveTimeoutFunction remove_function, 244 | DBusTimeoutToggledFunction toggled_function, 245 | void *data, 246 | DBusFreeFunction free_data_function); 247 | 248 | #define dbus_connection_set_wakeup_main_function(a, b, c, d) ((void)0) 249 | 250 | #define dbus_connection_set_dispatch_status_function(a, b, c, d) ((void)0) 251 | 252 | dbus_bool_t dbus_connection_get_unix_user (DBusConnection *connection, 253 | unsigned long *uid); 254 | 255 | dbus_bool_t dbus_connection_get_unix_process_id (DBusConnection *connection, 256 | unsigned long *pid); 257 | 258 | dbus_bool_t dbus_connection_get_adt_audit_session_data (DBusConnection *connection, 259 | void **data, 260 | dbus_int32_t *data_size); 261 | 262 | #define dbus_connection_set_unix_user_function(a, b, c, d) ((void)0) 263 | 264 | dbus_bool_t dbus_connection_get_windows_user (DBusConnection *connection, 265 | char **windows_sid_p); 266 | 267 | #define dbus_connection_set_windows_user_function(a, b, c, d) ((void)0) 268 | 269 | #define dbus_connection_set_allow_anonymous(a, b) ((void)0) 270 | 271 | #define dbus_connection_set_route_peer_messages(a, b) ((void)0) 272 | 273 | /* Filters */ 274 | 275 | 276 | dbus_bool_t dbus_connection_add_filter (DBusConnection *connection, 277 | DBusHandleMessageFunction function, 278 | void *user_data, 279 | DBusFreeFunction free_data_function); 280 | 281 | #define dbus_connection_remove_filter(a, b, c) ((void)0) 282 | 283 | /* Other */ 284 | 285 | dbus_bool_t dbus_connection_allocate_data_slot (dbus_int32_t *slot_p); 286 | 287 | #define dbus_connection_free_data_slot(a) ((void)0) 288 | 289 | dbus_bool_t dbus_connection_set_data (DBusConnection *connection, 290 | dbus_int32_t slot, 291 | void *data, 292 | DBusFreeFunction free_data_func); 293 | 294 | void* dbus_connection_get_data (DBusConnection *connection, 295 | dbus_int32_t slot); 296 | 297 | 298 | #define dbus_connection_set_change_sigpipe(a) ((void)0) 299 | 300 | #define dbus_connection_set_max_message_size(a, b) ((void)0) 301 | 302 | long dbus_connection_get_max_message_size (DBusConnection *connection); 303 | 304 | #define dbus_connection_set_max_received_size(a,b) ((void)0) 305 | 306 | long dbus_connection_get_max_received_size (DBusConnection *connection); 307 | 308 | 309 | #define dbus_connection_set_max_message_unix_fds(a,b) ((void)0) 310 | 311 | long dbus_connection_get_max_message_unix_fds (DBusConnection *connection); 312 | 313 | #define dbus_connection_set_max_received_unix_fds(a,b) ((void)0) 314 | 315 | long dbus_connection_get_max_received_unix_fds(DBusConnection *connection); 316 | 317 | 318 | long dbus_connection_get_outgoing_size (DBusConnection *connection); 319 | 320 | long dbus_connection_get_outgoing_unix_fds (DBusConnection *connection); 321 | 322 | 323 | DBusPreallocatedSend* dbus_connection_preallocate_send (DBusConnection *connection); 324 | 325 | #define dbus_connection_free_preallocated_send(a,b) ((void)0) 326 | 327 | #define dbus_connection_send_preallocated(a,b,c,d) ((void)0) 328 | 329 | 330 | /* Object tree functionality */ 331 | 332 | /** 333 | * Called when a #DBusObjectPathVTable is unregistered (or its connection is freed). 334 | * Found in #DBusObjectPathVTable. 335 | */ 336 | typedef void (* DBusObjectPathUnregisterFunction) (DBusConnection *connection, 337 | void *user_data); 338 | /** 339 | * Called when a message is sent to a registered object path. Found in 340 | * #DBusObjectPathVTable which is registered with dbus_connection_register_object_path() 341 | * or dbus_connection_register_fallback(). 342 | */ 343 | typedef DBusHandlerResult (* DBusObjectPathMessageFunction) (DBusConnection *connection, 344 | DBusMessage *message, 345 | void *user_data); 346 | 347 | /** 348 | * Virtual table that must be implemented to handle a portion of the 349 | * object path hierarchy. Attach the vtable to a particular path using 350 | * dbus_connection_register_object_path() or 351 | * dbus_connection_register_fallback(). 352 | */ 353 | struct DBusObjectPathVTable 354 | { 355 | DBusObjectPathUnregisterFunction unregister_function; /**< Function to unregister this handler */ 356 | DBusObjectPathMessageFunction message_function; /**< Function to handle messages */ 357 | 358 | void (* dbus_internal_pad1) (void *); /**< Reserved for future expansion */ 359 | void (* dbus_internal_pad2) (void *); /**< Reserved for future expansion */ 360 | void (* dbus_internal_pad3) (void *); /**< Reserved for future expansion */ 361 | void (* dbus_internal_pad4) (void *); /**< Reserved for future expansion */ 362 | }; 363 | 364 | 365 | dbus_bool_t dbus_connection_try_register_object_path (DBusConnection *connection, 366 | const char *path, 367 | const DBusObjectPathVTable *vtable, 368 | void *user_data, 369 | DBusError *error); 370 | 371 | 372 | dbus_bool_t dbus_connection_register_object_path (DBusConnection *connection, 373 | const char *path, 374 | const DBusObjectPathVTable *vtable, 375 | void *user_data); 376 | 377 | 378 | dbus_bool_t dbus_connection_try_register_fallback (DBusConnection *connection, 379 | const char *path, 380 | const DBusObjectPathVTable *vtable, 381 | void *user_data, 382 | DBusError *error); 383 | 384 | 385 | dbus_bool_t dbus_connection_register_fallback (DBusConnection *connection, 386 | const char *path, 387 | const DBusObjectPathVTable *vtable, 388 | void *user_data); 389 | 390 | dbus_bool_t dbus_connection_unregister_object_path (DBusConnection *connection, 391 | const char *path); 392 | 393 | 394 | dbus_bool_t dbus_connection_get_object_path_data (DBusConnection *connection, 395 | const char *path, 396 | void **data_p); 397 | 398 | 399 | dbus_bool_t dbus_connection_list_registered (DBusConnection *connection, 400 | const char *parent_path, 401 | char ***child_entries); 402 | 403 | 404 | dbus_bool_t dbus_connection_get_unix_fd (DBusConnection *connection, 405 | int *fd); 406 | 407 | dbus_bool_t dbus_connection_get_socket (DBusConnection *connection, 408 | int *fd); 409 | 410 | /** @} */ 411 | 412 | 413 | /** 414 | * @addtogroup DBusWatch 415 | * @{ 416 | */ 417 | 418 | #ifndef DBUS_DISABLE_DEPRECATED 419 | 420 | DBUS_DEPRECATED int dbus_watch_get_fd (DBusWatch *watch); 421 | #endif 422 | 423 | 424 | int dbus_watch_get_unix_fd (DBusWatch *watch); 425 | 426 | int dbus_watch_get_socket (DBusWatch *watch); 427 | 428 | unsigned int dbus_watch_get_flags (DBusWatch *watch); 429 | 430 | void* dbus_watch_get_data (DBusWatch *watch); 431 | 432 | #define dbus_watch_set_data(a, b, c) ((void)0) 433 | 434 | dbus_bool_t dbus_watch_handle (DBusWatch *watch, 435 | unsigned int flags); 436 | 437 | dbus_bool_t dbus_watch_get_enabled (DBusWatch *watch); 438 | 439 | /** @} */ 440 | 441 | /** 442 | * @addtogroup DBusTimeout 443 | * @{ 444 | */ 445 | 446 | 447 | int dbus_timeout_get_interval (DBusTimeout *timeout); 448 | 449 | void* dbus_timeout_get_data (DBusTimeout *timeout); 450 | 451 | #define dbus_timeout_set_data(a,b,c) ((void)0) 452 | 453 | dbus_bool_t dbus_timeout_handle (DBusTimeout *timeout); 454 | 455 | dbus_bool_t dbus_timeout_get_enabled (DBusTimeout *timeout); 456 | 457 | /** @} */ 458 | 459 | DBUS_END_DECLS 460 | 461 | #endif /* DBUS_CONNECTION_H */ 462 | -------------------------------------------------------------------------------- /include/dbus-1.0/dbus/dbus-errors.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ 2 | /* dbus-errors.h Error reporting 3 | * 4 | * Copyright (C) 2002 Red Hat Inc. 5 | * Copyright (C) 2003 CodeFactory AB 6 | * 7 | * Licensed under the Academic Free License version 2.1 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 | * 23 | */ 24 | #if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) 25 | #error "Only can be included directly, this file may disappear or change contents." 26 | #endif 27 | 28 | #ifndef DBUS_ERROR_H 29 | #define DBUS_ERROR_H 30 | 31 | #include 32 | #include 33 | #include 34 | 35 | DBUS_BEGIN_DECLS 36 | 37 | /** 38 | * @addtogroup DBusErrors 39 | * @{ 40 | */ 41 | 42 | /** Mostly-opaque type representing an error that occurred */ 43 | typedef struct DBusError DBusError; 44 | 45 | /** 46 | * Object representing an exception. 47 | */ 48 | struct DBusError 49 | { 50 | const char *name; /**< public error name field */ 51 | const char *message; /**< public error message field */ 52 | 53 | unsigned int dummy1 : 1; /**< placeholder */ 54 | unsigned int dummy2 : 1; /**< placeholder */ 55 | unsigned int dummy3 : 1; /**< placeholder */ 56 | unsigned int dummy4 : 1; /**< placeholder */ 57 | unsigned int dummy5 : 1; /**< placeholder */ 58 | 59 | void *padding1; /**< placeholder */ 60 | }; 61 | 62 | #define DBUS_ERROR_INIT { NULL, NULL, TRUE, 0, 0, 0, 0, NULL } 63 | 64 | 65 | #define dbus_error_init(a) ((void)0) 66 | 67 | #define dbus_error_free(a) ((void)0) 68 | 69 | #define dbus_set_error(a,b,c,...) ((void)0) 70 | 71 | #define dbus_set_error_const(a,b,c) ((void)0) 72 | 73 | #define dbus_move_error(a,b) ((void)0) 74 | 75 | dbus_bool_t dbus_error_has_name (const DBusError *error, 76 | const char *name); 77 | 78 | dbus_bool_t dbus_error_is_set (const DBusError *error); 79 | 80 | /** @} */ 81 | 82 | DBUS_END_DECLS 83 | 84 | #endif /* DBUS_ERROR_H */ 85 | -------------------------------------------------------------------------------- /include/dbus-1.0/dbus/dbus-glib-bindings.h: -------------------------------------------------------------------------------- 1 | /* Generated by dbus-binding-tool; do not edit! */ 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | G_BEGIN_DECLS 8 | 9 | #ifndef DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_DBus_Introspectable 10 | #define DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_DBus_Introspectable 11 | 12 | static 13 | #ifdef G_HAVE_INLINE 14 | inline 15 | #endif 16 | gboolean 17 | org_freedesktop_DBus_Introspectable_introspect (DBusGProxy *proxy, char ** OUT_data, GError **error) 18 | 19 | { 20 | return dbus_g_proxy_call (proxy, "Introspect", error, G_TYPE_INVALID, G_TYPE_STRING, OUT_data, G_TYPE_INVALID); 21 | } 22 | 23 | typedef void (*org_freedesktop_DBus_Introspectable_introspect_reply) (DBusGProxy *proxy, char * OUT_data, GError *error, gpointer userdata); 24 | 25 | static void 26 | org_freedesktop_DBus_Introspectable_introspect_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) 27 | { 28 | DBusGAsyncData *data = (DBusGAsyncData*) user_data; 29 | GError *error = NULL; 30 | char * OUT_data; 31 | dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_STRING, &OUT_data, G_TYPE_INVALID); 32 | (*(org_freedesktop_DBus_Introspectable_introspect_reply)data->cb) (proxy, OUT_data, error, data->userdata); 33 | return; 34 | } 35 | 36 | static 37 | #ifdef G_HAVE_INLINE 38 | inline 39 | #endif 40 | DBusGProxyCall* 41 | org_freedesktop_DBus_Introspectable_introspect_async (DBusGProxy *proxy, org_freedesktop_DBus_Introspectable_introspect_reply callback, gpointer userdata) 42 | 43 | { 44 | DBusGAsyncData *stuff; 45 | stuff = g_new (DBusGAsyncData, 1); 46 | stuff->cb = G_CALLBACK (callback); 47 | stuff->userdata = userdata; 48 | return dbus_g_proxy_begin_call (proxy, "Introspect", org_freedesktop_DBus_Introspectable_introspect_async_callback, stuff, g_free, G_TYPE_INVALID); 49 | } 50 | #endif /* defined DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_DBus_Introspectable */ 51 | 52 | #ifndef DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_DBus 53 | #define DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_DBus 54 | 55 | static 56 | #ifdef G_HAVE_INLINE 57 | inline 58 | #endif 59 | gboolean 60 | org_freedesktop_DBus_hello (DBusGProxy *proxy, char ** OUT_arg0, GError **error) 61 | 62 | { 63 | return dbus_g_proxy_call (proxy, "Hello", error, G_TYPE_INVALID, G_TYPE_STRING, OUT_arg0, G_TYPE_INVALID); 64 | } 65 | 66 | typedef void (*org_freedesktop_DBus_hello_reply) (DBusGProxy *proxy, char * OUT_arg0, GError *error, gpointer userdata); 67 | 68 | static void 69 | org_freedesktop_DBus_hello_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) 70 | { 71 | DBusGAsyncData *data = (DBusGAsyncData*) user_data; 72 | GError *error = NULL; 73 | char * OUT_arg0; 74 | dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_STRING, &OUT_arg0, G_TYPE_INVALID); 75 | (*(org_freedesktop_DBus_hello_reply)data->cb) (proxy, OUT_arg0, error, data->userdata); 76 | return; 77 | } 78 | 79 | static 80 | #ifdef G_HAVE_INLINE 81 | inline 82 | #endif 83 | DBusGProxyCall* 84 | org_freedesktop_DBus_hello_async (DBusGProxy *proxy, org_freedesktop_DBus_hello_reply callback, gpointer userdata) 85 | 86 | { 87 | DBusGAsyncData *stuff; 88 | stuff = g_new (DBusGAsyncData, 1); 89 | stuff->cb = G_CALLBACK (callback); 90 | stuff->userdata = userdata; 91 | return dbus_g_proxy_begin_call (proxy, "Hello", org_freedesktop_DBus_hello_async_callback, stuff, g_free, G_TYPE_INVALID); 92 | } 93 | static 94 | #ifdef G_HAVE_INLINE 95 | inline 96 | #endif 97 | gboolean 98 | org_freedesktop_DBus_request_name (DBusGProxy *proxy, const char * IN_arg0, const guint IN_arg1, guint* OUT_arg2, GError **error) 99 | 100 | { 101 | return dbus_g_proxy_call (proxy, "RequestName", error, G_TYPE_STRING, IN_arg0, G_TYPE_UINT, IN_arg1, G_TYPE_INVALID, G_TYPE_UINT, OUT_arg2, G_TYPE_INVALID); 102 | } 103 | 104 | typedef void (*org_freedesktop_DBus_request_name_reply) (DBusGProxy *proxy, guint OUT_arg2, GError *error, gpointer userdata); 105 | 106 | static void 107 | org_freedesktop_DBus_request_name_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) 108 | { 109 | DBusGAsyncData *data = (DBusGAsyncData*) user_data; 110 | GError *error = NULL; 111 | guint OUT_arg2; 112 | dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_UINT, &OUT_arg2, G_TYPE_INVALID); 113 | (*(org_freedesktop_DBus_request_name_reply)data->cb) (proxy, OUT_arg2, error, data->userdata); 114 | return; 115 | } 116 | 117 | static 118 | #ifdef G_HAVE_INLINE 119 | inline 120 | #endif 121 | DBusGProxyCall* 122 | org_freedesktop_DBus_request_name_async (DBusGProxy *proxy, const char * IN_arg0, const guint IN_arg1, org_freedesktop_DBus_request_name_reply callback, gpointer userdata) 123 | 124 | { 125 | DBusGAsyncData *stuff; 126 | stuff = g_new (DBusGAsyncData, 1); 127 | stuff->cb = G_CALLBACK (callback); 128 | stuff->userdata = userdata; 129 | return dbus_g_proxy_begin_call (proxy, "RequestName", org_freedesktop_DBus_request_name_async_callback, stuff, g_free, G_TYPE_STRING, IN_arg0, G_TYPE_UINT, IN_arg1, G_TYPE_INVALID); 130 | } 131 | static 132 | #ifdef G_HAVE_INLINE 133 | inline 134 | #endif 135 | gboolean 136 | org_freedesktop_DBus_release_name (DBusGProxy *proxy, const char * IN_arg0, guint* OUT_arg1, GError **error) 137 | 138 | { 139 | return dbus_g_proxy_call (proxy, "ReleaseName", error, G_TYPE_STRING, IN_arg0, G_TYPE_INVALID, G_TYPE_UINT, OUT_arg1, G_TYPE_INVALID); 140 | } 141 | 142 | typedef void (*org_freedesktop_DBus_release_name_reply) (DBusGProxy *proxy, guint OUT_arg1, GError *error, gpointer userdata); 143 | 144 | static void 145 | org_freedesktop_DBus_release_name_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) 146 | { 147 | DBusGAsyncData *data = (DBusGAsyncData*) user_data; 148 | GError *error = NULL; 149 | guint OUT_arg1; 150 | dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_UINT, &OUT_arg1, G_TYPE_INVALID); 151 | (*(org_freedesktop_DBus_release_name_reply)data->cb) (proxy, OUT_arg1, error, data->userdata); 152 | return; 153 | } 154 | 155 | static 156 | #ifdef G_HAVE_INLINE 157 | inline 158 | #endif 159 | DBusGProxyCall* 160 | org_freedesktop_DBus_release_name_async (DBusGProxy *proxy, const char * IN_arg0, org_freedesktop_DBus_release_name_reply callback, gpointer userdata) 161 | 162 | { 163 | DBusGAsyncData *stuff; 164 | stuff = g_new (DBusGAsyncData, 1); 165 | stuff->cb = G_CALLBACK (callback); 166 | stuff->userdata = userdata; 167 | return dbus_g_proxy_begin_call (proxy, "ReleaseName", org_freedesktop_DBus_release_name_async_callback, stuff, g_free, G_TYPE_STRING, IN_arg0, G_TYPE_INVALID); 168 | } 169 | static 170 | #ifdef G_HAVE_INLINE 171 | inline 172 | #endif 173 | gboolean 174 | org_freedesktop_DBus_start_service_by_name (DBusGProxy *proxy, const char * IN_arg0, const guint IN_arg1, guint* OUT_arg2, GError **error) 175 | 176 | { 177 | return dbus_g_proxy_call (proxy, "StartServiceByName", error, G_TYPE_STRING, IN_arg0, G_TYPE_UINT, IN_arg1, G_TYPE_INVALID, G_TYPE_UINT, OUT_arg2, G_TYPE_INVALID); 178 | } 179 | 180 | typedef void (*org_freedesktop_DBus_start_service_by_name_reply) (DBusGProxy *proxy, guint OUT_arg2, GError *error, gpointer userdata); 181 | 182 | static void 183 | org_freedesktop_DBus_start_service_by_name_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) 184 | { 185 | DBusGAsyncData *data = (DBusGAsyncData*) user_data; 186 | GError *error = NULL; 187 | guint OUT_arg2; 188 | dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_UINT, &OUT_arg2, G_TYPE_INVALID); 189 | (*(org_freedesktop_DBus_start_service_by_name_reply)data->cb) (proxy, OUT_arg2, error, data->userdata); 190 | return; 191 | } 192 | 193 | static 194 | #ifdef G_HAVE_INLINE 195 | inline 196 | #endif 197 | DBusGProxyCall* 198 | org_freedesktop_DBus_start_service_by_name_async (DBusGProxy *proxy, const char * IN_arg0, const guint IN_arg1, org_freedesktop_DBus_start_service_by_name_reply callback, gpointer userdata) 199 | 200 | { 201 | DBusGAsyncData *stuff; 202 | stuff = g_new (DBusGAsyncData, 1); 203 | stuff->cb = G_CALLBACK (callback); 204 | stuff->userdata = userdata; 205 | return dbus_g_proxy_begin_call (proxy, "StartServiceByName", org_freedesktop_DBus_start_service_by_name_async_callback, stuff, g_free, G_TYPE_STRING, IN_arg0, G_TYPE_UINT, IN_arg1, G_TYPE_INVALID); 206 | } 207 | static 208 | #ifdef G_HAVE_INLINE 209 | inline 210 | #endif 211 | gboolean 212 | org_freedesktop_DBus_name_has_owner (DBusGProxy *proxy, const char * IN_arg0, gboolean* OUT_arg1, GError **error) 213 | 214 | { 215 | return dbus_g_proxy_call (proxy, "NameHasOwner", error, G_TYPE_STRING, IN_arg0, G_TYPE_INVALID, G_TYPE_BOOLEAN, OUT_arg1, G_TYPE_INVALID); 216 | } 217 | 218 | typedef void (*org_freedesktop_DBus_name_has_owner_reply) (DBusGProxy *proxy, gboolean OUT_arg1, GError *error, gpointer userdata); 219 | 220 | static void 221 | org_freedesktop_DBus_name_has_owner_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) 222 | { 223 | DBusGAsyncData *data = (DBusGAsyncData*) user_data; 224 | GError *error = NULL; 225 | gboolean OUT_arg1; 226 | dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_BOOLEAN, &OUT_arg1, G_TYPE_INVALID); 227 | (*(org_freedesktop_DBus_name_has_owner_reply)data->cb) (proxy, OUT_arg1, error, data->userdata); 228 | return; 229 | } 230 | 231 | static 232 | #ifdef G_HAVE_INLINE 233 | inline 234 | #endif 235 | DBusGProxyCall* 236 | org_freedesktop_DBus_name_has_owner_async (DBusGProxy *proxy, const char * IN_arg0, org_freedesktop_DBus_name_has_owner_reply callback, gpointer userdata) 237 | 238 | { 239 | DBusGAsyncData *stuff; 240 | stuff = g_new (DBusGAsyncData, 1); 241 | stuff->cb = G_CALLBACK (callback); 242 | stuff->userdata = userdata; 243 | return dbus_g_proxy_begin_call (proxy, "NameHasOwner", org_freedesktop_DBus_name_has_owner_async_callback, stuff, g_free, G_TYPE_STRING, IN_arg0, G_TYPE_INVALID); 244 | } 245 | static 246 | #ifdef G_HAVE_INLINE 247 | inline 248 | #endif 249 | gboolean 250 | org_freedesktop_DBus_list_names (DBusGProxy *proxy, char *** OUT_arg0, GError **error) 251 | 252 | { 253 | return dbus_g_proxy_call (proxy, "ListNames", error, G_TYPE_INVALID, G_TYPE_STRV, OUT_arg0, G_TYPE_INVALID); 254 | } 255 | 256 | typedef void (*org_freedesktop_DBus_list_names_reply) (DBusGProxy *proxy, char * *OUT_arg0, GError *error, gpointer userdata); 257 | 258 | static void 259 | org_freedesktop_DBus_list_names_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) 260 | { 261 | DBusGAsyncData *data = (DBusGAsyncData*) user_data; 262 | GError *error = NULL; 263 | char ** OUT_arg0; 264 | dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_STRV, &OUT_arg0, G_TYPE_INVALID); 265 | (*(org_freedesktop_DBus_list_names_reply)data->cb) (proxy, OUT_arg0, error, data->userdata); 266 | return; 267 | } 268 | 269 | static 270 | #ifdef G_HAVE_INLINE 271 | inline 272 | #endif 273 | DBusGProxyCall* 274 | org_freedesktop_DBus_list_names_async (DBusGProxy *proxy, org_freedesktop_DBus_list_names_reply callback, gpointer userdata) 275 | 276 | { 277 | DBusGAsyncData *stuff; 278 | stuff = g_new (DBusGAsyncData, 1); 279 | stuff->cb = G_CALLBACK (callback); 280 | stuff->userdata = userdata; 281 | return dbus_g_proxy_begin_call (proxy, "ListNames", org_freedesktop_DBus_list_names_async_callback, stuff, g_free, G_TYPE_INVALID); 282 | } 283 | static 284 | #ifdef G_HAVE_INLINE 285 | inline 286 | #endif 287 | gboolean 288 | org_freedesktop_DBus_list_activatable_names (DBusGProxy *proxy, char *** OUT_arg0, GError **error) 289 | 290 | { 291 | return dbus_g_proxy_call (proxy, "ListActivatableNames", error, G_TYPE_INVALID, G_TYPE_STRV, OUT_arg0, G_TYPE_INVALID); 292 | } 293 | 294 | typedef void (*org_freedesktop_DBus_list_activatable_names_reply) (DBusGProxy *proxy, char * *OUT_arg0, GError *error, gpointer userdata); 295 | 296 | static void 297 | org_freedesktop_DBus_list_activatable_names_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) 298 | { 299 | DBusGAsyncData *data = (DBusGAsyncData*) user_data; 300 | GError *error = NULL; 301 | char ** OUT_arg0; 302 | dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_STRV, &OUT_arg0, G_TYPE_INVALID); 303 | (*(org_freedesktop_DBus_list_activatable_names_reply)data->cb) (proxy, OUT_arg0, error, data->userdata); 304 | return; 305 | } 306 | 307 | static 308 | #ifdef G_HAVE_INLINE 309 | inline 310 | #endif 311 | DBusGProxyCall* 312 | org_freedesktop_DBus_list_activatable_names_async (DBusGProxy *proxy, org_freedesktop_DBus_list_activatable_names_reply callback, gpointer userdata) 313 | 314 | { 315 | DBusGAsyncData *stuff; 316 | stuff = g_new (DBusGAsyncData, 1); 317 | stuff->cb = G_CALLBACK (callback); 318 | stuff->userdata = userdata; 319 | return dbus_g_proxy_begin_call (proxy, "ListActivatableNames", org_freedesktop_DBus_list_activatable_names_async_callback, stuff, g_free, G_TYPE_INVALID); 320 | } 321 | static 322 | #ifdef G_HAVE_INLINE 323 | inline 324 | #endif 325 | gboolean 326 | org_freedesktop_DBus_add_match (DBusGProxy *proxy, const char * IN_arg0, GError **error) 327 | 328 | { 329 | return dbus_g_proxy_call (proxy, "AddMatch", error, G_TYPE_STRING, IN_arg0, G_TYPE_INVALID, G_TYPE_INVALID); 330 | } 331 | 332 | typedef void (*org_freedesktop_DBus_add_match_reply) (DBusGProxy *proxy, GError *error, gpointer userdata); 333 | 334 | static void 335 | org_freedesktop_DBus_add_match_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) 336 | { 337 | DBusGAsyncData *data = (DBusGAsyncData*) user_data; 338 | GError *error = NULL; 339 | dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID); 340 | (*(org_freedesktop_DBus_add_match_reply)data->cb) (proxy, error, data->userdata); 341 | return; 342 | } 343 | 344 | static 345 | #ifdef G_HAVE_INLINE 346 | inline 347 | #endif 348 | DBusGProxyCall* 349 | org_freedesktop_DBus_add_match_async (DBusGProxy *proxy, const char * IN_arg0, org_freedesktop_DBus_add_match_reply callback, gpointer userdata) 350 | 351 | { 352 | DBusGAsyncData *stuff; 353 | stuff = g_new (DBusGAsyncData, 1); 354 | stuff->cb = G_CALLBACK (callback); 355 | stuff->userdata = userdata; 356 | return dbus_g_proxy_begin_call (proxy, "AddMatch", org_freedesktop_DBus_add_match_async_callback, stuff, g_free, G_TYPE_STRING, IN_arg0, G_TYPE_INVALID); 357 | } 358 | static 359 | #ifdef G_HAVE_INLINE 360 | inline 361 | #endif 362 | gboolean 363 | org_freedesktop_DBus_remove_match (DBusGProxy *proxy, const char * IN_arg0, GError **error) 364 | 365 | { 366 | return dbus_g_proxy_call (proxy, "RemoveMatch", error, G_TYPE_STRING, IN_arg0, G_TYPE_INVALID, G_TYPE_INVALID); 367 | } 368 | 369 | typedef void (*org_freedesktop_DBus_remove_match_reply) (DBusGProxy *proxy, GError *error, gpointer userdata); 370 | 371 | static void 372 | org_freedesktop_DBus_remove_match_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) 373 | { 374 | DBusGAsyncData *data = (DBusGAsyncData*) user_data; 375 | GError *error = NULL; 376 | dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID); 377 | (*(org_freedesktop_DBus_remove_match_reply)data->cb) (proxy, error, data->userdata); 378 | return; 379 | } 380 | 381 | static 382 | #ifdef G_HAVE_INLINE 383 | inline 384 | #endif 385 | DBusGProxyCall* 386 | org_freedesktop_DBus_remove_match_async (DBusGProxy *proxy, const char * IN_arg0, org_freedesktop_DBus_remove_match_reply callback, gpointer userdata) 387 | 388 | { 389 | DBusGAsyncData *stuff; 390 | stuff = g_new (DBusGAsyncData, 1); 391 | stuff->cb = G_CALLBACK (callback); 392 | stuff->userdata = userdata; 393 | return dbus_g_proxy_begin_call (proxy, "RemoveMatch", org_freedesktop_DBus_remove_match_async_callback, stuff, g_free, G_TYPE_STRING, IN_arg0, G_TYPE_INVALID); 394 | } 395 | static 396 | #ifdef G_HAVE_INLINE 397 | inline 398 | #endif 399 | gboolean 400 | org_freedesktop_DBus_get_name_owner (DBusGProxy *proxy, const char * IN_arg0, char ** OUT_arg1, GError **error) 401 | 402 | { 403 | return dbus_g_proxy_call (proxy, "GetNameOwner", error, G_TYPE_STRING, IN_arg0, G_TYPE_INVALID, G_TYPE_STRING, OUT_arg1, G_TYPE_INVALID); 404 | } 405 | 406 | typedef void (*org_freedesktop_DBus_get_name_owner_reply) (DBusGProxy *proxy, char * OUT_arg1, GError *error, gpointer userdata); 407 | 408 | static void 409 | org_freedesktop_DBus_get_name_owner_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) 410 | { 411 | DBusGAsyncData *data = (DBusGAsyncData*) user_data; 412 | GError *error = NULL; 413 | char * OUT_arg1; 414 | dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_STRING, &OUT_arg1, G_TYPE_INVALID); 415 | (*(org_freedesktop_DBus_get_name_owner_reply)data->cb) (proxy, OUT_arg1, error, data->userdata); 416 | return; 417 | } 418 | 419 | static 420 | #ifdef G_HAVE_INLINE 421 | inline 422 | #endif 423 | DBusGProxyCall* 424 | org_freedesktop_DBus_get_name_owner_async (DBusGProxy *proxy, const char * IN_arg0, org_freedesktop_DBus_get_name_owner_reply callback, gpointer userdata) 425 | 426 | { 427 | DBusGAsyncData *stuff; 428 | stuff = g_new (DBusGAsyncData, 1); 429 | stuff->cb = G_CALLBACK (callback); 430 | stuff->userdata = userdata; 431 | return dbus_g_proxy_begin_call (proxy, "GetNameOwner", org_freedesktop_DBus_get_name_owner_async_callback, stuff, g_free, G_TYPE_STRING, IN_arg0, G_TYPE_INVALID); 432 | } 433 | static 434 | #ifdef G_HAVE_INLINE 435 | inline 436 | #endif 437 | gboolean 438 | org_freedesktop_DBus_list_queued_owners (DBusGProxy *proxy, const char * IN_arg0, char *** OUT_arg1, GError **error) 439 | 440 | { 441 | return dbus_g_proxy_call (proxy, "ListQueuedOwners", error, G_TYPE_STRING, IN_arg0, G_TYPE_INVALID, G_TYPE_STRV, OUT_arg1, G_TYPE_INVALID); 442 | } 443 | 444 | typedef void (*org_freedesktop_DBus_list_queued_owners_reply) (DBusGProxy *proxy, char * *OUT_arg1, GError *error, gpointer userdata); 445 | 446 | static void 447 | org_freedesktop_DBus_list_queued_owners_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) 448 | { 449 | DBusGAsyncData *data = (DBusGAsyncData*) user_data; 450 | GError *error = NULL; 451 | char ** OUT_arg1; 452 | dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_STRV, &OUT_arg1, G_TYPE_INVALID); 453 | (*(org_freedesktop_DBus_list_queued_owners_reply)data->cb) (proxy, OUT_arg1, error, data->userdata); 454 | return; 455 | } 456 | 457 | static 458 | #ifdef G_HAVE_INLINE 459 | inline 460 | #endif 461 | DBusGProxyCall* 462 | org_freedesktop_DBus_list_queued_owners_async (DBusGProxy *proxy, const char * IN_arg0, org_freedesktop_DBus_list_queued_owners_reply callback, gpointer userdata) 463 | 464 | { 465 | DBusGAsyncData *stuff; 466 | stuff = g_new (DBusGAsyncData, 1); 467 | stuff->cb = G_CALLBACK (callback); 468 | stuff->userdata = userdata; 469 | return dbus_g_proxy_begin_call (proxy, "ListQueuedOwners", org_freedesktop_DBus_list_queued_owners_async_callback, stuff, g_free, G_TYPE_STRING, IN_arg0, G_TYPE_INVALID); 470 | } 471 | static 472 | #ifdef G_HAVE_INLINE 473 | inline 474 | #endif 475 | gboolean 476 | org_freedesktop_DBus_get_connection_unix_user (DBusGProxy *proxy, const char * IN_arg0, guint* OUT_arg1, GError **error) 477 | 478 | { 479 | return dbus_g_proxy_call (proxy, "GetConnectionUnixUser", error, G_TYPE_STRING, IN_arg0, G_TYPE_INVALID, G_TYPE_UINT, OUT_arg1, G_TYPE_INVALID); 480 | } 481 | 482 | typedef void (*org_freedesktop_DBus_get_connection_unix_user_reply) (DBusGProxy *proxy, guint OUT_arg1, GError *error, gpointer userdata); 483 | 484 | static void 485 | org_freedesktop_DBus_get_connection_unix_user_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) 486 | { 487 | DBusGAsyncData *data = (DBusGAsyncData*) user_data; 488 | GError *error = NULL; 489 | guint OUT_arg1; 490 | dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_UINT, &OUT_arg1, G_TYPE_INVALID); 491 | (*(org_freedesktop_DBus_get_connection_unix_user_reply)data->cb) (proxy, OUT_arg1, error, data->userdata); 492 | return; 493 | } 494 | 495 | static 496 | #ifdef G_HAVE_INLINE 497 | inline 498 | #endif 499 | DBusGProxyCall* 500 | org_freedesktop_DBus_get_connection_unix_user_async (DBusGProxy *proxy, const char * IN_arg0, org_freedesktop_DBus_get_connection_unix_user_reply callback, gpointer userdata) 501 | 502 | { 503 | DBusGAsyncData *stuff; 504 | stuff = g_new (DBusGAsyncData, 1); 505 | stuff->cb = G_CALLBACK (callback); 506 | stuff->userdata = userdata; 507 | return dbus_g_proxy_begin_call (proxy, "GetConnectionUnixUser", org_freedesktop_DBus_get_connection_unix_user_async_callback, stuff, g_free, G_TYPE_STRING, IN_arg0, G_TYPE_INVALID); 508 | } 509 | static 510 | #ifdef G_HAVE_INLINE 511 | inline 512 | #endif 513 | gboolean 514 | org_freedesktop_DBus_get_connection_unix_process_id (DBusGProxy *proxy, const char * IN_arg0, guint* OUT_arg1, GError **error) 515 | 516 | { 517 | return dbus_g_proxy_call (proxy, "GetConnectionUnixProcessID", error, G_TYPE_STRING, IN_arg0, G_TYPE_INVALID, G_TYPE_UINT, OUT_arg1, G_TYPE_INVALID); 518 | } 519 | 520 | typedef void (*org_freedesktop_DBus_get_connection_unix_process_id_reply) (DBusGProxy *proxy, guint OUT_arg1, GError *error, gpointer userdata); 521 | 522 | static void 523 | org_freedesktop_DBus_get_connection_unix_process_id_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) 524 | { 525 | DBusGAsyncData *data = (DBusGAsyncData*) user_data; 526 | GError *error = NULL; 527 | guint OUT_arg1; 528 | dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_UINT, &OUT_arg1, G_TYPE_INVALID); 529 | (*(org_freedesktop_DBus_get_connection_unix_process_id_reply)data->cb) (proxy, OUT_arg1, error, data->userdata); 530 | return; 531 | } 532 | 533 | static 534 | #ifdef G_HAVE_INLINE 535 | inline 536 | #endif 537 | DBusGProxyCall* 538 | org_freedesktop_DBus_get_connection_unix_process_id_async (DBusGProxy *proxy, const char * IN_arg0, org_freedesktop_DBus_get_connection_unix_process_id_reply callback, gpointer userdata) 539 | 540 | { 541 | DBusGAsyncData *stuff; 542 | stuff = g_new (DBusGAsyncData, 1); 543 | stuff->cb = G_CALLBACK (callback); 544 | stuff->userdata = userdata; 545 | return dbus_g_proxy_begin_call (proxy, "GetConnectionUnixProcessID", org_freedesktop_DBus_get_connection_unix_process_id_async_callback, stuff, g_free, G_TYPE_STRING, IN_arg0, G_TYPE_INVALID); 546 | } 547 | static 548 | #ifdef G_HAVE_INLINE 549 | inline 550 | #endif 551 | gboolean 552 | org_freedesktop_DBus_get_connection_se_linux_security_context (DBusGProxy *proxy, const char * IN_arg0, GArray** OUT_arg1, GError **error) 553 | 554 | { 555 | return dbus_g_proxy_call (proxy, "GetConnectionSELinuxSecurityContext", error, G_TYPE_STRING, IN_arg0, G_TYPE_INVALID, dbus_g_type_get_collection ("GArray", G_TYPE_UCHAR), OUT_arg1, G_TYPE_INVALID); 556 | } 557 | 558 | typedef void (*org_freedesktop_DBus_get_connection_se_linux_security_context_reply) (DBusGProxy *proxy, GArray *OUT_arg1, GError *error, gpointer userdata); 559 | 560 | static void 561 | org_freedesktop_DBus_get_connection_se_linux_security_context_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) 562 | { 563 | DBusGAsyncData *data = (DBusGAsyncData*) user_data; 564 | GError *error = NULL; 565 | GArray* OUT_arg1; 566 | dbus_g_proxy_end_call (proxy, call, &error, dbus_g_type_get_collection ("GArray", G_TYPE_UCHAR), &OUT_arg1, G_TYPE_INVALID); 567 | (*(org_freedesktop_DBus_get_connection_se_linux_security_context_reply)data->cb) (proxy, OUT_arg1, error, data->userdata); 568 | return; 569 | } 570 | 571 | static 572 | #ifdef G_HAVE_INLINE 573 | inline 574 | #endif 575 | DBusGProxyCall* 576 | org_freedesktop_DBus_get_connection_se_linux_security_context_async (DBusGProxy *proxy, const char * IN_arg0, org_freedesktop_DBus_get_connection_se_linux_security_context_reply callback, gpointer userdata) 577 | 578 | { 579 | DBusGAsyncData *stuff; 580 | stuff = g_new (DBusGAsyncData, 1); 581 | stuff->cb = G_CALLBACK (callback); 582 | stuff->userdata = userdata; 583 | return dbus_g_proxy_begin_call (proxy, "GetConnectionSELinuxSecurityContext", org_freedesktop_DBus_get_connection_se_linux_security_context_async_callback, stuff, g_free, G_TYPE_STRING, IN_arg0, G_TYPE_INVALID); 584 | } 585 | static 586 | #ifdef G_HAVE_INLINE 587 | inline 588 | #endif 589 | gboolean 590 | org_freedesktop_DBus_reload_config (DBusGProxy *proxy, GError **error) 591 | 592 | { 593 | return dbus_g_proxy_call (proxy, "ReloadConfig", error, G_TYPE_INVALID, G_TYPE_INVALID); 594 | } 595 | 596 | typedef void (*org_freedesktop_DBus_reload_config_reply) (DBusGProxy *proxy, GError *error, gpointer userdata); 597 | 598 | static void 599 | org_freedesktop_DBus_reload_config_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) 600 | { 601 | DBusGAsyncData *data = (DBusGAsyncData*) user_data; 602 | GError *error = NULL; 603 | dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID); 604 | (*(org_freedesktop_DBus_reload_config_reply)data->cb) (proxy, error, data->userdata); 605 | return; 606 | } 607 | 608 | static 609 | #ifdef G_HAVE_INLINE 610 | inline 611 | #endif 612 | DBusGProxyCall* 613 | org_freedesktop_DBus_reload_config_async (DBusGProxy *proxy, org_freedesktop_DBus_reload_config_reply callback, gpointer userdata) 614 | 615 | { 616 | DBusGAsyncData *stuff; 617 | stuff = g_new (DBusGAsyncData, 1); 618 | stuff->cb = G_CALLBACK (callback); 619 | stuff->userdata = userdata; 620 | return dbus_g_proxy_begin_call (proxy, "ReloadConfig", org_freedesktop_DBus_reload_config_async_callback, stuff, g_free, G_TYPE_INVALID); 621 | } 622 | static 623 | #ifdef G_HAVE_INLINE 624 | inline 625 | #endif 626 | gboolean 627 | org_freedesktop_DBus_get_id (DBusGProxy *proxy, char ** OUT_arg0, GError **error) 628 | 629 | { 630 | return dbus_g_proxy_call (proxy, "GetId", error, G_TYPE_INVALID, G_TYPE_STRING, OUT_arg0, G_TYPE_INVALID); 631 | } 632 | 633 | typedef void (*org_freedesktop_DBus_get_id_reply) (DBusGProxy *proxy, char * OUT_arg0, GError *error, gpointer userdata); 634 | 635 | static void 636 | org_freedesktop_DBus_get_id_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) 637 | { 638 | DBusGAsyncData *data = (DBusGAsyncData*) user_data; 639 | GError *error = NULL; 640 | char * OUT_arg0; 641 | dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_STRING, &OUT_arg0, G_TYPE_INVALID); 642 | (*(org_freedesktop_DBus_get_id_reply)data->cb) (proxy, OUT_arg0, error, data->userdata); 643 | return; 644 | } 645 | 646 | static 647 | #ifdef G_HAVE_INLINE 648 | inline 649 | #endif 650 | DBusGProxyCall* 651 | org_freedesktop_DBus_get_id_async (DBusGProxy *proxy, org_freedesktop_DBus_get_id_reply callback, gpointer userdata) 652 | 653 | { 654 | DBusGAsyncData *stuff; 655 | stuff = g_new (DBusGAsyncData, 1); 656 | stuff->cb = G_CALLBACK (callback); 657 | stuff->userdata = userdata; 658 | return dbus_g_proxy_begin_call (proxy, "GetId", org_freedesktop_DBus_get_id_async_callback, stuff, g_free, G_TYPE_INVALID); 659 | } 660 | #endif /* defined DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_DBus */ 661 | 662 | G_END_DECLS 663 | -------------------------------------------------------------------------------- /include/dbus-1.0/dbus/dbus-glib-lowlevel.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-file-style: "gnu" -*- */ 2 | /* dbus-glib-lowlevel.h GLib integration details that require dbus/dbus.h 3 | * 4 | * Copyright (C) 2002, 2003 CodeFactory AB 5 | * Copyright (C) 2003, 2004 Red Hat, Inc. 6 | * 7 | * Licensed under the Academic Free License version 2.1 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | * 23 | */ 24 | #ifndef DBUS_GLIB_LOWLEVEL_H 25 | #define DBUS_GLIB_LOWLEVEL_H 26 | 27 | #include 28 | #include 29 | 30 | G_BEGIN_DECLS 31 | 32 | #define dbus_set_g_error(a,b) ((void)0) 33 | 34 | #define DBUS_TYPE_CONNECTION (dbus_connection_get_g_type ()) 35 | #define DBUS_TYPE_MESSAGE (dbus_message_get_g_type ()) 36 | #define DBUS_TYPE_PENDING_CALL (dbus_pending_call_get_g_type ()) 37 | GType dbus_connection_get_g_type (void) G_GNUC_CONST; 38 | GType dbus_message_get_g_type (void) G_GNUC_CONST; 39 | GType dbus_pending_call_get_g_type (void) G_GNUC_CONST; 40 | 41 | #define dbus_connection_setup_with_g_main(a,b) ((void)0) 42 | #define dbus_server_setup_with_g_main(a,b) ((void)0) 43 | 44 | #define dbus_g_proxy_send(a,b,c) ((void)0) 45 | 46 | DBusConnection* dbus_g_connection_get_connection (DBusGConnection *gconnection); 47 | DBusGConnection* dbus_connection_get_g_connection (DBusConnection *connection); 48 | DBusMessage* dbus_g_message_get_message (DBusGMessage *gmessage); 49 | 50 | /* dbus_g_pending_call_get_pending_call() deliberately skipped for now; 51 | * not sure it makes sense to use any of the DBusPendingCall functions 52 | * on the wrapped pending call (once we have the right exported 53 | * g-functions anyhow) 54 | */ 55 | 56 | gchar* dbus_g_method_get_sender (DBusGMethodInvocation *context); 57 | 58 | DBusMessage* dbus_g_method_get_reply (DBusGMethodInvocation *context); 59 | 60 | #define dbus_g_method_send_reply(a,b) ((void)0) 61 | 62 | G_END_DECLS 63 | 64 | #endif /* DBUS_GLIB_LOWLEVEL_H */ 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /include/dbus-1.0/dbus/dbus-glib.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-file-style: "gnu" -*- */ 2 | /* dbus-glib.h GLib integration 3 | * 4 | * Copyright (C) 2002, 2003 CodeFactory AB 5 | * Copyright (C) 2003, 2004 Red Hat, Inc. 6 | * 7 | * Licensed under the Academic Free License version 2.1 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | * 23 | */ 24 | #ifndef DBUS_GLIB_H 25 | #define DBUS_GLIB_H 26 | 27 | #include 28 | #include 29 | 30 | G_BEGIN_DECLS 31 | 32 | #define DBUS_INSIDE_DBUS_GLIB_H 1 33 | 34 | 35 | /** 36 | * Convert to DBusConnection with dbus_g_connection_get_connection() in dbus-glib-lowlevel.h 37 | */ 38 | typedef struct _DBusGConnection DBusGConnection; 39 | /** 40 | * Convert to DBusMessage with dbus_g_message_get_message() in dbus-glib-lowlevel.h 41 | */ 42 | typedef struct _DBusGMessage DBusGMessage; 43 | 44 | 45 | #define DBUS_TYPE_G_CONNECTION (dbus_g_connection_get_g_type ()) 46 | #define DBUS_TYPE_G_MESSAGE (dbus_g_message_get_g_type ()) 47 | GType dbus_g_connection_get_g_type (void) G_GNUC_CONST; 48 | GType dbus_g_message_get_g_type (void) G_GNUC_CONST; 49 | 50 | 51 | DBusGConnection* dbus_g_connection_ref (DBusGConnection *connection); 52 | #define dbus_g_connection_unref(a) ((void)0) 53 | DBusGMessage* dbus_g_message_ref (DBusGMessage *message); 54 | #define dbus_g_message_unref(a) ((void)0) 55 | 56 | #define dbus_g_connection_flush(a) ((void)0) 57 | 58 | GQuark dbus_g_error_quark (void); 59 | #define DBUS_GERROR dbus_g_error_quark () 60 | 61 | typedef enum 62 | { 63 | DBUS_GERROR_FAILED, 64 | DBUS_GERROR_NO_MEMORY, 65 | DBUS_GERROR_SERVICE_UNKNOWN, 66 | DBUS_GERROR_NAME_HAS_NO_OWNER, 67 | DBUS_GERROR_NO_REPLY, 68 | DBUS_GERROR_IO_ERROR, 69 | DBUS_GERROR_BAD_ADDRESS, 70 | DBUS_GERROR_NOT_SUPPORTED, 71 | DBUS_GERROR_LIMITS_EXCEEDED, 72 | DBUS_GERROR_ACCESS_DENIED, 73 | DBUS_GERROR_AUTH_FAILED, 74 | DBUS_GERROR_NO_SERVER, 75 | DBUS_GERROR_TIMEOUT, 76 | DBUS_GERROR_NO_NETWORK, 77 | DBUS_GERROR_ADDRESS_IN_USE, 78 | DBUS_GERROR_DISCONNECTED, 79 | DBUS_GERROR_INVALID_ARGS, 80 | DBUS_GERROR_FILE_NOT_FOUND, 81 | DBUS_GERROR_FILE_EXISTS, 82 | DBUS_GERROR_UNKNOWN_METHOD, 83 | DBUS_GERROR_TIMED_OUT, 84 | DBUS_GERROR_MATCH_RULE_NOT_FOUND, 85 | DBUS_GERROR_MATCH_RULE_INVALID, 86 | DBUS_GERROR_SPAWN_EXEC_FAILED, 87 | DBUS_GERROR_SPAWN_FORK_FAILED, 88 | DBUS_GERROR_SPAWN_CHILD_EXITED, 89 | DBUS_GERROR_SPAWN_CHILD_SIGNALED, 90 | DBUS_GERROR_SPAWN_FAILED, 91 | DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN, 92 | DBUS_GERROR_INVALID_SIGNATURE, 93 | DBUS_GERROR_INVALID_FILE_CONTENT, 94 | DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN, 95 | DBUS_GERROR_REMOTE_EXCEPTION 96 | } DBusGError; 97 | 98 | gboolean dbus_g_error_has_name (GError *error, 99 | const char *name); 100 | const char * dbus_g_error_get_name (GError *error); 101 | 102 | #define dbus_g_thread_init() ((void)0) 103 | 104 | DBusGConnection* dbus_g_connection_open (const gchar *address, 105 | GError **error); 106 | DBusGConnection* dbus_g_bus_get (DBusBusType type, 107 | GError **error); 108 | 109 | typedef struct _DBusGObjectInfo DBusGObjectInfo; 110 | typedef struct _DBusGMethodInfo DBusGMethodInfo; 111 | 112 | /** 113 | * DBusGMethodInfo: 114 | * @function: C method to invoke 115 | * @marshaller: Marshaller to invoke method 116 | * @data_offset: Offset into the introspection data 117 | * 118 | * Object typically generated by #dbus-binding-tool that 119 | * stores a mapping from introspection data to a 120 | * function pointer for a C method to be invoked. 121 | */ 122 | struct _DBusGMethodInfo 123 | { 124 | GCallback function; 125 | GClosureMarshal marshaller; 126 | int data_offset; 127 | }; 128 | 129 | /** 130 | * DBusGObjectInfo: 131 | * @format_version: Allows us to change the rest of this struct 132 | * by adding DBusGObjectInfo2, DBusGObjectInfo3, etc. 133 | * @method_infos: Array of method pointers 134 | * @n_method_infos: Length of the infos array 135 | * @data: Introspection data 136 | * @exported_signals: Exported signals 137 | * @exported_properties: Exported properties 138 | * 139 | * Introspection data for a #GObject, normally autogenerated by 140 | * a tool such as #dbus-binding-tool. 141 | */ 142 | struct _DBusGObjectInfo 143 | { 144 | int format_version; 145 | 146 | const DBusGMethodInfo *method_infos; 147 | int n_method_infos; 148 | const char *data; 149 | const char *exported_signals; 150 | const char *exported_properties; 151 | }; 152 | 153 | #define dbus_g_object_type_install_info(a,b) ((void)0) 154 | 155 | #define dbus_g_error_domain_register(a,b,c) ((void)0) 156 | 157 | #define dbus_g_connection_register_g_object(a,b,c) ((void)0) 158 | GObject * dbus_g_connection_lookup_g_object (DBusGConnection *connection, 159 | const char *at_path); 160 | 161 | #ifdef DBUS_COMPILATION 162 | #include "dbus/dbus-gtype-specialized.h" 163 | #else 164 | #include 165 | #endif 166 | 167 | /* definitions for some basic array types */ 168 | #define DBUS_TYPE_G_BOOLEAN_ARRAY (dbus_g_type_get_collection ("GArray", G_TYPE_BOOLEAN)) 169 | #define DBUS_TYPE_G_UCHAR_ARRAY (dbus_g_type_get_collection ("GArray", G_TYPE_UCHAR)) 170 | #define DBUS_TYPE_G_UINT_ARRAY (dbus_g_type_get_collection ("GArray", G_TYPE_UINT)) 171 | #define DBUS_TYPE_G_INT_ARRAY (dbus_g_type_get_collection ("GArray", G_TYPE_INT)) 172 | #define DBUS_TYPE_G_UINT64_ARRAY (dbus_g_type_get_collection ("GArray", G_TYPE_UINT64)) 173 | #define DBUS_TYPE_G_INT64_ARRAY (dbus_g_type_get_collection ("GArray", G_TYPE_INT64)) 174 | #define DBUS_TYPE_G_OBJECT_ARRAY (dbus_g_type_get_collection ("GPtrArray", G_TYPE_OBJECT)) 175 | 176 | #define DBUS_TYPE_G_STRING_STRING_HASHTABLE (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_STRING)) 177 | 178 | GType dbus_g_object_path_get_g_type (void) G_GNUC_CONST; 179 | #define DBUS_TYPE_G_OBJECT_PATH (dbus_g_object_path_get_g_type ()) 180 | 181 | #define dbus_g_object_register_marshaller(a,b,...) ((void)0) 182 | #define dbus_g_object_register_marshaller_array(a,b,c,d) ((void)0) 183 | 184 | typedef struct _DBusGProxy DBusGProxy; 185 | typedef struct _DBusGProxyClass DBusGProxyClass; 186 | 187 | #define DBUS_TYPE_G_PROXY (dbus_g_proxy_get_type ()) 188 | #define DBUS_G_PROXY(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), DBUS_TYPE_G_PROXY, DBusGProxy)) 189 | #define DBUS_G_PROXY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DBUS_TYPE_G_PROXY, DBusGProxyClass)) 190 | #define DBUS_IS_G_PROXY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), DBUS_TYPE_G_PROXY)) 191 | #define DBUS_IS_G_PROXY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DBUS_TYPE_G_PROXY)) 192 | #define DBUS_G_PROXY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DBUS_TYPE_G_PROXY, DBusGProxyClass)) 193 | 194 | struct _DBusGProxy 195 | { 196 | GObject parent; 197 | }; 198 | 199 | struct _DBusGProxyClass 200 | { 201 | GObjectClass parent_class; /**< Parent class */ 202 | }; 203 | 204 | typedef struct _DBusGProxyCall DBusGProxyCall; 205 | typedef void (* DBusGProxyCallNotify) (DBusGProxy *proxy, 206 | DBusGProxyCall *call_id, 207 | void *user_data); 208 | 209 | GType dbus_g_proxy_get_type (void) G_GNUC_CONST; 210 | DBusGProxy* dbus_g_proxy_new_for_name (DBusGConnection *connection, 211 | const char *name, 212 | const char *path, 213 | const char *interface); 214 | DBusGProxy* dbus_g_proxy_new_for_name_owner (DBusGConnection *connection, 215 | const char *name, 216 | const char *path, 217 | const char *interface, 218 | GError **error); 219 | DBusGProxy* dbus_g_proxy_new_from_proxy (DBusGProxy *proxy, 220 | const char *interface, 221 | const char *path_name); 222 | DBusGProxy* dbus_g_proxy_new_for_peer (DBusGConnection *connection, 223 | const char *path_name, 224 | const char *interface_name); 225 | 226 | #define dbus_g_proxy_set_interface(a,b) ((void)0) 227 | #define dbus_g_proxy_add_signal(a,b,c,...) ((void)0) 228 | 229 | #define dbus_g_proxy_connect_signal(a,b,c,d,e) ((void)0) 230 | #define dbus_g_proxy_disconnect_signal(a,b,c,d) ((void)0) 231 | 232 | gboolean dbus_g_proxy_call (DBusGProxy *proxy, 233 | const char *method, 234 | GError **error, 235 | GType first_arg_type, 236 | ...); 237 | 238 | gboolean dbus_g_proxy_call_with_timeout (DBusGProxy *proxy, 239 | const char *method, 240 | int timeout, 241 | GError **error, 242 | GType first_arg_type, 243 | ...); 244 | 245 | #define dbus_g_proxy_call_no_reply(a,b,c,...) ((void)0) 246 | 247 | DBusGProxyCall * dbus_g_proxy_begin_call (DBusGProxy *proxy, 248 | const char *method, 249 | DBusGProxyCallNotify notify, 250 | gpointer data, 251 | GDestroyNotify destroy, 252 | GType first_arg_type, 253 | ...); 254 | DBusGProxyCall * dbus_g_proxy_begin_call_with_timeout (DBusGProxy *proxy, 255 | const char *method, 256 | DBusGProxyCallNotify notify, 257 | gpointer user_data, 258 | GDestroyNotify destroy, 259 | int timeout, 260 | GType first_arg_type, 261 | ...); 262 | 263 | gboolean dbus_g_proxy_end_call (DBusGProxy *proxy, 264 | DBusGProxyCall *call, 265 | GError **error, 266 | GType first_arg_type, 267 | ...); 268 | #define dbus_g_proxy_cancel_call(a,b) ((void)0) 269 | 270 | const char* dbus_g_proxy_get_path (DBusGProxy *proxy); 271 | 272 | const char* dbus_g_proxy_get_bus_name (DBusGProxy *proxy); 273 | 274 | const char* dbus_g_proxy_get_interface (DBusGProxy *proxy); 275 | 276 | typedef struct _DBusGMethodInvocation DBusGMethodInvocation; 277 | 278 | #define dbus_g_method_return(a,...) ((void)0) 279 | 280 | #define dbus_g_method_return_error(a,b) ((void)0) 281 | 282 | /* Probably possible to replace this with a closure */ 283 | typedef struct { 284 | GCallback cb; 285 | gpointer userdata; 286 | } DBusGAsyncData; 287 | 288 | #undef DBUS_INSIDE_DBUS_GLIB_H 289 | 290 | G_END_DECLS 291 | 292 | #endif /* DBUS_GLIB_H */ 293 | -------------------------------------------------------------------------------- /include/dbus-1.0/dbus/dbus-gtype-specialized.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-file-style: "gnu" -*- */ 2 | /* dbus-gtype-specialized.h: Non-DBus-specific functions for specialized GTypes 3 | * 4 | * Copyright (C) 2005 Red Hat, Inc. 5 | * 6 | * Licensed under the Academic Free License version 2.1 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | * 22 | */ 23 | 24 | #ifndef DBUS_GOBJECT_TYPE_SPECIALIZED_H 25 | #define DBUS_GOBJECT_TYPE_SPECIALIZED_H 26 | 27 | #include 28 | #include 29 | 30 | G_BEGIN_DECLS 31 | 32 | GType dbus_g_type_get_collection (const char *container, 33 | GType specialization); 34 | GType dbus_g_type_get_map (const char *container, 35 | GType key_specialization, 36 | GType value_specialization); 37 | GType dbus_g_type_get_structv (const char *container, 38 | guint num_members, 39 | GType *types); 40 | GType dbus_g_type_get_struct (const char *container, 41 | GType first_type, 42 | ...); 43 | gboolean dbus_g_type_is_collection (GType gtype); 44 | gboolean dbus_g_type_is_map (GType gtype); 45 | gboolean dbus_g_type_is_struct (GType gtype); 46 | GType dbus_g_type_get_collection_specialization (GType gtype); 47 | GType dbus_g_type_get_map_key_specialization (GType gtype); 48 | GType dbus_g_type_get_map_value_specialization (GType gtype); 49 | GType dbus_g_type_get_struct_member_type (GType gtype, 50 | guint member); 51 | guint dbus_g_type_get_struct_size (GType gtype); 52 | 53 | typedef void (*DBusGTypeSpecializedCollectionIterator) (const GValue *value, 54 | gpointer user_data); 55 | typedef void (*DBusGTypeSpecializedMapIterator) (const GValue *key_val, 56 | const GValue *value_val, 57 | gpointer user_data); 58 | 59 | gpointer dbus_g_type_specialized_construct (GType gtype); 60 | 61 | typedef struct { 62 | /* public */ 63 | GValue *val; 64 | GType specialization_type; 65 | /* padding */ 66 | gpointer b; 67 | guint c; 68 | gpointer d; 69 | } DBusGTypeSpecializedAppendContext; 70 | 71 | #define dbus_g_type_specialized_init_append(a,b) ((void)0) 72 | 73 | #define dbus_g_type_specialized_collection_append(a,b) ((void)0) 74 | 75 | #define dbus_g_type_specialized_collection_end_append(a) ((void)0) 76 | 77 | #define dbus_g_type_specialized_map_append(a,b,c) ((void)0) 78 | 79 | gboolean dbus_g_type_collection_get_fixed (GValue *value, 80 | gpointer *data, 81 | guint *len); 82 | 83 | #define dbus_g_type_collection_value_iterate(a,b,c) ((void)0) 84 | 85 | #define dbus_g_type_map_value_iterate(a,b,c) ((void)0) 86 | 87 | gboolean dbus_g_type_struct_get_member (const GValue *value, 88 | guint member, 89 | GValue *dest); 90 | gboolean dbus_g_type_struct_set_member (GValue *value, 91 | guint member, 92 | const GValue *src); 93 | 94 | gboolean dbus_g_type_struct_get (const GValue *value, 95 | guint member, 96 | ...); 97 | 98 | gboolean dbus_g_type_struct_set (GValue *value, 99 | guint member, 100 | ...); 101 | 102 | typedef gpointer (*DBusGTypeSpecializedConstructor) (GType type); 103 | typedef void (*DBusGTypeSpecializedFreeFunc) (GType type, gpointer val); 104 | typedef gpointer (*DBusGTypeSpecializedCopyFunc) (GType type, gpointer src); 105 | 106 | typedef struct { 107 | DBusGTypeSpecializedConstructor constructor; 108 | DBusGTypeSpecializedFreeFunc free_func; 109 | DBusGTypeSpecializedCopyFunc copy_func; 110 | GDestroyNotify simple_free_func; /* for type-independent freeing if possible */ 111 | gpointer padding2; 112 | gpointer padding3; 113 | } DBusGTypeSpecializedVtable; 114 | 115 | typedef gboolean (*DBusGTypeSpecializedCollectionFixedAccessorFunc) (GType type, gpointer instance, gpointer *values, guint *len); 116 | typedef void (*DBusGTypeSpecializedCollectionIteratorFunc) (GType type, gpointer instance, DBusGTypeSpecializedCollectionIterator iterator, gpointer user_data); 117 | typedef void (*DBusGTypeSpecializedCollectionAppendFunc) (DBusGTypeSpecializedAppendContext *ctx, GValue *val); 118 | typedef void (*DBusGTypeSpecializedCollectionEndAppendFunc) (DBusGTypeSpecializedAppendContext *ctx); 119 | 120 | typedef struct { 121 | DBusGTypeSpecializedVtable base_vtable; 122 | DBusGTypeSpecializedCollectionFixedAccessorFunc fixed_accessor; 123 | DBusGTypeSpecializedCollectionIteratorFunc iterator; 124 | DBusGTypeSpecializedCollectionAppendFunc append_func; 125 | DBusGTypeSpecializedCollectionEndAppendFunc end_append_func; 126 | } DBusGTypeSpecializedCollectionVtable; 127 | 128 | typedef void (*DBusGTypeSpecializedMapIteratorFunc) (GType type, gpointer instance, DBusGTypeSpecializedMapIterator iterator, gpointer user_data); 129 | typedef void (*DBusGTypeSpecializedMapAppendFunc) (DBusGTypeSpecializedAppendContext *ctx, GValue *key, GValue *val); 130 | 131 | typedef struct { 132 | DBusGTypeSpecializedVtable base_vtable; 133 | DBusGTypeSpecializedMapIteratorFunc iterator; 134 | DBusGTypeSpecializedMapAppendFunc append_func; 135 | } DBusGTypeSpecializedMapVtable; 136 | 137 | typedef gboolean (*DBusGTypeSpecializedStructGetMember) (GType type, gpointer instance, guint member, GValue *ret_value); 138 | typedef gboolean (*DBusGTypeSpecializedStructSetMember) (GType type, gpointer instance, guint member, const GValue *new_value); 139 | 140 | typedef struct { 141 | DBusGTypeSpecializedVtable base_vtable; 142 | DBusGTypeSpecializedStructGetMember get_member; 143 | DBusGTypeSpecializedStructSetMember set_member; 144 | } DBusGTypeSpecializedStructVtable; 145 | 146 | #define dbus_g_type_specialized_init() ((void)0) 147 | 148 | #define dbus_g_type_register_collection(a,b,c) ((void)0) 149 | 150 | #define dbus_g_type_register_map(a,b,c) ((void)0) 151 | const DBusGTypeSpecializedMapVtable* dbus_g_type_map_peek_vtable (GType map_type); 152 | const DBusGTypeSpecializedCollectionVtable* dbus_g_type_collection_peek_vtable (GType collection_type); 153 | 154 | #define dbus_g_type_register_struct(a,b,c) ((void)0) 155 | 156 | const DBusGTypeSpecializedMapVtable* dbus_g_type_map_peek_vtable (GType map_type); 157 | const DBusGTypeSpecializedCollectionVtable* dbus_g_type_collection_peek_vtable (GType collection_type); 158 | 159 | const DBusGTypeSpecializedStructVtable* dbus_g_type_struct_peek_vtable (GType struct_type); 160 | 161 | G_END_DECLS 162 | 163 | #endif 164 | -------------------------------------------------------------------------------- /include/dbus-1.0/dbus/dbus-macros.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ 2 | /* dbus-macros.h generic macros 3 | * 4 | * Copyright (C) 2002 Red Hat Inc. 5 | * 6 | * Licensed under the Academic Free License version 2.1 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | * 22 | */ 23 | #if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) 24 | #error "Only can be included directly, this file may disappear or change contents." 25 | #endif 26 | 27 | #ifndef DBUS_MACROS_H 28 | #define DBUS_MACROS_H 29 | 30 | #ifdef __cplusplus 31 | # define DBUS_BEGIN_DECLS extern "C" { 32 | # define DBUS_END_DECLS } 33 | #else 34 | # define DBUS_BEGIN_DECLS 35 | # define DBUS_END_DECLS 36 | #endif 37 | 38 | #ifndef TRUE 39 | # define TRUE 1 40 | #endif 41 | #ifndef FALSE 42 | # define FALSE 0 43 | #endif 44 | 45 | #ifndef NULL 46 | # ifdef __cplusplus 47 | # define NULL (0L) 48 | # else /* !__cplusplus */ 49 | # define NULL ((void*) 0) 50 | # endif /* !__cplusplus */ 51 | #endif 52 | 53 | #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) 54 | # define DBUS_DEPRECATED __attribute__ ((__deprecated__)) 55 | #else 56 | # define DBUS_DEPRECATED 57 | #endif 58 | 59 | #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8) 60 | # define _DBUS_GNUC_EXTENSION __extension__ 61 | #else 62 | # define _DBUS_GNUC_EXTENSION 63 | #endif 64 | 65 | #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) 66 | #define _DBUS_GNUC_PRINTF( format_idx, arg_idx ) \ 67 | __attribute__((__format__ (__printf__, format_idx, arg_idx))) 68 | #define _DBUS_GNUC_NORETURN \ 69 | __attribute__((__noreturn__)) 70 | #else /* !__GNUC__ */ 71 | #define _DBUS_GNUC_PRINTF( format_idx, arg_idx ) 72 | #define _DBUS_GNUC_NORETURN 73 | #endif /* !__GNUC__ */ 74 | 75 | #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) 76 | #define DBUS_MALLOC __attribute__((__malloc__)) 77 | #else 78 | #define DBUS_MALLOC 79 | #endif 80 | 81 | #if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) 82 | #define DBUS_ALLOC_SIZE(x) __attribute__((__alloc_size__(x))) 83 | #define DBUS_ALLOC_SIZE2(x,y) __attribute__((__alloc_size__(x,y))) 84 | #else 85 | #define DBUS_ALLOC_SIZE(x) 86 | #define DBUS_ALLOC_SIZE2(x,y) 87 | #endif 88 | 89 | 90 | #endif /* DBUS_MACROS_H */ 91 | -------------------------------------------------------------------------------- /include/dbus-1.0/dbus/dbus-memory.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ 2 | /* dbus-memory.h D-Bus memory handling 3 | * 4 | * Copyright (C) 2002 Red Hat Inc. 5 | * 6 | * Licensed under the Academic Free License version 2.1 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | * 22 | */ 23 | #if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) 24 | #error "Only can be included directly, this file may disappear or change contents." 25 | #endif 26 | 27 | #ifndef DBUS_MEMORY_H 28 | #define DBUS_MEMORY_H 29 | 30 | #include 31 | #include 32 | 33 | DBUS_BEGIN_DECLS 34 | 35 | /** 36 | * @addtogroup DBusMemory 37 | * @{ 38 | */ 39 | 40 | 41 | DBUS_MALLOC 42 | DBUS_ALLOC_SIZE(1) 43 | void* dbus_malloc (size_t bytes); 44 | 45 | 46 | DBUS_MALLOC 47 | DBUS_ALLOC_SIZE(1) 48 | void* dbus_malloc0 (size_t bytes); 49 | 50 | 51 | DBUS_MALLOC 52 | DBUS_ALLOC_SIZE(2) 53 | void* dbus_realloc (void *memory, 54 | size_t bytes); 55 | 56 | #define dbus_free(a) ((void)0) 57 | 58 | #define dbus_new(type, count) ((type*)dbus_malloc (sizeof (type) * (count))) 59 | #define dbus_new0(type, count) ((type*)dbus_malloc0 (sizeof (type) * (count))) 60 | 61 | 62 | #define dbus_free_string_array(a) ((void)0) 63 | 64 | typedef void (* DBusFreeFunction) (void *memory); 65 | 66 | 67 | #define dbus_shutdown() ((void)0) 68 | 69 | /** @} */ 70 | 71 | DBUS_END_DECLS 72 | 73 | #endif /* DBUS_MEMORY_H */ 74 | -------------------------------------------------------------------------------- /include/dbus-1.0/dbus/dbus-message.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ 2 | /* dbus-message.h DBusMessage object 3 | * 4 | * Copyright (C) 2002, 2003, 2005 Red Hat Inc. 5 | * 6 | * Licensed under the Academic Free License version 2.1 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | * 22 | */ 23 | #if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) 24 | #error "Only can be included directly, this file may disappear or change contents." 25 | #endif 26 | 27 | #ifndef DBUS_MESSAGE_H 28 | #define DBUS_MESSAGE_H 29 | 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | DBUS_BEGIN_DECLS 38 | 39 | /** 40 | * @addtogroup DBusMessage 41 | * @{ 42 | */ 43 | 44 | typedef struct DBusMessage DBusMessage; 45 | /** Opaque type representing a message iterator. Can be copied by value, and contains no allocated memory so never needs to be freed and can be allocated on the stack. */ 46 | typedef struct DBusMessageIter DBusMessageIter; 47 | 48 | /** 49 | * DBusMessageIter struct; contains no public fields. 50 | */ 51 | struct DBusMessageIter 52 | { 53 | void *dummy1; /**< Don't use this */ 54 | void *dummy2; /**< Don't use this */ 55 | dbus_uint32_t dummy3; /**< Don't use this */ 56 | int dummy4; /**< Don't use this */ 57 | int dummy5; /**< Don't use this */ 58 | int dummy6; /**< Don't use this */ 59 | int dummy7; /**< Don't use this */ 60 | int dummy8; /**< Don't use this */ 61 | int dummy9; /**< Don't use this */ 62 | int dummy10; /**< Don't use this */ 63 | int dummy11; /**< Don't use this */ 64 | int pad1; /**< Don't use this */ 65 | int pad2; /**< Don't use this */ 66 | void *pad3; /**< Don't use this */ 67 | }; 68 | 69 | 70 | DBusMessage* dbus_message_new (int message_type); 71 | 72 | DBusMessage* dbus_message_new_method_call (const char *bus_name, 73 | const char *path, 74 | const char *interface, 75 | const char *method); 76 | 77 | DBusMessage* dbus_message_new_method_return (DBusMessage *method_call); 78 | 79 | DBusMessage* dbus_message_new_signal (const char *path, 80 | const char *interface, 81 | const char *name); 82 | 83 | DBusMessage* dbus_message_new_error (DBusMessage *reply_to, 84 | const char *error_name, 85 | const char *error_message); 86 | 87 | DBusMessage* dbus_message_new_error_printf (DBusMessage *reply_to, 88 | const char *error_name, 89 | const char *error_format, 90 | ...); 91 | 92 | 93 | DBusMessage* dbus_message_copy (const DBusMessage *message); 94 | 95 | 96 | DBusMessage* dbus_message_ref (DBusMessage *message); 97 | 98 | #define dbus_message_unref(a) ((void)0) 99 | 100 | int dbus_message_get_type (DBusMessage *message); 101 | 102 | dbus_bool_t dbus_message_set_path (DBusMessage *message, 103 | const char *object_path); 104 | 105 | const char* dbus_message_get_path (DBusMessage *message); 106 | 107 | dbus_bool_t dbus_message_has_path (DBusMessage *message, 108 | const char *object_path); 109 | 110 | dbus_bool_t dbus_message_set_interface (DBusMessage *message, 111 | const char *interface); 112 | 113 | const char* dbus_message_get_interface (DBusMessage *message); 114 | 115 | dbus_bool_t dbus_message_has_interface (DBusMessage *message, 116 | const char *interface); 117 | 118 | dbus_bool_t dbus_message_set_member (DBusMessage *message, 119 | const char *member); 120 | 121 | const char* dbus_message_get_member (DBusMessage *message); 122 | 123 | dbus_bool_t dbus_message_has_member (DBusMessage *message, 124 | const char *member); 125 | 126 | dbus_bool_t dbus_message_set_error_name (DBusMessage *message, 127 | const char *name); 128 | 129 | const char* dbus_message_get_error_name (DBusMessage *message); 130 | 131 | dbus_bool_t dbus_message_set_destination (DBusMessage *message, 132 | const char *destination); 133 | 134 | const char* dbus_message_get_destination (DBusMessage *message); 135 | 136 | dbus_bool_t dbus_message_set_sender (DBusMessage *message, 137 | const char *sender); 138 | 139 | const char* dbus_message_get_sender (DBusMessage *message); 140 | 141 | const char* dbus_message_get_signature (DBusMessage *message); 142 | 143 | #define dbus_message_set_no_reply(a,b) ((void)0) 144 | 145 | dbus_bool_t dbus_message_get_no_reply (DBusMessage *message); 146 | 147 | dbus_bool_t dbus_message_is_method_call (DBusMessage *message, 148 | const char *interface, 149 | const char *method); 150 | 151 | dbus_bool_t dbus_message_is_signal (DBusMessage *message, 152 | const char *interface, 153 | const char *signal_name); 154 | 155 | dbus_bool_t dbus_message_is_error (DBusMessage *message, 156 | const char *error_name); 157 | 158 | dbus_bool_t dbus_message_has_destination (DBusMessage *message, 159 | const char *bus_name); 160 | 161 | dbus_bool_t dbus_message_has_sender (DBusMessage *message, 162 | const char *unique_bus_name); 163 | 164 | dbus_bool_t dbus_message_has_signature (DBusMessage *message, 165 | const char *signature); 166 | 167 | dbus_uint32_t dbus_message_get_serial (DBusMessage *message); 168 | 169 | #define dbus_message_set_serial(a,b) ((void)0) 170 | 171 | dbus_bool_t dbus_message_set_reply_serial (DBusMessage *message, 172 | dbus_uint32_t reply_serial); 173 | 174 | dbus_uint32_t dbus_message_get_reply_serial (DBusMessage *message); 175 | 176 | 177 | #define dbus_message_set_auto_start(a,b) ((void)0) 178 | 179 | dbus_bool_t dbus_message_get_auto_start (DBusMessage *message); 180 | 181 | 182 | dbus_bool_t dbus_message_get_path_decomposed (DBusMessage *message, 183 | char ***path); 184 | 185 | 186 | dbus_bool_t dbus_message_append_args (DBusMessage *message, 187 | int first_arg_type, 188 | ...); 189 | 190 | dbus_bool_t dbus_message_append_args_valist (DBusMessage *message, 191 | int first_arg_type, 192 | va_list var_args); 193 | 194 | dbus_bool_t dbus_message_get_args (DBusMessage *message, 195 | DBusError *error, 196 | int first_arg_type, 197 | ...); 198 | 199 | dbus_bool_t dbus_message_get_args_valist (DBusMessage *message, 200 | DBusError *error, 201 | int first_arg_type, 202 | va_list var_args); 203 | 204 | 205 | dbus_bool_t dbus_message_contains_unix_fds (DBusMessage *message); 206 | 207 | 208 | dbus_bool_t dbus_message_iter_init (DBusMessage *message, 209 | DBusMessageIter *iter); 210 | 211 | dbus_bool_t dbus_message_iter_has_next (DBusMessageIter *iter); 212 | 213 | dbus_bool_t dbus_message_iter_next (DBusMessageIter *iter); 214 | 215 | char* dbus_message_iter_get_signature (DBusMessageIter *iter); 216 | 217 | int dbus_message_iter_get_arg_type (DBusMessageIter *iter); 218 | 219 | int dbus_message_iter_get_element_type (DBusMessageIter *iter); 220 | 221 | #define dbus_message_iter_recurse(a,b) ((void)0) 222 | 223 | #define dbus_message_iter_get_basic(a,b) ((void)0) 224 | #ifndef DBUS_DISABLE_DEPRECATED 225 | /* This function returns the wire protocol size of the array in bytes, 226 | * you do not want to know that probably 227 | */ 228 | 229 | DBUS_DEPRECATED int dbus_message_iter_get_array_len (DBusMessageIter *iter); 230 | #endif 231 | 232 | #define dbus_message_iter_get_fixed_array(a,b,c) ((void)0) 233 | 234 | 235 | #define dbus_message_iter_init_append(a,b) ((void)0) 236 | 237 | dbus_bool_t dbus_message_iter_append_basic (DBusMessageIter *iter, 238 | int type, 239 | const void *value); 240 | 241 | dbus_bool_t dbus_message_iter_append_fixed_array (DBusMessageIter *iter, 242 | int element_type, 243 | const void *value, 244 | int n_elements); 245 | 246 | dbus_bool_t dbus_message_iter_open_container (DBusMessageIter *iter, 247 | int type, 248 | const char *contained_signature, 249 | DBusMessageIter *sub); 250 | 251 | dbus_bool_t dbus_message_iter_close_container (DBusMessageIter *iter, 252 | DBusMessageIter *sub); 253 | 254 | #define dbus_message_iter_abandon_container(a,b) ((void)0) 255 | 256 | 257 | #define dbus_message_lock(a) ((void)0) 258 | 259 | 260 | dbus_bool_t dbus_set_error_from_message (DBusError *error, 261 | DBusMessage *message); 262 | 263 | 264 | 265 | dbus_bool_t dbus_message_allocate_data_slot (dbus_int32_t *slot_p); 266 | 267 | #define dbus_message_free_data_slot(a) ((void)0) 268 | 269 | dbus_bool_t dbus_message_set_data (DBusMessage *message, 270 | dbus_int32_t slot, 271 | void *data, 272 | DBusFreeFunction free_data_func); 273 | 274 | void* dbus_message_get_data (DBusMessage *message, 275 | dbus_int32_t slot); 276 | 277 | 278 | int dbus_message_type_from_string (const char *type_str); 279 | 280 | const char* dbus_message_type_to_string (int type); 281 | 282 | 283 | dbus_bool_t dbus_message_marshal (DBusMessage *msg, 284 | char **marshalled_data_p, 285 | int *len_p); 286 | 287 | DBusMessage* dbus_message_demarshal (const char *str, 288 | int len, 289 | DBusError *error); 290 | 291 | 292 | int dbus_message_demarshal_bytes_needed (const char *str, 293 | int len); 294 | 295 | /** @} */ 296 | 297 | DBUS_END_DECLS 298 | 299 | #endif /* DBUS_MESSAGE_H */ 300 | -------------------------------------------------------------------------------- /include/dbus-1.0/dbus/dbus-misc.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clbr/nobus/0d6326243591a034bd65529badfb3ec2b4a09c72/include/dbus-1.0/dbus/dbus-misc.h -------------------------------------------------------------------------------- /include/dbus-1.0/dbus/dbus-pending-call.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ 2 | /* dbus-pending-call.h Object representing a call in progress. 3 | * 4 | * Copyright (C) 2002, 2003 Red Hat Inc. 5 | * 6 | * Licensed under the Academic Free License version 2.1 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | * 22 | */ 23 | #if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) 24 | #error "Only can be included directly, this file may disappear or change contents." 25 | #endif 26 | 27 | #ifndef DBUS_PENDING_CALL_H 28 | #define DBUS_PENDING_CALL_H 29 | 30 | #include 31 | #include 32 | #include 33 | 34 | DBUS_BEGIN_DECLS 35 | 36 | /** 37 | * @addtogroup DBusPendingCall 38 | * @{ 39 | */ 40 | 41 | #define DBUS_TIMEOUT_INFINITE ((int) 0x7fffffff) 42 | #define DBUS_TIMEOUT_USE_DEFAULT (-1) 43 | 44 | 45 | DBusPendingCall* dbus_pending_call_ref (DBusPendingCall *pending); 46 | 47 | #define dbus_pending_call_unref(a) ((void)0) 48 | 49 | dbus_bool_t dbus_pending_call_set_notify (DBusPendingCall *pending, 50 | DBusPendingCallNotifyFunction function, 51 | void *user_data, 52 | DBusFreeFunction free_user_data); 53 | 54 | #define dbus_pending_call_cancel(a) ((void)0) 55 | 56 | dbus_bool_t dbus_pending_call_get_completed (DBusPendingCall *pending); 57 | 58 | DBusMessage* dbus_pending_call_steal_reply (DBusPendingCall *pending); 59 | 60 | #define dbus_pending_call_block(a) ((void)0) 61 | 62 | 63 | dbus_bool_t dbus_pending_call_allocate_data_slot (dbus_int32_t *slot_p); 64 | 65 | #define dbus_pending_call_free_data_slot(a) ((void)0) 66 | 67 | dbus_bool_t dbus_pending_call_set_data (DBusPendingCall *pending, 68 | dbus_int32_t slot, 69 | void *data, 70 | DBusFreeFunction free_data_func); 71 | 72 | void* dbus_pending_call_get_data (DBusPendingCall *pending, 73 | dbus_int32_t slot); 74 | 75 | /** @} */ 76 | 77 | DBUS_END_DECLS 78 | 79 | #endif /* DBUS_PENDING_CALL_H */ 80 | -------------------------------------------------------------------------------- /include/dbus-1.0/dbus/dbus-protocol.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ 2 | /* dbus-protocol.h D-Bus protocol constants 3 | * 4 | * Copyright (C) 2002, 2003 CodeFactory AB 5 | * Copyright (C) 2004, 2005 Red Hat, Inc. 6 | * 7 | * Licensed under the Academic Free License version 2.1 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 | * 23 | */ 24 | 25 | #ifndef DBUS_PROTOCOL_H 26 | #define DBUS_PROTOCOL_H 27 | 28 | /* Don't include anything in here from anywhere else. It's 29 | * intended for use by any random library. 30 | */ 31 | 32 | #ifdef __cplusplus 33 | extern "C" { 34 | #if 0 35 | } /* avoids confusing emacs indentation */ 36 | #endif 37 | #endif 38 | 39 | /* Normally docs are in .c files, but there isn't a .c file for this. */ 40 | /** 41 | * @defgroup DBusProtocol Protocol constants 42 | * @ingroup DBus 43 | * 44 | * @brief Defines constants which are part of the D-Bus protocol 45 | * 46 | * This header is intended for use by any library, not only libdbus. 47 | * 48 | * @{ 49 | */ 50 | 51 | 52 | /* Message byte order */ 53 | #define DBUS_LITTLE_ENDIAN ('l') /**< Code marking LSB-first byte order in the wire protocol. */ 54 | #define DBUS_BIG_ENDIAN ('B') /**< Code marking MSB-first byte order in the wire protocol. */ 55 | 56 | /** Protocol version. */ 57 | #define DBUS_MAJOR_PROTOCOL_VERSION 1 58 | 59 | /** Type code that is never equal to a legitimate type code */ 60 | #define DBUS_TYPE_INVALID ((int) '\0') 61 | /** #DBUS_TYPE_INVALID as a string literal instead of a int literal */ 62 | #define DBUS_TYPE_INVALID_AS_STRING "\0" 63 | 64 | /* Primitive types */ 65 | /** Type code marking an 8-bit unsigned integer */ 66 | #define DBUS_TYPE_BYTE ((int) 'y') 67 | /** #DBUS_TYPE_BYTE as a string literal instead of a int literal */ 68 | #define DBUS_TYPE_BYTE_AS_STRING "y" 69 | /** Type code marking a boolean */ 70 | #define DBUS_TYPE_BOOLEAN ((int) 'b') 71 | /** #DBUS_TYPE_BOOLEAN as a string literal instead of a int literal */ 72 | #define DBUS_TYPE_BOOLEAN_AS_STRING "b" 73 | /** Type code marking a 16-bit signed integer */ 74 | #define DBUS_TYPE_INT16 ((int) 'n') 75 | /** #DBUS_TYPE_INT16 as a string literal instead of a int literal */ 76 | #define DBUS_TYPE_INT16_AS_STRING "n" 77 | /** Type code marking a 16-bit unsigned integer */ 78 | #define DBUS_TYPE_UINT16 ((int) 'q') 79 | /** #DBUS_TYPE_UINT16 as a string literal instead of a int literal */ 80 | #define DBUS_TYPE_UINT16_AS_STRING "q" 81 | /** Type code marking a 32-bit signed integer */ 82 | #define DBUS_TYPE_INT32 ((int) 'i') 83 | /** #DBUS_TYPE_INT32 as a string literal instead of a int literal */ 84 | #define DBUS_TYPE_INT32_AS_STRING "i" 85 | /** Type code marking a 32-bit unsigned integer */ 86 | #define DBUS_TYPE_UINT32 ((int) 'u') 87 | /** #DBUS_TYPE_UINT32 as a string literal instead of a int literal */ 88 | #define DBUS_TYPE_UINT32_AS_STRING "u" 89 | /** Type code marking a 64-bit signed integer */ 90 | #define DBUS_TYPE_INT64 ((int) 'x') 91 | /** #DBUS_TYPE_INT64 as a string literal instead of a int literal */ 92 | #define DBUS_TYPE_INT64_AS_STRING "x" 93 | /** Type code marking a 64-bit unsigned integer */ 94 | #define DBUS_TYPE_UINT64 ((int) 't') 95 | /** #DBUS_TYPE_UINT64 as a string literal instead of a int literal */ 96 | #define DBUS_TYPE_UINT64_AS_STRING "t" 97 | /** Type code marking an 8-byte double in IEEE 754 format */ 98 | #define DBUS_TYPE_DOUBLE ((int) 'd') 99 | /** #DBUS_TYPE_DOUBLE as a string literal instead of a int literal */ 100 | #define DBUS_TYPE_DOUBLE_AS_STRING "d" 101 | /** Type code marking a UTF-8 encoded, nul-terminated Unicode string */ 102 | #define DBUS_TYPE_STRING ((int) 's') 103 | /** #DBUS_TYPE_STRING as a string literal instead of a int literal */ 104 | #define DBUS_TYPE_STRING_AS_STRING "s" 105 | /** Type code marking a D-Bus object path */ 106 | #define DBUS_TYPE_OBJECT_PATH ((int) 'o') 107 | /** #DBUS_TYPE_OBJECT_PATH as a string literal instead of a int literal */ 108 | #define DBUS_TYPE_OBJECT_PATH_AS_STRING "o" 109 | /** Type code marking a D-Bus type signature */ 110 | #define DBUS_TYPE_SIGNATURE ((int) 'g') 111 | /** #DBUS_TYPE_SIGNATURE as a string literal instead of a int literal */ 112 | #define DBUS_TYPE_SIGNATURE_AS_STRING "g" 113 | /** Type code marking a unix file descriptor */ 114 | #define DBUS_TYPE_UNIX_FD ((int) 'h') 115 | /** #DBUS_TYPE_UNIX_FD as a string literal instead of a int literal */ 116 | #define DBUS_TYPE_UNIX_FD_AS_STRING "h" 117 | 118 | /* Compound types */ 119 | /** Type code marking a D-Bus array type */ 120 | #define DBUS_TYPE_ARRAY ((int) 'a') 121 | /** #DBUS_TYPE_ARRAY as a string literal instead of a int literal */ 122 | #define DBUS_TYPE_ARRAY_AS_STRING "a" 123 | /** Type code marking a D-Bus variant type */ 124 | #define DBUS_TYPE_VARIANT ((int) 'v') 125 | /** #DBUS_TYPE_VARIANT as a string literal instead of a int literal */ 126 | #define DBUS_TYPE_VARIANT_AS_STRING "v" 127 | 128 | /** STRUCT and DICT_ENTRY are sort of special since their codes can't 129 | * appear in a type string, instead 130 | * DBUS_STRUCT_BEGIN_CHAR/DBUS_DICT_ENTRY_BEGIN_CHAR have to appear 131 | */ 132 | /** Type code used to represent a struct; however, this type code does not appear 133 | * in type signatures, instead #DBUS_STRUCT_BEGIN_CHAR and #DBUS_STRUCT_END_CHAR will 134 | * appear in a signature. 135 | */ 136 | #define DBUS_TYPE_STRUCT ((int) 'r') 137 | /** #DBUS_TYPE_STRUCT as a string literal instead of a int literal */ 138 | #define DBUS_TYPE_STRUCT_AS_STRING "r" 139 | /** Type code used to represent a dict entry; however, this type code does not appear 140 | * in type signatures, instead #DBUS_DICT_ENTRY_BEGIN_CHAR and #DBUS_DICT_ENTRY_END_CHAR will 141 | * appear in a signature. 142 | */ 143 | #define DBUS_TYPE_DICT_ENTRY ((int) 'e') 144 | /** #DBUS_TYPE_DICT_ENTRY as a string literal instead of a int literal */ 145 | #define DBUS_TYPE_DICT_ENTRY_AS_STRING "e" 146 | 147 | /** Does not include #DBUS_TYPE_INVALID, #DBUS_STRUCT_BEGIN_CHAR, #DBUS_STRUCT_END_CHAR, 148 | * #DBUS_DICT_ENTRY_BEGIN_CHAR, or #DBUS_DICT_ENTRY_END_CHAR - i.e. it is the number of 149 | * valid types, not the number of distinct characters that may appear in a type signature. 150 | */ 151 | #define DBUS_NUMBER_OF_TYPES (16) 152 | 153 | /* characters other than typecodes that appear in type signatures */ 154 | 155 | /** Code marking the start of a struct type in a type signature */ 156 | #define DBUS_STRUCT_BEGIN_CHAR ((int) '(') 157 | /** #DBUS_STRUCT_BEGIN_CHAR as a string literal instead of a int literal */ 158 | #define DBUS_STRUCT_BEGIN_CHAR_AS_STRING "(" 159 | /** Code marking the end of a struct type in a type signature */ 160 | #define DBUS_STRUCT_END_CHAR ((int) ')') 161 | /** #DBUS_STRUCT_END_CHAR a string literal instead of a int literal */ 162 | #define DBUS_STRUCT_END_CHAR_AS_STRING ")" 163 | /** Code marking the start of a dict entry type in a type signature */ 164 | #define DBUS_DICT_ENTRY_BEGIN_CHAR ((int) '{') 165 | /** #DBUS_DICT_ENTRY_BEGIN_CHAR as a string literal instead of a int literal */ 166 | #define DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING "{" 167 | /** Code marking the end of a dict entry type in a type signature */ 168 | #define DBUS_DICT_ENTRY_END_CHAR ((int) '}') 169 | /** #DBUS_DICT_ENTRY_END_CHAR as a string literal instead of a int literal */ 170 | #define DBUS_DICT_ENTRY_END_CHAR_AS_STRING "}" 171 | 172 | /** Max length in bytes of a bus name, interface, or member (not object 173 | * path, paths are unlimited). This is limited because lots of stuff 174 | * is O(n) in this number, plus it would be obnoxious to type in a 175 | * paragraph-long method name so most likely something like that would 176 | * be an exploit. 177 | */ 178 | #define DBUS_MAXIMUM_NAME_LENGTH 255 179 | 180 | /** This one is 255 so it fits in a byte */ 181 | #define DBUS_MAXIMUM_SIGNATURE_LENGTH 255 182 | 183 | /** Max length of a match rule string; to keep people from hosing the 184 | * daemon with some huge rule 185 | */ 186 | #define DBUS_MAXIMUM_MATCH_RULE_LENGTH 1024 187 | 188 | /** Max arg number you can match on in a match rule, e.g. 189 | * arg0='hello' is OK, arg3489720987='hello' is not 190 | */ 191 | #define DBUS_MAXIMUM_MATCH_RULE_ARG_NUMBER 63 192 | 193 | /** Max length of a marshaled array in bytes (64M, 2^26) We use signed 194 | * int for lengths so must be INT_MAX or less. We need something a 195 | * bit smaller than INT_MAX because the array is inside a message with 196 | * header info, etc. so an INT_MAX array wouldn't allow the message 197 | * overhead. The 64M number is an attempt at a larger number than 198 | * we'd reasonably ever use, but small enough that your bus would chew 199 | * through it fairly quickly without locking up forever. If you have 200 | * data that's likely to be larger than this, you should probably be 201 | * sending it in multiple incremental messages anyhow. 202 | */ 203 | #define DBUS_MAXIMUM_ARRAY_LENGTH (67108864) 204 | /** Number of bits you need in an unsigned to store the max array size */ 205 | #define DBUS_MAXIMUM_ARRAY_LENGTH_BITS 26 206 | 207 | /** The maximum total message size including header and body; similar 208 | * rationale to max array size. 209 | */ 210 | #define DBUS_MAXIMUM_MESSAGE_LENGTH (DBUS_MAXIMUM_ARRAY_LENGTH * 2) 211 | /** Number of bits you need in an unsigned to store the max message size */ 212 | #define DBUS_MAXIMUM_MESSAGE_LENGTH_BITS 27 213 | 214 | /** The maximum total number of unix fds in a message. Similar 215 | * rationale as DBUS_MAXIMUM_MESSAGE_LENGTH. However we divide by four 216 | * given that one fd is an int and hence at least 32 bits. 217 | */ 218 | #define DBUS_MAXIMUM_MESSAGE_UNIX_FDS (DBUS_MAXIMUM_MESSAGE_LENGTH/4) 219 | /** Number of bits you need in an unsigned to store the max message unix fds */ 220 | #define DBUS_MAXIMUM_MESSAGE_UNIX_FDS_BITS (DBUS_MAXIMUM_MESSAGE_LENGTH_BITS-2) 221 | 222 | /** Depth of recursion in the type tree. This is automatically limited 223 | * to DBUS_MAXIMUM_SIGNATURE_LENGTH since you could only have an array 224 | * of array of array of ... that fit in the max signature. But that's 225 | * probably a bit too large. 226 | */ 227 | #define DBUS_MAXIMUM_TYPE_RECURSION_DEPTH 32 228 | 229 | /* Types of message */ 230 | 231 | /** This value is never a valid message type, see dbus_message_get_type() */ 232 | #define DBUS_MESSAGE_TYPE_INVALID 0 233 | /** Message type of a method call message, see dbus_message_get_type() */ 234 | #define DBUS_MESSAGE_TYPE_METHOD_CALL 1 235 | /** Message type of a method return message, see dbus_message_get_type() */ 236 | #define DBUS_MESSAGE_TYPE_METHOD_RETURN 2 237 | /** Message type of an error reply message, see dbus_message_get_type() */ 238 | #define DBUS_MESSAGE_TYPE_ERROR 3 239 | /** Message type of a signal message, see dbus_message_get_type() */ 240 | #define DBUS_MESSAGE_TYPE_SIGNAL 4 241 | 242 | #define DBUS_NUM_MESSAGE_TYPES 5 243 | 244 | /* Header flags */ 245 | 246 | /** If set, this flag means that the sender of a message does not care about getting 247 | * a reply, so the recipient need not send one. See dbus_message_set_no_reply(). 248 | */ 249 | #define DBUS_HEADER_FLAG_NO_REPLY_EXPECTED 0x1 250 | /** 251 | * If set, this flag means that even if the message bus knows how to start an owner for 252 | * the destination bus name (see dbus_message_set_destination()), it should not 253 | * do so. If this flag is not set, the bus may launch a program to process the 254 | * message. 255 | */ 256 | #define DBUS_HEADER_FLAG_NO_AUTO_START 0x2 257 | 258 | /* Header fields */ 259 | 260 | /** Not equal to any valid header field code */ 261 | #define DBUS_HEADER_FIELD_INVALID 0 262 | /** Header field code for the path - the path is the object emitting a signal or the object receiving a method call. 263 | * See dbus_message_set_path(). 264 | */ 265 | #define DBUS_HEADER_FIELD_PATH 1 266 | /** Header field code for the interface containing a member (method or signal). 267 | * See dbus_message_set_interface(). 268 | */ 269 | #define DBUS_HEADER_FIELD_INTERFACE 2 270 | /** Header field code for a member (method or signal). See dbus_message_set_member(). */ 271 | #define DBUS_HEADER_FIELD_MEMBER 3 272 | /** Header field code for an error name (found in #DBUS_MESSAGE_TYPE_ERROR messages). 273 | * See dbus_message_set_error_name(). 274 | */ 275 | #define DBUS_HEADER_FIELD_ERROR_NAME 4 276 | /** Header field code for a reply serial, used to match a #DBUS_MESSAGE_TYPE_METHOD_RETURN message with the 277 | * message that it's a reply to. See dbus_message_set_reply_serial(). 278 | */ 279 | #define DBUS_HEADER_FIELD_REPLY_SERIAL 5 280 | /** 281 | * Header field code for the destination bus name of a message. See dbus_message_set_destination(). 282 | */ 283 | #define DBUS_HEADER_FIELD_DESTINATION 6 284 | /** 285 | * Header field code for the sender of a message; usually initialized by the message bus. 286 | * See dbus_message_set_sender(). 287 | */ 288 | #define DBUS_HEADER_FIELD_SENDER 7 289 | /** 290 | * Header field code for the type signature of a message. 291 | */ 292 | #define DBUS_HEADER_FIELD_SIGNATURE 8 293 | /** 294 | * Header field code for the number of unix file descriptors associated 295 | * with this message. 296 | */ 297 | #define DBUS_HEADER_FIELD_UNIX_FDS 9 298 | 299 | 300 | /** 301 | * Value of the highest-numbered header field code, can be used to determine 302 | * the size of an array indexed by header field code. Remember though 303 | * that unknown codes must be ignored, so check for that before 304 | * indexing the array. 305 | */ 306 | #define DBUS_HEADER_FIELD_LAST DBUS_HEADER_FIELD_UNIX_FDS 307 | 308 | /** Header format is defined as a signature: 309 | * byte byte order 310 | * byte message type ID 311 | * byte flags 312 | * byte protocol version 313 | * uint32 body length 314 | * uint32 serial 315 | * array of struct (byte,variant) (field name, value) 316 | * 317 | * The length of the header can be computed as the 318 | * fixed size of the initial data, plus the length of 319 | * the array at the end, plus padding to an 8-boundary. 320 | */ 321 | #define DBUS_HEADER_SIGNATURE \ 322 | DBUS_TYPE_BYTE_AS_STRING \ 323 | DBUS_TYPE_BYTE_AS_STRING \ 324 | DBUS_TYPE_BYTE_AS_STRING \ 325 | DBUS_TYPE_BYTE_AS_STRING \ 326 | DBUS_TYPE_UINT32_AS_STRING \ 327 | DBUS_TYPE_UINT32_AS_STRING \ 328 | DBUS_TYPE_ARRAY_AS_STRING \ 329 | DBUS_STRUCT_BEGIN_CHAR_AS_STRING \ 330 | DBUS_TYPE_BYTE_AS_STRING \ 331 | DBUS_TYPE_VARIANT_AS_STRING \ 332 | DBUS_STRUCT_END_CHAR_AS_STRING 333 | 334 | 335 | /** 336 | * The smallest header size that can occur. (It won't be valid due to 337 | * missing required header fields.) This is 4 bytes, two uint32, an 338 | * array length. This isn't any kind of resource limit, just the 339 | * necessary/logical outcome of the header signature. 340 | */ 341 | #define DBUS_MINIMUM_HEADER_SIZE 16 342 | 343 | /* Errors */ 344 | /* WARNING these get autoconverted to an enum in dbus-glib.h. Thus, 345 | * if you change the order it breaks the ABI. Keep them in order. 346 | * Also, don't change the formatting since that will break the sed 347 | * script. 348 | */ 349 | /** A generic error; "something went wrong" - see the error message for more. */ 350 | #define DBUS_ERROR_FAILED "org.freedesktop.DBus.Error.Failed" 351 | /** There was not enough memory to complete an operation. */ 352 | #define DBUS_ERROR_NO_MEMORY "org.freedesktop.DBus.Error.NoMemory" 353 | /** The bus doesn't know how to launch a service to supply the bus name you wanted. */ 354 | #define DBUS_ERROR_SERVICE_UNKNOWN "org.freedesktop.DBus.Error.ServiceUnknown" 355 | /** The bus name you referenced doesn't exist (i.e. no application owns it). */ 356 | #define DBUS_ERROR_NAME_HAS_NO_OWNER "org.freedesktop.DBus.Error.NameHasNoOwner" 357 | /** No reply to a message expecting one, usually means a timeout occurred. */ 358 | #define DBUS_ERROR_NO_REPLY "org.freedesktop.DBus.Error.NoReply" 359 | /** Something went wrong reading or writing to a socket, for example. */ 360 | #define DBUS_ERROR_IO_ERROR "org.freedesktop.DBus.Error.IOError" 361 | /** A D-Bus bus address was malformed. */ 362 | #define DBUS_ERROR_BAD_ADDRESS "org.freedesktop.DBus.Error.BadAddress" 363 | /** Requested operation isn't supported (like ENOSYS on UNIX). */ 364 | #define DBUS_ERROR_NOT_SUPPORTED "org.freedesktop.DBus.Error.NotSupported" 365 | /** Some limited resource is exhausted. */ 366 | #define DBUS_ERROR_LIMITS_EXCEEDED "org.freedesktop.DBus.Error.LimitsExceeded" 367 | /** Security restrictions don't allow doing what you're trying to do. */ 368 | #define DBUS_ERROR_ACCESS_DENIED "org.freedesktop.DBus.Error.AccessDenied" 369 | /** Authentication didn't work. */ 370 | #define DBUS_ERROR_AUTH_FAILED "org.freedesktop.DBus.Error.AuthFailed" 371 | /** Unable to connect to server (probably caused by ECONNREFUSED on a socket). */ 372 | #define DBUS_ERROR_NO_SERVER "org.freedesktop.DBus.Error.NoServer" 373 | /** Certain timeout errors, possibly ETIMEDOUT on a socket. 374 | * Note that #DBUS_ERROR_NO_REPLY is used for message reply timeouts. 375 | * @warning this is confusingly-named given that #DBUS_ERROR_TIMED_OUT also exists. We can't fix 376 | * it for compatibility reasons so just be careful. 377 | */ 378 | #define DBUS_ERROR_TIMEOUT "org.freedesktop.DBus.Error.Timeout" 379 | /** No network access (probably ENETUNREACH on a socket). */ 380 | #define DBUS_ERROR_NO_NETWORK "org.freedesktop.DBus.Error.NoNetwork" 381 | /** Can't bind a socket since its address is in use (i.e. EADDRINUSE). */ 382 | #define DBUS_ERROR_ADDRESS_IN_USE "org.freedesktop.DBus.Error.AddressInUse" 383 | /** The connection is disconnected and you're trying to use it. */ 384 | #define DBUS_ERROR_DISCONNECTED "org.freedesktop.DBus.Error.Disconnected" 385 | /** Invalid arguments passed to a method call. */ 386 | #define DBUS_ERROR_INVALID_ARGS "org.freedesktop.DBus.Error.InvalidArgs" 387 | /** Missing file. */ 388 | #define DBUS_ERROR_FILE_NOT_FOUND "org.freedesktop.DBus.Error.FileNotFound" 389 | /** Existing file and the operation you're using does not silently overwrite. */ 390 | #define DBUS_ERROR_FILE_EXISTS "org.freedesktop.DBus.Error.FileExists" 391 | /** Method name you invoked isn't known by the object you invoked it on. */ 392 | #define DBUS_ERROR_UNKNOWN_METHOD "org.freedesktop.DBus.Error.UnknownMethod" 393 | /** Object you invoked a method on isn't known. */ 394 | #define DBUS_ERROR_UNKNOWN_OBJECT "org.freedesktop.DBus.Error.UnknownObject" 395 | /** Interface you invoked a method on isn't known by the object. */ 396 | #define DBUS_ERROR_UNKNOWN_INTERFACE "org.freedesktop.DBus.Error.UnknownInterface" 397 | /** Property you tried to access isn't known by the object. */ 398 | #define DBUS_ERROR_UNKNOWN_PROPERTY "org.freedesktop.DBus.Error.UnknownProperty" 399 | /** Property you tried to set is read-only. */ 400 | #define DBUS_ERROR_PROPERTY_READ_ONLY "org.freedesktop.DBus.Error.PropertyReadOnly" 401 | /** Certain timeout errors, e.g. while starting a service. 402 | * @warning this is confusingly-named given that #DBUS_ERROR_TIMEOUT also exists. We can't fix 403 | * it for compatibility reasons so just be careful. 404 | */ 405 | #define DBUS_ERROR_TIMED_OUT "org.freedesktop.DBus.Error.TimedOut" 406 | /** Tried to remove or modify a match rule that didn't exist. */ 407 | #define DBUS_ERROR_MATCH_RULE_NOT_FOUND "org.freedesktop.DBus.Error.MatchRuleNotFound" 408 | /** The match rule isn't syntactically valid. */ 409 | #define DBUS_ERROR_MATCH_RULE_INVALID "org.freedesktop.DBus.Error.MatchRuleInvalid" 410 | /** While starting a new process, the exec() call failed. */ 411 | #define DBUS_ERROR_SPAWN_EXEC_FAILED "org.freedesktop.DBus.Error.Spawn.ExecFailed" 412 | /** While starting a new process, the fork() call failed. */ 413 | #define DBUS_ERROR_SPAWN_FORK_FAILED "org.freedesktop.DBus.Error.Spawn.ForkFailed" 414 | /** While starting a new process, the child exited with a status code. */ 415 | #define DBUS_ERROR_SPAWN_CHILD_EXITED "org.freedesktop.DBus.Error.Spawn.ChildExited" 416 | /** While starting a new process, the child exited on a signal. */ 417 | #define DBUS_ERROR_SPAWN_CHILD_SIGNALED "org.freedesktop.DBus.Error.Spawn.ChildSignaled" 418 | /** While starting a new process, something went wrong. */ 419 | #define DBUS_ERROR_SPAWN_FAILED "org.freedesktop.DBus.Error.Spawn.Failed" 420 | /** We failed to setup the environment correctly. */ 421 | #define DBUS_ERROR_SPAWN_SETUP_FAILED "org.freedesktop.DBus.Error.Spawn.FailedToSetup" 422 | /** We failed to setup the config parser correctly. */ 423 | #define DBUS_ERROR_SPAWN_CONFIG_INVALID "org.freedesktop.DBus.Error.Spawn.ConfigInvalid" 424 | /** Bus name was not valid. */ 425 | #define DBUS_ERROR_SPAWN_SERVICE_INVALID "org.freedesktop.DBus.Error.Spawn.ServiceNotValid" 426 | /** Service file not found in system-services directory. */ 427 | #define DBUS_ERROR_SPAWN_SERVICE_NOT_FOUND "org.freedesktop.DBus.Error.Spawn.ServiceNotFound" 428 | /** Permissions are incorrect on the setuid helper. */ 429 | #define DBUS_ERROR_SPAWN_PERMISSIONS_INVALID "org.freedesktop.DBus.Error.Spawn.PermissionsInvalid" 430 | /** Service file invalid (Name, User or Exec missing). */ 431 | #define DBUS_ERROR_SPAWN_FILE_INVALID "org.freedesktop.DBus.Error.Spawn.FileInvalid" 432 | /** Tried to get a UNIX process ID and it wasn't available. */ 433 | #define DBUS_ERROR_SPAWN_NO_MEMORY "org.freedesktop.DBus.Error.Spawn.NoMemory" 434 | /** Tried to get a UNIX process ID and it wasn't available. */ 435 | #define DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN "org.freedesktop.DBus.Error.UnixProcessIdUnknown" 436 | /** A type signature is not valid. */ 437 | #define DBUS_ERROR_INVALID_SIGNATURE "org.freedesktop.DBus.Error.InvalidSignature" 438 | /** A file contains invalid syntax or is otherwise broken. */ 439 | #define DBUS_ERROR_INVALID_FILE_CONTENT "org.freedesktop.DBus.Error.InvalidFileContent" 440 | /** Asked for SELinux security context and it wasn't available. */ 441 | #define DBUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown" 442 | /** Asked for ADT audit data and it wasn't available. */ 443 | #define DBUS_ERROR_ADT_AUDIT_DATA_UNKNOWN "org.freedesktop.DBus.Error.AdtAuditDataUnknown" 444 | /** There's already an object with the requested object path. */ 445 | #define DBUS_ERROR_OBJECT_PATH_IN_USE "org.freedesktop.DBus.Error.ObjectPathInUse" 446 | /** The message meta data does not match the payload. e.g. expected 447 | number of file descriptors were not sent over the socket this message was received on. */ 448 | #define DBUS_ERROR_INCONSISTENT_MESSAGE "org.freedesktop.DBus.Error.InconsistentMessage" 449 | 450 | /* XML introspection format */ 451 | 452 | /** XML namespace of the introspection format version 1.0 */ 453 | #define DBUS_INTROSPECT_1_0_XML_NAMESPACE "http://www.freedesktop.org/standards/dbus" 454 | /** XML public identifier of the introspection format version 1.0 */ 455 | #define DBUS_INTROSPECT_1_0_XML_PUBLIC_IDENTIFIER "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" 456 | /** XML system identifier of the introspection format version 1.0 */ 457 | #define DBUS_INTROSPECT_1_0_XML_SYSTEM_IDENTIFIER "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd" 458 | /** XML document type declaration of the introspection format version 1.0 */ 459 | #define DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE "\n" 460 | 461 | /** @} */ 462 | 463 | #ifdef __cplusplus 464 | #if 0 465 | { /* avoids confusing emacs indentation */ 466 | #endif 467 | } 468 | #endif 469 | 470 | #endif /* DBUS_PROTOCOL_H */ 471 | -------------------------------------------------------------------------------- /include/dbus-1.0/dbus/dbus-server.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ 2 | /* dbus-server.h DBusServer object 3 | * 4 | * Copyright (C) 2002, 2003 Red Hat Inc. 5 | * 6 | * Licensed under the Academic Free License version 2.1 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | * 22 | */ 23 | #if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) 24 | #error "Only can be included directly, this file may disappear or change contents." 25 | #endif 26 | 27 | #ifndef DBUS_SERVER_H 28 | #define DBUS_SERVER_H 29 | 30 | #include 31 | #include 32 | #include 33 | #include 34 | 35 | DBUS_BEGIN_DECLS 36 | 37 | /** 38 | * @addtogroup DBusServer 39 | * @{ 40 | */ 41 | 42 | typedef struct DBusServer DBusServer; 43 | 44 | /** Called when a new connection to the server is available. Must reference and save the new 45 | * connection, or close the new connection. Set with dbus_server_set_new_connection_function(). 46 | */ 47 | typedef void (* DBusNewConnectionFunction) (DBusServer *server, 48 | DBusConnection *new_connection, 49 | void *data); 50 | 51 | 52 | DBusServer* dbus_server_listen (const char *address, 53 | DBusError *error); 54 | 55 | DBusServer* dbus_server_ref (DBusServer *server); 56 | 57 | #define dbus_server_unref(a) ((void)0) 58 | 59 | #define dbus_server_disconnect(a) ((void)0) 60 | 61 | dbus_bool_t dbus_server_get_is_connected (DBusServer *server); 62 | 63 | char* dbus_server_get_address (DBusServer *server); 64 | 65 | char* dbus_server_get_id (DBusServer *server); 66 | 67 | #define dbus_server_set_new_connection_function(a,b,c,d) ((void)0) 68 | 69 | dbus_bool_t dbus_server_set_watch_functions (DBusServer *server, 70 | DBusAddWatchFunction add_function, 71 | DBusRemoveWatchFunction remove_function, 72 | DBusWatchToggledFunction toggled_function, 73 | void *data, 74 | DBusFreeFunction free_data_function); 75 | 76 | dbus_bool_t dbus_server_set_timeout_functions (DBusServer *server, 77 | DBusAddTimeoutFunction add_function, 78 | DBusRemoveTimeoutFunction remove_function, 79 | DBusTimeoutToggledFunction toggled_function, 80 | void *data, 81 | DBusFreeFunction free_data_function); 82 | 83 | dbus_bool_t dbus_server_set_auth_mechanisms (DBusServer *server, 84 | const char **mechanisms); 85 | 86 | 87 | dbus_bool_t dbus_server_allocate_data_slot (dbus_int32_t *slot_p); 88 | 89 | #define dbus_server_free_data_slot(a) ((void)0) 90 | 91 | dbus_bool_t dbus_server_set_data (DBusServer *server, 92 | int slot, 93 | void *data, 94 | DBusFreeFunction free_data_func); 95 | 96 | void* dbus_server_get_data (DBusServer *server, 97 | int slot); 98 | 99 | /** @} */ 100 | 101 | DBUS_END_DECLS 102 | 103 | #endif /* DBUS_SERVER_H */ 104 | -------------------------------------------------------------------------------- /include/dbus-1.0/dbus/dbus-shared.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ 2 | /* dbus-shared.h Stuff used by both dbus/dbus.h low-level and C/C++ binding APIs 3 | * 4 | * Copyright (C) 2004 Red Hat, Inc. 5 | * 6 | * Licensed under the Academic Free License version 2.1 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | * 22 | */ 23 | 24 | #ifndef DBUS_SHARED_H 25 | #define DBUS_SHARED_H 26 | 27 | /* Don't include anything in here from anywhere else. It's 28 | * intended for use by any random library. 29 | */ 30 | 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #if 0 34 | } /* avoids confusing emacs indentation */ 35 | #endif 36 | #endif 37 | 38 | /* Normally docs are in .c files, but there isn't a .c file for this. */ 39 | /** 40 | * @defgroup DBusShared Shared constants 41 | * @ingroup DBus 42 | * 43 | * @brief Shared header included by both libdbus and C/C++ bindings such as the GLib bindings. 44 | * 45 | * Usually a C/C++ binding such as the GLib or Qt binding won't want to include dbus.h in its 46 | * public headers. However, a few constants and macros may be useful to include; those are 47 | * found here and in dbus-protocol.h 48 | * 49 | * @{ 50 | */ 51 | 52 | 53 | /** 54 | * Well-known bus types. See dbus_bus_get(). 55 | */ 56 | typedef enum 57 | { 58 | DBUS_BUS_SESSION, /**< The login session bus */ 59 | DBUS_BUS_SYSTEM, /**< The systemwide bus */ 60 | DBUS_BUS_STARTER /**< The bus that started us, if any */ 61 | } DBusBusType; 62 | 63 | /** 64 | * Results that a message handler can return. 65 | */ 66 | typedef enum 67 | { 68 | DBUS_HANDLER_RESULT_HANDLED, /**< Message has had its effect - no need to run more handlers. */ 69 | DBUS_HANDLER_RESULT_NOT_YET_HANDLED, /**< Message has not had any effect - see if other handlers want it. */ 70 | DBUS_HANDLER_RESULT_NEED_MEMORY /**< Need more memory in order to return #DBUS_HANDLER_RESULT_HANDLED or #DBUS_HANDLER_RESULT_NOT_YET_HANDLED. Please try again later with more memory. */ 71 | } DBusHandlerResult; 72 | 73 | /* Bus names */ 74 | 75 | /** The bus name used to talk to the bus itself. */ 76 | #define DBUS_SERVICE_DBUS "org.freedesktop.DBus" 77 | 78 | /* Paths */ 79 | /** The object path used to talk to the bus itself. */ 80 | #define DBUS_PATH_DBUS "/org/freedesktop/DBus" 81 | /** The object path used in local/in-process-generated messages. */ 82 | #define DBUS_PATH_LOCAL "/org/freedesktop/DBus/Local" 83 | 84 | /* Interfaces, these #define don't do much other than 85 | * catch typos at compile time 86 | */ 87 | /** The interface exported by the object with #DBUS_SERVICE_DBUS and #DBUS_PATH_DBUS */ 88 | #define DBUS_INTERFACE_DBUS "org.freedesktop.DBus" 89 | /** The interface supported by introspectable objects */ 90 | #define DBUS_INTERFACE_INTROSPECTABLE "org.freedesktop.DBus.Introspectable" 91 | /** The interface supported by objects with properties */ 92 | #define DBUS_INTERFACE_PROPERTIES "org.freedesktop.DBus.Properties" 93 | /** The interface supported by most dbus peers */ 94 | #define DBUS_INTERFACE_PEER "org.freedesktop.DBus.Peer" 95 | 96 | /** This is a special interface whose methods can only be invoked 97 | * by the local implementation (messages from remote apps aren't 98 | * allowed to specify this interface). 99 | */ 100 | #define DBUS_INTERFACE_LOCAL "org.freedesktop.DBus.Local" 101 | 102 | /* Owner flags */ 103 | #define DBUS_NAME_FLAG_ALLOW_REPLACEMENT 0x1 /**< Allow another service to become the primary owner if requested */ 104 | #define DBUS_NAME_FLAG_REPLACE_EXISTING 0x2 /**< Request to replace the current primary owner */ 105 | #define DBUS_NAME_FLAG_DO_NOT_QUEUE 0x4 /**< If we can not become the primary owner do not place us in the queue */ 106 | 107 | /* Replies to request for a name */ 108 | #define DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER 1 /**< Service has become the primary owner of the requested name */ 109 | #define DBUS_REQUEST_NAME_REPLY_IN_QUEUE 2 /**< Service could not become the primary owner and has been placed in the queue */ 110 | #define DBUS_REQUEST_NAME_REPLY_EXISTS 3 /**< Service is already in the queue */ 111 | #define DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER 4 /**< Service is already the primary owner */ 112 | 113 | /* Replies to releasing a name */ 114 | #define DBUS_RELEASE_NAME_REPLY_RELEASED 1 /**< Service was released from the given name */ 115 | #define DBUS_RELEASE_NAME_REPLY_NON_EXISTENT 2 /**< The given name does not exist on the bus */ 116 | #define DBUS_RELEASE_NAME_REPLY_NOT_OWNER 3 /**< Service is not an owner of the given name */ 117 | 118 | /* Replies to service starts */ 119 | #define DBUS_START_REPLY_SUCCESS 1 /**< Service was auto started */ 120 | #define DBUS_START_REPLY_ALREADY_RUNNING 2 /**< Service was already running */ 121 | 122 | /** @} */ 123 | 124 | #ifdef __cplusplus 125 | #if 0 126 | { /* avoids confusing emacs indentation */ 127 | #endif 128 | } 129 | #endif 130 | 131 | #endif /* DBUS_SHARED_H */ 132 | -------------------------------------------------------------------------------- /include/dbus-1.0/dbus/dbus-signature.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ 2 | /* dbus-signatures.h utility functions for D-Bus types 3 | * 4 | * Copyright (C) 2005 Red Hat Inc. 5 | * 6 | * Licensed under the Academic Free License version 2.1 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | * 22 | */ 23 | #if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) 24 | #error "Only can be included directly, this file may disappear or change contents." 25 | #endif 26 | 27 | #ifndef DBUS_SIGNATURES_H 28 | #define DBUS_SIGNATURES_H 29 | 30 | #include 31 | #include 32 | #include 33 | 34 | DBUS_BEGIN_DECLS 35 | 36 | /** 37 | * @addtogroup DBusSignature 38 | * @{ 39 | */ 40 | 41 | /** 42 | * DBusSignatureIter struct; contains no public fields 43 | */ 44 | typedef struct 45 | { 46 | void *dummy1; /**< Don't use this */ 47 | void *dummy2; /**< Don't use this */ 48 | dbus_uint32_t dummy8; /**< Don't use this */ 49 | int dummy12; /**< Don't use this */ 50 | int dummy17; /**< Don't use this */ 51 | } DBusSignatureIter; 52 | 53 | 54 | #define dbus_signature_iter_init(a,b) ((void)0) 55 | 56 | 57 | int dbus_signature_iter_get_current_type (const DBusSignatureIter *iter); 58 | 59 | 60 | char * dbus_signature_iter_get_signature (const DBusSignatureIter *iter); 61 | 62 | 63 | int dbus_signature_iter_get_element_type (const DBusSignatureIter *iter); 64 | 65 | 66 | dbus_bool_t dbus_signature_iter_next (DBusSignatureIter *iter); 67 | 68 | 69 | #define dbus_signature_iter_recurse(a,b) ((void)0) 70 | 71 | 72 | dbus_bool_t dbus_signature_validate (const char *signature, 73 | DBusError *error); 74 | 75 | 76 | dbus_bool_t dbus_signature_validate_single (const char *signature, 77 | DBusError *error); 78 | 79 | 80 | dbus_bool_t dbus_type_is_basic (int typecode); 81 | 82 | dbus_bool_t dbus_type_is_container (int typecode); 83 | 84 | dbus_bool_t dbus_type_is_fixed (int typecode); 85 | 86 | /** @} */ 87 | 88 | DBUS_END_DECLS 89 | 90 | #endif /* DBUS_SIGNATURE_H */ 91 | -------------------------------------------------------------------------------- /include/dbus-1.0/dbus/dbus-threads.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ 2 | /* dbus-threads.h D-Bus threads handling 3 | * 4 | * Copyright (C) 2002 Red Hat Inc. 5 | * 6 | * Licensed under the Academic Free License version 2.1 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | * 22 | */ 23 | #if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) 24 | #error "Only can be included directly, this file may disappear or change contents." 25 | #endif 26 | 27 | #ifndef DBUS_THREADS_H 28 | #define DBUS_THREADS_H 29 | 30 | #include 31 | #include 32 | 33 | DBUS_BEGIN_DECLS 34 | 35 | /** 36 | * @addtogroup DBusThreads 37 | * @{ 38 | */ 39 | 40 | /** An opaque mutex type provided by the #DBusThreadFunctions implementation installed by dbus_threads_init(). */ 41 | typedef struct DBusMutex DBusMutex; 42 | /** An opaque condition variable type provided by the #DBusThreadFunctions implementation installed by dbus_threads_init(). */ 43 | typedef struct DBusCondVar DBusCondVar; 44 | 45 | /** Deprecated, provide DBusRecursiveMutexNewFunction instead. */ 46 | typedef DBusMutex* (* DBusMutexNewFunction) (void); 47 | /** Deprecated, provide DBusRecursiveMutexFreeFunction instead. */ 48 | typedef void (* DBusMutexFreeFunction) (DBusMutex *mutex); 49 | /** Deprecated, provide DBusRecursiveMutexLockFunction instead. Return value is lock success, but gets ignored in practice. */ 50 | typedef dbus_bool_t (* DBusMutexLockFunction) (DBusMutex *mutex); 51 | /** Deprecated, provide DBusRecursiveMutexUnlockFunction instead. Return value is unlock success, but gets ignored in practice. */ 52 | typedef dbus_bool_t (* DBusMutexUnlockFunction) (DBusMutex *mutex); 53 | 54 | /** Creates a new recursively-lockable mutex, or returns #NULL if not 55 | * enough memory. Can only fail due to lack of memory. Found in 56 | * #DBusThreadFunctions. Do not just use PTHREAD_MUTEX_RECURSIVE for 57 | * this, because it does not save/restore the recursion count when 58 | * waiting on a condition. libdbus requires the Java-style behavior 59 | * where the mutex is fully unlocked to wait on a condition. 60 | */ 61 | typedef DBusMutex* (* DBusRecursiveMutexNewFunction) (void); 62 | /** Frees a recursively-lockable mutex. Found in #DBusThreadFunctions. 63 | */ 64 | typedef void (* DBusRecursiveMutexFreeFunction) (DBusMutex *mutex); 65 | /** Locks a recursively-lockable mutex. Found in #DBusThreadFunctions. 66 | * Can only fail due to lack of memory. 67 | */ 68 | typedef void (* DBusRecursiveMutexLockFunction) (DBusMutex *mutex); 69 | /** Unlocks a recursively-lockable mutex. Found in #DBusThreadFunctions. 70 | * Can only fail due to lack of memory. 71 | */ 72 | typedef void (* DBusRecursiveMutexUnlockFunction) (DBusMutex *mutex); 73 | 74 | /** Creates a new condition variable. Found in #DBusThreadFunctions. 75 | * Can only fail (returning #NULL) due to lack of memory. 76 | */ 77 | typedef DBusCondVar* (* DBusCondVarNewFunction) (void); 78 | /** Frees a condition variable. Found in #DBusThreadFunctions. 79 | */ 80 | typedef void (* DBusCondVarFreeFunction) (DBusCondVar *cond); 81 | 82 | /** Waits on a condition variable. Found in 83 | * #DBusThreadFunctions. Must work with either a recursive or 84 | * nonrecursive mutex, whichever the thread implementation 85 | * provides. Note that PTHREAD_MUTEX_RECURSIVE does not work with 86 | * condition variables (does not save/restore the recursion count) so 87 | * don't try using simply pthread_cond_wait() and a 88 | * PTHREAD_MUTEX_RECURSIVE to implement this, it won't work right. 89 | * 90 | * Has no error conditions. Must succeed if it returns. 91 | */ 92 | typedef void (* DBusCondVarWaitFunction) (DBusCondVar *cond, 93 | DBusMutex *mutex); 94 | 95 | /** Waits on a condition variable with a timeout. Found in 96 | * #DBusThreadFunctions. Returns #TRUE if the wait did not 97 | * time out, and #FALSE if it did. 98 | * 99 | * Has no error conditions. Must succeed if it returns. 100 | */ 101 | typedef dbus_bool_t (* DBusCondVarWaitTimeoutFunction) (DBusCondVar *cond, 102 | DBusMutex *mutex, 103 | int timeout_milliseconds); 104 | /** Wakes one waiting thread on a condition variable. Found in #DBusThreadFunctions. 105 | * 106 | * Has no error conditions. Must succeed if it returns. 107 | */ 108 | typedef void (* DBusCondVarWakeOneFunction) (DBusCondVar *cond); 109 | 110 | /** Wakes all waiting threads on a condition variable. Found in #DBusThreadFunctions. 111 | * 112 | * Has no error conditions. Must succeed if it returns. 113 | */ 114 | typedef void (* DBusCondVarWakeAllFunction) (DBusCondVar *cond); 115 | 116 | /** 117 | * Flags indicating which functions are present in #DBusThreadFunctions. Used to allow 118 | * the library to detect older callers of dbus_threads_init() if new possible functions 119 | * are added to #DBusThreadFunctions. 120 | */ 121 | typedef enum 122 | { 123 | DBUS_THREAD_FUNCTIONS_MUTEX_NEW_MASK = 1 << 0, 124 | DBUS_THREAD_FUNCTIONS_MUTEX_FREE_MASK = 1 << 1, 125 | DBUS_THREAD_FUNCTIONS_MUTEX_LOCK_MASK = 1 << 2, 126 | DBUS_THREAD_FUNCTIONS_MUTEX_UNLOCK_MASK = 1 << 3, 127 | DBUS_THREAD_FUNCTIONS_CONDVAR_NEW_MASK = 1 << 4, 128 | DBUS_THREAD_FUNCTIONS_CONDVAR_FREE_MASK = 1 << 5, 129 | DBUS_THREAD_FUNCTIONS_CONDVAR_WAIT_MASK = 1 << 6, 130 | DBUS_THREAD_FUNCTIONS_CONDVAR_WAIT_TIMEOUT_MASK = 1 << 7, 131 | DBUS_THREAD_FUNCTIONS_CONDVAR_WAKE_ONE_MASK = 1 << 8, 132 | DBUS_THREAD_FUNCTIONS_CONDVAR_WAKE_ALL_MASK = 1 << 9, 133 | DBUS_THREAD_FUNCTIONS_RECURSIVE_MUTEX_NEW_MASK = 1 << 10, 134 | DBUS_THREAD_FUNCTIONS_RECURSIVE_MUTEX_FREE_MASK = 1 << 11, 135 | DBUS_THREAD_FUNCTIONS_RECURSIVE_MUTEX_LOCK_MASK = 1 << 12, 136 | DBUS_THREAD_FUNCTIONS_RECURSIVE_MUTEX_UNLOCK_MASK = 1 << 13, 137 | DBUS_THREAD_FUNCTIONS_ALL_MASK = (1 << 14) - 1 138 | } DBusThreadFunctionsMask; 139 | 140 | /** 141 | * Functions that must be implemented to make the D-Bus library 142 | * thread-aware. The recursive mutex functions should be specified 143 | * rather than the old, deprecated nonrecursive ones. 144 | * 145 | * The condition variable functions have to work with recursive 146 | * mutexes if you provide those, or with nonrecursive mutexes if you 147 | * provide those. 148 | * 149 | * If implementing threads using pthreads, be aware that 150 | * PTHREAD_MUTEX_RECURSIVE is broken in combination with condition 151 | * variables. libdbus relies on the Java-style behavior that when 152 | * waiting on a condition, the recursion count is saved and restored, 153 | * and the mutex is completely unlocked, not just decremented one 154 | * level of recursion. 155 | * 156 | * Thus with pthreads you probably have to roll your own emulated 157 | * recursive mutexes, you can't use PTHREAD_MUTEX_RECURSIVE. This is 158 | * what dbus_threads_init_default() does on platforms that use 159 | * pthreads. 160 | */ 161 | typedef struct 162 | { 163 | unsigned int mask; /**< Mask indicating which functions are present. */ 164 | 165 | DBusMutexNewFunction mutex_new; /**< Function to create a mutex; optional and deprecated. */ 166 | DBusMutexFreeFunction mutex_free; /**< Function to free a mutex; optional and deprecated. */ 167 | DBusMutexLockFunction mutex_lock; /**< Function to lock a mutex; optional and deprecated. */ 168 | DBusMutexUnlockFunction mutex_unlock; /**< Function to unlock a mutex; optional and deprecated. */ 169 | 170 | DBusCondVarNewFunction condvar_new; /**< Function to create a condition variable */ 171 | DBusCondVarFreeFunction condvar_free; /**< Function to free a condition variable */ 172 | DBusCondVarWaitFunction condvar_wait; /**< Function to wait on a condition */ 173 | DBusCondVarWaitTimeoutFunction condvar_wait_timeout; /**< Function to wait on a condition with a timeout */ 174 | DBusCondVarWakeOneFunction condvar_wake_one; /**< Function to wake one thread waiting on the condition */ 175 | DBusCondVarWakeAllFunction condvar_wake_all; /**< Function to wake all threads waiting on the condition */ 176 | 177 | DBusRecursiveMutexNewFunction recursive_mutex_new; /**< Function to create a recursive mutex */ 178 | DBusRecursiveMutexFreeFunction recursive_mutex_free; /**< Function to free a recursive mutex */ 179 | DBusRecursiveMutexLockFunction recursive_mutex_lock; /**< Function to lock a recursive mutex */ 180 | DBusRecursiveMutexUnlockFunction recursive_mutex_unlock; /**< Function to unlock a recursive mutex */ 181 | 182 | void (* padding1) (void); /**< Reserved for future expansion */ 183 | void (* padding2) (void); /**< Reserved for future expansion */ 184 | void (* padding3) (void); /**< Reserved for future expansion */ 185 | void (* padding4) (void); /**< Reserved for future expansion */ 186 | 187 | } DBusThreadFunctions; 188 | 189 | 190 | dbus_bool_t dbus_threads_init (const DBusThreadFunctions *functions); 191 | 192 | dbus_bool_t dbus_threads_init_default (void); 193 | 194 | /** @} */ 195 | 196 | DBUS_END_DECLS 197 | 198 | #endif /* DBUS_THREADS_H */ 199 | -------------------------------------------------------------------------------- /include/dbus-1.0/dbus/dbus-types.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ 2 | /* dbus-types.h types such as dbus_bool_t 3 | * 4 | * Copyright (C) 2002 Red Hat Inc. 5 | * 6 | * Licensed under the Academic Free License version 2.1 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | * 22 | */ 23 | #if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) 24 | #error "Only can be included directly, this file may disappear or change contents." 25 | #endif 26 | 27 | #ifndef DBUS_TYPES_H 28 | #define DBUS_TYPES_H 29 | 30 | #include 31 | #include 32 | 33 | typedef dbus_uint32_t dbus_unichar_t; 34 | /* boolean size must be fixed at 4 bytes due to wire protocol! */ 35 | typedef dbus_uint32_t dbus_bool_t; 36 | 37 | /* Normally docs are in .c files, but there isn't a .c file for this. */ 38 | /** 39 | * @defgroup DBusTypes Basic types 40 | * @ingroup DBus 41 | * @brief dbus_bool_t, dbus_int32_t, etc. 42 | * 43 | * Typedefs for common primitive types. 44 | * 45 | * @{ 46 | */ 47 | 48 | /** 49 | * @typedef dbus_bool_t 50 | * 51 | * A boolean, valid values are #TRUE and #FALSE. 52 | */ 53 | 54 | /** 55 | * @typedef dbus_uint32_t 56 | * 57 | * A 32-bit unsigned integer on all platforms. 58 | */ 59 | 60 | /** 61 | * @typedef dbus_int32_t 62 | * 63 | * A 32-bit signed integer on all platforms. 64 | */ 65 | 66 | /** 67 | * @typedef dbus_uint16_t 68 | * 69 | * A 16-bit unsigned integer on all platforms. 70 | */ 71 | 72 | /** 73 | * @typedef dbus_int16_t 74 | * 75 | * A 16-bit signed integer on all platforms. 76 | */ 77 | 78 | 79 | /** 80 | * @typedef dbus_uint64_t 81 | * 82 | * A 64-bit unsigned integer on all platforms that support it. 83 | * If supported, #DBUS_HAVE_INT64 will be defined. 84 | * 85 | * C99 requires a 64-bit type and most likely all interesting 86 | * compilers support one. GLib for example flat-out requires 87 | * a 64-bit type. 88 | * 89 | * You probably want to just assume #DBUS_HAVE_INT64 is always defined. 90 | */ 91 | 92 | /** 93 | * @typedef dbus_int64_t 94 | * 95 | * A 64-bit signed integer on all platforms that support it. 96 | * If supported, #DBUS_HAVE_INT64 will be defined. 97 | * 98 | * C99 requires a 64-bit type and most likely all interesting 99 | * compilers support one. GLib for example flat-out requires 100 | * a 64-bit type. 101 | * 102 | * You probably want to just assume #DBUS_HAVE_INT64 is always defined. 103 | */ 104 | 105 | /** 106 | * @def DBUS_HAVE_INT64 107 | * 108 | * Defined if 64-bit integers are available. Will be defined 109 | * on any platform you care about, unless you care about 110 | * some truly ancient UNIX, or some bizarre embedded platform. 111 | * 112 | * C99 requires a 64-bit type and most likely all interesting 113 | * compilers support one. GLib for example flat-out requires 114 | * a 64-bit type. 115 | * 116 | * You should feel comfortable ignoring this macro and just using 117 | * int64 unconditionally. 118 | * 119 | */ 120 | 121 | /** 122 | * @def DBUS_INT64_CONSTANT 123 | * 124 | * Declare a 64-bit signed integer constant. The macro 125 | * adds the necessary "LL" or whatever after the integer, 126 | * giving a literal such as "325145246765LL" 127 | */ 128 | 129 | /** 130 | * @def DBUS_UINT64_CONSTANT 131 | * 132 | * Declare a 64-bit unsigned integer constant. The macro 133 | * adds the necessary "ULL" or whatever after the integer, 134 | * giving a literal such as "325145246765ULL" 135 | */ 136 | 137 | /** @} */ 138 | 139 | #endif /* DBUS_TYPES_H */ 140 | -------------------------------------------------------------------------------- /include/dbus-1.0/dbus/dbus.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ 2 | /* dbus.h Convenience header including all other headers 3 | * 4 | * Copyright (C) 2002, 2003 Red Hat Inc. 5 | * 6 | * Licensed under the Academic Free License version 2.1 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | * 22 | */ 23 | 24 | #ifndef DBUS_H 25 | #define DBUS_H 26 | 27 | #define DBUS_INSIDE_DBUS_H 1 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | 45 | #undef DBUS_INSIDE_DBUS_H 46 | 47 | #endif /* DBUS_H */ 48 | -------------------------------------------------------------------------------- /stubs.c: -------------------------------------------------------------------------------- 1 | #include "include/dbus-1.0/dbus/dbus.h" 2 | #include "include/dbus-1.0/dbus/dbus-glib.h" 3 | #include 4 | #include 5 | 6 | static const char *empty = ""; 7 | 8 | static GError gerr = {.domain = 0, .code = G_FILE_ERROR_NOENT, .message = "" }; 9 | 10 | dbus_bool_t dbus_parse_address (const char *a, 11 | DBusAddressEntry ***b, 12 | int *c, 13 | DBusError *d) { 14 | return TRUE; 15 | } 16 | 17 | const char *dbus_address_entry_get_value (DBusAddressEntry *entry, 18 | const char *key) { 19 | return empty; 20 | } 21 | 22 | const char *dbus_address_entry_get_method (DBusAddressEntry *entry) { 23 | return empty; 24 | } 25 | 26 | char* dbus_address_escape_value (const char *value) { 27 | return NULL; 28 | } 29 | 30 | char* dbus_address_unescape_value (const char *value, 31 | DBusError *error) { 32 | return NULL; 33 | } 34 | 35 | DBusConnection *dbus_bus_get (DBusBusType type, 36 | DBusError *error) { 37 | return NULL; 38 | } 39 | 40 | DBusConnection *dbus_bus_get_private (DBusBusType type, 41 | DBusError *error) { 42 | return NULL; 43 | } 44 | 45 | dbus_bool_t dbus_bus_register (DBusConnection *connection, 46 | DBusError *error) { 47 | return TRUE; 48 | } 49 | 50 | dbus_bool_t dbus_bus_set_unique_name (DBusConnection *connection, 51 | const char *unique_name) { 52 | return TRUE; 53 | } 54 | 55 | const char* dbus_bus_get_unique_name (DBusConnection *connection) { 56 | return empty; 57 | } 58 | 59 | unsigned long dbus_bus_get_unix_user (DBusConnection *connection, 60 | const char *name, 61 | DBusError *error) { 62 | return 0; 63 | } 64 | 65 | char* dbus_bus_get_id (DBusConnection *connection, 66 | DBusError *error) { 67 | return strdup(empty); 68 | } 69 | 70 | int dbus_bus_request_name (DBusConnection *connection, 71 | const char *name, 72 | unsigned int flags, 73 | DBusError *error) { 74 | return DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER; 75 | } 76 | 77 | int dbus_bus_release_name (DBusConnection *connection, 78 | const char *name, 79 | DBusError *error) { 80 | return DBUS_RELEASE_NAME_REPLY_RELEASED; 81 | } 82 | 83 | dbus_bool_t dbus_bus_name_has_owner (DBusConnection *connection, 84 | const char *name, 85 | DBusError *error) { 86 | return TRUE; 87 | } 88 | 89 | dbus_bool_t dbus_bus_start_service_by_name (DBusConnection *connection, 90 | const char *name, 91 | dbus_uint32_t flags, 92 | dbus_uint32_t *reply, 93 | DBusError *error) { 94 | return TRUE; 95 | } 96 | 97 | DBusConnection* dbus_connection_open (const char *address, 98 | DBusError *error) { 99 | return NULL; 100 | } 101 | 102 | DBusConnection* dbus_connection_open_private (const char *address, 103 | DBusError *error) { 104 | return NULL; 105 | } 106 | 107 | DBusConnection* dbus_connection_ref (DBusConnection *connection) { 108 | return connection; 109 | } 110 | 111 | dbus_bool_t dbus_connection_get_is_connected (DBusConnection *connection) { 112 | return TRUE; 113 | } 114 | 115 | dbus_bool_t dbus_connection_get_is_authenticated (DBusConnection *connection) { 116 | return TRUE; 117 | } 118 | 119 | dbus_bool_t dbus_connection_get_is_anonymous (DBusConnection *connection) { 120 | return TRUE; 121 | } 122 | 123 | char* dbus_connection_get_server_id (DBusConnection *connection) { 124 | return strdup(empty); 125 | } 126 | 127 | dbus_bool_t dbus_connection_can_send_type (DBusConnection *connection, 128 | int type) { 129 | return TRUE; 130 | } 131 | 132 | dbus_bool_t dbus_connection_read_write_dispatch (DBusConnection *connection, 133 | int timeout_milliseconds) { 134 | return TRUE; 135 | } 136 | 137 | dbus_bool_t dbus_connection_read_write (DBusConnection *connection, 138 | int timeout_milliseconds) { 139 | return TRUE; 140 | } 141 | 142 | DBusMessage* dbus_connection_borrow_message (DBusConnection *connection) { 143 | return NULL; 144 | } 145 | 146 | DBusMessage* dbus_connection_pop_message (DBusConnection *connection) { 147 | return NULL; 148 | } 149 | 150 | DBusDispatchStatus dbus_connection_get_dispatch_status (DBusConnection *connection) { 151 | return DBUS_DISPATCH_COMPLETE; 152 | } 153 | 154 | DBusDispatchStatus dbus_connection_dispatch (DBusConnection *connection) { 155 | return DBUS_DISPATCH_COMPLETE; 156 | } 157 | 158 | dbus_bool_t dbus_connection_has_messages_to_send (DBusConnection *connection) { 159 | return FALSE; 160 | } 161 | 162 | dbus_bool_t dbus_connection_send (DBusConnection *connection, 163 | DBusMessage *message, 164 | dbus_uint32_t *client_serial) { 165 | return TRUE; 166 | } 167 | 168 | dbus_bool_t dbus_connection_send_with_reply (DBusConnection *connection, 169 | DBusMessage *message, 170 | DBusPendingCall **pending_return, 171 | int timeout_milliseconds) { 172 | return TRUE; 173 | } 174 | 175 | DBusMessage * dbus_connection_send_with_reply_and_block (DBusConnection *connection, 176 | DBusMessage *message, 177 | int timeout_milliseconds, 178 | DBusError *error) { 179 | return NULL; 180 | } 181 | 182 | dbus_bool_t dbus_connection_set_watch_functions (DBusConnection *connection, 183 | DBusAddWatchFunction add_function, 184 | DBusRemoveWatchFunction remove_function, 185 | DBusWatchToggledFunction toggled_function, 186 | void *data, 187 | DBusFreeFunction free_data_function) { 188 | return TRUE; 189 | } 190 | 191 | dbus_bool_t dbus_connection_set_timeout_functions (DBusConnection *connection, 192 | DBusAddTimeoutFunction add_function, 193 | DBusRemoveTimeoutFunction remove_function, 194 | DBusTimeoutToggledFunction toggled_function, 195 | void *data, 196 | DBusFreeFunction free_data_function) { 197 | return TRUE; 198 | } 199 | 200 | dbus_bool_t dbus_connection_get_unix_user (DBusConnection *connection, 201 | unsigned long *uid) { 202 | return FALSE; 203 | } 204 | 205 | dbus_bool_t dbus_connection_get_unix_process_id (DBusConnection *connection, 206 | unsigned long *pid) { 207 | return FALSE; 208 | } 209 | 210 | dbus_bool_t dbus_connection_get_adt_audit_session_data (DBusConnection *connection, 211 | void **data, 212 | dbus_int32_t *data_size) { 213 | return FALSE; 214 | } 215 | 216 | dbus_bool_t dbus_connection_get_windows_user (DBusConnection *connection, 217 | char **windows_sid_p) { 218 | return FALSE; 219 | } 220 | 221 | dbus_bool_t dbus_connection_add_filter (DBusConnection *connection, 222 | DBusHandleMessageFunction function, 223 | void *user_data, 224 | DBusFreeFunction free_data_function) { 225 | return TRUE; 226 | } 227 | 228 | dbus_bool_t dbus_connection_allocate_data_slot (dbus_int32_t *slot_p) { 229 | return TRUE; 230 | } 231 | 232 | dbus_bool_t dbus_connection_set_data (DBusConnection *connection, 233 | dbus_int32_t slot, 234 | void *data, 235 | DBusFreeFunction free_data_func) { 236 | return TRUE; 237 | } 238 | 239 | void* dbus_connection_get_data (DBusConnection *connection, 240 | dbus_int32_t slot) { 241 | return NULL; 242 | } 243 | 244 | long dbus_connection_get_max_message_size (DBusConnection *connection) { 245 | return 10; 246 | } 247 | 248 | long dbus_connection_get_max_received_size (DBusConnection *connection) { 249 | return 10; 250 | } 251 | 252 | long dbus_connection_get_max_message_unix_fds (DBusConnection *connection) { 253 | return 10; 254 | } 255 | 256 | long dbus_connection_get_max_received_unix_fds(DBusConnection *connection) { 257 | return 10; 258 | } 259 | 260 | long dbus_connection_get_outgoing_size (DBusConnection *connection) { 261 | return 0; 262 | } 263 | 264 | long dbus_connection_get_outgoing_unix_fds (DBusConnection *connection) { 265 | return 0; 266 | } 267 | 268 | DBusPreallocatedSend* dbus_connection_preallocate_send (DBusConnection *connection) { 269 | return NULL; 270 | } 271 | 272 | dbus_bool_t dbus_connection_try_register_object_path (DBusConnection *connection, 273 | const char *path, 274 | const DBusObjectPathVTable *vtable, 275 | void *user_data, 276 | DBusError *error) { 277 | return TRUE; 278 | } 279 | 280 | dbus_bool_t dbus_connection_register_object_path (DBusConnection *connection, 281 | const char *path, 282 | const DBusObjectPathVTable *vtable, 283 | void *user_data) { 284 | return TRUE; 285 | } 286 | 287 | dbus_bool_t dbus_connection_try_register_fallback (DBusConnection *connection, 288 | const char *path, 289 | const DBusObjectPathVTable *vtable, 290 | void *user_data, 291 | DBusError *error) { 292 | return TRUE; 293 | } 294 | 295 | dbus_bool_t dbus_connection_register_fallback (DBusConnection *connection, 296 | const char *path, 297 | const DBusObjectPathVTable *vtable, 298 | void *user_data) { 299 | return TRUE; 300 | } 301 | 302 | dbus_bool_t dbus_connection_unregister_object_path (DBusConnection *connection, 303 | const char *path) { 304 | return TRUE; 305 | } 306 | 307 | dbus_bool_t dbus_connection_get_object_path_data (DBusConnection *connection, 308 | const char *path, 309 | void **data_p) { 310 | return TRUE; 311 | } 312 | 313 | dbus_bool_t dbus_connection_list_registered (DBusConnection *connection, 314 | const char *parent_path, 315 | char ***child_entries) { 316 | return FALSE; 317 | } 318 | 319 | dbus_bool_t dbus_connection_get_unix_fd (DBusConnection *connection, 320 | int *fd) { 321 | return FALSE; 322 | } 323 | 324 | dbus_bool_t dbus_connection_get_socket (DBusConnection *connection, 325 | int *fd) { 326 | return FALSE; 327 | } 328 | 329 | int dbus_watch_get_fd (DBusWatch *watch) { 330 | return -1; 331 | } 332 | 333 | int dbus_watch_get_unix_fd (DBusWatch *watch) { 334 | return -1; 335 | } 336 | 337 | int dbus_watch_get_socket (DBusWatch *watch) { 338 | return -1; 339 | } 340 | 341 | unsigned int dbus_watch_get_flags (DBusWatch *watch) { 342 | return 0; 343 | } 344 | 345 | void* dbus_watch_get_data (DBusWatch *watch) { 346 | return NULL; 347 | } 348 | 349 | dbus_bool_t dbus_watch_handle (DBusWatch *watch, 350 | unsigned int flags) { 351 | return TRUE; 352 | } 353 | 354 | dbus_bool_t dbus_watch_get_enabled (DBusWatch *watch) { 355 | return TRUE; 356 | } 357 | 358 | int dbus_timeout_get_interval (DBusTimeout *timeout) { 359 | return 0; 360 | } 361 | 362 | void* dbus_timeout_get_data (DBusTimeout *timeout) { 363 | return NULL; 364 | } 365 | 366 | dbus_bool_t dbus_timeout_handle (DBusTimeout *timeout) { 367 | return TRUE; 368 | } 369 | 370 | dbus_bool_t dbus_timeout_get_enabled (DBusTimeout *timeout) { 371 | return TRUE; 372 | } 373 | 374 | dbus_bool_t dbus_error_has_name (const DBusError *error, 375 | const char *name) { 376 | return TRUE; 377 | } 378 | 379 | dbus_bool_t dbus_error_is_set (const DBusError *error) { 380 | return TRUE; 381 | } 382 | 383 | GType dbus_g_connection_get_g_type() { 384 | return 0; 385 | } 386 | 387 | GType dbus_g_message_get_g_type() { 388 | return 0; 389 | } 390 | 391 | DBusGConnection* dbus_g_connection_ref (DBusGConnection *connection) { 392 | return connection; 393 | } 394 | 395 | DBusGMessage* dbus_g_message_ref (DBusGMessage *message) { 396 | return message; 397 | } 398 | 399 | GQuark dbus_g_error_quark() { 400 | return 0; 401 | } 402 | 403 | gboolean dbus_g_error_has_name (GError *error, 404 | const char *name) { 405 | return TRUE; 406 | } 407 | 408 | const char * dbus_g_error_get_name (GError *error) { 409 | return empty; 410 | } 411 | 412 | DBusGConnection* dbus_g_connection_open (const gchar *address, 413 | GError **error) { 414 | *error = &gerr; 415 | return NULL; 416 | } 417 | 418 | DBusGConnection* dbus_g_bus_get (DBusBusType type, 419 | GError **error) { 420 | return NULL; 421 | } 422 | 423 | GObject * dbus_g_connection_lookup_g_object (DBusGConnection *connection, 424 | const char *at_path) { 425 | return NULL; 426 | } 427 | 428 | GType dbus_g_object_path_get_g_type() { 429 | return 0; 430 | } 431 | 432 | GType dbus_g_proxy_get_type() { 433 | return 0; 434 | } 435 | 436 | DBusGProxy* dbus_g_proxy_new_for_name (DBusGConnection *connection, 437 | const char *name, 438 | const char *path, 439 | const char *interface) { 440 | return NULL; 441 | } 442 | 443 | DBusGProxy* dbus_g_proxy_new_for_name_owner (DBusGConnection *connection, 444 | const char *name, 445 | const char *path, 446 | const char *interface, 447 | GError **error) { 448 | return NULL; 449 | } 450 | 451 | DBusGProxy* dbus_g_proxy_new_from_proxy (DBusGProxy *proxy, 452 | const char *interface, 453 | const char *path_name) { 454 | return NULL; 455 | } 456 | 457 | DBusGProxy* dbus_g_proxy_new_for_peer (DBusGConnection *connection, 458 | const char *path_name, 459 | const char *interface_name) { 460 | return NULL; 461 | } 462 | 463 | gboolean dbus_g_proxy_call (DBusGProxy *proxy, 464 | const char *method, 465 | GError **error, 466 | GType first_arg_type, 467 | ...) { 468 | return TRUE; 469 | } 470 | 471 | gboolean dbus_g_proxy_call_with_timeout (DBusGProxy *proxy, 472 | const char *method, 473 | int timeout, 474 | GError **error, 475 | GType first_arg_type, 476 | ...) { 477 | return TRUE; 478 | } 479 | 480 | DBusGProxyCall * dbus_g_proxy_begin_call (DBusGProxy *proxy, 481 | const char *method, 482 | DBusGProxyCallNotify notify, 483 | gpointer data, 484 | GDestroyNotify destroy, 485 | GType first_arg_type, 486 | ...) { 487 | return NULL; 488 | } 489 | 490 | DBusGProxyCall * dbus_g_proxy_begin_call_with_timeout (DBusGProxy *proxy, 491 | const char *method, 492 | DBusGProxyCallNotify notify, 493 | gpointer user_data, 494 | GDestroyNotify destroy, 495 | int timeout, 496 | GType first_arg_type, 497 | ...) { 498 | return NULL; 499 | } 500 | 501 | gboolean dbus_g_proxy_end_call (DBusGProxy *proxy, 502 | DBusGProxyCall *call, 503 | GError **error, 504 | GType first_arg_type, 505 | ...) { 506 | return TRUE; 507 | } 508 | 509 | const char* dbus_g_proxy_get_path (DBusGProxy *proxy) { 510 | return empty; 511 | } 512 | 513 | const char* dbus_g_proxy_get_bus_name (DBusGProxy *proxy) { 514 | return empty; 515 | } 516 | 517 | const char* dbus_g_proxy_get_interface (DBusGProxy *proxy) { 518 | return empty; 519 | } 520 | 521 | GType dbus_connection_get_g_type() { 522 | return 0; 523 | } 524 | 525 | GType dbus_message_get_g_type() { 526 | return 0; 527 | } 528 | 529 | GType dbus_pending_call_get_g_type() { 530 | return 0; 531 | } 532 | 533 | DBusConnection* dbus_g_connection_get_connection (DBusGConnection *gconnection) { 534 | return NULL; 535 | } 536 | 537 | DBusGConnection* dbus_connection_get_g_connection (DBusConnection *connection) { 538 | return NULL; 539 | } 540 | 541 | DBusMessage* dbus_g_message_get_message (DBusGMessage *gmessage) { 542 | return NULL; 543 | } 544 | 545 | gchar* dbus_g_method_get_sender (DBusGMethodInvocation *context) { 546 | return strdup(empty); 547 | } 548 | 549 | DBusMessage* dbus_g_method_get_reply (DBusGMethodInvocation *context) { 550 | return NULL; 551 | } 552 | 553 | GType dbus_g_type_get_collection (const char *container, 554 | GType specialization) { 555 | return 0; 556 | } 557 | 558 | GType dbus_g_type_get_map (const char *container, 559 | GType key_specialization, 560 | GType value_specialization) { 561 | return 0; 562 | } 563 | 564 | GType dbus_g_type_get_structv (const char *container, 565 | guint num_members, 566 | GType *types) { 567 | return 0; 568 | } 569 | 570 | GType dbus_g_type_get_struct (const char *container, 571 | GType first_type, 572 | ...) { 573 | return 0; 574 | } 575 | 576 | gboolean dbus_g_type_is_collection (GType gtype) { 577 | return FALSE; 578 | } 579 | 580 | gboolean dbus_g_type_is_map (GType gtype) { 581 | return FALSE; 582 | } 583 | 584 | gboolean dbus_g_type_is_struct (GType gtype) { 585 | return FALSE; 586 | } 587 | 588 | GType dbus_g_type_get_collection_specialization (GType gtype) { 589 | return 0; 590 | } 591 | 592 | GType dbus_g_type_get_map_key_specialization (GType gtype) { 593 | return 0; 594 | } 595 | 596 | GType dbus_g_type_get_map_value_specialization (GType gtype) { 597 | return 0; 598 | } 599 | 600 | GType dbus_g_type_get_struct_member_type (GType gtype, 601 | guint member) { 602 | return 0; 603 | } 604 | 605 | guint dbus_g_type_get_struct_size (GType gtype) { 606 | return 0; 607 | } 608 | 609 | gpointer dbus_g_type_specialized_construct (GType gtype) { 610 | return NULL; 611 | } 612 | 613 | gboolean dbus_g_type_collection_get_fixed (GValue *value, 614 | gpointer *data, 615 | guint *len) { 616 | return FALSE; 617 | } 618 | 619 | gboolean dbus_g_type_struct_get_member (const GValue *value, 620 | guint member, 621 | GValue *dest) { 622 | return FALSE; 623 | } 624 | 625 | gboolean dbus_g_type_struct_set_member (GValue *value, 626 | guint member, 627 | const GValue *src) { 628 | return FALSE; 629 | } 630 | 631 | gboolean dbus_g_type_struct_get (const GValue *value, 632 | guint member, 633 | ...) { 634 | return FALSE; 635 | } 636 | 637 | gboolean dbus_g_type_struct_set (GValue *value, 638 | guint member, 639 | ...) { 640 | return FALSE; 641 | } 642 | 643 | const DBusGTypeSpecializedMapVtable* dbus_g_type_map_peek_vtable (GType map_type) { 644 | return NULL; 645 | } 646 | 647 | const DBusGTypeSpecializedCollectionVtable* dbus_g_type_collection_peek_vtable (GType collection_type) { 648 | return NULL; 649 | } 650 | 651 | const DBusGTypeSpecializedStructVtable* dbus_g_type_struct_peek_vtable (GType struct_type) { 652 | return NULL; 653 | } 654 | 655 | void* dbus_malloc (size_t bytes) { 656 | return malloc(bytes); 657 | } 658 | 659 | void* dbus_malloc0 (size_t bytes) { 660 | return calloc(bytes, 1); 661 | } 662 | 663 | void* dbus_realloc (void *memory, 664 | size_t bytes) { 665 | return realloc(memory, bytes); 666 | } 667 | 668 | DBusMessage* dbus_message_new (int message_type) { 669 | return NULL; 670 | } 671 | 672 | DBusMessage* dbus_message_new_method_call (const char *bus_name, 673 | const char *path, 674 | const char *interface, 675 | const char *method) { 676 | return NULL; 677 | } 678 | 679 | DBusMessage* dbus_message_new_method_return (DBusMessage *method_call) { 680 | return NULL; 681 | } 682 | 683 | DBusMessage* dbus_message_new_signal (const char *path, 684 | const char *interface, 685 | const char *name) { 686 | return NULL; 687 | } 688 | 689 | DBusMessage* dbus_message_new_error (DBusMessage *reply_to, 690 | const char *error_name, 691 | const char *error_message) { 692 | return NULL; 693 | } 694 | 695 | DBusMessage* dbus_message_new_error_printf (DBusMessage *reply_to, 696 | const char *error_name, 697 | const char *error_format, 698 | ...) { 699 | return NULL; 700 | } 701 | 702 | DBusMessage* dbus_message_copy (const DBusMessage *message) { 703 | return NULL; 704 | } 705 | 706 | DBusMessage* dbus_message_ref (DBusMessage *message) { 707 | return message; 708 | } 709 | 710 | int dbus_message_get_type (DBusMessage *message) { 711 | return 0; 712 | } 713 | 714 | dbus_bool_t dbus_message_set_path (DBusMessage *message, 715 | const char *object_path) { 716 | return TRUE; 717 | } 718 | 719 | const char* dbus_message_get_path (DBusMessage *message) { 720 | return empty; 721 | } 722 | 723 | dbus_bool_t dbus_message_has_path (DBusMessage *message, 724 | const char *object_path) { 725 | return TRUE; 726 | } 727 | 728 | dbus_bool_t dbus_message_set_interface (DBusMessage *message, 729 | const char *interface) { 730 | return TRUE; 731 | } 732 | 733 | const char* dbus_message_get_interface (DBusMessage *message) { 734 | return empty; 735 | } 736 | 737 | dbus_bool_t dbus_message_has_interface (DBusMessage *message, 738 | const char *interface) { 739 | return TRUE; 740 | } 741 | 742 | dbus_bool_t dbus_message_set_member (DBusMessage *message, 743 | const char *member) { 744 | return TRUE; 745 | } 746 | 747 | const char* dbus_message_get_member (DBusMessage *message) { 748 | return empty; 749 | } 750 | 751 | dbus_bool_t dbus_message_has_member (DBusMessage *message, 752 | const char *member) { 753 | return FALSE; 754 | } 755 | 756 | dbus_bool_t dbus_message_set_error_name (DBusMessage *message, 757 | const char *name) { 758 | return TRUE; 759 | } 760 | 761 | const char* dbus_message_get_error_name (DBusMessage *message) { 762 | return empty; 763 | } 764 | 765 | dbus_bool_t dbus_message_set_destination (DBusMessage *message, 766 | const char *destination) { 767 | return TRUE; 768 | } 769 | 770 | const char* dbus_message_get_destination (DBusMessage *message) { 771 | return empty; 772 | } 773 | 774 | dbus_bool_t dbus_message_set_sender (DBusMessage *message, 775 | const char *sender) { 776 | return TRUE; 777 | } 778 | 779 | const char* dbus_message_get_sender (DBusMessage *message) { 780 | return empty; 781 | } 782 | 783 | const char* dbus_message_get_signature (DBusMessage *message) { 784 | return empty; 785 | } 786 | 787 | dbus_bool_t dbus_message_get_no_reply (DBusMessage *message) { 788 | return TRUE; 789 | } 790 | 791 | dbus_bool_t dbus_message_is_method_call (DBusMessage *message, 792 | const char *interface, 793 | const char *method) { 794 | return FALSE; 795 | } 796 | 797 | dbus_bool_t dbus_message_is_signal (DBusMessage *message, 798 | const char *interface, 799 | const char *signal_name) { 800 | return FALSE; 801 | } 802 | 803 | dbus_bool_t dbus_message_is_error (DBusMessage *message, 804 | const char *error_name) { 805 | return FALSE; 806 | } 807 | 808 | dbus_bool_t dbus_message_has_destination (DBusMessage *message, 809 | const char *bus_name) { 810 | return TRUE; 811 | } 812 | 813 | dbus_bool_t dbus_message_has_sender (DBusMessage *message, 814 | const char *unique_bus_name) { 815 | return TRUE; 816 | } 817 | 818 | dbus_bool_t dbus_message_has_signature (DBusMessage *message, 819 | const char *signature) { 820 | return TRUE; 821 | } 822 | 823 | dbus_uint32_t dbus_message_get_serial (DBusMessage *message) { 824 | return 0; 825 | } 826 | 827 | dbus_bool_t dbus_message_set_reply_serial (DBusMessage *message, 828 | dbus_uint32_t reply_serial) { 829 | return TRUE; 830 | } 831 | 832 | dbus_uint32_t dbus_message_get_reply_serial (DBusMessage *message) { 833 | return 0; 834 | } 835 | 836 | dbus_bool_t dbus_message_get_auto_start (DBusMessage *message) { 837 | return FALSE; 838 | } 839 | 840 | dbus_bool_t dbus_message_get_path_decomposed (DBusMessage *message, 841 | char ***path) { 842 | return FALSE; 843 | } 844 | 845 | dbus_bool_t dbus_message_append_args (DBusMessage *message, 846 | int first_arg_type, 847 | ...) { 848 | return TRUE; 849 | } 850 | 851 | dbus_bool_t dbus_message_append_args_valist (DBusMessage *message, 852 | int first_arg_type, 853 | va_list var_args) { 854 | return TRUE; 855 | } 856 | 857 | dbus_bool_t dbus_message_get_args (DBusMessage *message, 858 | DBusError *error, 859 | int first_arg_type, 860 | ...) { 861 | return FALSE; 862 | } 863 | 864 | dbus_bool_t dbus_message_get_args_valist (DBusMessage *message, 865 | DBusError *error, 866 | int first_arg_type, 867 | va_list var_args) { 868 | return FALSE; 869 | } 870 | 871 | dbus_bool_t dbus_message_contains_unix_fds (DBusMessage *message) { 872 | return FALSE; 873 | } 874 | 875 | dbus_bool_t dbus_message_iter_init (DBusMessage *message, 876 | DBusMessageIter *iter) { 877 | return FALSE; 878 | } 879 | 880 | dbus_bool_t dbus_message_iter_has_next (DBusMessageIter *iter) { 881 | return FALSE; 882 | } 883 | 884 | dbus_bool_t dbus_message_iter_next (DBusMessageIter *iter) { 885 | return FALSE; 886 | } 887 | 888 | char* dbus_message_iter_get_signature (DBusMessageIter *iter) { 889 | return strdup(empty); 890 | } 891 | 892 | int dbus_message_iter_get_arg_type (DBusMessageIter *iter) { 893 | return 0; 894 | } 895 | 896 | int dbus_message_iter_get_element_type (DBusMessageIter *iter) { 897 | return 0; 898 | } 899 | 900 | int dbus_message_iter_get_array_len (DBusMessageIter *iter) { 901 | return 0; 902 | } 903 | 904 | dbus_bool_t dbus_message_iter_append_basic (DBusMessageIter *iter, 905 | int type, 906 | const void *value) { 907 | return TRUE; 908 | } 909 | 910 | dbus_bool_t dbus_message_iter_append_fixed_array (DBusMessageIter *iter, 911 | int element_type, 912 | const void *value, 913 | int n_elements) { 914 | return TRUE; 915 | } 916 | 917 | dbus_bool_t dbus_message_iter_open_container (DBusMessageIter *iter, 918 | int type, 919 | const char *contained_signature, 920 | DBusMessageIter *sub) { 921 | return TRUE; 922 | } 923 | 924 | dbus_bool_t dbus_message_iter_close_container (DBusMessageIter *iter, 925 | DBusMessageIter *sub) { 926 | return TRUE; 927 | } 928 | 929 | dbus_bool_t dbus_set_error_from_message (DBusError *error, 930 | DBusMessage *message) { 931 | return TRUE; 932 | } 933 | 934 | dbus_bool_t dbus_message_allocate_data_slot (dbus_int32_t *slot_p) { 935 | return FALSE; 936 | } 937 | 938 | dbus_bool_t dbus_message_set_data (DBusMessage *message, 939 | dbus_int32_t slot, 940 | void *data, 941 | DBusFreeFunction free_data_func) { 942 | return TRUE; 943 | } 944 | 945 | void* dbus_message_get_data (DBusMessage *message, 946 | dbus_int32_t slot) { 947 | return NULL; 948 | } 949 | 950 | int dbus_message_type_from_string (const char *type_str) { 951 | return 0; 952 | } 953 | 954 | const char* dbus_message_type_to_string (int type) { 955 | return empty; 956 | } 957 | 958 | dbus_bool_t dbus_message_marshal (DBusMessage *msg, 959 | char **marshalled_data_p, 960 | int *len_p) { 961 | return FALSE; 962 | } 963 | 964 | DBusMessage* dbus_message_demarshal (const char *str, 965 | int len, 966 | DBusError *error) { 967 | return NULL; 968 | } 969 | 970 | int dbus_message_demarshal_bytes_needed (const char *str, 971 | int len) { 972 | return 0; 973 | } 974 | 975 | char* dbus_get_local_machine_id (void) { 976 | return strdup(empty); 977 | } 978 | 979 | DBusPendingCall* dbus_pending_call_ref (DBusPendingCall *pending) { 980 | return NULL; 981 | } 982 | 983 | dbus_bool_t dbus_pending_call_set_notify (DBusPendingCall *pending, 984 | DBusPendingCallNotifyFunction function, 985 | void *user_data, 986 | DBusFreeFunction free_user_data) { 987 | return TRUE; 988 | } 989 | 990 | dbus_bool_t dbus_pending_call_get_completed (DBusPendingCall *pending) { 991 | return TRUE; 992 | } 993 | 994 | DBusMessage* dbus_pending_call_steal_reply (DBusPendingCall *pending) { 995 | return NULL; 996 | } 997 | 998 | dbus_bool_t dbus_pending_call_allocate_data_slot (dbus_int32_t *slot_p) { 999 | return FALSE; 1000 | } 1001 | 1002 | dbus_bool_t dbus_pending_call_set_data (DBusPendingCall *pending, 1003 | dbus_int32_t slot, 1004 | void *data, 1005 | DBusFreeFunction free_data_func) { 1006 | return TRUE; 1007 | } 1008 | 1009 | void* dbus_pending_call_get_data (DBusPendingCall *pending, 1010 | dbus_int32_t slot) { 1011 | return NULL; 1012 | } 1013 | 1014 | DBusServer* dbus_server_listen (const char *address, 1015 | DBusError *error) { 1016 | return NULL; 1017 | } 1018 | 1019 | DBusServer* dbus_server_ref (DBusServer *server) { 1020 | return server; 1021 | } 1022 | 1023 | dbus_bool_t dbus_server_get_is_connected (DBusServer *server) { 1024 | return TRUE; 1025 | } 1026 | 1027 | char* dbus_server_get_address (DBusServer *server) { 1028 | return strdup(empty); 1029 | } 1030 | 1031 | char* dbus_server_get_id (DBusServer *server) { 1032 | return strdup(empty); 1033 | } 1034 | 1035 | dbus_bool_t dbus_server_set_watch_functions (DBusServer *server, 1036 | DBusAddWatchFunction add_function, 1037 | DBusRemoveWatchFunction remove_function, 1038 | DBusWatchToggledFunction toggled_function, 1039 | void *data, 1040 | DBusFreeFunction free_data_function) { 1041 | return TRUE; 1042 | } 1043 | 1044 | dbus_bool_t dbus_server_set_timeout_functions (DBusServer *server, 1045 | DBusAddTimeoutFunction add_function, 1046 | DBusRemoveTimeoutFunction remove_function, 1047 | DBusTimeoutToggledFunction toggled_function, 1048 | void *data, 1049 | DBusFreeFunction free_data_function) { 1050 | return TRUE; 1051 | } 1052 | 1053 | dbus_bool_t dbus_server_set_auth_mechanisms (DBusServer *server, 1054 | const char **mechanisms) { 1055 | return TRUE; 1056 | } 1057 | 1058 | dbus_bool_t dbus_server_allocate_data_slot (dbus_int32_t *slot_p) { 1059 | return FALSE; 1060 | } 1061 | 1062 | dbus_bool_t dbus_server_set_data (DBusServer *server, 1063 | int slot, 1064 | void *data, 1065 | DBusFreeFunction free_data_func) { 1066 | return TRUE; 1067 | } 1068 | 1069 | void* dbus_server_get_data (DBusServer *server, 1070 | int slot) { 1071 | return NULL; 1072 | } 1073 | 1074 | int dbus_signature_iter_get_current_type (const DBusSignatureIter *iter) { 1075 | return 0; 1076 | } 1077 | 1078 | char * dbus_signature_iter_get_signature (const DBusSignatureIter *iter) { 1079 | return strdup(empty); 1080 | } 1081 | 1082 | int dbus_signature_iter_get_element_type (const DBusSignatureIter *iter) { 1083 | return 0; 1084 | } 1085 | 1086 | dbus_bool_t dbus_signature_iter_next (DBusSignatureIter *iter) { 1087 | return FALSE; 1088 | } 1089 | 1090 | dbus_bool_t dbus_signature_validate (const char *signature, 1091 | DBusError *error) { 1092 | return TRUE; 1093 | } 1094 | 1095 | dbus_bool_t dbus_signature_validate_single (const char *signature, 1096 | DBusError *error) { 1097 | return TRUE; 1098 | } 1099 | 1100 | dbus_bool_t dbus_type_is_basic (int typecode) { 1101 | return TRUE; 1102 | } 1103 | 1104 | dbus_bool_t dbus_type_is_container (int typecode) { 1105 | return FALSE; 1106 | } 1107 | 1108 | dbus_bool_t dbus_type_is_fixed (int typecode) { 1109 | return FALSE; 1110 | } 1111 | 1112 | dbus_bool_t dbus_threads_init (const DBusThreadFunctions *functions) { 1113 | return TRUE; 1114 | } 1115 | 1116 | dbus_bool_t dbus_threads_init_default() { 1117 | return TRUE; 1118 | } 1119 | --------------------------------------------------------------------------------