ObjectManager not used for children objects?

Aleksander Morgado aleksander at lanedo.com
Tue Nov 12 23:38:20 PST 2013


On 11/12/2013 07:00 PM, Dan Williams wrote:
> Hi,
> 
> Jan Grulich was working on MM Qt bindings and found that the
> ObjectManager doesn't know about all the objects that MM exports.  The
> objects are getting exported with g_dbus_interface_skeleton_export(),
> but should they be exported with g_dbus_object_manager_server_export()
> instead?  Watching with dbus-monitor, I'm not seeing any ObjectManager
> interface signals when new Bearers get created, for example.
> 
> Exporting with g_dbus_object_manager_server_export() would require
> either pushing the ObjectManager instance down into a couple classes
> (Bearer, SIM, SMS), but maybe that's the right thing to do instead of a
> singleton with a global get() function?
> 

For now, the ObjectManager interface is only applicable to the 'manager'
object, and only notifies about added/removed modem objects or modem
interfaces. It does not apply to SIM, Bearer or SMS objects, but we have
other ways to get notified about those:
 * SIM: "Sim" property in the "Modem" interface. Clients wanting to get
notified when the SIM object is available can watch for changes in that
property.
 * SMS: "List" method in the "Messaging" interface, which lists all
currently available SMS objects; plus "Added" signal to notify about new
ones.
 * Bearer: "ListBearers" in the "Modem" interface, to list which are
available.

>From one point of view, we could get the manager notify about those as
well, but then these 'sub' objects wouldn't be seen as being managed by
specific modems. You would get object-added for a SIM, for example, but
you still would need to look at all available modems to see to which
modem object it applies.

Another option would have been to let each Modem object implement the
ObjectManager interface itself, but then it would be managing objects of
very different types, which I'm not sure it looks very good. For
example, if you wanted to look for which SIM object applies to a given
Modem, you would be listing also all SMS and bearer objects before being
able to know which path the SIM object has.

-- 
Aleksander


More information about the ModemManager-devel mailing list