From: Martin Xu Date: Fri, 23 Oct 2009 10:38:36 +0000 (+0800) Subject: Add device reconnect state and its helper functions X-Git-Tag: accepted/2.0alpha-wayland/20121110.002834~3179 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a016a7ed84314408649d381a48199ce63a3b58ff;p=profile%2Fivi%2Fconnman.git Add device reconnect state and its helper functions --- diff --git a/src/connman.h b/src/connman.h index 1fad19b..36a4e46 100644 --- a/src/connman.h +++ b/src/connman.h @@ -272,6 +272,10 @@ int __connman_device_disconnect(struct connman_device *device); connman_bool_t __connman_device_has_driver(struct connman_device *device); +void __connman_device_set_reconnect(struct connman_device *device, + connman_bool_t reconnect); +connman_bool_t __connman_device_get_reconnect(struct connman_device *device); + const char *__connman_device_get_type(struct connman_device *device); const char *__connman_device_get_ident(struct connman_device *device); diff --git a/src/device.c b/src/device.c index 119255f..6b669f2 100644 --- a/src/device.c +++ b/src/device.c @@ -45,6 +45,7 @@ struct connman_device { connman_bool_t carrier; connman_bool_t scanning; connman_bool_t disconnected; + connman_bool_t reconnect; connman_uint16_t scan_interval; char *name; char *node; @@ -1790,6 +1791,18 @@ void __connman_device_set_network(struct connman_device *device, } } +void __connman_device_set_reconnect(struct connman_device *device, + connman_bool_t reconnect) +{ + device->reconnect = reconnect; +} + +connman_bool_t __connman_device_get_reconnect( + struct connman_device *device) +{ + return device->reconnect; +} + /** * connman_device_register: * @device: device structure