Add function to change initial policy setting
authorMarcel Holtmann <marcel@holtmann.org>
Sun, 28 Dec 2008 01:18:36 +0000 (02:18 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Sun, 28 Dec 2008 01:18:36 +0000 (02:18 +0100)
include/device.h
src/device.c

index b282d03..6d172e8 100644 (file)
@@ -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);
 
index 0a7fe05..d74b634 100644 (file)
@@ -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