technology: Add technology blocked field getter
authorSamuel Ortiz <sameo@linux.intel.com>
Fri, 8 Oct 2010 15:22:57 +0000 (17:22 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Fri, 8 Oct 2010 15:25:07 +0000 (17:25 +0200)
src/connman.h
src/technology.c

index 2f8f5af..b65ad6d 100644 (file)
@@ -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 <connman/device.h>
 
 int __connman_device_init(void);
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("");