Add function connman_device_remove_all_networks
authorMartin Xu <martin.xu@intel.com>
Mon, 23 Nov 2009 07:56:55 +0000 (15:56 +0800)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 23 Nov 2009 08:18:22 +0000 (09:18 +0100)
include/device.h
src/device.c

index 726eab3..5267e25 100644 (file)
@@ -109,6 +109,7 @@ struct connman_network *connman_device_get_network(struct connman_device *device
                                                        const char *identifier);
 int connman_device_remove_network(struct connman_device *device,
                                                        const char *identifier);
+void connman_device_remove_all_networks(struct connman_device *device);
 
 int connman_device_register(struct connman_device *device);
 void connman_device_unregister(struct connman_device *device);
index b58e8ad..41eb07c 100644 (file)
@@ -1775,6 +1775,11 @@ int connman_device_remove_network(struct connman_device *device,
        return 0;
 }
 
+void connman_device_remove_all_networks(struct connman_device *device)
+{
+       g_hash_table_remove_all(device->networks);
+}
+
 void __connman_device_set_network(struct connman_device *device,
                                        struct connman_network *network)
 {