1 /* SPDX-License-Identifier: LGPL-2.1-or-later */ 2 #pragma once 3 4 #include <stdio.h> 5 6 #include "sd-bus.h" 7 8 #include "ordered-set.h" 9 10 struct introspect { 11 FILE *f; 12 char *interface_name; 13 char *introspection; 14 size_t size; 15 bool trusted; 16 }; 17 18 int introspect_begin(struct introspect *i, bool trusted); 19 int introspect_write_default_interfaces(struct introspect *i, bool object_manager); 20 int introspect_write_child_nodes(struct introspect *i, OrderedSet *s, const char *prefix); 21 int introspect_write_interface( 22 struct introspect *i, 23 const char *interface_name, 24 const sd_bus_vtable *v); 25 int introspect_finish(struct introspect *i, char **ret); 26 void introspect_free(struct introspect *i); 27