summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-07-05 14:41:37 -0700
committerMarcel Holtmann <marcel@holtmann.org>2009-07-05 14:41:37 -0700
commited1eda8841c98f34cbbf89e2dd85db2441e7dfe6 (patch)
tree87241c8ad4d9bed0d5e5b67cfb468cab4a0f70aa
parente1f6ccf0b32b3e21774bf96d687b0aa1a9d96be0 (diff)
downloadconnman-ed1eda8841c98f34cbbf89e2dd85db2441e7dfe6.tar.gz
connman-ed1eda8841c98f34cbbf89e2dd85db2441e7dfe6.tar.bz2
connman-ed1eda8841c98f34cbbf89e2dd85db2441e7dfe6.zip
Add function getting device disconnected state
-rw-r--r--include/device.h1
-rw-r--r--src/device.c11
2 files changed, 12 insertions, 0 deletions
diff --git a/include/device.h b/include/device.h
index 43b4a682..3ef80425 100644
--- a/include/device.h
+++ b/include/device.h
@@ -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);
diff --git a/src/device.c b/src/device.c
index 23b4fafd..d2f6db2f 100644
--- a/src/device.c
+++ b/src/device.c
@@ -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