summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-07-20 16:31:02 +0200
committerMarcel Holtmann <marcel@holtmann.org>2009-07-20 16:31:02 +0200
commit49c3cd3a8bb28f0d95e49fa522b20ff1ea331390 (patch)
tree45061eba0d6fc44b7777d919a5dbccedca40f18d
parentf3b51adb6b18a81ee59d064d87cfbccf5e5ec357 (diff)
downloadconnman-49c3cd3a8bb28f0d95e49fa522b20ff1ea331390.tar.gz
connman-49c3cd3a8bb28f0d95e49fa522b20ff1ea331390.tar.bz2
connman-49c3cd3a8bb28f0d95e49fa522b20ff1ea331390.zip
Remove support for network Connect and Disconnect methods
-rw-r--r--src/network.c62
1 files changed, 0 insertions, 62 deletions
diff --git a/src/network.c b/src/network.c
index 7277e213..06f1c5a8 100644
--- a/src/network.c
+++ b/src/network.c
@@ -217,71 +217,9 @@ static DBusMessage *set_property(DBusConnection *conn,
return g_dbus_create_reply(msg, DBUS_TYPE_INVALID);
}
-static DBusMessage *do_connect(DBusConnection *conn,
- DBusMessage *msg, void *data)
-{
- struct connman_network *network = data;
- int err;
-
- DBG("conn %p", conn);
-
- if (__connman_security_check_privilege(msg,
- CONNMAN_SECURITY_PRIVILEGE_MODIFY) < 0)
- return __connman_error_permission_denied(msg);
-
- if (network->connected == TRUE)
- return __connman_error_failed(msg, EALREADY);
-
- if (network->driver && network->driver->connect) {
- enum connman_device_mode mode;
-
- mode = connman_device_get_mode(network->device);
- if (mode == CONNMAN_DEVICE_MODE_NETWORK_SINGLE)
- __connman_device_disconnect(network->device);
-
- err = network->driver->connect(network);
- if (err < 0 && err != -EINPROGRESS)
- return __connman_error_failed(msg, -err);
- } else
- network->connected = TRUE;
-
- return g_dbus_create_reply(msg, DBUS_TYPE_INVALID);
-}
-
-static DBusMessage *do_disconnect(DBusConnection *conn,
- DBusMessage *msg, void *data)
-{
- struct connman_network *network = data;
- int err;
-
- DBG("conn %p", conn);
-
- if (__connman_security_check_privilege(msg,
- CONNMAN_SECURITY_PRIVILEGE_MODIFY) < 0)
- return __connman_error_permission_denied(msg);
-
- if (network->connected == FALSE)
- return __connman_error_failed(msg, EINVAL);
-
- connman_element_unregister_children(&network->element);
-
- connman_device_set_disconnected(network->device, TRUE);
-
- if (network->driver && network->driver->disconnect) {
- err = network->driver->disconnect(network);
- if (err < 0 && err != -EINPROGRESS)
- return __connman_error_failed(msg, -err);
- } else
- network->connected = FALSE;
-
- return g_dbus_create_reply(msg, DBUS_TYPE_INVALID);
-}
-
static GDBusMethodTable network_methods[] = {
{ "GetProperties", "", "a{sv}", get_properties },
{ "SetProperty", "sv", "", set_property },
- { "Connect", "", "", do_connect },
- { "Disconnect", "", "", do_disconnect },
{ },
};