dbus2 / zbus-old

Rust D-Bus crate.
https://gitlab.freedesktop.org/dbus/zbus
Other
49 stars 13 forks source link

emits_changed_signal = "false" does not work #332

Closed zeenix closed 1 year ago

zeenix commented 1 year ago

In GitLab by @classabbyamp on Mar 6, 2023, 21:48

In zbus 3.10.0, setting emits_changed_signal = "false" as is described in !479 isn't working for me, busctl (from elogind) still shows the emits-change flag on the endpoint.

minimal example:

struct FooBar;

#[dbus_interface(name = "org.test.foobar")]
impl FooBar {
    #[dbus_interface(property(emits_changed_signal = "false"))]
    async fn foo(&self) -> u64 {
        0
    }
}
$ busctl --system introspect org.test.foobar /org/test/foobar
NAME                                TYPE      SIGNATURE RESULT/VALUE       FLAGS
org.freedesktop.DBus.Introspectable interface -         -                  -
.Introspect                         method    -         s                  -
org.freedesktop.DBus.Peer           interface -         -                  -
.GetMachineId                       method    -         s                  -
.Ping                               method    -         -                  -
org.freedesktop.DBus.Properties     interface -         -                  -
.Get                                method    ss        v                  -
.GetAll                             method    s         a{sv}              -
.Set                                method    ssv       -                  -
.PropertiesChanged                  signal    sa{sv}as  -                  -
org.test.foobar                     interface -         -                  -
.Foo                                property  t         -                  emits-change
zeenix commented 1 year ago

!479 added these attributes for dbus_proxy, not dbus_interface. It would be nice to add the support for dbus_interface as well actually.

zeenix commented 1 year ago

In GitLab by @classabbyamp on Mar 6, 2023, 23:20

ooh thanks, I missed that.

zeenix commented 1 year ago

np. I created #323 for interfaces.