1 module ddbus.c_lib; 2 3 import core.stdc.config; 4 import core.stdc.stdarg; 5 6 // dfmt off 7 8 extern (C): 9 // START dbus/dbus-arch-deps.d 10 alias c_long dbus_int64_t; 11 alias c_ulong dbus_uint64_t; 12 alias int dbus_int32_t; 13 alias uint dbus_uint32_t; 14 alias short dbus_int16_t; 15 alias ushort dbus_uint16_t; 16 // END dbus/dbus-arch-deps.d 17 // START dbus/dbus-types.d 18 alias uint dbus_unichar_t; 19 alias uint dbus_bool_t; 20 21 22 23 struct DBus8ByteStruct 24 { 25 dbus_uint32_t first32; 26 dbus_uint32_t second32; 27 } 28 29 union DBusBasicValue 30 { 31 ubyte[8] bytes; 32 dbus_int16_t i16; 33 dbus_uint16_t u16; 34 dbus_int32_t i32; 35 dbus_uint32_t u32; 36 dbus_bool_t bool_val; 37 dbus_int64_t i64; 38 dbus_uint64_t u64; 39 DBus8ByteStruct eight; 40 double dbl; 41 ubyte byt; 42 char* str; 43 int fd; 44 } 45 // END dbus/dbus-types.d 46 // START dbus/dbus-protocol.d 47 48 // END dbus/dbus-protocol.d 49 // START dbus/dbus-errors.d 50 struct DBusError 51 { 52 const(char)* name; 53 const(char)* message; 54 uint dummy1; 55 uint dummy2; 56 uint dummy3; 57 uint dummy4; 58 uint dummy5; 59 void* padding1; 60 } 61 62 void dbus_error_init (DBusError* error); 63 void dbus_error_free (DBusError* error); 64 void dbus_set_error (DBusError* error, const(char)* name, const(char)* message, ...); 65 void dbus_set_error_const (DBusError* error, const(char)* name, const(char)* message); 66 void dbus_move_error (DBusError* src, DBusError* dest); 67 dbus_bool_t dbus_error_has_name (const(DBusError)* error, const(char)* name); 68 dbus_bool_t dbus_error_is_set (const(DBusError)* error); 69 // END dbus/dbus-errors.d 70 // START dbus/dbus-macros.d 71 72 // END dbus/dbus-macros.d 73 // START dbus/dbus-memory.d 74 alias void function (void*) DBusFreeFunction; 75 76 void* dbus_malloc (size_t bytes); 77 void* dbus_malloc0 (size_t bytes); 78 void* dbus_realloc (void* memory, size_t bytes); 79 void dbus_free (void* memory); 80 void dbus_free_string_array (char** str_array); 81 void dbus_shutdown (); 82 // END dbus/dbus-memory.d 83 // START dbus/dbus-shared.d 84 enum DBusBusType 85 { 86 DBUS_BUS_SESSION = 0, 87 DBUS_BUS_SYSTEM = 1, 88 DBUS_BUS_STARTER = 2 89 } 90 91 enum DBusHandlerResult 92 { 93 DBUS_HANDLER_RESULT_HANDLED = 0, 94 DBUS_HANDLER_RESULT_NOT_YET_HANDLED = 1, 95 DBUS_HANDLER_RESULT_NEED_MEMORY = 2 96 } 97 // END dbus/dbus-shared.d 98 // START dbus/dbus-address.d 99 struct DBusAddressEntry; 100 101 102 dbus_bool_t dbus_parse_address (const(char)* address, DBusAddressEntry*** entry, int* array_len, DBusError* error); 103 const(char)* dbus_address_entry_get_value (DBusAddressEntry* entry, const(char)* key); 104 const(char)* dbus_address_entry_get_method (DBusAddressEntry* entry); 105 void dbus_address_entries_free (DBusAddressEntry** entries); 106 char* dbus_address_escape_value (const(char)* value); 107 char* dbus_address_unescape_value (const(char)* value, DBusError* error); 108 // END dbus/dbus-address.d 109 // START dbus/dbus-syntax.d 110 dbus_bool_t dbus_validate_path (const(char)* path, DBusError* error); 111 dbus_bool_t dbus_validate_interface (const(char)* name, DBusError* error); 112 dbus_bool_t dbus_validate_member (const(char)* name, DBusError* error); 113 dbus_bool_t dbus_validate_error_name (const(char)* name, DBusError* error); 114 dbus_bool_t dbus_validate_bus_name (const(char)* name, DBusError* error); 115 dbus_bool_t dbus_validate_utf8 (const(char)* alleged_utf8, DBusError* error); 116 // END dbus/dbus-syntax.d 117 // START dbus/dbus-signature.d 118 struct DBusSignatureIter 119 { 120 void* dummy1; 121 void* dummy2; 122 dbus_uint32_t dummy8; 123 int dummy12; 124 int dummy17; 125 } 126 127 void dbus_signature_iter_init (DBusSignatureIter* iter, const(char)* signature); 128 int dbus_signature_iter_get_current_type (const(DBusSignatureIter)* iter); 129 char* dbus_signature_iter_get_signature (const(DBusSignatureIter)* iter); 130 int dbus_signature_iter_get_element_type (const(DBusSignatureIter)* iter); 131 dbus_bool_t dbus_signature_iter_next (DBusSignatureIter* iter); 132 void dbus_signature_iter_recurse (const(DBusSignatureIter)* iter, DBusSignatureIter* subiter); 133 dbus_bool_t dbus_signature_validate (const(char)* signature, DBusError* error); 134 dbus_bool_t dbus_signature_validate_single (const(char)* signature, DBusError* error); 135 dbus_bool_t dbus_type_is_valid (int typecode); 136 dbus_bool_t dbus_type_is_basic (int typecode); 137 dbus_bool_t dbus_type_is_container (int typecode); 138 dbus_bool_t dbus_type_is_fixed (int typecode); 139 // END dbus/dbus-signature.d 140 // START dbus/dbus-misc.d 141 char* dbus_get_local_machine_id (); 142 void dbus_get_version (int* major_version_p, int* minor_version_p, int* micro_version_p); 143 dbus_bool_t dbus_setenv (const(char)* variable, const(char)* value); 144 // END dbus/dbus-misc.d 145 // START dbus/dbus-threads.d 146 alias DBusMutex* function () DBusMutexNewFunction; 147 alias void function (DBusMutex*) DBusMutexFreeFunction; 148 alias uint function (DBusMutex*) DBusMutexLockFunction; 149 alias uint function (DBusMutex*) DBusMutexUnlockFunction; 150 alias DBusMutex* function () DBusRecursiveMutexNewFunction; 151 alias void function (DBusMutex*) DBusRecursiveMutexFreeFunction; 152 alias void function (DBusMutex*) DBusRecursiveMutexLockFunction; 153 alias void function (DBusMutex*) DBusRecursiveMutexUnlockFunction; 154 alias DBusCondVar* function () DBusCondVarNewFunction; 155 alias void function (DBusCondVar*) DBusCondVarFreeFunction; 156 alias void function (DBusCondVar*, DBusMutex*) DBusCondVarWaitFunction; 157 alias uint function (DBusCondVar*, DBusMutex*, int) DBusCondVarWaitTimeoutFunction; 158 alias void function (DBusCondVar*) DBusCondVarWakeOneFunction; 159 alias void function (DBusCondVar*) DBusCondVarWakeAllFunction; 160 161 162 163 enum DBusThreadFunctionsMask 164 { 165 DBUS_THREAD_FUNCTIONS_MUTEX_NEW_MASK = 1, 166 DBUS_THREAD_FUNCTIONS_MUTEX_FREE_MASK = 2, 167 DBUS_THREAD_FUNCTIONS_MUTEX_LOCK_MASK = 4, 168 DBUS_THREAD_FUNCTIONS_MUTEX_UNLOCK_MASK = 8, 169 DBUS_THREAD_FUNCTIONS_CONDVAR_NEW_MASK = 16, 170 DBUS_THREAD_FUNCTIONS_CONDVAR_FREE_MASK = 32, 171 DBUS_THREAD_FUNCTIONS_CONDVAR_WAIT_MASK = 64, 172 DBUS_THREAD_FUNCTIONS_CONDVAR_WAIT_TIMEOUT_MASK = 128, 173 DBUS_THREAD_FUNCTIONS_CONDVAR_WAKE_ONE_MASK = 256, 174 DBUS_THREAD_FUNCTIONS_CONDVAR_WAKE_ALL_MASK = 512, 175 DBUS_THREAD_FUNCTIONS_RECURSIVE_MUTEX_NEW_MASK = 1024, 176 DBUS_THREAD_FUNCTIONS_RECURSIVE_MUTEX_FREE_MASK = 2048, 177 DBUS_THREAD_FUNCTIONS_RECURSIVE_MUTEX_LOCK_MASK = 4096, 178 DBUS_THREAD_FUNCTIONS_RECURSIVE_MUTEX_UNLOCK_MASK = 8192, 179 DBUS_THREAD_FUNCTIONS_ALL_MASK = 16383 180 } 181 182 struct DBusThreadFunctions 183 { 184 uint mask; 185 DBusMutexNewFunction mutex_new; 186 DBusMutexFreeFunction mutex_free; 187 DBusMutexLockFunction mutex_lock; 188 DBusMutexUnlockFunction mutex_unlock; 189 DBusCondVarNewFunction condvar_new; 190 DBusCondVarFreeFunction condvar_free; 191 DBusCondVarWaitFunction condvar_wait; 192 DBusCondVarWaitTimeoutFunction condvar_wait_timeout; 193 DBusCondVarWakeOneFunction condvar_wake_one; 194 DBusCondVarWakeAllFunction condvar_wake_all; 195 DBusRecursiveMutexNewFunction recursive_mutex_new; 196 DBusRecursiveMutexFreeFunction recursive_mutex_free; 197 DBusRecursiveMutexLockFunction recursive_mutex_lock; 198 DBusRecursiveMutexUnlockFunction recursive_mutex_unlock; 199 void function () padding1; 200 void function () padding2; 201 void function () padding3; 202 void function () padding4; 203 } 204 205 struct DBusCondVar; 206 207 208 struct DBusMutex; 209 210 211 dbus_bool_t dbus_threads_init (const(DBusThreadFunctions)* functions); 212 dbus_bool_t dbus_threads_init_default (); 213 // END dbus/dbus-threads.d 214 // START dbus/dbus-message.d 215 struct DBusMessageIter 216 { 217 void* dummy1; 218 void* dummy2; 219 dbus_uint32_t dummy3; 220 int dummy4; 221 int dummy5; 222 int dummy6; 223 int dummy7; 224 int dummy8; 225 int dummy9; 226 int dummy10; 227 int dummy11; 228 int pad1; 229 int pad2; 230 void* pad3; 231 } 232 233 struct DBusMessage; 234 235 236 DBusMessage* dbus_message_new (int message_type); 237 DBusMessage* dbus_message_new_method_call (const(char)* bus_name, const(char)* path, const(char)* iface, const(char)* method); 238 DBusMessage* dbus_message_new_method_return (DBusMessage* method_call); 239 DBusMessage* dbus_message_new_signal (const(char)* path, const(char)* iface, const(char)* name); 240 DBusMessage* dbus_message_new_error (DBusMessage* reply_to, const(char)* error_name, const(char)* error_message); 241 DBusMessage* dbus_message_new_error_printf (DBusMessage* reply_to, const(char)* error_name, const(char)* error_format, ...); 242 DBusMessage* dbus_message_copy (const(DBusMessage)* message); 243 DBusMessage* dbus_message_ref (DBusMessage* message); 244 void dbus_message_unref (DBusMessage* message); 245 int dbus_message_get_type (DBusMessage* message); 246 dbus_bool_t dbus_message_set_path (DBusMessage* message, const(char)* object_path); 247 const(char)* dbus_message_get_path (DBusMessage* message); 248 dbus_bool_t dbus_message_has_path (DBusMessage* message, const(char)* object_path); 249 dbus_bool_t dbus_message_set_interface (DBusMessage* message, const(char)* iface); 250 const(char)* dbus_message_get_interface (DBusMessage* message); 251 dbus_bool_t dbus_message_has_interface (DBusMessage* message, const(char)* iface); 252 dbus_bool_t dbus_message_set_member (DBusMessage* message, const(char)* member); 253 const(char)* dbus_message_get_member (DBusMessage* message); 254 dbus_bool_t dbus_message_has_member (DBusMessage* message, const(char)* member); 255 dbus_bool_t dbus_message_set_error_name (DBusMessage* message, const(char)* name); 256 const(char)* dbus_message_get_error_name (DBusMessage* message); 257 dbus_bool_t dbus_message_set_destination (DBusMessage* message, const(char)* destination); 258 const(char)* dbus_message_get_destination (DBusMessage* message); 259 dbus_bool_t dbus_message_set_sender (DBusMessage* message, const(char)* sender); 260 const(char)* dbus_message_get_sender (DBusMessage* message); 261 const(char)* dbus_message_get_signature (DBusMessage* message); 262 void dbus_message_set_no_reply (DBusMessage* message, dbus_bool_t no_reply); 263 dbus_bool_t dbus_message_get_no_reply (DBusMessage* message); 264 dbus_bool_t dbus_message_is_method_call (DBusMessage* message, const(char)* iface, const(char)* method); 265 dbus_bool_t dbus_message_is_signal (DBusMessage* message, const(char)* iface, const(char)* signal_name); 266 dbus_bool_t dbus_message_is_error (DBusMessage* message, const(char)* error_name); 267 dbus_bool_t dbus_message_has_destination (DBusMessage* message, const(char)* bus_name); 268 dbus_bool_t dbus_message_has_sender (DBusMessage* message, const(char)* unique_bus_name); 269 dbus_bool_t dbus_message_has_signature (DBusMessage* message, const(char)* signature); 270 dbus_uint32_t dbus_message_get_serial (DBusMessage* message); 271 void dbus_message_set_serial (DBusMessage* message, dbus_uint32_t serial); 272 dbus_bool_t dbus_message_set_reply_serial (DBusMessage* message, dbus_uint32_t reply_serial); 273 dbus_uint32_t dbus_message_get_reply_serial (DBusMessage* message); 274 void dbus_message_set_auto_start (DBusMessage* message, dbus_bool_t auto_start); 275 dbus_bool_t dbus_message_get_auto_start (DBusMessage* message); 276 dbus_bool_t dbus_message_get_path_decomposed (DBusMessage* message, char*** path); 277 dbus_bool_t dbus_message_append_args (DBusMessage* message, int first_arg_type, ...); 278 dbus_bool_t dbus_message_append_args_valist (DBusMessage* message, int first_arg_type, va_list var_args); 279 dbus_bool_t dbus_message_get_args (DBusMessage* message, DBusError* error, int first_arg_type, ...); 280 dbus_bool_t dbus_message_get_args_valist (DBusMessage* message, DBusError* error, int first_arg_type, va_list var_args); 281 dbus_bool_t dbus_message_contains_unix_fds (DBusMessage* message); 282 dbus_bool_t dbus_message_iter_init (DBusMessage* message, DBusMessageIter* iter); 283 dbus_bool_t dbus_message_iter_has_next (DBusMessageIter* iter); 284 dbus_bool_t dbus_message_iter_next (DBusMessageIter* iter); 285 char* dbus_message_iter_get_signature (DBusMessageIter* iter); 286 int dbus_message_iter_get_arg_type (DBusMessageIter* iter); 287 int dbus_message_iter_get_element_type (DBusMessageIter* iter); 288 void dbus_message_iter_recurse (DBusMessageIter* iter, DBusMessageIter* sub); 289 void dbus_message_iter_get_basic (DBusMessageIter* iter, void* value); 290 int dbus_message_iter_get_array_len (DBusMessageIter* iter); 291 void dbus_message_iter_get_fixed_array (DBusMessageIter* iter, void* value, int* n_elements); 292 void dbus_message_iter_init_append (DBusMessage* message, DBusMessageIter* iter); 293 dbus_bool_t dbus_message_iter_append_basic (DBusMessageIter* iter, int type, const(void)* value); 294 dbus_bool_t dbus_message_iter_append_fixed_array (DBusMessageIter* iter, int element_type, const(void)* value, int n_elements); 295 dbus_bool_t dbus_message_iter_open_container (DBusMessageIter* iter, int type, const(char)* contained_signature, DBusMessageIter* sub); 296 dbus_bool_t dbus_message_iter_close_container (DBusMessageIter* iter, DBusMessageIter* sub); 297 void dbus_message_iter_abandon_container (DBusMessageIter* iter, DBusMessageIter* sub); 298 void dbus_message_lock (DBusMessage* message); 299 dbus_bool_t dbus_set_error_from_message (DBusError* error, DBusMessage* message); 300 dbus_bool_t dbus_message_allocate_data_slot (dbus_int32_t* slot_p); 301 void dbus_message_free_data_slot (dbus_int32_t* slot_p); 302 dbus_bool_t dbus_message_set_data (DBusMessage* message, dbus_int32_t slot, void* data, DBusFreeFunction free_data_func); 303 void* dbus_message_get_data (DBusMessage* message, dbus_int32_t slot); 304 int dbus_message_type_from_string (const(char)* type_str); 305 const(char)* dbus_message_type_to_string (int type); 306 dbus_bool_t dbus_message_marshal (DBusMessage* msg, char** marshalled_data_p, int* len_p); 307 DBusMessage* dbus_message_demarshal (const(char)* str, int len, DBusError* error); 308 int dbus_message_demarshal_bytes_needed (const(char)* str, int len); 309 // END dbus/dbus-message.d 310 // START dbus/dbus-connection.d 311 alias uint function (DBusWatch*, void*) DBusAddWatchFunction; 312 alias void function (DBusWatch*, void*) DBusWatchToggledFunction; 313 alias void function (DBusWatch*, void*) DBusRemoveWatchFunction; 314 alias uint function (DBusTimeout*, void*) DBusAddTimeoutFunction; 315 alias void function (DBusTimeout*, void*) DBusTimeoutToggledFunction; 316 alias void function (DBusTimeout*, void*) DBusRemoveTimeoutFunction; 317 alias void function (DBusConnection*, DBusDispatchStatus, void*) DBusDispatchStatusFunction; 318 alias void function (void*) DBusWakeupMainFunction; 319 alias uint function (DBusConnection*, c_ulong, void*) DBusAllowUnixUserFunction; 320 alias uint function (DBusConnection*, const(char)*, void*) DBusAllowWindowsUserFunction; 321 alias void function (DBusPendingCall*, void*) DBusPendingCallNotifyFunction; 322 alias DBusHandlerResult function (DBusConnection*, DBusMessage*, void*) DBusHandleMessageFunction; 323 alias void function (DBusConnection*, void*) DBusObjectPathUnregisterFunction; 324 alias DBusHandlerResult function (DBusConnection*, DBusMessage*, void*) DBusObjectPathMessageFunction; 325 326 enum DBusWatchFlags 327 { 328 DBUS_WATCH_READABLE = 1, 329 DBUS_WATCH_WRITABLE = 2, 330 DBUS_WATCH_ERROR = 4, 331 DBUS_WATCH_HANGUP = 8 332 } 333 334 enum DBusDispatchStatus 335 { 336 DBUS_DISPATCH_DATA_REMAINS = 0, 337 DBUS_DISPATCH_COMPLETE = 1, 338 DBUS_DISPATCH_NEED_MEMORY = 2 339 } 340 341 struct DBusObjectPathVTable 342 { 343 DBusObjectPathUnregisterFunction unregister_function; 344 DBusObjectPathMessageFunction message_function; 345 void function (void*) dbus_internal_pad1; 346 void function (void*) dbus_internal_pad2; 347 void function (void*) dbus_internal_pad3; 348 void function (void*) dbus_internal_pad4; 349 } 350 351 struct DBusPreallocatedSend; 352 353 354 struct DBusTimeout; 355 356 357 struct DBusPendingCall; 358 359 360 struct DBusConnection; 361 362 363 struct DBusWatch; 364 365 366 DBusConnection* dbus_connection_open (const(char)* address, DBusError* error); 367 DBusConnection* dbus_connection_open_private (const(char)* address, DBusError* error); 368 DBusConnection* dbus_connection_ref (DBusConnection* connection); 369 void dbus_connection_unref (DBusConnection* connection); 370 void dbus_connection_close (DBusConnection* connection); 371 dbus_bool_t dbus_connection_get_is_connected (DBusConnection* connection); 372 dbus_bool_t dbus_connection_get_is_authenticated (DBusConnection* connection); 373 dbus_bool_t dbus_connection_get_is_anonymous (DBusConnection* connection); 374 char* dbus_connection_get_server_id (DBusConnection* connection); 375 dbus_bool_t dbus_connection_can_send_type (DBusConnection* connection, int type); 376 void dbus_connection_set_exit_on_disconnect (DBusConnection* connection, dbus_bool_t exit_on_disconnect); 377 void dbus_connection_flush (DBusConnection* connection); 378 dbus_bool_t dbus_connection_read_write_dispatch (DBusConnection* connection, int timeout_milliseconds); 379 dbus_bool_t dbus_connection_read_write (DBusConnection* connection, int timeout_milliseconds); 380 DBusMessage* dbus_connection_borrow_message (DBusConnection* connection); 381 void dbus_connection_return_message (DBusConnection* connection, DBusMessage* message); 382 void dbus_connection_steal_borrowed_message (DBusConnection* connection, DBusMessage* message); 383 DBusMessage* dbus_connection_pop_message (DBusConnection* connection); 384 DBusDispatchStatus dbus_connection_get_dispatch_status (DBusConnection* connection); 385 DBusDispatchStatus dbus_connection_dispatch (DBusConnection* connection); 386 dbus_bool_t dbus_connection_has_messages_to_send (DBusConnection* connection); 387 dbus_bool_t dbus_connection_send (DBusConnection* connection, DBusMessage* message, dbus_uint32_t* client_serial); 388 dbus_bool_t dbus_connection_send_with_reply (DBusConnection* connection, DBusMessage* message, DBusPendingCall** pending_return, int timeout_milliseconds); 389 DBusMessage* dbus_connection_send_with_reply_and_block (DBusConnection* connection, DBusMessage* message, int timeout_milliseconds, DBusError* error); 390 dbus_bool_t dbus_connection_set_watch_functions (DBusConnection* connection, DBusAddWatchFunction add_function, DBusRemoveWatchFunction remove_function, DBusWatchToggledFunction toggled_function, void* data, DBusFreeFunction free_data_function); 391 dbus_bool_t dbus_connection_set_timeout_functions (DBusConnection* connection, DBusAddTimeoutFunction add_function, DBusRemoveTimeoutFunction remove_function, DBusTimeoutToggledFunction toggled_function, void* data, DBusFreeFunction free_data_function); 392 void dbus_connection_set_wakeup_main_function (DBusConnection* connection, DBusWakeupMainFunction wakeup_main_function, void* data, DBusFreeFunction free_data_function); 393 void dbus_connection_set_dispatch_status_function (DBusConnection* connection, DBusDispatchStatusFunction function_, void* data, DBusFreeFunction free_data_function); 394 dbus_bool_t dbus_connection_get_unix_user (DBusConnection* connection, c_ulong* uid); 395 dbus_bool_t dbus_connection_get_unix_process_id (DBusConnection* connection, c_ulong* pid); 396 dbus_bool_t dbus_connection_get_adt_audit_session_data (DBusConnection* connection, void** data, dbus_int32_t* data_size); 397 void dbus_connection_set_unix_user_function (DBusConnection* connection, DBusAllowUnixUserFunction function_, void* data, DBusFreeFunction free_data_function); 398 dbus_bool_t dbus_connection_get_windows_user (DBusConnection* connection, char** windows_sid_p); 399 void dbus_connection_set_windows_user_function (DBusConnection* connection, DBusAllowWindowsUserFunction function_, void* data, DBusFreeFunction free_data_function); 400 void dbus_connection_set_allow_anonymous (DBusConnection* connection, dbus_bool_t value); 401 void dbus_connection_set_route_peer_messages (DBusConnection* connection, dbus_bool_t value); 402 dbus_bool_t dbus_connection_add_filter (DBusConnection* connection, DBusHandleMessageFunction function_, void* user_data, DBusFreeFunction free_data_function); 403 void dbus_connection_remove_filter (DBusConnection* connection, DBusHandleMessageFunction function_, void* user_data); 404 dbus_bool_t dbus_connection_allocate_data_slot (dbus_int32_t* slot_p); 405 void dbus_connection_free_data_slot (dbus_int32_t* slot_p); 406 dbus_bool_t dbus_connection_set_data (DBusConnection* connection, dbus_int32_t slot, void* data, DBusFreeFunction free_data_func); 407 void* dbus_connection_get_data (DBusConnection* connection, dbus_int32_t slot); 408 void dbus_connection_set_change_sigpipe (dbus_bool_t will_modify_sigpipe); 409 void dbus_connection_set_max_message_size (DBusConnection* connection, c_long size); 410 c_long dbus_connection_get_max_message_size (DBusConnection* connection); 411 void dbus_connection_set_max_received_size (DBusConnection* connection, c_long size); 412 c_long dbus_connection_get_max_received_size (DBusConnection* connection); 413 void dbus_connection_set_max_message_unix_fds (DBusConnection* connection, c_long n); 414 c_long dbus_connection_get_max_message_unix_fds (DBusConnection* connection); 415 void dbus_connection_set_max_received_unix_fds (DBusConnection* connection, c_long n); 416 c_long dbus_connection_get_max_received_unix_fds (DBusConnection* connection); 417 c_long dbus_connection_get_outgoing_size (DBusConnection* connection); 418 c_long dbus_connection_get_outgoing_unix_fds (DBusConnection* connection); 419 DBusPreallocatedSend* dbus_connection_preallocate_send (DBusConnection* connection); 420 void dbus_connection_free_preallocated_send (DBusConnection* connection, DBusPreallocatedSend* preallocated); 421 void dbus_connection_send_preallocated (DBusConnection* connection, DBusPreallocatedSend* preallocated, DBusMessage* message, dbus_uint32_t* client_serial); 422 dbus_bool_t dbus_connection_try_register_object_path (DBusConnection* connection, const(char)* path, const(DBusObjectPathVTable)* vtable, void* user_data, DBusError* error); 423 dbus_bool_t dbus_connection_register_object_path (DBusConnection* connection, const(char)* path, const(DBusObjectPathVTable)* vtable, void* user_data); 424 dbus_bool_t dbus_connection_try_register_fallback (DBusConnection* connection, const(char)* path, const(DBusObjectPathVTable)* vtable, void* user_data, DBusError* error); 425 dbus_bool_t dbus_connection_register_fallback (DBusConnection* connection, const(char)* path, const(DBusObjectPathVTable)* vtable, void* user_data); 426 dbus_bool_t dbus_connection_unregister_object_path (DBusConnection* connection, const(char)* path); 427 dbus_bool_t dbus_connection_get_object_path_data (DBusConnection* connection, const(char)* path, void** data_p); 428 dbus_bool_t dbus_connection_list_registered (DBusConnection* connection, const(char)* parent_path, char*** child_entries); 429 dbus_bool_t dbus_connection_get_unix_fd (DBusConnection* connection, int* fd); 430 dbus_bool_t dbus_connection_get_socket (DBusConnection* connection, int* fd); 431 int dbus_watch_get_fd (DBusWatch* watch); 432 int dbus_watch_get_unix_fd (DBusWatch* watch); 433 int dbus_watch_get_socket (DBusWatch* watch); 434 uint dbus_watch_get_flags (DBusWatch* watch); 435 void* dbus_watch_get_data (DBusWatch* watch); 436 void dbus_watch_set_data (DBusWatch* watch, void* data, DBusFreeFunction free_data_function); 437 dbus_bool_t dbus_watch_handle (DBusWatch* watch, uint flags); 438 dbus_bool_t dbus_watch_get_enabled (DBusWatch* watch); 439 int dbus_timeout_get_interval (DBusTimeout* timeout); 440 void* dbus_timeout_get_data (DBusTimeout* timeout); 441 void dbus_timeout_set_data (DBusTimeout* timeout, void* data, DBusFreeFunction free_data_function); 442 dbus_bool_t dbus_timeout_handle (DBusTimeout* timeout); 443 dbus_bool_t dbus_timeout_get_enabled (DBusTimeout* timeout); 444 // END dbus/dbus-connection.d 445 // START dbus/dbus-pending-call.d 446 DBusPendingCall* dbus_pending_call_ref (DBusPendingCall* pending); 447 void dbus_pending_call_unref (DBusPendingCall* pending); 448 dbus_bool_t dbus_pending_call_set_notify (DBusPendingCall* pending, DBusPendingCallNotifyFunction function_, void* user_data, DBusFreeFunction free_user_data); 449 void dbus_pending_call_cancel (DBusPendingCall* pending); 450 dbus_bool_t dbus_pending_call_get_completed (DBusPendingCall* pending); 451 DBusMessage* dbus_pending_call_steal_reply (DBusPendingCall* pending); 452 void dbus_pending_call_block (DBusPendingCall* pending); 453 dbus_bool_t dbus_pending_call_allocate_data_slot (dbus_int32_t* slot_p); 454 void dbus_pending_call_free_data_slot (dbus_int32_t* slot_p); 455 dbus_bool_t dbus_pending_call_set_data (DBusPendingCall* pending, dbus_int32_t slot, void* data, DBusFreeFunction free_data_func); 456 void* dbus_pending_call_get_data (DBusPendingCall* pending, dbus_int32_t slot); 457 // END dbus/dbus-pending-call.d 458 // START dbus/dbus-server.d 459 alias void function (DBusServer*, DBusConnection*, void*) DBusNewConnectionFunction; 460 461 struct DBusServer; 462 463 464 DBusServer* dbus_server_listen (const(char)* address, DBusError* error); 465 DBusServer* dbus_server_ref (DBusServer* server); 466 void dbus_server_unref (DBusServer* server); 467 void dbus_server_disconnect (DBusServer* server); 468 dbus_bool_t dbus_server_get_is_connected (DBusServer* server); 469 char* dbus_server_get_address (DBusServer* server); 470 char* dbus_server_get_id (DBusServer* server); 471 void dbus_server_set_new_connection_function (DBusServer* server, DBusNewConnectionFunction function_, void* data, DBusFreeFunction free_data_function); 472 dbus_bool_t dbus_server_set_watch_functions (DBusServer* server, DBusAddWatchFunction add_function, DBusRemoveWatchFunction remove_function, DBusWatchToggledFunction toggled_function, void* data, DBusFreeFunction free_data_function); 473 dbus_bool_t dbus_server_set_timeout_functions (DBusServer* server, DBusAddTimeoutFunction add_function, DBusRemoveTimeoutFunction remove_function, DBusTimeoutToggledFunction toggled_function, void* data, DBusFreeFunction free_data_function); 474 dbus_bool_t dbus_server_set_auth_mechanisms (DBusServer* server, const(char*)* mechanisms); 475 dbus_bool_t dbus_server_allocate_data_slot (dbus_int32_t* slot_p); 476 void dbus_server_free_data_slot (dbus_int32_t* slot_p); 477 dbus_bool_t dbus_server_set_data (DBusServer* server, int slot, void* data, DBusFreeFunction free_data_func); 478 void* dbus_server_get_data (DBusServer* server, int slot); 479 // END dbus/dbus-server.d 480 // START dbus/dbus-bus.d 481 DBusConnection* dbus_bus_get (DBusBusType type, DBusError* error); 482 DBusConnection* dbus_bus_get_private (DBusBusType type, DBusError* error); 483 dbus_bool_t dbus_bus_register (DBusConnection* connection, DBusError* error); 484 dbus_bool_t dbus_bus_set_unique_name (DBusConnection* connection, const(char)* unique_name); 485 const(char)* dbus_bus_get_unique_name (DBusConnection* connection); 486 c_ulong dbus_bus_get_unix_user (DBusConnection* connection, const(char)* name, DBusError* error); 487 char* dbus_bus_get_id (DBusConnection* connection, DBusError* error); 488 int dbus_bus_request_name (DBusConnection* connection, const(char)* name, uint flags, DBusError* error); 489 int dbus_bus_release_name (DBusConnection* connection, const(char)* name, DBusError* error); 490 dbus_bool_t dbus_bus_name_has_owner (DBusConnection* connection, const(char)* name, DBusError* error); 491 dbus_bool_t dbus_bus_start_service_by_name (DBusConnection* connection, const(char)* name, dbus_uint32_t flags, dbus_uint32_t* reply, DBusError* error); 492 void dbus_bus_add_match (DBusConnection* connection, const(char)* rule, DBusError* error); 493 void dbus_bus_remove_match (DBusConnection* connection, const(char)* rule, DBusError* error); 494 // END dbus/dbus-bus.d 495 // START dbus/dbus.d 496 497 // END dbus/dbus.d