summaryrefslogtreecommitdiff
path: root/src/dbus-swap.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-05-23 03:45:33 +0200
committerLennart Poettering <lennart@poettering.net>2010-05-23 03:45:33 +0200
commit4288f619215e3dda0b75113d78e4fb7ba219ed58 (patch)
treef7e3c8d3d710ae29bcb1313323a843ea1e375d89 /src/dbus-swap.c
parent6d526de26737a0f1e8d1cf422da364d29489022e (diff)
dbus: automatically generate and install introspection files
Diffstat (limited to 'src/dbus-swap.c')
-rw-r--r--src/dbus-swap.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/src/dbus-swap.c b/src/dbus-swap.c
index e935e09bf2..f6f8685daf 100644
--- a/src/dbus-swap.c
+++ b/src/dbus-swap.c
@@ -25,17 +25,22 @@
#include "dbus-unit.h"
#include "dbus-swap.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.Swap\">"
- " <property name=\"What\" type=\"s\" access=\"read\"/>"
- " <property name=\"Priority\" type=\"i\" access=\"read\"/>"
- " </interface>"
- BUS_INTROSPECTABLE_INTERFACE
- "</node>";
+#define BUS_SWAP_INTERFACE \
+ " <interface name=\"org.freedesktop.systemd1.Swap\">\n" \
+ " <property name=\"What\" type=\"s\" access=\"read\"/>\n" \
+ " <property name=\"Priority\" type=\"i\" access=\"read\"/>\n" \
+ " </interface>\n"
+
+#define INTROSPECTION \
+ DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE \
+ "<node>\n" \
+ BUS_UNIT_INTERFACE \
+ BUS_SWAP_INTERFACE \
+ BUS_PROPERTIES_INTERFACE \
+ BUS_INTROSPECTABLE_INTERFACE \
+ "</node>\n"
+
+const char bus_swap_interface[] = BUS_SWAP_INTERFACE;
static int bus_swap_append_priority(Manager *m, DBusMessageIter *i, const char *property, void *data) {
Swap *s = data;
@@ -69,5 +74,5 @@ DBusHandlerResult bus_swap_message_handler(Unit *u, DBusMessage *message) {
{ NULL, NULL, NULL, NULL, NULL }
};
- return bus_default_message_handler(u->meta.manager, message, introspection, properties);
+ return bus_default_message_handler(u->meta.manager, message, INTROSPECTION, properties);
}