}
/**
+ * connman_device_get_mode:
+ * @device: device structure
+ *
+ * Get network mode of device
+ */
+enum connman_device_mode connman_device_get_mode(struct connman_device *device)
+{
+ return device->mode;
+}
+
+/**
* connman_device_set_powered:
* @device: device structure
* @powered: powered state
return 0;
}
+void __connman_device_disconnect(struct connman_device *device)
+{
+ GHashTableIter iter;
+ gpointer key, value;
+
+ DBG("device %p", device);
+
+ g_hash_table_iter_init(&iter, device->networks);
+
+ while (g_hash_table_iter_next(&iter, &key, &value) == TRUE) {
+ struct connman_network *network = value;
+
+ if (connman_network_get_connected(network) == FALSE)
+ continue;
+
+ __connman_network_disconnect(network);
+ }
+}
+
static void connect_known_network(struct connman_device *device)
{
struct connman_network *network = NULL;