From 3a82d95223b0b1d73ad592948f567ed1e5ee4c20 Mon Sep 17 00:00:00 2001 From: Maciek Borzecki Date: Mon, 5 Jun 2017 21:48:44 +0200 Subject: [PATCH] devicemanager: signal device capabilities added --- src/mconnect/devicemanager.vala | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mconnect/devicemanager.vala b/src/mconnect/devicemanager.vala index 9c15473..120f65f 100644 --- a/src/mconnect/devicemanager.vala +++ b/src/mconnect/devicemanager.vala @@ -22,6 +22,9 @@ using Gee; class DeviceManager : GLib.Object { public signal void found_new_device(Device dev); + public signal void device_capability_added(Device dev, + string capability, + PacketHandlerInterface handler); public const string DEVICES_CACHE_FILE = "devices"; @@ -198,7 +201,9 @@ class DeviceManager : GLib.Object private void enable_protocol_handlers(Device dev) { var core = Core.instance(); - core.handlers.use_device(dev); + core.handlers.use_device(dev, (cap, handler) => { + device_capability_added(dev, cap, handler); + }); } private void disable_protocol_handlers(Device dev) {