summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/connman.h1
-rw-r--r--src/manager.c20
-rw-r--r--src/service.c44
3 files changed, 0 insertions, 65 deletions
diff --git a/src/connman.h b/src/connman.h
index 85055b1d..ba9762f3 100644
--- a/src/connman.h
+++ b/src/connman.h
@@ -485,7 +485,6 @@ int __connman_service_clear_error(struct connman_service *service);
int __connman_service_indicate_default(struct connman_service *service);
int __connman_service_request_login(struct connman_service *service);
-int __connman_service_lookup(const char *pattern, const char **path);
int __connman_service_connect(struct connman_service *service);
int __connman_service_disconnect(struct connman_service *service);
int __connman_service_disconnect_all(void);
diff --git a/src/manager.c b/src/manager.c
index 2b34ea6f..9afcc3ea 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -337,25 +337,6 @@ static DBusMessage *get_services(DBusConnection *conn,
return reply;
}
-static DBusMessage *lookup_service(DBusConnection *conn,
- DBusMessage *msg, void *data)
-{
- const char *pattern, *path;
- int err;
-
- DBG("conn %p", conn);
-
- dbus_message_get_args(msg, NULL, DBUS_TYPE_STRING, &pattern,
- DBUS_TYPE_INVALID);
-
- err = __connman_service_lookup(pattern, &path);
- if (err < 0)
- return __connman_error_failed(msg, -err);
-
- return g_dbus_create_reply(msg, DBUS_TYPE_OBJECT_PATH, &path,
- DBUS_TYPE_INVALID);
-}
-
static DBusMessage *connect_service(DBusConnection *conn,
DBusMessage *msg, void *data)
{
@@ -584,7 +565,6 @@ static GDBusMethodTable manager_methods[] = {
{ "DisableTechnology", "s", "", disable_technology,
G_DBUS_METHOD_FLAG_ASYNC },
{ "GetServices", "", "a(oa{sv})", get_services },
- { "LookupService", "s", "o", lookup_service, },
{ "ConnectService", "a{sv}", "o", connect_service,
G_DBUS_METHOD_FLAG_ASYNC },
{ "ProvisionService", "s", "", provision_service,
diff --git a/src/service.c b/src/service.c
index 0ab313c2..334a7f62 100644
--- a/src/service.c
+++ b/src/service.c
@@ -4766,50 +4766,6 @@ int __connman_service_disconnect_all(void)
}
/**
- * __connman_service_lookup:
- * @pattern: search pattern
- * @path: return object path
- *
- * Look up a service path from a search pattern
- */
-int __connman_service_lookup(const char *pattern, const char **path)
-{
- GHashTableIter iter;
- gpointer key, value;
- struct connman_device *device;
- const char *ifname;
-
- g_hash_table_iter_init(&iter, service_hash);
-
- while (g_hash_table_iter_next(&iter, &key, &value) == TRUE) {
- GSequenceIter *iter = value;
- struct connman_service *service = g_sequence_get(iter);
-
- if (g_strcmp0(service->identifier, pattern) == 0 ||
- g_strcmp0(service->name, pattern) == 0) {
- *path = (const char *) service->path;
- return 0;
- }
-
- if (service->network == NULL)
- continue;
-
- device = connman_network_get_device(service->network);
- if (device == NULL)
- continue;
-
- ifname = connman_device_get_string(device, "Interface");
- if (ifname != NULL && g_strcmp0(ifname, pattern) == 0) {
- *path = (const char *) service->path;
- return 0;
- }
-
- }
-
- return -ENXIO;
-}
-
-/**
* lookup_by_identifier:
* @identifier: service identifier
*