static int setup_device(struct connman_device *device)
{
+ enum connman_service_type type;
int err;
DBG("device %p", device);
return err;
}
+ type = __connman_device_get_service_type(device);
+ __connman_notifier_register(type);
+
switch (device->mode) {
case CONNMAN_DEVICE_MODE_UNKNOWN:
case CONNMAN_DEVICE_MODE_NETWORK_SINGLE:
static void remove_device(struct connman_device *device)
{
+ enum connman_service_type type;
+
DBG("device %p", device);
__connman_device_disable(device);
break;
}
+ type = __connman_device_get_service_type(device);
+ __connman_notifier_unregister(type);
+
unregister_interface(&device->element);
if (device->driver->remove)
*/
int connman_device_register(struct connman_device *device)
{
- enum connman_service_type type;
-
__connman_storage_load_device(device);
device->offlinemode = __connman_manager_get_offlinemode();
- type = __connman_device_get_service_type(device);
- __connman_notifier_register(type);
-
return connman_element_register(&device->element, NULL);
}
*/
void connman_device_unregister(struct connman_device *device)
{
- enum connman_service_type type;
-
__connman_storage_save_device(device);
- type = __connman_device_get_service_type(device);
- __connman_notifier_unregister(type);
-
connman_element_unregister(&device->element);
}