registerObject method
Registers an object
on the bus.
Implementation
Future<void> registerObject(DBusObject object) async {
if (object.client != null) {
if (object.client == this) {
throw Exception('Object already registered');
} else {
throw Exception('Object already registered on other client');
}
}
object.client = this;
var node = _objectTree.add(object.path, object);
await _connect();
// If has an object manager as a parent, emit a signal to indicate this was added.
var objectManager = _findObjectManager(node.parent);
if (objectManager != null) {
var interfacesAndProperties = expandObjectInterfaceAndProperties(object,
introspectable: introspectable);
await objectManager.emitInterfacesAdded(
object.path, interfacesAndProperties);
}
}