GNOME Bugzilla – Bug 643813
Support BusName sender parameter in signals
Last modified: 2018-05-22 13:57:06 UTC
Created attachment 182394 [details] [review] D-Bus: Support BusName sender parameter in signals Now a client can define a signal with a GLib.BusName parameter, and that will be used for showing the sender name. If a server defines a signal with a GLib.BusName parameter, it will be ignored when sending the dbus signal. Like: [DBus (name = "org.example.Demo")] interface Demo : Object { public abstract int ping (string msg) throws IOError; public signal void pong (int count, string msg, GLib.BusName sender); } ... demo.pong.connect((c, m, s) => { stdout.printf ("Got pong %d for msg '%s' from sender '%s'\n", c, m, s); loop.quit (); }); Actually the generated code is compiled with a warning, due the usage of the sender const char* string; I guess that strdup'ing it, the warning will go away; but is it so important? The patch couldn't apply directly since it depends on the one attached on bug 643744
Created attachment 182425 [details] [review] D-Bus: Support BusName sender parameter in signals Ops, I forgot a debug print in the old patch. Updated.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vala/issues/176.