aboutsummaryrefslogtreecommitdiff
path: root/src/bluez.vala
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2012-10-11 19:07:48 +1300
committerRobert Ancell <robert.ancell@canonical.com>2012-10-11 19:07:48 +1300
commitde247720b4c7261d96dd99edd42f5ea898ab09b5 (patch)
treeeaf1a04b1a61bda8908db6e064dc7b014b3884fa /src/bluez.vala
parent8e5d7ea526a3d61e8b5ea95041893adbbca427b0 (diff)
downloadayatana-indicator-bluetooth-de247720b4c7261d96dd99edd42f5ea898ab09b5.tar.gz
ayatana-indicator-bluetooth-de247720b4c7261d96dd99edd42f5ea898ab09b5.tar.bz2
ayatana-indicator-bluetooth-de247720b4c7261d96dd99edd42f5ea898ab09b5.zip
Check device class
Diffstat (limited to 'src/bluez.vala')
-rw-r--r--src/bluez.vala5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bluez.vala b/src/bluez.vala
index 976c1ce..c20acc7 100644
--- a/src/bluez.vala
+++ b/src/bluez.vala
@@ -102,6 +102,9 @@ public class BluezDevice : Object
private string _name = null;
public string name { get { return _name; } }
+ private uint32 _class = 0;
+ public uint32 class { get { return _class; } }
+
internal string path;
private BluezDeviceInterface proxy;
@@ -127,6 +130,8 @@ public class BluezDevice : Object
stderr.printf ("%s %s=%s\n", path, name, value.print (false));
if (name == "Name" && value.is_of_type (VariantType.STRING))
_name = value.get_string ();
+ if (name == "Class" && value.is_of_type (VariantType.UINT32))
+ _class = value.get_uint32 ();
}
private void input_property_changed_cb (string name, Variant value)