Browse Source

devicemanager-proxy: register per capability bus interfaces

bboozzoo/pairing-fixes
Maciek Borzecki 8 years ago
parent
commit
94be6214e1
1 changed files with 24 additions and 0 deletions
  1. +24
    -0
      src/mconnect/devicemanager-proxy.vala

+ 24
- 0
src/mconnect/devicemanager-proxy.vala View File

@ -39,6 +39,7 @@ class DeviceManagerDBusProxy : Object
manager.found_new_device.connect((d) => {
this.add_device(d);
});
manager.device_capability_added.connect(this.add_device_capability);
}
[DBus (visible = false)]
@ -97,6 +98,29 @@ class DeviceManagerDBusProxy : Object
}
}
private void add_device_capability(Device dev,
string capability,
PacketHandlerInterface iface) {
ObjectPath path = null;
foreach (var entry in this.devices.entries) {
if (entry.value.device == dev) {
path = new ObjectPath(entry.key);
break;
}
}
if (path == null) {
warning("no path for device?");
return;
}
info("add capability handler %s for device at path %s",
capability, path.to_string());
// TODO:
// PacketHandlersProxy.register_capability(path, capability, iface);
}
/**
* make_device_path:
*


Loading…
Cancel
Save