Browse Source

devicemanager: print message that device got disconnected

bboozzoo/device-cache
Maciek Borzecki 10 years ago
parent
commit
addf64d24d
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      src/devicemanager.vala

+ 10
- 0
src/devicemanager.vala View File

@ -38,6 +38,7 @@ class DeviceManager : GLib.Object
}
string unique = dev.to_unique_string();
debug("device key: %s", unique);
if (this.devices.has_key(unique) == false) {
debug("adding new device with key: %s", unique);
this.devices.@set(unique, dev);
@ -45,8 +46,13 @@ class DeviceManager : GLib.Object
dev.paired.connect((d, p) => {
device_paired(d, p);
});
dev.disconnected.connect((d) => {
device_disconnected(d);
});
dev.activate();
} else {
debug("activate from device");
var known_dev = this.devices.@get(unique);
known_dev.activate_from_device(dev);
}
@ -67,4 +73,8 @@ class DeviceManager : GLib.Object
}
}
private void device_disconnected(Device dev) {
debug("device %s got disconnected", dev.to_string());
}
}

Loading…
Cancel
Save