From c5d973cf54a9fe54ec4e82a5780144b3b1f0afb0 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 28 Dec 2008 02:18:36 +0100 Subject: [PATCH] Add function to change initial policy setting --- include/device.h | 2 ++ src/device.c | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/include/device.h b/include/device.h index b282d03..6d172e8 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 0a7fe05..d74b634 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 -- 2.7.4