[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-dbus
Subject: Detect new available names in bus
From: Sergio Costas <rastersoft () gmail ! com>
Date: 2022-02-14 22:51:48
Message-ID: dcb112b2-5d91-d27c-27ef-21c31273f512 () gmail ! com
[Download RAW message or body]
Hi all:
I want to detect if the user has installed a service that offers the
well-known name "org.gnome.ArchiveManager1" (usually it is offered by
file-roller). I can do a call to "NameHasOwner()" and it will return
TRUE if that name is registered, even if the service is not active
(because it is launched on demand), or FALSE if it isn't available
(because the package "file-roller" isn't installed). But I haven't been
able to detect when that name becomes available unless the service is
launched. There seems to be no signal just for the act of "registering"
a service that offers a well-known name (this is: if the package isn't
installed and I install it, DBus should detect that there is a new file
at "/usr/share/dbus-1/services/" called
"org.gnome.ArchiveManager1.service", and notify that the service is
available on-demand).
I tried connecting to 'NameOwnerChanged' but it only notifies when the
well-known name is acquired by the program, which means that it must be
launched to detect it. But since it is an on-demand service, it is only
launched if a program does a call to an interface on the well-known
name. I also tried with 'NameAcquired' and 'NameLost', but I receive
nothing (if I understand correctly the documentation, they seems to be
emitted only to the service itself, but not to others). Also tried with
'PropertiesChanged', but nothing is emitted when the file gets installed.
Is there a way of detecting this via events? I don't want to do neither
a periodic polling, nor manually monitoring all the folders where
service files can be added.
Thanks!
--
Nos leemos
RASTER (Linux user #228804)
rastersoft@gmail.com https://www.rastersoft.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic