int __connman_notifier_init(void);
void __connman_notifier_cleanup(void);
+void __connman_notifier_device_type_increase(enum connman_device_type type);
+void __connman_notifier_device_type_decrease(enum connman_device_type type);
+void __connman_notifier_offline_mode(connman_bool_t enabled);
+
#include <connman/rtnl.h>
int __connman_rtnl_init(void);
return -EINVAL;
if (powered == TRUE) {
- if (driver->enable)
+ if (driver->enable) {
err = driver->enable(device);
- else
+ __connman_notifier_device_type_increase(device->type);
+ } else
err = -EINVAL;
} else {
g_hash_table_remove_all(device->networks);
- if (driver->disable)
+ if (driver->disable) {
err = driver->disable(device);
- else
+ __connman_notifier_device_type_decrease(device->type);
+ } else
err = -EINVAL;
}
if (device->powered == TRUE)
return;
- if (device->driver->enable)
+ if (device->driver->enable) {
device->driver->enable(device);
+ __connman_notifier_device_type_increase(device->type);
+ }
}
static void device_disable(struct connman_device *device)
g_hash_table_remove_all(device->networks);
- if (device->driver->disable)
+ if (device->driver->disable) {
device->driver->disable(device);
+ __connman_notifier_device_type_decrease(device->type);
+ }
}
static int setup_device(struct connman_device *device)
__connman_element_foreach(NULL, CONNMAN_ELEMENT_TYPE_DEVICE,
set_offlinemode, GUINT_TO_POINTER(offlinemode));
+ __connman_notifier_offline_mode(offlinemode);
+
return 0;
}
notifier_list = g_slist_remove(notifier_list, notifier);
}
+void __connman_notifier_device_type_increase(enum connman_device_type type)
+{
+ DBG("type %d", type);
+}
+
+void __connman_notifier_device_type_decrease(enum connman_device_type type)
+{
+ DBG("type %d", type);
+}
+
+void __connman_notifier_offline_mode(connman_bool_t enabled)
+{
+ DBG("enabled %d", enabled);
+}
+
int __connman_notifier_init(void)
{
DBG("");