1 /* SPDX-License-Identifier: LGPL-2.1-or-later */ 2 #pragma once 3 4 #include <stdbool.h> 5 6 #include "sd-bus.h" 7 8 #include "macro.h" 9 #include "set.h" 10 11 typedef enum BusPrintPropertyFlags { 12 BUS_PRINT_PROPERTY_ONLY_VALUE = 1 << 0, /* e.g. systemctl --value */ 13 BUS_PRINT_PROPERTY_SHOW_EMPTY = 1 << 1, /* e.g. systemctl --all */ 14 } BusPrintPropertyFlags; 15 16 typedef int (*bus_message_print_t) (const char *name, const char *expected_value, sd_bus_message *m, BusPrintPropertyFlags flags); 17 18 int bus_print_property_value(const char *name, const char *expected_value, BusPrintPropertyFlags flags, const char *value); 19 int bus_print_property_valuef(const char *name, const char *expected_value, BusPrintPropertyFlags flags, const char *fmt, ...) _printf_(4,5); 20 int bus_message_print_all_properties(sd_bus_message *m, bus_message_print_t func, char **filter, BusPrintPropertyFlags flags, Set **found_properties); 21 int bus_print_all_properties(sd_bus *bus, const char *dest, const char *path, bus_message_print_t func, char **filter, BusPrintPropertyFlags flags, Set **found_properties); 22