I am implementing a dbus server, and to simplify things, I decided to use gdbus-codegen
.
This hello world example and it's repository are going to generate header and source files. Then it do this to connect the signal to the function:
g_signal_connect (interface,
"handle-hello-world",
G_CALLBACK (on_handle_hello_world), NULL);
My questions are next:
- what is the function
GType min_min_bus_gdbus_get_type (void)
supposed to do? It is declared, but not defined in generated files. - instead of connecting signal to a callback function (as described above), can I somehow use the
struct MinMinBusGDBUSIface
, declared in the generated header?
Any example that I found on the net, are having these two things (*_get_type (void)
function declaration, and struct *Iface
declared in the generated header. How to use them?