diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-05-23 03:45:33 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-05-23 03:45:33 +0200 |
commit | 4288f619215e3dda0b75113d78e4fb7ba219ed58 (patch) | |
tree | f7e3c8d3d710ae29bcb1313323a843ea1e375d89 /src/dbus-snapshot.c | |
parent | 6d526de26737a0f1e8d1cf422da364d29489022e (diff) |
dbus: automatically generate and install introspection files
Diffstat (limited to 'src/dbus-snapshot.c')
-rw-r--r-- | src/dbus-snapshot.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/src/dbus-snapshot.c b/src/dbus-snapshot.c index 8aeca15254..15e51f032e 100644 --- a/src/dbus-snapshot.c +++ b/src/dbus-snapshot.c @@ -22,17 +22,22 @@ #include "dbus-unit.h" #include "dbus-snapshot.h" -static const char introspection[] = - DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE - "<node>" - BUS_UNIT_INTERFACE - BUS_PROPERTIES_INTERFACE - " <interface name=\"org.freedesktop.systemd1.Snapshot\">" - " <method name=\"Remove\"/>" - " <property name=\"Cleanup\" type=\"b\" access=\"read\"/>" - " </interface>" - BUS_INTROSPECTABLE_INTERFACE - "</node>"; +#define BUS_SNAPSHOT_INTERFACE \ + " <interface name=\"org.freedesktop.systemd1.Snapshot\">\n" \ + " <method name=\"Remove\"/>\n" \ + " <property name=\"Cleanup\" type=\"b\" access=\"read\"/>\n" \ + " </interface>\n" + +#define INTROSPECTION \ + DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE \ + "<node>\n" \ + BUS_UNIT_INTERFACE \ + BUS_SNAPSHOT_INTERFACE \ + BUS_PROPERTIES_INTERFACE \ + BUS_INTROSPECTABLE_INTERFACE \ + "</node>\n" + +const char bus_snapshot_interface[] = BUS_SNAPSHOT_INTERFACE; DBusHandlerResult bus_snapshot_message_handler(Unit *u, DBusMessage *message) { const BusProperty properties[] = { @@ -54,7 +59,7 @@ DBusHandlerResult bus_snapshot_message_handler(Unit *u, DBusMessage *message) { goto oom; } else - return bus_default_message_handler(u->meta.manager, message, introspection, properties); + return bus_default_message_handler(u->meta.manager, message, INTROSPECTION, properties); if (reply) { if (!dbus_connection_send(u->meta.manager->api_bus, reply, NULL)) |