diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-12-28 02:18:36 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-12-28 02:18:36 +0100 |
commit | c5d973cf54a9fe54ec4e82a5780144b3b1f0afb0 (patch) | |
tree | a97db1481d8f3fae3302dd77e14e4e9965247b90 | |
parent | c867b6b07870792c5efe275e2f79cb9ba9595164 (diff) | |
download | connman-c5d973cf54a9fe54ec4e82a5780144b3b1f0afb0.tar.gz connman-c5d973cf54a9fe54ec4e82a5780144b3b1f0afb0.tar.bz2 connman-c5d973cf54a9fe54ec4e82a5780144b3b1f0afb0.zip |
Add function to change initial policy setting
-rw-r--r-- | include/device.h | 2 | ||||
-rw-r--r-- | src/device.c | 13 |
2 files changed, 15 insertions, 0 deletions
diff --git a/include/device.h b/include/device.h index b282d032..6d172e80 100644 --- a/include/device.h +++ b/include/device.h @@ -78,6 +78,8 @@ extern void connman_device_set_interface(struct connman_device *device, const char *interface); extern const char *connman_device_get_interface(struct connman_device *device); +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); diff --git a/src/device.c b/src/device.c index 0a7fe053..d74b6349 100644 --- a/src/device.c +++ b/src/device.c @@ -576,6 +576,19 @@ const char *connman_device_get_interface(struct connman_device *device) } /** + * connman_device_set_policy: + * @device: device structure + * @policy: power and connection policy + * + * Change power and connection policy of device + */ +void connman_device_set_policy(struct connman_device *device, + enum connman_device_policy policy) +{ + device->policy = policy; +} + +/** * connman_device_set_mode: * @device: device structure * @mode: network mode |