1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #pragma once
3 
4 #include "sd-bus.h"
5 
6 #include "install.h"
7 #include "unit-def.h"
8 
9 typedef struct UnitInfo {
10         const char *machine;
11         const char *id;
12         const char *description;
13         const char *load_state;
14         const char *active_state;
15         const char *sub_state;
16         const char *following;
17         const char *unit_path;
18         uint32_t job_id;
19         const char *job_type;
20         const char *job_path;
21 } UnitInfo;
22 
23 int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u);
24 
25 int bus_append_unit_property_assignment(sd_bus_message *m, UnitType t, const char *assignment);
26 int bus_append_unit_property_assignment_many(sd_bus_message *m, UnitType t, char **l);
27 
28 int bus_deserialize_and_dump_unit_file_changes(sd_bus_message *m, bool quiet, UnitFileChange **changes, size_t *n_changes);
29 
30 int unit_load_state(sd_bus *bus, const char *name, char **load_state);
31 
32 int unit_info_compare(const UnitInfo *a, const UnitInfo *b);
33