summaryrefslogtreecommitdiff
path: root/src/dbus-job.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-job.c
parent6d526de26737a0f1e8d1cf422da364d29489022e (diff)
dbus: automatically generate and install introspection files
Diffstat (limited to 'src/dbus-job.c')
-rw-r--r--src/dbus-job.c35
1 files changed, 20 insertions, 15 deletions
diff --git a/src/dbus-job.c b/src/dbus-job.c
index 34e64fc681..7346252a18 100644
--- a/src/dbus-job.c
+++ b/src/dbus-job.c
@@ -25,20 +25,25 @@
#include "log.h"
#include "dbus-job.h"
-static const char introspection[] =
- DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE
- "<node>"
- " <interface name=\"org.freedesktop.systemd1.Job\">"
- " <method name=\"Cancel\"/>"
- " <signal name=\"Changed\"/>"
- " <property name=\"Id\" type=\"u\" access=\"read\"/>"
- " <property name=\"Unit\" type=\"(so)\" access=\"read\"/>"
- " <property name=\"JobType\" type=\"s\" access=\"read\"/>"
- " <property name=\"State\" type=\"s\" access=\"read\"/>"
- " </interface>"
- BUS_PROPERTIES_INTERFACE
- BUS_INTROSPECTABLE_INTERFACE
- "</node>";
+#define BUS_JOB_INTERFACE \
+ " <interface name=\"org.freedesktop.systemd1.Job\">\n" \
+ " <method name=\"Cancel\"/>\n" \
+ " <signal name=\"Changed\"/>\n" \
+ " <property name=\"Id\" type=\"u\" access=\"read\"/>\n" \
+ " <property name=\"Unit\" type=\"(so)\" access=\"read\"/>\n" \
+ " <property name=\"JobType\" type=\"s\" access=\"read\"/>\n" \
+ " <property name=\"State\" type=\"s\" access=\"read\"/>\n" \
+ " </interface>\n"
+
+#define INTROSPECTION \
+ DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE \
+ "<node>\n" \
+ BUS_JOB_INTERFACE \
+ BUS_PROPERTIES_INTERFACE \
+ BUS_INTROSPECTABLE_INTERFACE \
+ "</node>\n"
+
+const char bus_job_interface[] = BUS_JOB_INTERFACE;
static DEFINE_BUS_PROPERTY_APPEND_ENUM(bus_job_append_state, job_state, JobState);
static DEFINE_BUS_PROPERTY_APPEND_ENUM(bus_job_append_type, job_type, JobType);
@@ -92,7 +97,7 @@ static DBusHandlerResult bus_job_message_dispatch(Job *j, DBusMessage *message)
job_free(j);
} else
- return bus_default_message_handler(j->manager, message, introspection, properties);
+ return bus_default_message_handler(j->manager, message, INTROSPECTION, properties);
if (reply) {
if (!dbus_connection_send(m->api_bus, reply, NULL))