]>
Commit | Line | Data |
---|---|---|
53e1b683 | 1 | /* SPDX-License-Identifier: LGPL-2.1+ */ |
291d565a LP |
2 | #pragma once |
3 | ||
4 | /*** | |
5 | This file is part of systemd. | |
6 | ||
7 | Copyright 2016 Lennart Poettering | |
8 | ||
9 | systemd is free software; you can redistribute it and/or modify it | |
10 | under the terms of the GNU Lesser General Public License as published by | |
11 | the Free Software Foundation; either version 2.1 of the License, or | |
12 | (at your option) any later version. | |
13 | ||
14 | systemd is distributed in the hope that it will be useful, but | |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
17 | Lesser General Public License for more details. | |
18 | ||
19 | You should have received a copy of the GNU Lesser General Public License | |
20 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
21 | ***/ | |
22 | ||
23 | #include "sd-bus.h" | |
24 | ||
25 | #include "output-mode.h" | |
26 | #include "install.h" | |
27 | ||
20b16441 LP |
28 | typedef struct UnitInfo { |
29 | const char *machine; | |
30 | const char *id; | |
31 | const char *description; | |
32 | const char *load_state; | |
33 | const char *active_state; | |
34 | const char *sub_state; | |
35 | const char *following; | |
36 | const char *unit_path; | |
37 | uint32_t job_id; | |
38 | const char *job_type; | |
39 | const char *job_path; | |
40 | } UnitInfo; | |
41 | ||
42 | int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u); | |
43 | ||
44 | int bus_append_unit_property_assignment(sd_bus_message *m, const char *assignment); | |
8673cf13 | 45 | int bus_append_unit_property_assignment_many(sd_bus_message *m, char **l); |
20b16441 LP |
46 | |
47 | typedef struct BusWaitForJobs BusWaitForJobs; | |
48 | ||
49 | int bus_wait_for_jobs_new(sd_bus *bus, BusWaitForJobs **ret); | |
50 | void bus_wait_for_jobs_free(BusWaitForJobs *d); | |
51 | int bus_wait_for_jobs_add(BusWaitForJobs *d, const char *path); | |
52 | int bus_wait_for_jobs(BusWaitForJobs *d, bool quiet, const char* const* extra_args); | |
53 | int bus_wait_for_jobs_one(BusWaitForJobs *d, const char *path, bool quiet); | |
54 | ||
55 | DEFINE_TRIVIAL_CLEANUP_FUNC(BusWaitForJobs*, bus_wait_for_jobs_free); | |
56 | ||
57 | int bus_deserialize_and_dump_unit_file_changes(sd_bus_message *m, bool quiet, UnitFileChange **changes, unsigned *n_changes); | |
58 | ||
291d565a | 59 | int unit_show_processes(sd_bus *bus, const char *unit, const char *cgroup_path, const char *prefix, unsigned n_columns, OutputFlags flags, sd_bus_error *error); |