Skip to content

Commit 036bed1

Browse files
authored
Merge pull request #21 from 51yu/loadunit
Add load/reload/restart method for SystemdManager Object
2 parents 21af0f9 + d42419a commit 036bed1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/manager/proxy.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ use crate::{Result, UnitTuple};
66
default_path = "/org/freedesktop/systemd1"
77
)]
88
trait SystemdManager {
9-
fn list_units(&self) -> zbus::Result<Vec<UnitTuple>>;
109
fn get_unit(&self, name: &str) -> zbus::Result<zvariant::OwnedObjectPath>;
10+
fn list_units(&self) -> zbus::Result<Vec<UnitTuple>>;
11+
fn load_unit(&self, name: &str) -> zbus::Result<zvariant::OwnedObjectPath>;
12+
fn reload_unit(&self, name: &str, mode: &str) -> zbus::Result<zvariant::OwnedObjectPath>;
13+
fn restart_unit(&self, name: &str, mode: &str) -> zbus::Result<zvariant::OwnedObjectPath>;
1114
fn start_unit(&self, name: &str, mode: &str) -> zbus::Result<zvariant::OwnedObjectPath>;
1215
fn stop_unit(&self, name: &str, mode: &str) -> zbus::Result<zvariant::OwnedObjectPath>;
1316
#[dbus_proxy(property)]

0 commit comments

Comments
 (0)