2017-11-18 17:09:20 +01:00
|
|
|
/* SPDX-License-Identifier: LGPL-2.1+ */
|
2013-10-09 02:37:10 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include "sd-bus.h"
|
2015-11-18 22:46:33 +01:00
|
|
|
|
2013-10-09 02:37:10 +02:00
|
|
|
#include "set.h"
|
|
|
|
|
|
|
|
struct introspect {
|
|
|
|
FILE *f;
|
2020-04-13 13:34:09 +02:00
|
|
|
char *interface_name;
|
2013-10-09 02:37:10 +02:00
|
|
|
char *introspection;
|
|
|
|
size_t size;
|
2013-12-21 18:08:39 +01:00
|
|
|
bool trusted;
|
2013-10-09 02:37:10 +02:00
|
|
|
};
|
|
|
|
|
2013-12-21 18:08:39 +01:00
|
|
|
int introspect_begin(struct introspect *i, bool trusted);
|
2013-10-09 02:37:10 +02:00
|
|
|
int introspect_write_default_interfaces(struct introspect *i, bool object_manager);
|
|
|
|
int introspect_write_child_nodes(struct introspect *i, Set *s, const char *prefix);
|
2020-04-13 13:34:09 +02:00
|
|
|
int introspect_write_interface(
|
|
|
|
struct introspect *i,
|
|
|
|
const char *interface_name,
|
|
|
|
const sd_bus_vtable *v);
|
2019-04-19 12:14:35 +02:00
|
|
|
int introspect_finish(struct introspect *i, char **ret);
|
2013-10-09 02:37:10 +02:00
|
|
|
void introspect_free(struct introspect *i);
|