diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-02-01 03:33:24 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-02-01 03:33:24 +0100 |
commit | ea4309869e75497ba6a97c540646cb66a157a4d9 (patch) | |
tree | 8a00d7d42718d74e1b88ecb6e074ce9eb1b8a3fd /dbus-job.c | |
parent | b9f880f4f4903f5dd8198fc1e2e920a9850ac86e (diff) |
add basic (and not very useful) D-Bus support
Diffstat (limited to 'dbus-job.c')
-rw-r--r-- | dbus-job.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/dbus-job.c b/dbus-job.c new file mode 100644 index 0000000000..0ac11bc1fb --- /dev/null +++ b/dbus-job.c @@ -0,0 +1,32 @@ +/*-*- Mode: C; c-basic-offset: 8 -*-*/ + +#include "dbus.h" +#include "log.h" + +static const char introspection[] = + DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE + "<node>" + " <interface name=\"org.freedesktop.systemd1.Job\">" + " </interface>" + BUS_PROPERTIES_INTERFACE + BUS_INTROSPECTABLE_INTERFACE + "</node>"; + +DBusHandlerResult bus_job_message_handler(DBusConnection *connection, DBusMessage *message, void *data) { + Manager *m = data; + + assert(connection); + assert(message); + assert(m); + + log_debug("Got D-Bus request: %s.%s() on %s", + dbus_message_get_interface(message), + dbus_message_get_member(message), + dbus_message_get_path(message)); + + return bus_default_message_handler(m, message, introspection, NULL); +} + +const DBusObjectPathVTable bus_job_vtable = { + .message_function = bus_job_message_handler +}; |