]> git.ipfire.org Git - people/ms/systemd.git/blame - systemd-interfaces.vala
Merge remote branch 'kay/master'
[people/ms/systemd.git] / systemd-interfaces.vala
CommitLineData
501c7d0b
LP
1using DBus;
2
3[DBus (name = "org.freedesktop.systemd1")]
4public interface Manager : DBus.Object {
5
6 public struct UnitInfo {
7 string id;
8 string description;
9 string load_state;
10 string active_state;
11 ObjectPath unit_path;
12 uint32 job_id;
13 string job_type;
14 ObjectPath job_path;
15 }
16
17 public struct JobInfo {
18 uint32 id;
19 string name;
20 string type;
21 string state;
22 ObjectPath job_path;
23 ObjectPath unit_path;
24 }
25
26 public abstract UnitInfo[] list_units() throws DBus.Error;
27 public abstract JobInfo[] list_jobs() throws DBus.Error;
28
29 public abstract ObjectPath get_unit(string name) throws DBus.Error;
30 public abstract ObjectPath load_unit(string name) throws DBus.Error;
31 public abstract ObjectPath get_job(uint32 id) throws DBus.Error;
32
33 public abstract void clear_jobs() throws DBus.Error;
34}
35
36[DBus (name = "org.freedesktop.systemd1.Unit")]
37public interface Unit : DBus.Object {
38 public abstract string id { owned get; }
39 public abstract string description { owned get; }
40 public abstract string load_state { owned get; }
41 public abstract string active_state { owned get; }
42 public abstract string load_path { owned get; }
43 public abstract uint64 active_enter_timestamp { owned get; }
44 public abstract uint64 active_exit_timestamp { owned get; }
45 public abstract bool can_reload { owned get; }
46 public abstract bool can_start { owned get; }
47
48 public abstract ObjectPath start(string mode) throws DBus.Error;
49 public abstract ObjectPath stop(string mode) throws DBus.Error;
50 public abstract ObjectPath restart(string mode) throws DBus.Error;
51 public abstract ObjectPath reload(string mode) throws DBus.Error;
52}
53
54[DBus (name = "org.freedesktop.systemd1.Job")]
55public interface Job : DBus.Object {
56 public abstract uint32 id { owned get; }
57 public abstract string state { owned get; }
58 public abstract string job_type { owned get; }
59
60 public abstract void cancel() throws DBus.Error;
61}