]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/shared/bus-unit-util.h
systemctl: show capabilities in human readable format
[thirdparty/systemd.git] / src / shared / bus-unit-util.h
CommitLineData
291d565a
LP
1#pragma once
2
3/***
4 This file is part of systemd.
5
6 Copyright 2016 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
22#include "sd-bus.h"
23
24#include "output-mode.h"
25#include "install.h"
26
20b16441
LP
27typedef struct UnitInfo {
28 const char *machine;
29 const char *id;
30 const char *description;
31 const char *load_state;
32 const char *active_state;
33 const char *sub_state;
34 const char *following;
35 const char *unit_path;
36 uint32_t job_id;
37 const char *job_type;
38 const char *job_path;
39} UnitInfo;
40
41int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u);
42
43int bus_append_unit_property_assignment(sd_bus_message *m, const char *assignment);
8673cf13 44int bus_append_unit_property_assignment_many(sd_bus_message *m, char **l);
20b16441
LP
45
46typedef struct BusWaitForJobs BusWaitForJobs;
47
48int bus_wait_for_jobs_new(sd_bus *bus, BusWaitForJobs **ret);
49void bus_wait_for_jobs_free(BusWaitForJobs *d);
50int bus_wait_for_jobs_add(BusWaitForJobs *d, const char *path);
51int bus_wait_for_jobs(BusWaitForJobs *d, bool quiet, const char* const* extra_args);
52int bus_wait_for_jobs_one(BusWaitForJobs *d, const char *path, bool quiet);
53
54DEFINE_TRIVIAL_CLEANUP_FUNC(BusWaitForJobs*, bus_wait_for_jobs_free);
55
56int bus_deserialize_and_dump_unit_file_changes(sd_bus_message *m, bool quiet, UnitFileChange **changes, unsigned *n_changes);
57
291d565a 58int 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);