From: Marcel Holtmann Date: Wed, 21 Jan 2009 00:44:02 +0000 (+0100) Subject: Add function to get device mode X-Git-Tag: 2.0_alpha~4058 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6e9987061ef9bc393309adfcdba155386d1802c4;p=framework%2Fconnectivity%2Fconnman.git Add function to get device mode --- diff --git a/include/device.h b/include/device.h index 350890f..abd62cf 100644 --- a/include/device.h +++ b/include/device.h @@ -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); diff --git a/src/device.c b/src/device.c index 6e2575b..ea72b25 100644 --- a/src/device.c +++ b/src/device.c @@ -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