GDBusObjectProxy: Add a public way to assign interfaces to the object proxy
Submitted by Emanuele Aina
Assigned to David Zeuthen
Link to original bug (#703676)
Description
While it is commmon to have DBus object implementing multiple interfaces it often happen that they are not managed by an ObjectManager, either because the ObjectManager interface requirement of exporting the whole hierarchy make it unsuitable for the scope (eg. it would cause massive traffic if used for org.gnome.UPnP.MediaContainer2) or because there is only one object with multiple interfaces.
Unfortunately GDBusObjectProxy currently requires a GDBusObjectManagerClient to call the private methods that adds and remove the interface proxies.
I've made those functions public and added a way to load the proxies by name to try to make GDBusObjectProxy more useful for other users.
I've yet to add documentation to the public functions, but I'd like to have some feedback on the general approach.
An example of code that would benefit from this stuff is https://git.gnome.org/browse/gnome-photos/tree/src/photos-dlna-renderer.c, which exports multiple interfaces (com.intel.dLeynaRenderer.RendererDevice, com.intel.dLeynaRenderer.PushHost and org.mpris.MediaPlayer2.Player) but does not use ObjectManager but a similar ad-hoc interface.