summaryrefslogtreecommitdiff
path: root/src/job.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-07-17 04:09:28 +0200
committerLennart Poettering <lennart@poettering.net>2010-07-17 04:09:28 +0200
commitfaf919f1ebebdfc13f769bb6585e64e7ad4b301b (patch)
tree8fb54ae1edeffef63cf72fb40b278b57cb727e18 /src/job.h
parent064f51fa29c1dfd7c0704feb969eb59119e57854 (diff)
job: timeout every job independently of the unit
Diffstat (limited to 'src/job.h')
-rw-r--r--src/job.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/job.h b/src/job.h
index 9c685f1dad..41d697e842 100644
--- a/src/job.h
+++ b/src/job.h
@@ -102,6 +102,8 @@ struct Job {
JobType type;
JobState state;
+ Watch timer_watch;
+
/* Note that this bus object is not ref counted here. */
DBusConnection *bus;
char *bus_client;
@@ -138,9 +140,14 @@ bool job_is_runnable(Job *j);
void job_add_to_run_queue(Job *j);
void job_add_to_dbus_queue(Job *j);
+int job_start_timer(Job *j);
+void job_timer_event(Job *j, uint64_t n_elapsed, Watch *w);
+
int job_run_and_invalidate(Job *j);
int job_finish_and_invalidate(Job *j, bool success);
+char *job_dbus_path(Job *j);
+
const char* job_type_to_string(JobType t);
JobType job_type_from_string(const char *s);
@@ -150,6 +157,4 @@ JobState job_state_from_string(const char *s);
const char* job_mode_to_string(JobMode t);
JobMode job_mode_from_string(const char *s);
-char *job_dbus_path(Job *j);
-
#endif