2 This file is part of systemd.
4 Copyright 2010 Lennart Poettering
6 systemd is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 systemd is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with systemd; If not, see <http://www.gnu.org/licenses/>.
22 [DBus (name = "org.freedesktop.systemd1.Manager")]
23 public interface Manager : DBus.Object {
25 public struct UnitInfo {
38 public struct JobInfo {
47 public abstract string[] environment { owned get; }
49 public abstract UnitInfo[] list_units() throws DBus.Error;
50 public abstract JobInfo[] list_jobs() throws DBus.Error;
52 public abstract ObjectPath get_unit(string name) throws DBus.Error;
53 public abstract ObjectPath get_unit_by_pid(uint32 pid) throws DBus.Error;
54 public abstract ObjectPath load_unit(string name) throws DBus.Error;
55 public abstract ObjectPath get_job(uint32 id) throws DBus.Error;
57 public abstract ObjectPath start_unit(string name, string mode = "replace") throws DBus.Error;
58 public abstract ObjectPath stop_unit(string name, string mode = "replace") throws DBus.Error;
59 public abstract ObjectPath reload_unit(string name, string mode = "replace") throws DBus.Error;
60 public abstract ObjectPath restart_unit(string name, string mode = "replace") throws DBus.Error;
61 public abstract ObjectPath try_restart_unit(string name, string mode = "replace") throws DBus.Error;
62 public abstract ObjectPath reload_or_restart_unit(string name, string mode = "replace") throws DBus.Error;
63 public abstract ObjectPath reload_or_try_restart_unit(string name, string mode = "replace") throws DBus.Error;
65 public abstract void reset_failed_unit(string name = "") throws DBus.Error;
67 public abstract void clear_jobs() throws DBus.Error;
69 public abstract void subscribe() throws DBus.Error;
70 public abstract void unsubscribe() throws DBus.Error;
72 public abstract string dump() throws DBus.Error;
74 public abstract void reload() throws DBus.Error;
75 public abstract void reexecute() throws DBus.Error;
76 public abstract void exit() throws DBus.Error;
77 public abstract void halt() throws DBus.Error;
78 public abstract void power_off() throws DBus.Error;
79 public abstract void reboot() throws DBus.Error;
80 public abstract void kexec() throws DBus.Error;
82 public abstract ObjectPath create_snapshot(string name = "", bool cleanup = false) throws DBus.Error;
84 public abstract void set_environment(string[] names) throws DBus.Error;
85 public abstract void unset_environment(string[] names) throws DBus.Error;
87 public abstract signal void unit_new(string id, ObjectPath path);
88 public abstract signal void unit_removed(string id, ObjectPath path);
89 public abstract signal void job_new(uint32 id, ObjectPath path);
90 public abstract signal void job_removed(uint32 id, ObjectPath path, bool success);
93 [DBus (name = "org.freedesktop.systemd1.Unit")]
94 public interface Unit : DBus.Object {
95 public struct JobLink {
100 public abstract string id { owned get; }
101 public abstract string[] names { owned get; }
102 public abstract string following { owned get; }
103 public abstract string[] requires { owned get; }
104 public abstract string[] requires_overridable { owned get; }
105 public abstract string[] requisite { owned get; }
106 public abstract string[] requisite_overridable { owned get; }
107 public abstract string[] wants { owned get; }
108 public abstract string[] required_by { owned get; }
109 public abstract string[] required_by_overridable { owned get; }
110 public abstract string[] wanted_by { owned get; }
111 public abstract string[] conflicts { owned get; }
112 public abstract string[] conflicted_by { owned get; }
113 public abstract string[] before { owned get; }
114 public abstract string[] after { owned get; }
115 public abstract string[] on_failure { owned get; }
116 public abstract string description { owned get; }
117 public abstract string load_state { owned get; }
118 public abstract string active_state { owned get; }
119 public abstract string sub_state { owned get; }
120 public abstract string fragment_path { owned get; }
121 public abstract uint64 inactive_exit_timestamp { owned get; }
122 public abstract uint64 active_enter_timestamp { owned get; }
123 public abstract uint64 active_exit_timestamp { owned get; }
124 public abstract uint64 inactive_enter_timestamp { owned get; }
125 public abstract bool can_start { owned get; }
126 public abstract bool can_stop { owned get; }
127 public abstract bool can_reload { owned get; }
128 public abstract JobLink job { owned get; }
129 public abstract bool recursive_stop { owned get; }
130 public abstract bool stop_when_unneeded { owned get; }
131 public abstract bool refuse_manual_start { owned get; }
132 public abstract bool refuse_manual_stop { owned get; }
133 public abstract bool default_dependencies { owned get; }
134 public abstract string default_control_group { owned get; }
135 public abstract string[] control_groups { owned get; }
136 public abstract bool need_daemon_reload { owned get; }
137 public abstract uint64 job_timeout_usec { owned get; }
139 public abstract ObjectPath start(string mode = "replace") throws DBus.Error;
140 public abstract ObjectPath stop(string mode = "replace") throws DBus.Error;
141 public abstract ObjectPath reload(string mode = "replace") throws DBus.Error;
142 public abstract ObjectPath restart(string mode = "replace") throws DBus.Error;
143 public abstract ObjectPath try_restart(string mode = "replace") throws DBus.Error;
144 public abstract ObjectPath reload_or_restart(string mode = "replace") throws DBus.Error;
145 public abstract ObjectPath reload_or_try_restart(string mode = "replace") throws DBus.Error;
147 public abstract void reset_failed() throws DBus.Error;
150 [DBus (name = "org.freedesktop.systemd1.Job")]
151 public interface Job : DBus.Object {
152 public struct UnitLink {
157 public abstract uint32 id { owned get; }
158 public abstract string state { owned get; }
159 public abstract string job_type { owned get; }
160 public abstract UnitLink unit { owned get; }
162 public abstract void cancel() throws DBus.Error;
165 [DBus (name = "org.freedesktop.DBus.Properties")]
166 public interface Properties : DBus.Object {
167 public abstract Value? get(string iface, string property) throws DBus.Error;
168 public abstract signal void properties_changed(string iface, HashTable<string, Value?> changed_properties, string[] invalidated_properties);