Callback for service changed

JH jupiter.hce at gmail.com
Thu May 9 02:20:50 UTC 2019


Hi Thiago,

Thanks for your response.

> To react to signals, you need to use dbus_connection_add_filter() and make
> sure you return DBUS_HANDLER_RESULT_NOT_YET_HANDLED.

Yes, I did:

dbus_message_is_signal(msg, "org.freedesktop.NetworkManager", "StateChange")

dbus_connection_add_filter(conn, signal_callback, (void *)data.c_str(), NULL);

DBusHandlerResult signal_callback(DBusConnection *connection,
DBusMessage *message, void *user_data) {
 .......
 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}

My question is which function provides the values of DBusMessage
*message, void *user_data for signal_callback? And what is format of
the message?

Thank you.

Kind regards,

- jupiter


More information about the dbus mailing list