1 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
6 This file is part of systemd.
8 Copyright 2013 Lennart Poettering
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
33 typedef struct Manager Manager;
42 Hashmap *machine_units;
43 Hashmap *machine_leaders;
45 LIST_HEAD(Machine, machine_gc_queue);
48 Manager *manager_new(void);
49 void manager_free(Manager *m);
51 int manager_add_machine(Manager *m, const char *name, Machine **_machine);
52 int manager_enumerate_machines(Manager *m);
54 int manager_startup(Manager *m);
55 int manager_run(Manager *m);
57 void manager_gc(Manager *m, bool drop_not_started);
59 int manager_get_machine_by_pid(Manager *m, pid_t pid, Machine **machine);
61 extern const sd_bus_vtable manager_vtable[];
63 int match_reloading(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error);
64 int match_unit_removed(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error);
65 int match_properties_changed(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error);
66 int match_job_removed(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error);
68 int manager_start_scope(Manager *manager, const char *scope, pid_t pid, const char *slice, const char *description, sd_bus_message *more_properties, sd_bus_error *error, char **job);
69 int manager_stop_unit(Manager *manager, const char *unit, sd_bus_error *error, char **job);
70 int manager_kill_unit(Manager *manager, const char *unit, int signo, sd_bus_error *error);
71 int manager_unit_is_active(Manager *manager, const char *unit);
72 int manager_job_is_active(Manager *manager, const char *path);