chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
transaction: cancel jobs non-recursively on isolate
[elogind.git]
/
src
/
core
/
job.h
diff --git
a/src/core/job.h
b/src/core/job.h
index 0110126ce9f43f872f0d79d9bd71d73e29e82850..2b679735fcb5b02199b80b66524dadfa0291f934 100644
(file)
--- a/
src/core/job.h
+++ b/
src/core/job.h
@@
-28,6
+28,7
@@
typedef struct Job Job;
typedef struct JobDependency JobDependency;
typedef struct Job Job;
typedef struct JobDependency JobDependency;
+typedef struct JobBusClient JobBusClient;
typedef enum JobType JobType;
typedef enum JobState JobState;
typedef enum JobMode JobMode;
typedef enum JobType JobType;
typedef enum JobState JobState;
typedef enum JobMode JobMode;
@@
-99,6
+100,13
@@
struct JobDependency {
bool conflicts;
};
bool conflicts;
};
+struct JobBusClient {
+ LIST_FIELDS(JobBusClient, client);
+ /* Note that this bus object is not ref counted here. */
+ DBusConnection *bus;
+ char name[0];
+};
+
struct Job {
Manager *manager;
Unit *unit;
struct Job {
Manager *manager;
Unit *unit;
@@
-121,9
+129,8
@@
struct Job {
Watch timer_watch;
Watch timer_watch;
- /* Note that this bus object is not ref counted here. */
- DBusConnection *bus;
- char *bus_client;
+ /* There can be more than one client, because of job merging. */
+ LIST_HEAD(JobBusClient, bus_client_list);
JobResult result;
JobResult result;
@@
-134,13
+141,21
@@
struct Job {
bool in_dbus_queue:1;
bool sent_dbus_new_signal:1;
bool ignore_order:1;
bool in_dbus_queue:1;
bool sent_dbus_new_signal:1;
bool ignore_order:1;
+ bool forgot_bus_clients:1;
};
};
+JobBusClient* job_bus_client_new(DBusConnection *connection, const char *name);
+
Job* job_new(Unit *unit, JobType type);
Job* job_new(Unit *unit, JobType type);
+Job* job_new_raw(Unit *unit);
void job_free(Job *job);
void job_free(Job *job);
-void job_install(Job *j);
+Job* job_install(Job *j);
+void job_install_deserialized(Job *j);
void job_uninstall(Job *j);
void job_dump(Job *j, FILE*f, const char *prefix);
void job_uninstall(Job *j);
void job_dump(Job *j, FILE*f, const char *prefix);
+int job_serialize(Job *j, FILE *f, FDSet *fds);
+int job_deserialize(Job *j, FILE *f, FDSet *fds);
+int job_coldplug(Job *j);
JobDependency* job_dependency_new(Job *subject, Job *object, bool matters, bool conflicts);
void job_dependency_free(JobDependency *l);
JobDependency* job_dependency_new(Job *subject, Job *object, bool matters, bool conflicts);
void job_dependency_free(JobDependency *l);
@@
-181,7
+196,7
@@
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);
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, JobResult result);
+int job_finish_and_invalidate(Job *j, JobResult result
, bool recursive
);
char *job_dbus_path(Job *j);
char *job_dbus_path(Job *j);