X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fdbus-target.c;h=55cf862de068d9caf65eb648c0adf315d74cef7d;hp=69e82120764e7f8365ef102934287a3b7667e2bf;hb=2af777ba966fcaefb02e87524583917726a470a1;hpb=c4e2ceae941d02de5574becbfd3b4db15de2eda3 diff --git a/src/dbus-target.c b/src/dbus-target.c index 69e821207..55cf862de 100644 --- a/src/dbus-target.c +++ b/src/dbus-target.c @@ -23,6 +23,7 @@ #include "dbus-unit.h" #include "dbus-target.h" +#include "dbus-common.h" #define BUS_TARGET_INTERFACE \ " \n" \ @@ -38,13 +39,17 @@ BUS_INTROSPECTABLE_INTERFACE \ "\n" -const char bus_target_interface[] = BUS_TARGET_INTERFACE; +#define INTERFACES_LIST \ + BUS_UNIT_INTERFACES_LIST \ + "org.freedesktop.systemd1.Target\0" + +const char bus_target_interface[] _introspect_("Target") = BUS_TARGET_INTERFACE; DBusHandlerResult bus_target_message_handler(Unit *u, DBusConnection *c, DBusMessage *message) { - const BusProperty properties[] = { - BUS_UNIT_PROPERTIES, - { NULL, NULL, NULL, NULL, NULL } + const BusBoundProperties bps[] = { + { "org.freedesktop.systemd1.Unit", bus_unit_properties, u }, + { NULL, } }; - return bus_default_message_handler(u->meta.manager, c, message, INTROSPECTION, properties); + return bus_default_message_handler(c, message, INTROSPECTION, INTERFACES_LIST, bps); }