summaryrefslogtreecommitdiff
path: root/src/manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/manager.c')
-rwxr-xr-xsrc/manager.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/manager.c b/src/manager.c
index 4b351e11..19f62c65 100755
--- a/src/manager.c
+++ b/src/manager.c
@@ -217,6 +217,32 @@ static DBusMessage *get_services(DBusConnection *conn,
}
#if defined TIZEN_EXT
+static DBusMessage *get_interfaces(DBusConnection *conn, DBusMessage *msg, void *data)
+{
+ DBusMessage *reply;
+ DBusMessageIter iter, array;
+ const char *default_interface = connman_option_get_string("DefaultWifiInterface");
+
+ DBG("DefaultWifiInterface %s", default_interface);
+
+ reply = dbus_message_new_method_return(msg);
+ if (!reply)
+ return NULL;
+
+ dbus_message_iter_init_append(reply, &iter);
+ dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY,
+ DBUS_TYPE_STRING_AS_STRING, &array);
+
+ dbus_message_iter_append_basic(&array,
+ DBUS_TYPE_STRING, &default_interface);
+
+ __connman_technology_append_interfaces(&array,
+ CONNMAN_SERVICE_TYPE_WIFI, default_interface);
+
+ dbus_message_iter_close_container(&iter, &array);
+ return reply;
+}
+
static DBusMessage *get_default_service(DBusConnection *conn,
DBusMessage *msg, void *data)
{
@@ -700,6 +726,9 @@ static const GDBusMethodTable manager_methods[] = {
NULL, GDBUS_ARGS({ "services", "a(oa{sv})" }),
get_services) },
#if defined TIZEN_EXT
+ { GDBUS_METHOD("GetInterfaces",
+ NULL, GDBUS_ARGS({ "interface_list", "as" }),
+ get_interfaces) },
{ GDBUS_METHOD("GetDefaultService",
NULL, GDBUS_ARGS({ "service", "oa{sv}" }),
get_default_service) },