From: Tomasz Bursztyka Date: Fri, 25 May 2012 08:17:38 +0000 (+0300) Subject: device: Make scanning getter method public. X-Git-Tag: 1.1~27 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fc6cfb5cfd7641a848ac1a082b41737fd81512e5;p=platform%2Fupstream%2Fconnman.git device: Make scanning getter method public. --- diff --git a/include/device.h b/include/device.h index abfa228..1141620 100644 --- a/include/device.h +++ b/include/device.h @@ -82,6 +82,7 @@ int connman_device_set_powered(struct connman_device *device, connman_bool_t powered); int connman_device_set_scanning(struct connman_device *device, connman_bool_t scanning); +connman_bool_t connman_device_get_scanning(struct connman_device *device); void connman_device_reset_scanning(struct connman_device *device); int connman_device_set_disconnected(struct connman_device *device, diff --git a/src/connman.h b/src/connman.h index b501296..5ac97f9 100644 --- a/src/connman.h +++ b/src/connman.h @@ -487,8 +487,6 @@ int __connman_device_enable(struct connman_device *device); int __connman_device_disable(struct connman_device *device); int __connman_device_disconnect(struct connman_device *device); -connman_bool_t __connman_device_scanning(struct connman_device *device); - connman_bool_t __connman_device_has_driver(struct connman_device *device); void __connman_device_set_reconnect(struct connman_device *device, diff --git a/src/device.c b/src/device.c index c20b82c..e433991 100644 --- a/src/device.c +++ b/src/device.c @@ -703,7 +703,7 @@ void __connman_device_cleanup_networks(struct connman_device *device) remove_unavailable_network, NULL); } -connman_bool_t __connman_device_scanning(struct connman_device *device) +connman_bool_t connman_device_get_scanning(struct connman_device *device) { return device->scanning; } diff --git a/src/service.c b/src/service.c index 9220ad9..384d13d 100644 --- a/src/service.c +++ b/src/service.c @@ -5936,7 +5936,7 @@ struct connman_service * __connman_service_create_from_network(struct connman_ne if (service->favorite == TRUE) { device = connman_network_get_device(service->network); - if (device && __connman_device_scanning(device) == FALSE) + if (device && connman_device_get_scanning(device) == FALSE) __connman_service_auto_connect(); } diff --git a/src/technology.c b/src/technology.c index 42446b0..2edb48f 100644 --- a/src/technology.c +++ b/src/technology.c @@ -831,7 +831,7 @@ void __connman_technology_scan_stopped(struct connman_device *device) if (__connman_device_get_service_type(other_device) != type) continue; - if (__connman_device_scanning(other_device)) + if (connman_device_get_scanning(other_device) == TRUE) count += 1; } @@ -1101,7 +1101,7 @@ int __connman_technology_remove_device(struct connman_device *device) return -ENXIO; } - if (__connman_device_scanning(device)) + if (connman_device_get_scanning(device) == TRUE) __connman_technology_scan_stopped(device); technology->device_list = g_slist_remove(technology->device_list,