summaryrefslogtreecommitdiff
path: root/job.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-02-01 03:33:24 +0100
committerLennart Poettering <lennart@poettering.net>2010-02-01 03:33:24 +0100
commitea4309869e75497ba6a97c540646cb66a157a4d9 (patch)
tree8a00d7d42718d74e1b88ecb6e074ce9eb1b8a3fd /job.c
parentb9f880f4f4903f5dd8198fc1e2e920a9850ac86e (diff)
add basic (and not very useful) D-Bus support
Diffstat (limited to 'job.c')
-rw-r--r--job.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/job.c b/job.c
index 378a85df6..d02551aff 100644
--- a/job.c
+++ b/job.c
@@ -463,6 +463,17 @@ void job_schedule_run(Job *j) {
j->in_run_queue = true;
}
+char *job_dbus_path(Job *j) {
+ char *p;
+
+ assert(j);
+
+ if (asprintf(&p, "/org/freedesktop/systemd1/job/%lu", (unsigned long) j->id) < 0)
+ return NULL;
+
+ return p;
+}
+
static const char* const job_state_table[_JOB_STATE_MAX] = {
[JOB_WAITING] = "waiting",
[JOB_RUNNING] = "running"