]>
Commit | Line | Data |
---|---|---|
75778e21 MS |
1 | #ifndef footransactionhfoo |
2 | #define footransactionhfoo | |
3 | ||
4 | typedef struct Transaction Transaction; | |
5 | ||
6 | #include "unit.h" | |
7 | #include "manager.h" | |
8 | #include "job.h" | |
9 | #include "hashmap.h" | |
10 | ||
11 | struct Transaction { | |
12 | /* Jobs to be added */ | |
13 | Hashmap *jobs; /* Unit object => Job object list 1:1 */ | |
b94fbd30 | 14 | Job *anchor_job; /* the job the user asked for */ |
75778e21 MS |
15 | }; |
16 | ||
17 | Transaction *transaction_new(void); | |
18 | void transaction_free(Transaction *tr); | |
19 | ||
20 | int transaction_add_job_and_dependencies( | |
21 | Transaction *tr, | |
22 | JobType type, | |
23 | Unit *unit, | |
24 | Job *by, | |
25 | bool matters, | |
26 | bool override, | |
27 | bool conflicts, | |
28 | bool ignore_requirements, | |
29 | bool ignore_order, | |
b94fbd30 | 30 | DBusError *e); |
75778e21 MS |
31 | int transaction_activate(Transaction *tr, Manager *m, JobMode mode, DBusError *e); |
32 | int transaction_add_isolate_jobs(Transaction *tr, Manager *m); | |
33 | void transaction_abort(Transaction *tr); | |
34 | ||
35 | #endif |