]>
Commit | Line | Data |
---|---|---|
7c0436b9 LP |
1 | /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ |
2 | ||
05d3a176 | 3 | #pragma once |
75778e21 | 4 | |
7c0436b9 LP |
5 | /*** |
6 | This file is part of systemd. | |
7 | ||
8 | Copyright 2010 Lennart Poettering | |
9 | ||
10 | systemd is free software; you can redistribute it and/or modify it | |
11 | under the terms of the GNU Lesser General Public License as published by | |
12 | the Free Software Foundation; either version 2.1 of the License, or | |
13 | (at your option) any later version. | |
14 | ||
15 | systemd is distributed in the hope that it will be useful, but | |
16 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
18 | Lesser General Public License for more details. | |
19 | ||
20 | You should have received a copy of the GNU Lesser General Public License | |
21 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
22 | ***/ | |
23 | ||
75778e21 MS |
24 | typedef struct Transaction Transaction; |
25 | ||
26 | #include "unit.h" | |
27 | #include "manager.h" | |
28 | #include "job.h" | |
29 | #include "hashmap.h" | |
30 | ||
31 | struct Transaction { | |
32 | /* Jobs to be added */ | |
33 | Hashmap *jobs; /* Unit object => Job object list 1:1 */ | |
b94fbd30 | 34 | Job *anchor_job; /* the job the user asked for */ |
23ade460 | 35 | bool irreversible; |
75778e21 MS |
36 | }; |
37 | ||
23ade460 | 38 | Transaction *transaction_new(bool irreversible); |
75778e21 MS |
39 | void transaction_free(Transaction *tr); |
40 | ||
41 | int transaction_add_job_and_dependencies( | |
42 | Transaction *tr, | |
43 | JobType type, | |
44 | Unit *unit, | |
45 | Job *by, | |
46 | bool matters, | |
47 | bool override, | |
48 | bool conflicts, | |
49 | bool ignore_requirements, | |
50 | bool ignore_order, | |
b94fbd30 | 51 | DBusError *e); |
75778e21 MS |
52 | int transaction_activate(Transaction *tr, Manager *m, JobMode mode, DBusError *e); |
53 | int transaction_add_isolate_jobs(Transaction *tr, Manager *m); | |
54 | void transaction_abort(Transaction *tr); |