From: Samuel Ortiz Date: Fri, 8 Oct 2010 15:22:57 +0000 (+0200) Subject: technology: Add technology blocked field getter X-Git-Tag: 0.63~102 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b680f0c062d77d3b045193025e774f0424ae2da1;p=platform%2Fupstream%2Fconnman.git technology: Add technology blocked field getter --- diff --git a/src/connman.h b/src/connman.h index 2f8f5af..b65ad6d 100644 --- a/src/connman.h +++ b/src/connman.h @@ -312,6 +312,8 @@ void __connman_technology_remove_interface(enum connman_service_type type, int __connman_technology_enable_tethering(void); int __connman_technology_disable_tethering(void); +connman_bool_t __connman_technology_get_blocked(enum connman_service_type type); + #include int __connman_device_init(void); diff --git a/src/technology.c b/src/technology.c index 37414d7..8cf6633 100644 --- a/src/technology.c +++ b/src/technology.c @@ -728,6 +728,20 @@ int __connman_technology_remove_rfkill(unsigned int index) return 0; } +connman_bool_t __connman_technology_get_blocked(enum connman_service_type type) +{ + struct connman_technology *technology; + + technology = technology_get(type); + if (technology == NULL) + return FALSE; + + if (g_atomic_int_get(&technology->blocked)) + return TRUE; + + return FALSE; +} + int __connman_technology_init(void) { DBG("");