Re: No way to advertise an interface?
Lawrence D'Oliveiro <ldo-kC51rjc0cqs1dNLGKZg6taU/[email protected]>
| Newsgroups | gmane.comp.freedesktop.dbus |
|---|---|
| Organization | Geek Central |
| Message-ID | <[email protected]> |
On Wed, 29 Sep 2021 08:03:20 +0200, Anders Feder wrote: > If a person A creates an application named "Music Player" and have it > take the bus name "org.mpris.MediaPlayer2.musicplayer", there is no > procedure preventing a person B without knowledge of person A's > application from creating another application named "Music Player" > also taking the bus name "org.mpris.MediaPlayer2.musicplayer". It is true that D-Bus has no concept of “group” or “multicast” names; each name can belong to only one bus peer. But remember that, if you do not specify DBUS_NAME_FLAG_DO_NOT_QUEUE when trying to register a name and it is already taken, then you will be placed in a queue to get it when the existing owner relinquishes it. That way, anybody looking for “org.mpris.MediaPlayer2.musicplayer” only sees one. Quit that one, and the other should appear. After all, you only need one at a time, don’t you?