After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 643813 - Support BusName sender parameter in signals
Support BusName sender parameter in signals
Status: RESOLVED OBSOLETE
Product: vala
Classification: Core
Component: D-Bus
0.11.x
Other Linux
: Normal enhancement
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on: 643744
Blocks:
 
 
Reported: 2011-03-03 19:56 UTC by Marco Trevisan (Treviño)
Modified: 2018-05-22 13:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
D-Bus: Support BusName sender parameter in signals (3.73 KB, patch)
2011-03-03 19:56 UTC, Marco Trevisan (Treviño)
none Details | Review
D-Bus: Support BusName sender parameter in signals (3.68 KB, patch)
2011-03-04 00:07 UTC, Marco Trevisan (Treviño)
none Details | Review

Description Marco Trevisan (Treviño) 2011-03-03 19:56:32 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
Comment 1 Marco Trevisan (Treviño) 2011-03-04 00:07:38 UTC
Created attachment 182425 [details] [review]
D-Bus: Support BusName sender parameter in signals

Ops, I forgot a debug print in the old patch. Updated.
Comment 2 GNOME Infrastructure Team 2018-05-22 13:57:06 UTC
-- 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.