systemd_jp/
systemd_connection.rs

1use super::systemd_dbus::*;
2
3pub struct SystemdConnection {
4	dbus_connection: DbusConnection,
5}
6
7impl SystemdConnection {
8
9	pub fn new (
10	) -> Result <SystemdConnection, String> {
11
12		let dbus_connection =
13			DbusConnection::get_private (
14				DbusBusType::System,
15			).unwrap ();
16
17		Ok (SystemdConnection {
18			dbus_connection: dbus_connection,
19		})
20
21	}
22
23	pub fn dbus_connection (& self) -> & DbusConnection {
24		& self.dbus_connection
25	}
26
27}
28
29// ex: noet ts=4 filetype=rust