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