summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-05-13 21:00:13 -0700
committerMarcel Holtmann <marcel@holtmann.org>2009-05-13 21:00:13 -0700
commit47225048709183a2e54fa3fea0e29b91db1ea537 (patch)
treea40f63158ad2c8b45c3c5cb30e3111da17d68473
parent254c95953680203a984aee5cd43443958c506ea9 (diff)
downloadconnman-47225048709183a2e54fa3fea0e29b91db1ea537.tar.gz
connman-47225048709183a2e54fa3fea0e29b91db1ea537.tar.bz2
connman-47225048709183a2e54fa3fea0e29b91db1ea537.zip
Add callback skeleton for generic service connect method
-rw-r--r--src/manager.c46
1 files changed, 40 insertions, 6 deletions
diff --git a/src/manager.c b/src/manager.c
index 6c079ff3..f5c50f6e 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -294,6 +294,39 @@ static DBusMessage *remove_profile(DBusConnection *conn,
return __connman_error_not_supported(msg);
}
+static DBusMessage *connect_service(DBusConnection *conn,
+ DBusMessage *msg, void *data)
+{
+ DBusMessageIter iter, array;
+
+ DBG("conn %p", conn);
+
+ if (__connman_security_check_privilege(msg,
+ CONNMAN_SECURITY_PRIVILEGE_MODIFY) < 0)
+ return __connman_error_permission_denied(msg);
+
+ dbus_message_iter_init(msg, &iter);
+ dbus_message_iter_recurse(&iter, &array);
+
+ while (dbus_message_iter_get_arg_type(&array) == DBUS_TYPE_DICT_ENTRY) {
+ DBusMessageIter entry, value;
+ const char *key;
+
+ dbus_message_iter_recurse(&array, &entry);
+ dbus_message_iter_get_basic(&entry, &key);
+
+ dbus_message_iter_next(&entry);
+ dbus_message_iter_recurse(&entry, &value);
+
+ switch (dbus_message_iter_get_arg_type(&value)) {
+ }
+
+ dbus_message_iter_next(&array);
+ }
+
+ return __connman_error_not_implemented(msg);
+}
+
static DBusMessage *register_agent(DBusConnection *conn,
DBusMessage *msg, void *data)
{
@@ -343,12 +376,13 @@ static DBusMessage *unregister_agent(DBusConnection *conn,
}
static GDBusMethodTable manager_methods[] = {
- { "GetProperties", "", "a{sv}", get_properties },
- { "SetProperty", "sv", "", set_property },
- { "AddProfile", "s", "o", add_profile },
- { "RemoveProfile", "o", "", remove_profile },
- { "RegisterAgent", "o", "", register_agent },
- { "UnregisterAgent", "o", "", unregister_agent },
+ { "GetProperties", "", "a{sv}", get_properties },
+ { "SetProperty", "sv", "", set_property },
+ { "AddProfile", "s", "o", add_profile },
+ { "RemoveProfile", "o", "", remove_profile },
+ { "ConnectService", "a{sv}", "o", connect_service },
+ { "RegisterAgent", "o", "", register_agent },
+ { "UnregisterAgent", "o", "", unregister_agent },
{ },
};