[][src]Crate dbus_launch

A D-Bus daemon launcher.

A tool for starting an new isolated instance of a dbus-daemon or a dbus-broker, with option to configure and start services using D-Bus activation.

Intended for the use in integration tests of D-Bus services and utilities.

Examples

Launching a dbus-daemon process

// Start the dbus-daemon.
let daemon = dbus_launch::Launcher::daemon()
    .launch()
    .expect("failed to launch dbus-daemon");

// Use dbus-daemon by connecting to `daemon.address()`.

// Stop the dbus-daemon process by dropping it.
drop(daemon);

Starting custom services using D-Bus activation

use std::path::Path;

let daemon = dbus_launch::Launcher::daemon()
    .service("com.example.Test", Path::new("/usr/lib/test-service"))
    .launch()
    .expect("failed to launch dbus-daemon");

// Use com.example.Test service by connecting to `daemon.address()`.

Structs

Daemon

A running D-Bus daemon process.

Launcher

A D-Bus daemon launcher.

Enums

Auth

An authentication mechanism.

BusType

A well-known message bus type.

DaemonType

A type of a D-Bus daemon.