[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DBUS signals?


Le 26/09/2024 à 03:16, Jussi Lahtinen a écrit :
Meh, didn't change anything.

hDBUS = New DBusSignal(DBus.System, "org.freedesktop.login1.Manager", "/org/freedesktop/login1", "PrepareForShutdown", True) As "DBusSignal"

I do not understand why I would need to provide all that. What is the point? Why so complicated? There is already an interface for the object, thus the object should not be required.

On DBus, an application exports objects, and each object can have one or several interfaces, an interface defining a set of methods, properties and signals.


The event declaration already has "Signal as String". And I also want to catch "PrepareForSleep".
Public Sub DBusSignal_Signal(Signal As String, Arguments As Variant[])


Jussi


DBusSignal is a just a wrapper class around DBusObserver. If you want more flexibility, you have to use the DBusObserver class. With that class, you will see all DBus messages sent to your application, not just the signals.

Regards,

--
Benoît Minisini.


References:
DBUS signals?Jussi Lahtinen <jussi.lahtinen@xxxxxxxxx>
Re: DBUS signals?BB <adamnt42@xxxxxxxxx>
Re: DBUS signals?Jussi Lahtinen <jussi.lahtinen@xxxxxxxxx>
Re: DBUS signals?BB <adamnt42@xxxxxxxxx>
Re: DBUS signals?Jussi Lahtinen <jussi.lahtinen@xxxxxxxxx>
Re: DBUS signals?Jussi Lahtinen <jussi.lahtinen@xxxxxxxxx>
Re: DBUS signals?Jussi Lahtinen <jussi.lahtinen@xxxxxxxxx>