godbus / dbus

Native Go bindings for D-Bus
BSD 2-Clause "Simplified" License
972 stars 224 forks source link

Eavesdrop is deprecated #253

Open oldaccountdeadname opened 3 years ago

oldaccountdeadname commented 3 years ago

In the dbus specification, it looks like eavesdropping was deprecated in v0.31:

Formally deprecate eavesdropping in favor of BecomeMonitor

I believe this means that at the very least, /_examples/eavesdrop.go is out of date, and potentially the underlying Conn.Eavesdrop method as well.

The example did not work for certain rules, particularly when I was attempting to monitor notifications with interface='org.freedesktop.Notifications', but did work for conn.BusObject.Call("org.freedesktop.DBus.Monitoring.BecomeMonitor, 0, <rules>, uint(0)).

Hopefully everything above is correct: I'm new to dbus and just learning Go. It's possible that everything above is completely incorrect, in which case sorry for the extraneous issue! Thanks!

leophys commented 6 months ago

Hi all.

I confirm @oldaccountdeadname report. I could volunteer to:

Let me know if there is interest in this, cc @guelfey @jsouthworth