dbus-manager.c revision e677bf7ef610acdc5068b9d5d4c79556a236e52f
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog This file is part of systemd.
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog Copyright 2010 Lennart Poettering
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog systemd is free software; you can redistribute it and/or modify it
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog under the terms of the GNU Lesser General Public License as published by
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog the Free Software Foundation; either version 2.1 of the License, or
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog (at your option) any later version.
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog systemd is distributed in the hope that it will be useful, but
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog WITHOUT ANY WARRANTY; without even the implied warranty of
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog Lesser General Public License for more details.
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog You should have received a copy of the GNU Lesser General Public License
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog along with systemd; If not, see <http://www.gnu.org/licenses/>.
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <interface name=\"org.freedesktop.systemd1.Manager\">\n"
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog#define BUS_MANAGER_INTERFACE_METHODS \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"GetUnit\">\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"unit\" type=\"o\" direction=\"out\"/>\n" \
89ca10c6a61309d84d54c5dc5a295387ce39e610Lennart Poettering " </method>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"GetUnitByPID\">\n" \
89ca10c6a61309d84d54c5dc5a295387ce39e610Lennart Poettering " <arg name=\"pid\" type=\"u\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"unit\" type=\"o\" direction=\"out\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " </method>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"LoadUnit\">\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"unit\" type=\"o\" direction=\"out\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " </method>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"StartUnit\">\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"mode\" type=\"s\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"job\" type=\"o\" direction=\"out\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " </method>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"StartUnitReplace\">\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"old_unit\" type=\"s\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"new_unit\" type=\"s\" direction=\"in\"/>\n" \
996d16975b4d802335188a3be2bbc3635c1287f3Tom Gundersen " <arg name=\"mode\" type=\"s\" direction=\"in\"/>\n" \
996d16975b4d802335188a3be2bbc3635c1287f3Tom Gundersen " <arg name=\"job\" type=\"o\" direction=\"out\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " </method>\n" \
996d16975b4d802335188a3be2bbc3635c1287f3Tom Gundersen " <method name=\"StopUnit\">\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"mode\" type=\"s\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"job\" type=\"o\" direction=\"out\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " </method>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"ReloadUnit\">\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"mode\" type=\"s\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"job\" type=\"o\" direction=\"out\"/>\n" \
996d16975b4d802335188a3be2bbc3635c1287f3Tom Gundersen " </method>\n" \
996d16975b4d802335188a3be2bbc3635c1287f3Tom Gundersen " <method name=\"RestartUnit\">\n" \
996d16975b4d802335188a3be2bbc3635c1287f3Tom Gundersen " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"mode\" type=\"s\" direction=\"in\"/>\n" \
996d16975b4d802335188a3be2bbc3635c1287f3Tom Gundersen " <arg name=\"job\" type=\"o\" direction=\"out\"/>\n" \
996d16975b4d802335188a3be2bbc3635c1287f3Tom Gundersen " </method>\n" \
996d16975b4d802335188a3be2bbc3635c1287f3Tom Gundersen " <method name=\"TryRestartUnit\">\n" \
996d16975b4d802335188a3be2bbc3635c1287f3Tom Gundersen " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"mode\" type=\"s\" direction=\"in\"/>\n" \
996d16975b4d802335188a3be2bbc3635c1287f3Tom Gundersen " <arg name=\"job\" type=\"o\" direction=\"out\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " </method>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"ReloadOrRestartUnit\">\n" \
996d16975b4d802335188a3be2bbc3635c1287f3Tom Gundersen " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
996d16975b4d802335188a3be2bbc3635c1287f3Tom Gundersen " <arg name=\"mode\" type=\"s\" direction=\"in\"/>\n" \
996d16975b4d802335188a3be2bbc3635c1287f3Tom Gundersen " <arg name=\"job\" type=\"o\" direction=\"out\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " </method>\n" \
996d16975b4d802335188a3be2bbc3635c1287f3Tom Gundersen " <method name=\"ReloadOrTryRestartUnit\">\n" \
996d16975b4d802335188a3be2bbc3635c1287f3Tom Gundersen " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
996d16975b4d802335188a3be2bbc3635c1287f3Tom Gundersen " <arg name=\"mode\" type=\"s\" direction=\"in\"/>\n" \
996d16975b4d802335188a3be2bbc3635c1287f3Tom Gundersen " <arg name=\"job\" type=\"o\" direction=\"out\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " </method>\n" \
996d16975b4d802335188a3be2bbc3635c1287f3Tom Gundersen " <method name=\"KillUnit\">\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"who\" type=\"s\" direction=\"in\"/>\n" \
996d16975b4d802335188a3be2bbc3635c1287f3Tom Gundersen " <arg name=\"mode\" type=\"s\" direction=\"in\"/>\n" \
996d16975b4d802335188a3be2bbc3635c1287f3Tom Gundersen " <arg name=\"signal\" type=\"i\" direction=\"in\"/>\n" \
996d16975b4d802335188a3be2bbc3635c1287f3Tom Gundersen " </method>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"ResetFailedUnit\">\n" \
996d16975b4d802335188a3be2bbc3635c1287f3Tom Gundersen " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " </method>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"GetJob\">\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"id\" type=\"u\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"job\" type=\"o\" direction=\"out\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " </method>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"ClearJobs\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"ResetFailed\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"ListUnits\">\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"units\" type=\"a(ssssssouso)\" direction=\"out\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " </method>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"ListJobs\">\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"jobs\" type=\"a(usssoo)\" direction=\"out\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " </method>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"Subscribe\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"Unsubscribe\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"Dump\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"CreateSnapshot\">\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"cleanup\" type=\"b\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"unit\" type=\"o\" direction=\"out\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " </method>\n" \
e3dca0089b7b50e2ec21409d1292727921d06102Tom Gundersen " <method name=\"Reload\"/>\n" \
e3dca0089b7b50e2ec21409d1292727921d06102Tom Gundersen " <method name=\"Reexecute\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"Exit\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"Reboot\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"PowerOff\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"Halt\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"KExec\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"SetEnvironment\">\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"names\" type=\"as\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " </method>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"UnsetEnvironment\">\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"names\" type=\"as\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " </method>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"UnsetAndSetEnvironment\">\n" \
b45e4eb679ad0c9a77c4fe6e404c8842d4097fdbTom Gundersen " <arg name=\"unset\" type=\"as\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"set\" type=\"as\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " </method>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"ListUnitFiles\">\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"changes\" type=\"a(ss)\" direction=\"out\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " </method>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"GetUnitFileState\">\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"file\" type=\"s\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"state\" type=\"s\" direction=\"out\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " </method>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"EnableUnitFiles\">\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"files\" type=\"as\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"runtime\" type=\"b\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"force\" type=\"b\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"carries_install_info\" type=\"b\" direction=\"out\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"changes\" type=\"a(sss)\" direction=\"out\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " </method>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"DisableUnitFiles\">\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"files\" type=\"as\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"runtime\" type=\"b\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"changes\" type=\"a(sss)\" direction=\"out\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " </method>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"ReenableUnitFiles\">\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"files\" type=\"as\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"runtime\" type=\"b\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"force\" type=\"b\" direction=\"in\"/>\n" \
89ca10c6a61309d84d54c5dc5a295387ce39e610Lennart Poettering " <arg name=\"carries_install_info\" type=\"b\" direction=\"out\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"changes\" type=\"a(sss)\" direction=\"out\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " </method>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"LinkUnitFiles\">\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"files\" type=\"as\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"runtime\" type=\"b\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"force\" type=\"b\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"changes\" type=\"a(sss)\" direction=\"out\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " </method>\n" \
e3dca0089b7b50e2ec21409d1292727921d06102Tom Gundersen " <method name=\"PresetUnitFiles\">\n" \
e3dca0089b7b50e2ec21409d1292727921d06102Tom Gundersen " <arg name=\"files\" type=\"as\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"runtime\" type=\"b\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"force\" type=\"b\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"carries_install_info\" type=\"b\" direction=\"out\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"changes\" type=\"a(sss)\" direction=\"out\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " </method>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"MaskUnitFiles\">\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"files\" type=\"as\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"runtime\" type=\"b\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"force\" type=\"b\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"changes\" type=\"a(sss)\" direction=\"out\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " </method>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <method name=\"UnmaskUnitFiles\">\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"files\" type=\"as\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"runtime\" type=\"b\" direction=\"in\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"changes\" type=\"a(sss)\" direction=\"out\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog#define BUS_MANAGER_INTERFACE_SIGNALS \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <signal name=\"UnitNew\">\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"id\" type=\"s\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"unit\" type=\"o\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " </signal>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <signal name=\"UnitRemoved\">\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"id\" type=\"s\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"unit\" type=\"o\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " </signal>\n" \
a64edefacbad4f3d538b45a6a65d8a5a03797d78Thomas Hindoe Paaboel Andersen " <signal name=\"JobNew\">\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"id\" type=\"u\"/>\n" \
e3dca0089b7b50e2ec21409d1292727921d06102Tom Gundersen " <arg name=\"job\" type=\"o\"/>\n" \
e3dca0089b7b50e2ec21409d1292727921d06102Tom Gundersen " </signal>\n" \
e3dca0089b7b50e2ec21409d1292727921d06102Tom Gundersen " <signal name=\"JobRemoved\">\n" \
e3dca0089b7b50e2ec21409d1292727921d06102Tom Gundersen " <arg name=\"id\" type=\"u\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"job\" type=\"o\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"result\" type=\"s\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <signal name=\"StartupFinished\">\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"kernel\" type=\"t\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"initrd\" type=\"t\"/>\n" \
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog " <arg name=\"userspace\" type=\"t\"/>\n" \
#define BUS_MANAGER_INTERFACE_PROPERTIES_GENERAL \
#ifdef HAVE_SYSV_COMPAT
#define BUS_MANAGER_INTERFACE_PROPERTIES_SYSV \
#define BUS_MANAGER_INTERFACE_END \
#define BUS_MANAGER_INTERFACE \
#define INTROSPECTION_BEGIN \
#define INTROSPECTION_END \
#define INTERFACES_LIST \
"org.freedesktop.systemd1.Manager\0"
static DEFINE_BUS_PROPERTY_APPEND_ENUM(bus_manager_append_running_as, manager_running_as, ManagerRunningAs);
assert(i);
assert(m);
if (m->taint_usr)
free(p);
if (hwclock_is_localtime() > 0)
t = buf;
return -ENOMEM;
assert(i);
return -ENOMEM;
assert(i);
dbus_message_iter_get_basic(i, &t);
return log_set_target_from_string(t);
assert(i);
return -ENOMEM;
assert(i);
dbus_message_iter_get_basic(i, &t);
return log_set_max_level_from_string(t);
uint32_t u;
assert(i);
assert(m);
return -ENOMEM;
uint32_t u;
assert(i);
assert(m);
return -ENOMEM;
assert(i);
assert(m);
return -ENOMEM;
assert(m);
if ((s = dbus_message_get_sender(m)))
DBusMessage *m,
unsigned n_changes,
int carries_install_info) {
if (!reply)
return NULL;
if (carries_install_info >= 0) {
dbus_bool_t b;
b = !!carries_install_info;
goto oom;
goto oom;
for (i = 0; i < n_changes; i++) {
goto oom;
goto oom;
return reply;
oom:
return NULL;
DBusMessage *s;
s = dbus_message_new_signal("/org/freedesktop/systemd1", "org.freedesktop.systemd1.Manager", "UnitFilesChanged");
return -ENOMEM;
r = bus_broadcast(m, s);
dbus_bool_t b;
assert(i);
return -ENOMEM;
static int bus_manager_set_runtime_watchdog_usec(DBusMessageIter *i, const char *property, void *data) {
assert(i);
dbus_message_iter_get_basic(i, t);
return watchdog_set_timeout(t);
static const char systemd_property_string[] =
{ NULL, }
{ "InitRDTimestamp", bus_property_append_uint64, "t", offsetof(Manager, initrd_timestamp.realtime) },
{ "InitRDTimestampMonotonic", bus_property_append_uint64, "t", offsetof(Manager, initrd_timestamp.monotonic) },
{ "StartupTimestamp", bus_property_append_uint64, "t", offsetof(Manager, startup_timestamp.realtime) },
{ "StartupTimestampMonotonic", bus_property_append_uint64, "t", offsetof(Manager, startup_timestamp.monotonic) },
{ "FinishTimestamp", bus_property_append_uint64, "t", offsetof(Manager, finish_timestamp.realtime) },
{ "FinishTimestampMonotonic", bus_property_append_uint64, "t", offsetof(Manager, finish_timestamp.monotonic) },
{ "ControlGroupHierarchy", bus_property_append_string, "s", offsetof(Manager, cgroup_hierarchy), true },
{ "DefaultControllers", bus_property_append_strv, "as", offsetof(Manager, default_controllers), true },
{ "DefaultStandardOutput", bus_manager_append_exec_output, "s", offsetof(Manager, default_std_output) },
{ "DefaultStandardError", bus_manager_append_exec_output, "s", offsetof(Manager, default_std_error) },
{ "RuntimeWatchdogUSec", bus_property_append_usec, "t", offsetof(Manager, runtime_watchdog), false, bus_manager_set_runtime_watchdog_usec },
{ "ShutdownWatchdogUSec", bus_property_append_usec, "t", offsetof(Manager, shutdown_watchdog), false, bus_property_set_usec },
#ifdef HAVE_SYSV_COMPAT
{ "SysVInitPath", bus_property_append_strv, "as", offsetof(Manager, lookup_paths.sysvinit_path), true },
{ "SysVRcndPath", bus_property_append_strv, "as", offsetof(Manager, lookup_paths.sysvrcnd_path), true },
{ NULL, }
static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection, DBusMessage *message, void *data) {
bool reload_if_possible = false;
const char *member;
assert(m);
const char *name;
Unit *u;
if (!dbus_message_get_args(
&error,
goto oom;
goto oom;
if (!dbus_message_append_args(
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "GetUnitByPID")) {
Unit *u;
if (!dbus_message_get_args(
&error,
dbus_set_error(&error, BUS_ERROR_NO_SUCH_UNIT, "No unit for PID %lu is loaded.", (unsigned long) pid);
goto oom;
goto oom;
if (!dbus_message_append_args(
goto oom;
const char *name;
Unit *u;
if (!dbus_message_get_args(
&error,
goto oom;
goto oom;
if (!dbus_message_append_args(
goto oom;
else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "StartUnitReplace"))
else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "TryRestartUnit"))
else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "ReloadOrRestartUnit")) {
reload_if_possible = true;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "ReloadOrTryRestartUnit")) {
reload_if_possible = true;
Unit *u;
if (!dbus_message_get_args(
&error,
if (who < 0)
if (mode < 0)
goto oom;
Job *j;
if (!dbus_message_get_args(
&error,
goto oom;
goto oom;
if (!dbus_message_append_args(
goto oom;
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "ResetFailed")) {
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "ResetFailedUnit")) {
const char *name;
Unit *u;
if (!dbus_message_get_args(
&error,
goto oom;
Iterator i;
Unit *u;
goto oom;
goto oom;
Unit *f;
if (k != u->id)
goto oom;
f = unit_following(u);
goto oom;
if (u->job) {
goto oom;
job_id = 0;
if (u->job)
goto oom;
if (u->job)
goto oom;
goto oom;
Iterator i;
Job *j;
goto oom;
goto oom;
goto oom;
goto oom;
goto oom;
goto oom;
goto oom;
goto oom;
char *client;
Set *s;
goto oom;
set_free(s);
goto oom;
goto oom;
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "Unsubscribe")) {
char *client;
if (!(client = set_remove(BUS_CONNECTION_SUBSCRIBED(m, connection), (char*) message_get_sender_with_fallback(message)))) {
goto oom;
FILE *f;
goto oom;
goto oom;
if (ferror(f)) {
fclose(f);
goto oom;
fclose(f);
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "CreateSnapshot")) {
const char *name;
Snapshot *s;
if (!dbus_message_get_args(
&error,
goto oom;
goto oom;
if (!dbus_message_append_args(
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.DBus.Introspectable", "Introspect")) {
FILE *f;
Iterator i;
Unit *u;
Job *j;
goto oom;
goto oom;
if (k != u->id)
if (!(p = bus_path_escape(k))) {
fclose(f);
goto oom;
free(p);
if (ferror(f)) {
fclose(f);
goto oom;
fclose(f);
if (!introspection)
goto oom;
goto oom;
goto oom;
dbus_set_error(&error, BUS_ERROR_NOT_SUPPORTED, "Exit is only supported for user service managers.");
goto oom;
goto oom;
dbus_set_error(&error, BUS_ERROR_NOT_SUPPORTED, "Powering off is only supported for system managers.");
goto oom;
goto oom;
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "SetEnvironment")) {
if (r == -ENOMEM)
goto oom;
strv_free(l);
goto oom;
strv_free(e);
goto oom;
m->environment = e;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "UnsetEnvironment")) {
if (r == -ENOMEM)
goto oom;
strv_free(l);
goto oom;
strv_free(e);
goto oom;
m->environment = e;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "UnsetAndSetEnvironment")) {
goto oom;
if (r == -ENOMEM)
goto oom;
if (r == -ENOMEM)
goto oom;
goto oom;
strv_free(e);
goto oom;
strv_free(f);
goto oom;
m->environment = f;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "ListUnitFiles")) {
Hashmap *h;
Iterator i;
if (!reply)
goto oom;
goto oom;
r = unit_file_get_list(m->running_as == MANAGER_SYSTEM ? UNIT_FILE_SYSTEM : UNIT_FILE_USER, NULL, h);
goto oom;
const char *state;
goto oom;
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "GetUnitFileState")) {
const char *name;
if (!dbus_message_get_args(
&error,
state = unit_file_get_state(m->running_as == MANAGER_SYSTEM ? UNIT_FILE_SYSTEM : UNIT_FILE_USER, NULL, name);
if (state < 0)
assert(s);
if (!reply)
goto oom;
if (!dbus_message_append_args(
DBUS_TYPE_STRING, &s,
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "EnableUnitFiles") ||
char **l = NULL;
unsigned n_changes = 0;
goto oom;
if (r == -ENOMEM)
goto oom;
strv_free(l);
carries_install_info = r;
carries_install_info = r;
carries_install_info = r;
strv_free(l);
if (!reply)
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "DisableUnitFiles") ||
char **l = NULL;
unsigned n_changes = 0;
goto oom;
if (r == -ENOMEM)
goto oom;
strv_free(l);
strv_free(l);
if (!reply)
goto oom;
{ NULL, }
Job *j;
Unit *u;
&error,
&error,
if (old_name)
!u->job ||
dbus_set_error(&error, BUS_ERROR_ONLY_BY_DEPENDENCY, "Operation refused, may be requested by dependency only.");
if (!cl)
goto oom;
goto oom;
goto oom;
if (!dbus_message_append_args(
goto oom;
if (reply) {
goto oom;
return DBUS_HANDLER_RESULT_HANDLED;
oom:
if (reply)
return DBUS_HANDLER_RESULT_NEED_MEMORY;