summaryrefslogtreecommitdiff
path: root/src/manager.c
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2012-01-19 14:27:48 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2012-01-20 01:59:36 +0100
commitc640bafaa872a2ad8b8a2840bcbc3409246a141c (patch)
tree5b77f34389f0dd2f33259043d7755f229eecc07d /src/manager.c
parent59c436643e82b9fd87538951fc838ad5a29f04b3 (diff)
downloadconnman-c640bafaa872a2ad8b8a2840bcbc3409246a141c.tar.gz
connman-c640bafaa872a2ad8b8a2840bcbc3409246a141c.tar.bz2
connman-c640bafaa872a2ad8b8a2840bcbc3409246a141c.zip
manager: Remove EnableTechnology and DisableTechnology
Remove EnableTechnology and DisableTechnology D-Bus method calls from Manager API.
Diffstat (limited to 'src/manager.c')
-rw-r--r--src/manager.c74
1 files changed, 0 insertions, 74 deletions
diff --git a/src/manager.c b/src/manager.c
index 4db6ab07..941bf5f1 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -242,76 +242,6 @@ static struct connman_notifier technology_notifier = {
.idle_state = idle_state,
};
-static DBusMessage *enable_technology(DBusConnection *conn,
- DBusMessage *msg, void *data)
-{
- enum connman_service_type type;
- const char *str;
-
- DBG("conn %p", conn);
-
- dbus_message_get_args(msg, NULL, DBUS_TYPE_STRING, &str,
- DBUS_TYPE_INVALID);
-
- if (g_strcmp0(str, "ethernet") == 0)
- type = CONNMAN_SERVICE_TYPE_ETHERNET;
- else if (g_strcmp0(str, "wifi") == 0)
- type = CONNMAN_SERVICE_TYPE_WIFI;
- else if (g_strcmp0(str, "wimax") == 0)
- type = CONNMAN_SERVICE_TYPE_WIMAX;
- else if (g_strcmp0(str, "bluetooth") == 0)
- type = CONNMAN_SERVICE_TYPE_BLUETOOTH;
- else if (g_strcmp0(str, "cellular") == 0)
- type = CONNMAN_SERVICE_TYPE_CELLULAR;
- else
- return __connman_error_invalid_arguments(msg);
-
- if (__connman_notifier_is_registered(type) == FALSE)
- return __connman_error_not_registered(msg);
-
- if (__connman_notifier_is_enabled(type) == TRUE)
- return __connman_error_already_enabled(msg);
-
- __connman_technology_enable(type, msg);
-
- return NULL;
-}
-
-static DBusMessage *disable_technology(DBusConnection *conn,
- DBusMessage *msg, void *data)
-{
- enum connman_service_type type;
- const char *str;
-
- DBG("conn %p", conn);
-
- dbus_message_get_args(msg, NULL, DBUS_TYPE_STRING, &str,
- DBUS_TYPE_INVALID);
-
- if (g_strcmp0(str, "ethernet") == 0)
- type = CONNMAN_SERVICE_TYPE_ETHERNET;
- else if (g_strcmp0(str, "wifi") == 0)
- type = CONNMAN_SERVICE_TYPE_WIFI;
- else if (g_strcmp0(str, "wimax") == 0)
- type = CONNMAN_SERVICE_TYPE_WIMAX;
- else if (g_strcmp0(str, "bluetooth") == 0)
- type = CONNMAN_SERVICE_TYPE_BLUETOOTH;
- else if (g_strcmp0(str, "cellular") == 0)
- type = CONNMAN_SERVICE_TYPE_CELLULAR;
- else
- return __connman_error_invalid_arguments(msg);
-
- if (__connman_notifier_is_registered(type) == FALSE)
- return __connman_error_not_registered(msg);
-
- if (__connman_notifier_is_enabled(type) == FALSE)
- return __connman_error_already_disabled(msg);
-
- __connman_technology_disable(type, msg);
-
- return NULL;
-}
-
static DBusMessage *get_services(DBusConnection *conn,
DBusMessage *msg, void *data)
{
@@ -523,10 +453,6 @@ static GDBusMethodTable manager_methods[] = {
{ "GetTechnologies", "", "a(oa{sv})", get_technologies },
{ "RemoveProvider", "o", "", remove_provider },
{ "RequestScan", "s", "", request_scan },
- { "EnableTechnology", "s", "", enable_technology,
- G_DBUS_METHOD_FLAG_ASYNC },
- { "DisableTechnology", "s", "", disable_technology,
- G_DBUS_METHOD_FLAG_ASYNC },
{ "GetServices", "", "a(oa{sv})", get_services },
{ "ConnectProvider", "a{sv}", "o", connect_provider,
G_DBUS_METHOD_FLAG_ASYNC },