device: Add a getter for powered property
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Mon, 15 Oct 2012 12:35:20 +0000 (15:35 +0300)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Tue, 16 Oct 2012 12:05:40 +0000 (15:05 +0300)
include/device.h
src/device.c

index 5339e98..470059b 100644 (file)
@@ -80,6 +80,7 @@ const char *connman_device_get_ident(struct connman_device *device);
 
 int connman_device_set_powered(struct connman_device *device,
                                                connman_bool_t powered);
+connman_bool_t connman_device_get_powered(struct connman_device *device);
 int connman_device_set_scanning(struct connman_device *device,
                                                connman_bool_t scanning);
 connman_bool_t connman_device_get_scanning(struct connman_device *device);
index 12bc7da..9f88dfa 100644 (file)
@@ -595,6 +595,11 @@ int connman_device_set_powered(struct connman_device *device,
        return 0;
 }
 
+connman_bool_t connman_device_get_powered(struct connman_device *device)
+{
+       return device->powered;
+}
+
 static int device_scan(struct connman_device *device)
 {
        if (!device->driver || !device->driver->scan)