Add function to get device mode
authorMarcel Holtmann <marcel@holtmann.org>
Wed, 21 Jan 2009 00:44:02 +0000 (01:44 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 21 Jan 2009 00:44:02 +0000 (01:44 +0100)
include/device.h
src/device.c

index 350890f..abd62cf 100644 (file)
@@ -83,6 +83,7 @@ extern void connman_device_set_policy(struct connman_device *device,
                                        enum connman_device_policy policy);
 extern void connman_device_set_mode(struct connman_device *device,
                                                enum connman_device_mode mode);
+extern enum connman_device_mode connman_device_get_mode(struct connman_device *device);
 
 extern int connman_device_set_powered(struct connman_device *device,
                                                connman_bool_t powered);
index 6e2575b..ea72b25 100644 (file)
@@ -893,6 +893,17 @@ void connman_device_set_mode(struct connman_device *device,
 }
 
 /**
+ * connman_device_get_mode:
+ * @device: device structure
+ *
+ * Get network mode of device
+ */
+enum connman_device_mode connman_device_get_mode(struct connman_device *device)
+{
+       return device->mode;
+}
+
+/**
  * connman_device_set_powered:
  * @device: device structure
  * @powered: powered state