]>
Commit | Line | Data |
---|---|---|
53e1b683 | 1 | /* SPDX-License-Identifier: LGPL-2.1+ */ |
05d3a176 | 2 | #pragma once |
75778e21 MS |
3 | |
4 | typedef struct Transaction Transaction; | |
5 | ||
75778e21 | 6 | #include "hashmap.h" |
71d35b6b TA |
7 | #include "job.h" |
8 | #include "manager.h" | |
9 | #include "unit.h" | |
75778e21 MS |
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 */ |
23ade460 | 15 | bool irreversible; |
75778e21 MS |
16 | }; |
17 | ||
23ade460 | 18 | Transaction *transaction_new(bool irreversible); |
75778e21 MS |
19 | void transaction_free(Transaction *tr); |
20 | ||
15d167f8 | 21 | void transaction_add_propagate_reload_jobs(Transaction *tr, Unit *unit, Job *by, bool ignore_order, sd_bus_error *e); |
75778e21 MS |
22 | int transaction_add_job_and_dependencies( |
23 | Transaction *tr, | |
24 | JobType type, | |
25 | Unit *unit, | |
26 | Job *by, | |
27 | bool matters, | |
75778e21 MS |
28 | bool conflicts, |
29 | bool ignore_requirements, | |
30 | bool ignore_order, | |
718db961 LP |
31 | sd_bus_error *e); |
32 | int transaction_activate(Transaction *tr, Manager *m, JobMode mode, sd_bus_error *e); | |
75778e21 MS |
33 | int transaction_add_isolate_jobs(Transaction *tr, Manager *m); |
34 | void transaction_abort(Transaction *tr); |