godbus / dbus

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

Introduction of 'Sender' and 'Destination' for Sending and Receiving #326

Open kkoehler opened 2 years ago

kkoehler commented 2 years ago

Hi,

we need to receive the DBus Sender of a message and we also want to pass the Destination header along with a message. Therefor we enhanced the dbus.Method interface to include another param of type "dbus.Sender" which will automatically set if the client impl has such a param. On the other hand we introduced a new type "dbus.Destination" which can be passed to Emit calls...

Kristian

guelfey commented 2 years ago

I'm fine with adding something like EmitWithDestination, but I'm against the changes to method calling since it's a breaking change on the public API of this package. You should be able to achieve the same using https://pkg.go.dev/github.com/godbus/dbus/v5#WithIncomingInterceptor if really needed. (Also, please ensure that the linting passes.)