Re: No way to advertise an interface?
Anders Feder <[email protected]>
| Newsgroups | gmane.comp.freedesktop.dbus |
|---|---|
| Message-ID | <CAFqna2X3jJ5FO2o2VWvHi9M4Nf2TLfEeNCSHTAjQrP5L=tpV7w@mail.gmail.com> |
Sorry for the ambiguity, I meant interface in the general sense - MPRIS defines a programming interface and one part of that interface is the bus name prefix that MPRIS requires services to use. I will use the term "API" instead: I'm not saying that multiple peers can't implement the API. I'm saying multiple peers can't implement the API with the assurance that they are not causing a naming collision. This negates the purpose of having reverse domain name notation namespaces in the first place. 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". What better pattern, if any, could a standard such as MPRIS use to avoid this sort of collision? Regards, Anders Feder ons. 29. sep. 2021 00.23 skrev Lawrence D'Oliveiro <ldo-kC51rjc0cqs1dNLGKZg6taU/[email protected] >: > On Tue, 28 Sep 2021 21:27:21 +0200, Anders Feder wrote: > > > For clients to be able to discover services that implement the > > interface, the MPRIS specification requires each media player > > to request a unique bus name which begins with the prefix > > "org.mpris.MediaPlayer2". > > > > ... > > > > This to me seems like bad practice: The whole purpose of interface > > namespaces is to prevent naming collisions. > > Yet you were talking above about bus names, not interface names. > Multiple bus peers can implement the same interface, why not? >