exported-object: add support for DBus ObjectManager interface

NMExportedObject now derives from GDBusObjectSkeleton, which is what
GDBusObjectManagerServer wants.  The main GDBusConnection and each
private server connection now gets a new GDBusObjectManagerServer,
and exported objects are registered with that instead of individually
exporting each GDBusInterfaceSkeleton.

Previously exported objects were not referenced by the BusManager,
but instead removed from the exports hash via weak references.  The
GDBusObjectManagerServer instead references exported objects, which
can make them live much longer than they did before.

Co-Authored-By: Thomas Haller <thaller@redhat.com>
This commit is contained in:
Dan Williams
2015-07-20 17:30:02 -05:00
committed by Thomas Haller
parent 83b8b9e1f6
commit b023d0754b
9 changed files with 194 additions and 203 deletions

View File

@@ -148,6 +148,7 @@ out:
static void
new_connection_cb (NMBusManager *mgr,
GDBusConnection *connection,
GDBusObjectManager *manager,
NMDhcpListener *self)
{
NMDhcpListenerPrivate *priv = NM_DHCP_LISTENER_GET_PRIVATE (self);