- return connman_element_get_string(&device->element, key);
-}
-
-static void set_offlinemode(struct connman_element *element, gpointer user_data)
-{
- struct connman_device *device = element->device;
- connman_bool_t offlinemode = GPOINTER_TO_UINT(user_data);
- connman_bool_t powered;
-
- DBG("element %p name %s", element, element->name);
-
- if (device == NULL)
- return;
-
- device->offlinemode = offlinemode;
-
- if (device->blocked == TRUE)
- return;
-
- powered = (offlinemode == TRUE) ? FALSE : TRUE;
-
- if (device->powered == powered)
- return;
-
- if (device->powered_persistent == FALSE)
- powered = FALSE;
-
- set_powered(device, powered);
-}
-
-int __connman_device_set_offlinemode(connman_bool_t offlinemode)
-{
- DBG("offlinmode %d", offlinemode);
-
- __connman_element_foreach(NULL, CONNMAN_ELEMENT_TYPE_DEVICE,
- set_offlinemode, GUINT_TO_POINTER(offlinemode));
-
- __connman_notifier_offlinemode(offlinemode);
-
- return 0;
-}
-
-void __connman_device_increase_connections(struct connman_device *device)
-{
- if (device == NULL)
- return;
-
- device->connections++;
-}
-
-void __connman_device_decrease_connections(struct connman_device *device)
-{
- if (device == NULL)
- return;
-
- device->connections--;