technology: Add technology blocked field getter
[framework/connectivity/connman.git] / src / technology.c
index 37414d7..8cf6633 100644 (file)
@@ -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("");