Add function getting device disconnected state
authorMarcel Holtmann <marcel@holtmann.org>
Sun, 5 Jul 2009 21:41:37 +0000 (14:41 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Sun, 5 Jul 2009 21:41:37 +0000 (14:41 -0700)
include/device.h
src/device.c

index 43b4a68..3ef8042 100644 (file)
@@ -91,6 +91,7 @@ int connman_device_set_scanning(struct connman_device *device,
                                                connman_bool_t scanning);
 int connman_device_set_disconnected(struct connman_device *device,
                                                connman_bool_t disconnected);
+connman_bool_t connman_device_get_disconnected(struct connman_device *device);
 int connman_device_set_connected(struct connman_device *device,
                                                connman_bool_t connected);
 
index 23b4faf..d2f6db2 100644 (file)
@@ -1529,6 +1529,17 @@ int connman_device_set_disconnected(struct connman_device *device,
 }
 
 /**
+ * connman_device_get_disconnected:
+ * @device: device structure
+ *
+ * Get device disconnected state
+ */
+connman_bool_t connman_device_get_disconnected(struct connman_device *device)
+{
+       return device->disconnected;
+}
+
+/**
  * connman_device_set_connected:
  * @device: device structure
  * @connected: connected state