Skip to content

Commit

Permalink
BluezInterface: add connect() to BluezDevice
Browse files Browse the repository at this point in the history
  • Loading branch information
ncopa committed Jan 22, 2015
1 parent d3baefc commit 167ca40
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/BluezInterface.vala
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ public class BluezAdapterProperties : BluezInterface {
/* http:https://git.kernel.org/cgit/bluetooth/bluez.git/tree/doc/device-api.txt */
public class BluezDevice : BluezInterface {
private string[] _uuids;
private BluezDeviceBus device_bus;

public string address {
get { return this.get_cache("Address").get_string(); }
Expand Down Expand Up @@ -288,6 +289,11 @@ public class BluezDevice : BluezInterface {
public BluezDevice(ObjectPath path,
HashTable<string, Variant>? props = null) {
base("org.bluez.Device1", path, props);
device_bus = Bus.get_proxy_sync (BusType.SYSTEM, "org.bluez", path);
}

public void connect() {
device_bus.connect();
}

public signal void alias_changed();
Expand Down

0 comments on commit 167ca40

Please sign in to comment.