Detect new available names in bus
Sergio Costas
rastersoft at gmail.com
Tue Feb 15 13:13:32 UTC 2022
Hi:
El 15/2/22 a las 13:58, Ralf Habacker escribió:
> Am 15.02.22 um 11:35 schrieb Sergio Costas:
>> Which confirms that the dbus daemon is already monitoring those
>> folders (both with inotify for linux and kqueue for BSD), so adding
>> that dbus signal sould be quite straightforward...
>>
>> So... How much complex is to submit a proposal for modifying the
>> specification...?
>>
>
> Have you checked
> https://dbus.freedesktop.org/doc/dbus-specification.html to see if
> there is already a signal that meets your requirements?
>
> A quick look shows me that these may be usable here:
>
> org.freedesktop.DBus.NameOwnerChanged - This signal indicates that the
> owner of a name has changed. It's also the signal to use to detect the
> appearance of new names on the bus.
>
> org.freedesktop.DBus.NameLost - This signal is sent to a specific
> application when it loses ownership of a name.
>
> org.freedesktop.DBus.NameAcquired - This signal is sent to a specific
> application when it gains ownership of a name.
As I commented in a previous message, I already checked all those.
NameLost and NameAcquired seems to be emitted only to the current owner
of the name, to notify that it has successfully acquired a name or if
some other service "stole" it. I connected to them but don't receive any
signal, no matter that I install or uninstall the files, launch or kill
de daemon...
About NameOwnerChanged, it only notifies when a daemon actually acquires
a name, but that requires it to be launched. This means that an
activatable service won't emit that unless any of their methods is
called, thus loading the daemon. Again, that's not what I need. What I
need is to detect when the .service file is added or removed.
--
Nos leemos
RASTER (Linux user #228804)
rastersoft at gmail.com https://www.rastersoft.com
More information about the dbus
mailing list