1 /*-*- Mode: C; c-basic-offset: 8 -*-*/
4 This file is part of systemd.
6 Copyright 2010 Lennart Poettering
8 systemd is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 systemd is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with systemd; If not, see <http://www.gnu.org/licenses/>.
26 #include "dbus-manager.h"
28 #include "bus-errors.h"
30 #define BUS_MANAGER_INTERFACE \
31 " <interface name=\"org.freedesktop.systemd1.Manager\">\n" \
32 " <method name=\"GetUnit\">\n" \
33 " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
34 " <arg name=\"unit\" type=\"o\" direction=\"out\"/>\n" \
36 " <method name=\"LoadUnit\">\n" \
37 " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
38 " <arg name=\"unit\" type=\"o\" direction=\"out\"/>\n" \
40 " <method name=\"StartUnit\">\n" \
41 " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
42 " <arg name=\"mode\" type=\"s\" direction=\"in\"/>\n" \
43 " <arg name=\"job\" type=\"o\" direction=\"out\"/>\n" \
45 " <method name=\"StopUnit\">\n" \
46 " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
47 " <arg name=\"mode\" type=\"s\" direction=\"in\"/>\n" \
48 " <arg name=\"job\" type=\"o\" direction=\"out\"/>\n" \
50 " <method name=\"ReloadUnit\">\n" \
51 " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
52 " <arg name=\"mode\" type=\"s\" direction=\"in\"/>\n" \
53 " <arg name=\"job\" type=\"o\" direction=\"out\"/>\n" \
55 " <method name=\"RestartUnit\">\n" \
56 " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
57 " <arg name=\"mode\" type=\"s\" direction=\"in\"/>\n" \
58 " <arg name=\"job\" type=\"o\" direction=\"out\"/>\n" \
60 " <method name=\"TryRestartUnit\">\n" \
61 " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
62 " <arg name=\"mode\" type=\"s\" direction=\"in\"/>\n" \
63 " <arg name=\"job\" type=\"o\" direction=\"out\"/>\n" \
65 " <method name=\"GetJob\">\n" \
66 " <arg name=\"id\" type=\"u\" direction=\"in\"/>\n" \
67 " <arg name=\"job\" type=\"o\" direction=\"out\"/>\n" \
69 " <method name=\"ClearJobs\"/>\n" \
70 " <method name=\"ListUnits\">\n" \
71 " <arg name=\"units\" type=\"a(sssssouso)\" direction=\"out\"/>\n" \
73 " <method name=\"ListJobs\">\n" \
74 " <arg name=\"jobs\" type=\"a(usssoo)\" direction=\"out\"/>\n" \
76 " <method name=\"Subscribe\"/>\n" \
77 " <method name=\"Unsubscribe\"/>\n" \
78 " <method name=\"Dump\"/>\n" \
79 " <method name=\"CreateSnapshot\">\n" \
80 " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
81 " <arg nane=\"cleanup\" type=\"b\" direction=\"in\"/>\n" \
82 " <arg name=\"unit\" type=\"o\" direction=\"out\"/>\n" \
84 " <method name=\"Reload\"/>\n" \
85 " <method name=\"Reexecute\"/>\n" \
86 " <method name=\"Exit\"/>\n" \
87 " <method name=\"SetEnvironment\">\n" \
88 " <arg name=\"names\" type=\"as\" direction=\"in\"/>\n" \
90 " <method name=\"UnsetEnvironment\">\n" \
91 " <arg name=\"names\" type=\"as\" direction=\"in\"/>\n" \
93 " <signal name=\"UnitNew\">\n" \
94 " <arg name=\"id\" type=\"s\"/>\n" \
95 " <arg name=\"unit\" type=\"o\"/>\n" \
97 " <signal name=\"UnitRemoved\">\n" \
98 " <arg name=\"id\" type=\"s\"/>\n" \
99 " <arg name=\"unit\" type=\"o\"/>\n" \
101 " <signal name=\"JobNew\">\n" \
102 " <arg name=\"id\" type=\"u\"/>\n" \
103 " <arg name=\"job\" type=\"o\"/>\n" \
105 " <signal name=\"JobRemoved\">\n" \
106 " <arg name=\"id\" type=\"u\"/>\n" \
107 " <arg name=\"job\" type=\"o\"/>\n" \
108 " <arg name=\"success\" type=\"b\"/>\n" \
110 " <property name=\"Version\" type=\"s\" access=\"read\"/>\n" \
111 " <property name=\"RunningAs\" type=\"s\" access=\"read\"/>\n" \
112 " <property name=\"StartupTimestamp\" type=\"t\" access=\"read\"/>\n" \
113 " <property name=\"LogLevel\" type=\"s\" access=\"read\"/>\n" \
114 " <property name=\"LogTarget\" type=\"s\" access=\"read\"/>\n" \
115 " <property name=\"NNames\" type=\"u\" access=\"read\"/>\n" \
116 " <property name=\"NJobs\" type=\"u\" access=\"read\"/>\n" \
117 " <property name=\"Environment\" type=\"as\" access=\"read\"/>\n" \
118 " <property name=\"ConfirmSpawn\" type=\"b\" access=\"read\"/>\n" \
119 " <property name=\"ShowStatus\" type=\"b\" access=\"read\"/>\n" \
120 " <property name=\"UnitPath\" type=\"as\" access=\"read\"/>\n" \
121 " <property name=\"SysVInitPath\" type=\"as\" access=\"read\"/>\n" \
122 " <property name=\"SysVRcndPath\" type=\"as\" access=\"read\"/>\n" \
123 " <property name=\"NotifySocket\" type=\"s\" access=\"read\"/>\n" \
126 #define INTROSPECTION_BEGIN \
127 DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE \
129 BUS_MANAGER_INTERFACE \
130 BUS_PROPERTIES_INTERFACE \
131 BUS_INTROSPECTABLE_INTERFACE
133 #define INTROSPECTION_END \
136 const char bus_manager_interface[] = BUS_MANAGER_INTERFACE;
138 static DEFINE_BUS_PROPERTY_APPEND_ENUM(bus_manager_append_running_as, manager_running_as, ManagerRunningAs);
140 static int bus_manager_append_log_target(Manager *m, DBusMessageIter *i, const char *property, void *data) {
147 t = log_target_to_string(log_get_target());
149 if (!dbus_message_iter_append_basic(i, DBUS_TYPE_STRING, &t))
155 static int bus_manager_append_log_level(Manager *m, DBusMessageIter *i, const char *property, void *data) {
162 t = log_level_to_string(log_get_max_level());
164 if (!dbus_message_iter_append_basic(i, DBUS_TYPE_STRING, &t))
170 static int bus_manager_append_n_names(Manager *m, DBusMessageIter *i, const char *property, void *data) {
177 u = hashmap_size(m->units);
179 if (!dbus_message_iter_append_basic(i, DBUS_TYPE_UINT32, &u))
185 static int bus_manager_append_n_jobs(Manager *m, DBusMessageIter *i, const char *property, void *data) {
192 u = hashmap_size(m->jobs);
194 if (!dbus_message_iter_append_basic(i, DBUS_TYPE_UINT32, &u))
200 static const char *message_get_sender_with_fallback(DBusMessage *m) {
205 if ((s = dbus_message_get_sender(m)))
208 /* When the message came in from a direct connection the
209 * message will have no sender. We fix that here. */
214 static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection, DBusMessage *message, void *data) {
217 const BusProperty properties[] = {
218 { "org.freedesktop.systemd1.Manager", "Version", bus_property_append_string, "s", PACKAGE_STRING },
219 { "org.freedesktop.systemd1.Manager", "RunningAs", bus_manager_append_running_as, "s", &m->running_as },
220 { "org.freedesktop.systemd1.Manager", "StartupTimestamp", bus_property_append_uint64, "t", &m->startup_timestamp.realtime },
221 { "org.freedesktop.systemd1.Manager", "LogLevel", bus_manager_append_log_level, "s", NULL },
222 { "org.freedesktop.systemd1.Manager", "LogTarget", bus_manager_append_log_target, "s", NULL },
223 { "org.freedesktop.systemd1.Manager", "NNames", bus_manager_append_n_names, "u", NULL },
224 { "org.freedesktop.systemd1.Manager", "NJobs", bus_manager_append_n_jobs, "u", NULL },
225 { "org.freedesktop.systemd1.Manager", "Environment", bus_property_append_strv, "as", m->environment },
226 { "org.freedesktop.systemd1.Manager", "ConfirmSpawn", bus_property_append_bool, "b", &m->confirm_spawn },
227 { "org.freedesktop.systemd1.Manager", "ShowStatus", bus_property_append_bool, "b", &m->show_status },
228 { "org.freedesktop.systemd1.Manager", "UnitPath", bus_property_append_strv, "as", m->lookup_paths.unit_path },
229 { "org.freedesktop.systemd1.Manager", "SysVInitPath", bus_property_append_strv, "as", m->lookup_paths.sysvinit_path },
230 { "org.freedesktop.systemd1.Manager", "SysVRcndPath", bus_property_append_strv, "as", m->lookup_paths.sysvrcnd_path },
231 { "org.freedesktop.systemd1.Manager", "NotifySocket", bus_property_append_string, "s", m->notify_socket },
232 { NULL, NULL, NULL, NULL, NULL }
237 DBusMessage *reply = NULL;
239 JobType job_type = _JOB_TYPE_INVALID;
245 dbus_error_init(&error);
247 if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "GetUnit")) {
251 if (!dbus_message_get_args(
254 DBUS_TYPE_STRING, &name,
256 return bus_send_error_reply(m, connection, message, &error, -EINVAL);
258 if (!(u = manager_get_unit(m, name))) {
259 dbus_set_error(&error, BUS_ERROR_NO_SUCH_UNIT, "Unit %s is not loaded.", name);
260 return bus_send_error_reply(m, connection, message, &error, -ENOENT);
263 if (!(reply = dbus_message_new_method_return(message)))
266 if (!(path = unit_dbus_path(u)))
269 if (!dbus_message_append_args(
271 DBUS_TYPE_OBJECT_PATH, &path,
275 } else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "LoadUnit")) {
279 if (!dbus_message_get_args(
282 DBUS_TYPE_STRING, &name,
284 return bus_send_error_reply(m, connection, message, &error, -EINVAL);
286 if ((r = manager_load_unit(m, name, NULL, &error, &u)) < 0)
287 return bus_send_error_reply(m, connection, message, &error, r);
289 if (!(reply = dbus_message_new_method_return(message)))
292 if (!(path = unit_dbus_path(u)))
295 if (!dbus_message_append_args(
297 DBUS_TYPE_OBJECT_PATH, &path,
301 } else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "StartUnit"))
302 job_type = JOB_START;
303 else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "StopUnit"))
305 else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "ReloadUnit"))
306 job_type = JOB_RELOAD;
307 else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "RestartUnit"))
308 job_type = JOB_RESTART;
309 else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "TryRestartUnit"))
310 job_type = JOB_TRY_RESTART;
311 else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "GetJob")) {
315 if (!dbus_message_get_args(
318 DBUS_TYPE_UINT32, &id,
320 return bus_send_error_reply(m, connection, message, &error, -EINVAL);
322 if (!(j = manager_get_job(m, id))) {
323 dbus_set_error(&error, BUS_ERROR_NO_SUCH_JOB, "Job %u does not exist.", (unsigned) id);
324 return bus_send_error_reply(m, connection, message, &error, -ENOENT);
327 if (!(reply = dbus_message_new_method_return(message)))
330 if (!(path = job_dbus_path(j)))
333 if (!dbus_message_append_args(
335 DBUS_TYPE_OBJECT_PATH, &path,
339 } else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "ClearJobs")) {
341 manager_clear_jobs(m);
343 if (!(reply = dbus_message_new_method_return(message)))
346 } else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "ListUnits")) {
347 DBusMessageIter iter, sub;
352 if (!(reply = dbus_message_new_method_return(message)))
355 dbus_message_iter_init_append(reply, &iter);
357 if (!dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY, "(sssssouso)", &sub))
360 HASHMAP_FOREACH_KEY(u, k, m->units, i) {
361 char *u_path, *j_path;
362 const char *description, *load_state, *active_state, *sub_state, *sjob_type;
363 DBusMessageIter sub2;
369 if (!dbus_message_iter_open_container(&sub, DBUS_TYPE_STRUCT, NULL, &sub2))
372 description = unit_description(u);
373 load_state = unit_load_state_to_string(u->meta.load_state);
374 active_state = unit_active_state_to_string(unit_active_state(u));
375 sub_state = unit_sub_state_to_string(u);
377 if (!(u_path = unit_dbus_path(u)))
381 job_id = (uint32_t) u->meta.job->id;
383 if (!(j_path = job_dbus_path(u->meta.job))) {
388 sjob_type = job_type_to_string(u->meta.job->type);
395 if (!dbus_message_iter_append_basic(&sub2, DBUS_TYPE_STRING, &u->meta.id) ||
396 !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_STRING, &description) ||
397 !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_STRING, &load_state) ||
398 !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_STRING, &active_state) ||
399 !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_STRING, &sub_state) ||
400 !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_OBJECT_PATH, &u_path) ||
401 !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_UINT32, &job_id) ||
402 !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_STRING, &sjob_type) ||
403 !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_OBJECT_PATH, &j_path)) {
414 if (!dbus_message_iter_close_container(&sub, &sub2))
418 if (!dbus_message_iter_close_container(&iter, &sub))
421 } else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "ListJobs")) {
422 DBusMessageIter iter, sub;
426 if (!(reply = dbus_message_new_method_return(message)))
429 dbus_message_iter_init_append(reply, &iter);
431 if (!dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY, "(usssoo)", &sub))
434 HASHMAP_FOREACH(j, m->jobs, i) {
435 char *u_path, *j_path;
436 const char *state, *type;
438 DBusMessageIter sub2;
440 if (!dbus_message_iter_open_container(&sub, DBUS_TYPE_STRUCT, NULL, &sub2))
443 id = (uint32_t) j->id;
444 state = job_state_to_string(j->state);
445 type = job_type_to_string(j->type);
447 if (!(j_path = job_dbus_path(j)))
450 if (!(u_path = unit_dbus_path(j->unit))) {
455 if (!dbus_message_iter_append_basic(&sub2, DBUS_TYPE_UINT32, &id) ||
456 !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_STRING, &j->unit->meta.id) ||
457 !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_STRING, &type) ||
458 !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_STRING, &state) ||
459 !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_OBJECT_PATH, &j_path) ||
460 !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_OBJECT_PATH, &u_path)) {
469 if (!dbus_message_iter_close_container(&sub, &sub2))
473 if (!dbus_message_iter_close_container(&iter, &sub))
476 } else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "Subscribe")) {
480 if (!(s = BUS_CONNECTION_SUBSCRIBED(m, connection))) {
481 if (!(s = set_new(string_hash_func, string_compare_func)))
484 if (!(dbus_connection_set_data(connection, m->subscribed_data_slot, s, NULL))) {
490 if (!(client = strdup(message_get_sender_with_fallback(message))))
493 if ((r = set_put(s, client)) < 0) {
495 return bus_send_error_reply(m, connection, message, NULL, r);
498 if (!(reply = dbus_message_new_method_return(message)))
501 } else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "Unsubscribe")) {
504 if (!(client = set_remove(BUS_CONNECTION_SUBSCRIBED(m, connection), (char*) message_get_sender_with_fallback(message)))) {
505 dbus_set_error(&error, BUS_ERROR_NOT_SUBSCRIBED, "Client is not subscribed.");
506 return bus_send_error_reply(m, connection, message, &error, -ENOENT);
511 if (!(reply = dbus_message_new_method_return(message)))
514 } else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "Dump")) {
519 if (!(reply = dbus_message_new_method_return(message)))
522 if (!(f = open_memstream(&dump, &size)))
525 manager_dump_units(m, f, NULL);
526 manager_dump_jobs(m, f, NULL);
536 if (!dbus_message_append_args(reply, DBUS_TYPE_STRING, &dump, DBUS_TYPE_INVALID)) {
542 } else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "CreateSnapshot")) {
547 if (!dbus_message_get_args(
550 DBUS_TYPE_STRING, &name,
551 DBUS_TYPE_BOOLEAN, &cleanup,
553 return bus_send_error_reply(m, connection, message, &error, -EINVAL);
555 if (name && name[0] == 0)
558 if ((r = snapshot_create(m, name, cleanup, &error, &s)) < 0)
559 return bus_send_error_reply(m, connection, message, &error, r);
561 if (!(reply = dbus_message_new_method_return(message)))
564 if (!(path = unit_dbus_path(UNIT(s))))
567 if (!dbus_message_append_args(
569 DBUS_TYPE_OBJECT_PATH, &path,
573 } else if (dbus_message_is_method_call(message, "org.freedesktop.DBus.Introspectable", "Introspect")) {
574 char *introspection = NULL;
582 if (!(reply = dbus_message_new_method_return(message)))
585 /* We roll our own introspection code here, instead of
586 * relying on bus_default_message_handler() because we
587 * need to generate our introspection string
590 if (!(f = open_memstream(&introspection, &size)))
593 fputs(INTROSPECTION_BEGIN, f);
595 HASHMAP_FOREACH_KEY(u, k, m->units, i) {
601 if (!(p = bus_path_escape(k))) {
607 fprintf(f, "<node name=\"unit/%s\"/>", p);
611 HASHMAP_FOREACH(j, m->jobs, i)
612 fprintf(f, "<node name=\"job/%lu\"/>", (unsigned long) j->id);
614 fputs(INTROSPECTION_END, f);
627 if (!dbus_message_append_args(reply, DBUS_TYPE_STRING, &introspection, DBUS_TYPE_INVALID)) {
634 } else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "Reload")) {
636 assert(!m->queued_message);
638 /* Instead of sending the reply back right away, we
639 * just remember that we need to and then send it
640 * after the reload is finished. That way the caller
641 * knows when the reload finished. */
643 if (!(m->queued_message = dbus_message_new_method_return(message)))
646 m->queued_message_connection = connection;
647 m->exit_code = MANAGER_RELOAD;
649 } else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "Reexecute")) {
651 if (!(reply = dbus_message_new_method_return(message)))
654 m->exit_code = MANAGER_REEXECUTE;
656 } else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "Exit")) {
658 if (m->running_as == MANAGER_SYSTEM) {
659 dbus_set_error(&error, BUS_ERROR_NOT_SUPPORTED, "Exit is only supported for session managers.");
660 return bus_send_error_reply(m, connection, message, &error, -ENOTSUP);
663 if (!(reply = dbus_message_new_method_return(message)))
666 m->exit_code = MANAGER_EXIT;
668 } else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "SetEnvironment")) {
669 char **l = NULL, **e = NULL;
671 if ((r = bus_parse_strv(message, &l)) < 0) {
675 return bus_send_error_reply(m, connection, message, NULL, r);
678 e = strv_env_merge(2, m->environment, l);
684 if (!(reply = dbus_message_new_method_return(message))) {
689 strv_free(m->environment);
692 } else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "UnsetEnvironment")) {
693 char **l = NULL, **e = NULL;
695 if ((r = bus_parse_strv(message, &l)) < 0) {
699 return bus_send_error_reply(m, connection, message, NULL, r);
702 e = strv_env_delete(m->environment, 1, l);
708 if (!(reply = dbus_message_new_method_return(message)))
711 strv_free(m->environment);
715 return bus_default_message_handler(m, connection, message, NULL, properties);
718 if (job_type != _JOB_TYPE_INVALID) {
719 const char *name, *smode;
724 if (!dbus_message_get_args(
727 DBUS_TYPE_STRING, &name,
728 DBUS_TYPE_STRING, &smode,
730 return bus_send_error_reply(m, connection, message, &error, -EINVAL);
732 if ((mode = job_mode_from_string(smode)) == _JOB_MODE_INVALID) {
733 dbus_set_error(&error, BUS_ERROR_INVALID_JOB_MODE, "Job mode %s is invalid.", smode);
734 return bus_send_error_reply(m, connection, message, &error, -EINVAL);
737 if ((r = manager_load_unit(m, name, NULL, &error, &u)) < 0)
738 return bus_send_error_reply(m, connection, message, &error, r);
740 if (job_type == JOB_START && u->meta.only_by_dependency) {
741 dbus_set_error(&error, BUS_ERROR_ONLY_BY_DEPENDENCY, "Unit may be activated by dependency only.");
742 return bus_send_error_reply(m, connection, message, &error, -EPERM);
745 if ((r = manager_add_job(m, job_type, u, mode, true, &error, &j)) < 0)
746 return bus_send_error_reply(m, connection, message, &error, r);
748 if (!(j->bus_client = strdup(message_get_sender_with_fallback(message))))
753 if (!(reply = dbus_message_new_method_return(message)))
756 if (!(path = job_dbus_path(j)))
759 if (!dbus_message_append_args(
761 DBUS_TYPE_OBJECT_PATH, &path,
769 if (!dbus_connection_send(connection, reply, NULL))
772 dbus_message_unref(reply);
775 return DBUS_HANDLER_RESULT_HANDLED;
781 dbus_message_unref(reply);
783 dbus_error_free(&error);
785 return DBUS_HANDLER_RESULT_NEED_MEMORY;
788 const DBusObjectPathVTable bus_manager_vtable = {
789 .message_function = bus_manager_message_handler