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 5339e98b95554e7c9da3658514e67ce6aaac70f8..470059b106c425e38a360305843ff75de05c4eb8 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 12bc7da3a13a9dcb122d926d7b8a897b0afb7ec7..9f88dfa99edfd5cc82c86af1944674ceaa544aa6 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)