Add functions for device connect/disconnect handling
authorMarcel Holtmann <marcel@holtmann.org>
Tue, 21 Apr 2009 03:04:49 +0000 (04:04 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 21 Apr 2009 03:04:49 +0000 (04:04 +0100)
src/connman.h
src/device.c

index 84bccaa..102b334 100644 (file)
@@ -179,7 +179,8 @@ void __connman_device_decrease_connections(struct connman_device *device);
 void __connman_device_set_network(struct connman_device *device,
                                        struct connman_network *network);
 
-void __connman_device_disconnect(struct connman_device *device);
+int __connman_device_connect(struct connman_device *device);
+int __connman_device_disconnect(struct connman_device *device);
 
 connman_bool_t __connman_device_has_driver(struct connman_device *device);
 
index bb9abf5..c75e331 100644 (file)
@@ -1266,7 +1266,14 @@ int connman_device_set_carrier(struct connman_device *device,
        return set_carrier(device, device->carrier);
 }
 
-void __connman_device_disconnect(struct connman_device *device)
+int __connman_device_connect(struct connman_device *device)
+{
+       DBG("device %p", device);
+
+       return 0;
+}
+
+int __connman_device_disconnect(struct connman_device *device)
 {
        GHashTableIter iter;
        gpointer key, value;
@@ -1283,6 +1290,8 @@ void __connman_device_disconnect(struct connman_device *device)
                if (connman_network_get_connected(network) == TRUE)
                        __connman_network_disconnect(network);
        }
+
+       return 0;
 }
 
 static void connect_known_network(struct connman_device *device)