summaryrefslogtreecommitdiffstats
path: root/third_party/rust/libdbus-sys
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
commit2aa4a82499d4becd2284cdb482213d541b8804dd (patch)
treeb80bf8bf13c3766139fbacc530efd0dd9d54394c /third_party/rust/libdbus-sys
parentInitial commit. (diff)
downloadfirefox-upstream.tar.xz
firefox-upstream.zip
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/rust/libdbus-sys')
-rw-r--r--third_party/rust/libdbus-sys/.cargo-checksum.json1
-rw-r--r--third_party/rust/libdbus-sys/Cargo.toml28
-rw-r--r--third_party/rust/libdbus-sys/LICENSE-APACHE202
-rw-r--r--third_party/rust/libdbus-sys/LICENSE-MIT19
-rw-r--r--third_party/rust/libdbus-sys/build.rs7
-rw-r--r--third_party/rust/libdbus-sys/src/lib.rs300
6 files changed, 557 insertions, 0 deletions
diff --git a/third_party/rust/libdbus-sys/.cargo-checksum.json b/third_party/rust/libdbus-sys/.cargo-checksum.json
new file mode 100644
index 0000000000..5d73e519be
--- /dev/null
+++ b/third_party/rust/libdbus-sys/.cargo-checksum.json
@@ -0,0 +1 @@
+{"files":{"Cargo.toml":"7054b852a13a318562f3ef791e69802f234c9f3d943f2de2d1cef8b31fd0939a","LICENSE-APACHE":"453745410e3be8cf25d56872ea2aec975a78e6c9f217443d0bf908a5bce7c8ff","LICENSE-MIT":"de3911c2d98c8bd2d701ee721347053d9b55995a11f9a8c955e44d3ca1b376bf","build.rs":"9fbc218277d76a570c01c5795a7c8008f5458317cc036d7c88b1dc1a4af22fb7","src/lib.rs":"c8a0d43a3b7e9c8828d4946437379f1985492bd6b04fdd5e967bbcace2197c3d"},"package":"18cb88963258d00f4962205dbb5933d82780d9962c8c8a064b651d2ad7189210"} \ No newline at end of file
diff --git a/third_party/rust/libdbus-sys/Cargo.toml b/third_party/rust/libdbus-sys/Cargo.toml
new file mode 100644
index 0000000000..070d6ecaab
--- /dev/null
+++ b/third_party/rust/libdbus-sys/Cargo.toml
@@ -0,0 +1,28 @@
+# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
+#
+# When uploading crates to the registry Cargo will automatically
+# "normalize" Cargo.toml files for maximal compatibility
+# with all versions of Cargo and also rewrite `path` dependencies
+# to registry (e.g. crates.io) dependencies
+#
+# If you believe there's an error in this file please file an
+# issue against the rust-lang/cargo repository. If you're
+# editing this file be aware that the upstream Cargo.toml
+# will likely look very different (and much more reasonable)
+
+[package]
+name = "libdbus-sys"
+version = "0.1.5"
+authors = ["David Henningsson <diwic@ubuntu.com>"]
+build = "build.rs"
+links = "dbus"
+description = "FFI bindings to libdbus."
+documentation = "http://docs.rs/libdbus-sys"
+keywords = ["D-Bus", "DBus", "libdbus"]
+categories = ["os::unix-apis", "external-ffi-bindings"]
+license = "Apache-2.0/MIT"
+repository = "https://github.com/diwic/dbus-rs"
+[package.metadata.pkg-config]
+dbus-1 = "1.6"
+[build-dependencies.pkg-config]
+version = "0.3"
diff --git a/third_party/rust/libdbus-sys/LICENSE-APACHE b/third_party/rust/libdbus-sys/LICENSE-APACHE
new file mode 100644
index 0000000000..6003c7dd9a
--- /dev/null
+++ b/third_party/rust/libdbus-sys/LICENSE-APACHE
@@ -0,0 +1,202 @@
+Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "{}"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2014-2018 David Henningsson <diwic@ubuntu.com> and other contributors
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
diff --git a/third_party/rust/libdbus-sys/LICENSE-MIT b/third_party/rust/libdbus-sys/LICENSE-MIT
new file mode 100644
index 0000000000..aec16d2daa
--- /dev/null
+++ b/third_party/rust/libdbus-sys/LICENSE-MIT
@@ -0,0 +1,19 @@
+Copyright (c) 2014-2018 David Henningsson <diwic@ubuntu.com> and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE. \ No newline at end of file
diff --git a/third_party/rust/libdbus-sys/build.rs b/third_party/rust/libdbus-sys/build.rs
new file mode 100644
index 0000000000..463a38007e
--- /dev/null
+++ b/third_party/rust/libdbus-sys/build.rs
@@ -0,0 +1,7 @@
+extern crate pkg_config;
+
+fn main() {
+ // See https://github.com/joshtriplett/metadeps/issues/9 for why we don't use
+ // metadeps here, but instead keep this manually in sync with Cargo.toml.
+ pkg_config::Config::new().atleast_version("1.6").probe("dbus-1").unwrap();
+}
diff --git a/third_party/rust/libdbus-sys/src/lib.rs b/third_party/rust/libdbus-sys/src/lib.rs
new file mode 100644
index 0000000000..80fbf14e2a
--- /dev/null
+++ b/third_party/rust/libdbus-sys/src/lib.rs
@@ -0,0 +1,300 @@
+use std::os::raw::{c_void, c_char, c_uint, c_int, c_long};
+
+pub type DBusConnection = c_void;
+pub type DBusMessage = c_void;
+pub type DBusWatch = c_void;
+pub type DBusPendingCall = c_void;
+pub type DBusTimeout = c_void;
+
+#[repr(C)]
+#[derive(Debug, PartialEq, Copy, Clone)]
+pub enum DBusBusType {
+ Session = 0,
+ System = 1,
+ Starter = 2,
+}
+
+pub const DBUS_TYPE_ARRAY: c_int = 'a' as c_int;
+pub const DBUS_TYPE_VARIANT: c_int = 'v' as c_int;
+pub const DBUS_TYPE_BOOLEAN: c_int = 'b' as c_int;
+pub const DBUS_TYPE_INVALID: c_int = 0;
+pub const DBUS_TYPE_STRING: c_int = 's' as c_int;
+pub const DBUS_TYPE_DICT_ENTRY: c_int = 'e' as c_int;
+pub const DBUS_TYPE_BYTE: c_int = 'y' as c_int;
+pub const DBUS_TYPE_INT16: c_int = 'n' as c_int;
+pub const DBUS_TYPE_UINT16: c_int = 'q' as c_int;
+pub const DBUS_TYPE_INT32: c_int = 'i' as c_int;
+pub const DBUS_TYPE_UINT32: c_int = 'u' as c_int;
+pub const DBUS_TYPE_INT64: c_int = 'x' as c_int;
+pub const DBUS_TYPE_UINT64: c_int = 't' as c_int;
+pub const DBUS_TYPE_DOUBLE: c_int = 'd' as c_int;
+pub const DBUS_TYPE_UNIX_FD: c_int = 'h' as c_int;
+pub const DBUS_TYPE_STRUCT: c_int = 'r' as c_int;
+pub const DBUS_TYPE_OBJECT_PATH: c_int = 'o' as c_int;
+pub const DBUS_TYPE_SIGNATURE: c_int = 'g' as c_int;
+
+pub const DBUS_TIMEOUT_USE_DEFAULT: c_int = -1;
+pub const DBUS_TIMEOUT_INFINITE: c_int = 0x7fffffff;
+
+pub const DBUS_NAME_FLAG_ALLOW_REPLACEMENT: c_int = 1;
+pub const DBUS_NAME_FLAG_REPLACE_EXISTING: c_int = 2;
+pub const DBUS_NAME_FLAG_DO_NOT_QUEUE: c_int = 4;
+
+pub const DBUS_WATCH_READABLE: c_int = 1;
+pub const DBUS_WATCH_WRITABLE: c_int = 2;
+pub const DBUS_WATCH_ERROR: c_int = 4;
+pub const DBUS_WATCH_HANGUP: c_int = 8;
+
+#[repr(C)]
+#[derive(Debug, PartialEq, Copy, Clone)]
+pub enum DBusRequestNameReply {
+ PrimaryOwner = 1,
+ InQueue = 2,
+ Exists = 3,
+ AlreadyOwner = 4,
+}
+
+#[repr(C)]
+#[derive(Debug, PartialEq, Copy, Clone)]
+pub enum DBusReleaseNameReply {
+ Released = 1,
+ NonExistent = 2,
+ NotOwner = 3,
+}
+
+#[repr(C)]
+#[derive(Debug, PartialEq, Copy, Clone)]
+pub enum DBusHandlerResult {
+ Handled = 0,
+ NotYetHandled = 1,
+ NeedMemory = 2,
+}
+
+#[repr(C)]
+#[derive(Debug, PartialEq, Copy, Clone)]
+pub enum DBusMessageType {
+ Invalid = 0,
+ MethodCall = 1,
+ MethodReturn = 2,
+ Error = 3,
+ Signal = 4,
+}
+
+#[repr(C)]
+#[derive(Debug, PartialEq, Copy, Clone)]
+pub enum DBusDispatchStatus {
+ DataRemains = 0,
+ Complete = 1,
+ NeedMemory = 2,
+}
+
+#[repr(C)]
+pub struct DBusError {
+ pub name: *const c_char,
+ pub message: *const c_char,
+ pub dummy: c_uint,
+ pub padding1: *const c_void
+}
+
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct DBusMessageIter {
+ pub dummy1: *mut c_void,
+ pub dummy2: *mut c_void,
+ pub dummy3: u32,
+ pub dummy4: c_int,
+ pub dummy5: c_int,
+ pub dummy6: c_int,
+ pub dummy7: c_int,
+ pub dummy8: c_int,
+ pub dummy9: c_int,
+ pub dummy10: c_int,
+ pub dummy11: c_int,
+ pub pad1: c_int,
+ pub pad2: c_int,
+ // Here would have been padding; because pad3 is a 8 byte aligned pointer (on amd64).
+ // Rust reserves the right not to copy the padding when cloning a struct,
+ // but the D-Bus library uses this part of the struct too.
+ // Hence, add a field as big as the padding to ensure Rust copies all data.
+ pub pad2_added_by_rust: c_int,
+ pub pad3: *mut c_void,
+}
+
+pub type DBusHandleMessageFunction = Option<extern fn(conn: *mut DBusConnection, msg: *mut DBusMessage, user_data: *mut c_void) -> DBusHandlerResult>;
+
+pub type DBusAddWatchFunction = Option<extern fn(watch: *mut DBusWatch, user_data: *mut c_void) -> u32>;
+pub type DBusRemoveWatchFunction = Option<extern fn(watch: *mut DBusWatch, user_data: *mut c_void)>;
+pub type DBusWatchToggledFunction = Option<extern fn(watch: *mut DBusWatch, user_data: *mut c_void)>;
+
+pub type DBusAddTimeoutFunction = Option<extern fn(timeout: *mut DBusTimeout, user_data: *mut c_void) -> u32>;
+pub type DBusTimeoutToggledFunction = Option<extern fn(timeout: *mut DBusTimeout, user_data: *mut c_void)>;
+pub type DBusRemoveTimeoutFunction = Option<extern fn(timeout: *mut DBusTimeout, user_data: *mut c_void)>;
+
+pub type DBusDispatchStatusFunction = Option<extern fn(conn: *mut DBusConnection, new_status: DBusDispatchStatus, user_data: *mut c_void)>;
+
+pub type DBusWakeupMainFunction = Option<extern fn(conn: *mut DBusConnection, user_data: *mut c_void)>;
+
+pub type DBusPendingCallNotifyFunction = Option<extern fn(pending: *mut DBusPendingCall, user_data: *mut c_void)>;
+
+pub type DBusFreeFunction = Option<extern fn(memory: *mut c_void)>;
+
+#[repr(C)]
+pub struct DBusObjectPathVTable {
+ pub unregister_function: Option<extern fn(conn: *mut DBusConnection, user_data: *mut c_void)>,
+ pub message_function: DBusHandleMessageFunction,
+ pub dbus_internal_pad1: Option<extern fn()>,
+ pub dbus_internal_pad2: Option<extern fn()>,
+ pub dbus_internal_pad3: Option<extern fn()>,
+ pub dbus_internal_pad4: Option<extern fn()>,
+}
+
+extern "C" {
+ pub fn dbus_bus_get_private(t: DBusBusType, error: *mut DBusError) -> *mut DBusConnection;
+ pub fn dbus_bus_get_unique_name(conn: *mut DBusConnection) -> *const c_char;
+ pub fn dbus_bus_request_name(conn: *mut DBusConnection, name: *const c_char,
+ flags: c_uint, error: *mut DBusError) -> c_int;
+ pub fn dbus_bus_release_name(conn: *mut DBusConnection, name: *const c_char,
+ error: *mut DBusError) -> c_int;
+ pub fn dbus_bus_add_match(conn: *mut DBusConnection, rule: *const c_char,
+ error: *mut DBusError);
+ pub fn dbus_bus_remove_match(conn: *mut DBusConnection, rule: *const c_char,
+ error: *mut DBusError);
+ pub fn dbus_bus_register(conn: *mut DBusConnection, error: *mut DBusError) -> bool;
+
+ pub fn dbus_connection_close(conn: *mut DBusConnection);
+ pub fn dbus_connection_dispatch(conn: *mut DBusConnection) -> DBusDispatchStatus;
+ pub fn dbus_connection_flush(conn: *mut DBusConnection);
+ pub fn dbus_connection_open_private(address: *const c_char, error: *mut DBusError) -> *mut DBusConnection;
+ pub fn dbus_connection_unref(conn: *mut DBusConnection);
+ pub fn dbus_connection_get_is_connected(conn: *mut DBusConnection) -> bool;
+ pub fn dbus_connection_set_exit_on_disconnect(conn: *mut DBusConnection, enable: u32);
+ pub fn dbus_connection_send_with_reply_and_block(conn: *mut DBusConnection,
+ message: *mut DBusMessage, timeout_milliseconds: c_int, error: *mut DBusError) -> *mut DBusMessage;
+ pub fn dbus_connection_send_with_reply(conn: *mut DBusConnection,
+ message: *mut DBusMessage, pending_return: *mut *mut DBusPendingCall, timeout_milliseconds: c_int) -> u32;
+ pub fn dbus_connection_send(conn: *mut DBusConnection,
+ message: *mut DBusMessage, serial: *mut u32) -> u32;
+ pub fn dbus_connection_read_write_dispatch(conn: *mut DBusConnection,
+ timeout_milliseconds: c_int) -> u32;
+ pub fn dbus_connection_try_register_object_path(conn: *mut DBusConnection,
+ path: *const c_char, vtable: *const DBusObjectPathVTable, user_data: *mut c_void,
+ error: *mut DBusError) -> u32;
+ pub fn dbus_connection_unregister_object_path(conn: *mut DBusConnection,
+ path: *const c_char) -> u32;
+ pub fn dbus_connection_list_registered(conn: *mut DBusConnection,
+ parent_path: *const c_char, child_entries: *mut *mut *mut c_char) -> u32;
+ pub fn dbus_connection_add_filter(conn: *mut DBusConnection, function: DBusHandleMessageFunction,
+ user_data: *mut c_void, free_data_function: DBusFreeFunction) -> u32;
+ pub fn dbus_connection_remove_filter(conn: *mut DBusConnection, function: DBusHandleMessageFunction,
+ user_data: *mut c_void) -> u32;
+ pub fn dbus_connection_set_watch_functions(conn: *mut DBusConnection, add_function: DBusAddWatchFunction,
+ remove_function: DBusRemoveWatchFunction, toggled_function: DBusWatchToggledFunction,
+ data: *mut c_void, free_data_function: DBusFreeFunction) -> u32;
+ pub fn dbus_connection_set_timeout_functions(conn: *mut DBusConnection, add_function: DBusAddTimeoutFunction,
+ remove_function: DBusRemoveTimeoutFunction, toggled_function: DBusTimeoutToggledFunction,
+ data: *mut c_void, free_data_function: DBusFreeFunction) -> u32;
+ pub fn dbus_connection_set_dispatch_status_function(conn: *mut DBusConnection,
+ dispatch_function: DBusDispatchStatusFunction, data: *mut c_void, free_data_function: DBusFreeFunction);
+ pub fn dbus_connection_set_wakeup_main_function(conn: *mut DBusConnection,
+ wakeup_function: DBusWakeupMainFunction, data: *mut c_void, free_data_function: DBusFreeFunction);
+
+ pub fn dbus_error_init(error: *mut DBusError);
+ pub fn dbus_error_free(error: *mut DBusError);
+ pub fn dbus_set_error(error: *mut DBusError, name: *const c_char, message: *const c_char, ...);
+ pub fn dbus_set_error_from_message(error: *mut DBusError, message: *mut DBusMessage) -> u32;
+
+ pub fn dbus_message_new_method_call(destination: *const c_char, path: *const c_char,
+ iface: *const c_char, method: *const c_char) -> *mut DBusMessage;
+ pub fn dbus_message_new_method_return(message: *mut DBusMessage) -> *mut DBusMessage;
+ pub fn dbus_message_new_error(message: *mut DBusMessage,
+ error_name: *const c_char, error_message: *const c_char) -> *mut DBusMessage;
+ pub fn dbus_message_new_signal(path: *const c_char,
+ iface: *const c_char, name: *const c_char) -> *mut DBusMessage;
+ pub fn dbus_message_ref(message: *mut DBusMessage) -> *mut DBusMessage;
+ pub fn dbus_message_unref(message: *mut DBusMessage);
+ pub fn dbus_message_get_type(message: *mut DBusMessage) -> c_int;
+ pub fn dbus_message_is_method_call(message: *mut DBusMessage, iface: *const c_char, method: *const c_char) -> u32;
+ pub fn dbus_message_is_signal(message: *mut DBusMessage, iface: *const c_char, signal_name: *const c_char) -> u32;
+ pub fn dbus_message_get_reply_serial(message: *mut DBusMessage) -> u32;
+ pub fn dbus_message_get_serial(message: *mut DBusMessage) -> u32;
+ pub fn dbus_message_get_path(message: *mut DBusMessage) -> *const c_char;
+ pub fn dbus_message_get_interface(message: *mut DBusMessage) -> *const c_char;
+ pub fn dbus_message_get_destination(message: *mut DBusMessage) -> *const c_char;
+ pub fn dbus_message_get_member(message: *mut DBusMessage) -> *const c_char;
+ pub fn dbus_message_get_sender(message: *mut DBusMessage) -> *const c_char;
+ pub fn dbus_message_set_serial(message: *mut DBusMessage, serial: u32);
+ pub fn dbus_message_set_destination(message: *mut DBusMessage, destination: *const c_char) -> u32;
+ pub fn dbus_message_get_no_reply(message: *mut DBusMessage) -> u32;
+ pub fn dbus_message_set_no_reply(message: *mut DBusMessage, no_reply: u32);
+ pub fn dbus_message_get_auto_start(message: *mut DBusMessage) -> u32;
+ pub fn dbus_message_set_auto_start(message: *mut DBusMessage, no_reply: u32);
+
+ pub fn dbus_message_iter_append_basic(iter: *mut DBusMessageIter, t: c_int, value: *const c_void) -> u32;
+ pub fn dbus_message_iter_append_fixed_array(iter: *mut DBusMessageIter, element_type: c_int,
+ value: *const c_void, n_elements: c_int) -> u32;
+ pub fn dbus_message_iter_init(message: *mut DBusMessage, iter: *mut DBusMessageIter) -> u32;
+ pub fn dbus_message_iter_init_append(message: *mut DBusMessage, iter: *mut DBusMessageIter);
+ pub fn dbus_message_iter_get_arg_type(iter: *mut DBusMessageIter) -> c_int;
+ pub fn dbus_message_iter_get_basic(iter: *mut DBusMessageIter, value: *mut c_void);
+ pub fn dbus_message_iter_get_element_type(iter: *mut DBusMessageIter) -> c_int;
+ pub fn dbus_message_iter_get_fixed_array(iter: *mut DBusMessageIter,
+ value: *mut c_void, n_elements: *mut c_int) -> u32;
+ pub fn dbus_message_iter_get_signature(iter: *mut DBusMessageIter) -> *mut c_char;
+ pub fn dbus_message_iter_next(iter: *mut DBusMessageIter) -> u32;
+ pub fn dbus_message_iter_recurse(iter: *mut DBusMessageIter, subiter: *mut DBusMessageIter);
+ pub fn dbus_message_iter_open_container(iter: *mut DBusMessageIter, _type: c_int,
+ contained_signature: *const c_char, sub: *mut DBusMessageIter) -> u32;
+ pub fn dbus_message_iter_close_container(iter: *mut DBusMessageIter, sub: *mut DBusMessageIter) -> u32;
+
+ pub fn dbus_free(memory: *mut c_void);
+ pub fn dbus_free_string_array(str_array: *mut *mut c_char) -> c_void;
+
+ pub fn dbus_signature_validate_single(signature: *const c_char, error: *mut DBusError) -> u32;
+
+ pub fn dbus_threads_init_default() -> c_int;
+
+ pub fn dbus_validate_bus_name(busname: *const c_char, error: *mut DBusError) -> u32;
+ pub fn dbus_validate_error_name(errorname: *const c_char, error: *mut DBusError) -> u32;
+ pub fn dbus_validate_interface(interface: *const c_char, error: *mut DBusError) -> u32;
+ pub fn dbus_validate_member(member: *const c_char, error: *mut DBusError) -> u32;
+ pub fn dbus_validate_path(path: *const c_char, error: *mut DBusError) -> u32;
+
+ pub fn dbus_watch_get_enabled(watch: *mut DBusWatch) -> u32;
+ pub fn dbus_watch_get_flags(watch: *mut DBusWatch) -> c_uint;
+ pub fn dbus_watch_get_unix_fd(watch: *mut DBusWatch) -> c_int;
+ pub fn dbus_watch_handle(watch: *mut DBusWatch, flags: c_uint) -> u32;
+ pub fn dbus_watch_get_data(watch: *mut DBusWatch) -> *mut c_void;
+ pub fn dbus_watch_set_data(watch: *mut DBusWatch, user_data: *mut c_void,
+ free_data_function: DBusFreeFunction);
+
+ pub fn dbus_timeout_get_enabled(timeout: *mut DBusTimeout) -> u32;
+ pub fn dbus_timeout_get_interval(timeout: *mut DBusTimeout) -> c_int;
+ pub fn dbus_timeout_handle(timeout: *mut DBusTimeout) -> u32;
+ pub fn dbus_timeout_get_data(timeout: *mut DBusTimeout) -> *mut c_void;
+ pub fn dbus_timeout_set_data(timeout: *mut DBusTimeout, user_data: *mut c_void,
+ free_data_function: DBusFreeFunction);
+
+ pub fn dbus_pending_call_ref(pending: *mut DBusPendingCall) -> *mut DBusPendingCall;
+ pub fn dbus_pending_call_unref(pending: *mut DBusPendingCall);
+ pub fn dbus_pending_call_set_notify(pending: *mut DBusPendingCall, n: DBusPendingCallNotifyFunction,
+ user_data: *mut c_void, free_user_data: DBusFreeFunction) -> u32;
+ pub fn dbus_pending_call_steal_reply(pending: *mut DBusPendingCall) -> *mut DBusMessage;
+
+ pub fn dbus_message_marshal(msg: *mut DBusMessage, marshalled_data_p: *mut *mut c_char, len_p: *mut c_int) -> u32;
+ pub fn dbus_message_demarshal(s: *const c_char, len: c_int, error: *mut DBusError) -> *mut DBusMessage;
+ pub fn dbus_message_demarshal_bytes_needed(buf: *const c_char, len: c_int) -> c_int;
+
+ pub fn dbus_connection_set_max_message_size(conn: *mut DBusConnection, size: c_long);
+ pub fn dbus_connection_get_max_message_size(conn: *mut DBusConnection) -> c_long;
+ pub fn dbus_connection_set_max_message_unix_fds(conn: *mut DBusConnection, n: c_long);
+ pub fn dbus_connection_get_max_message_unix_fds(conn: *mut DBusConnection) -> c_long;
+
+ pub fn dbus_connection_set_max_received_size(conn: *mut DBusConnection, size: c_long);
+ pub fn dbus_connection_get_max_received_size(conn: *mut DBusConnection) -> c_long;
+ pub fn dbus_connection_set_max_received_unix_fds(conn: *mut DBusConnection, n: c_long);
+ pub fn dbus_connection_get_max_received_unix_fds(conn: *mut DBusConnection) -> c_long;
+
+ pub fn dbus_connection_get_outgoing_size(conn: *mut DBusConnection) -> c_long;
+ pub fn dbus_connection_get_outgoing_unix_fds(conn: *mut DBusConnection) -> c_long;
+ pub fn dbus_connection_has_messages_to_send(conn: *mut DBusConnection) -> u32;
+}