From: Tomasz Bursztyka Date: Mon, 15 Oct 2012 12:35:20 +0000 (+0300) Subject: device: Add a getter for powered property X-Git-Tag: 1.9~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=287c19dc6093d7b55f52741e1af90a742249a534;p=platform%2Fupstream%2Fconnman.git device: Add a getter for powered property --- diff --git a/include/device.h b/include/device.h index 5339e98b..470059b1 100644 --- a/include/device.h +++ b/include/device.h @@ -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); diff --git a/src/device.c b/src/device.c index 12bc7da3..9f88dfa9 100644 --- a/src/device.c +++ b/src/device.c @@ -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)