libink: declare signals in introspection XML

All three org.finit signals were invisible to generated proxies, and
org.freedesktop.DBus was missing from the standard interfaces even
though Hello, AddMatch, and RemoveMatch are answered.

Add a link_signal_t table to the vtable, emitted like methods and
properties, declare the Manager1 and Cond1 signals, and complete the
static XML with PropertiesChanged and org.freedesktop.DBus.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2026-08-16 22:03:39 +02:00
1 parent 9d4cc8e933
commit b743d15e35
5 files changed
+92 -1

No files matched your search

+10
View File
@@ -247,10 +247,20 @@ typedef struct {
link_property_getter_fn getter;
} link_property_t;
/*
* Declares a signal for introspection only; emission is unchecked,
* see link_connection_emit_signal().
*/
typedef struct {
const char *name; /* member name */
const char *sig; /* D-Bus signature, e.g. "sss" */
} link_signal_t;
typedef struct {
const char *interface; /* e.g. "org.finit.Manager1" */
const link_method_t *methods; /* terminated by {NULL, ...}, or NULL */
const link_property_t *properties; /* terminated by {NULL, ...}, or NULL */
const link_signal_t *signals; /* terminated by {NULL, ...}, or NULL */
} link_vtable_t;
/* Register one (interface, methods) at `path`. Calling repeatedly