Struct dbus::Connection
[−]
[src]
pub struct Connection { // some fields omitted }
A D-Bus connection. Start here if you want to get on the D-Bus!
Methods
impl Connection
[src]
fn get_private(bus: BusType) -> Result<Connection, Error>
Creates a new D-Bus connection.
fn send_with_reply_and_block(&self, msg: Message, timeout_ms: i32) -> Result<Message, Error>
Sends a message over the D-Bus and waits for a reply. This is usually used for method calls.
fn send(&self, msg: Message) -> Result<u32, ()>
Sends a message over the D-Bus without waiting. Useful for sending signals and method call replies.
fn unique_name(&self) -> String
Get the connection's unique name.
fn iter(&self, timeout_ms: i32) -> ConnectionItems
Check if there are new incoming events
fn register_object_path(&self, path: &str) -> Result<(), Error>
Register an object path.
fn unregister_object_path(&self, path: &str)
Unregister an object path.
fn list_registered_object_paths(&self, path: &str) -> Vec<String>
List registered object paths.
fn register_name(&self, name: &str, flags: u32) -> Result<RequestNameReply, Error>
Register a name.
fn release_name(&self, name: &str) -> Result<ReleaseNameReply, Error>
Release a name.
fn add_match(&self, rule: &str) -> Result<(), Error>
Add a match rule to match messages on the message bus.
fn remove_match(&self, rule: &str) -> Result<(), Error>
Remove a match rule to match messages on the message bus.
fn watch_fds(&self) -> Vec<Watch>
Async I/O: Get an up-to-date list of file descriptors to watch.
fn watch_handle(&self, fd: RawFd, flags: c_uint) -> ConnectionItems
Async I/O: Call this function whenever you detected an event on the Fd, Flags are a set of WatchEvent bits. The returned iterator will return pending items only, never block for new events.