X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fprofile.c;h=44dcf55f73c947b7e1a7abbbad652a321fddc124;hb=058b97a987c51323282c2f4f6aeebcf5a2576d83;hp=223ea434fa9eef25d4ef96bf4c39df8fe5fb7c3f;hpb=f3ce64de7eb5cffd32dafe6388b8425a5bec137a;p=connman diff --git a/src/profile.c b/src/profile.c index 223ea43..44dcf55 100644 --- a/src/profile.c +++ b/src/profile.c @@ -2,7 +2,7 @@ * * Connection Manager * - * Copyright (C) 2007-2008 Intel Corporation. All rights reserved. + * Copyright (C) 2007-2009 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -37,7 +37,36 @@ void __connman_profile_list(DBusMessageIter *iter) dbus_message_iter_append_basic(iter, DBUS_TYPE_OBJECT_PATH, &path); } +static DBusMessage *get_properties(DBusConnection *conn, + DBusMessage *msg, void *data) +{ + const char *name = "Default"; + DBusMessage *reply; + DBusMessageIter array, dict; + + DBG("conn %p", conn); + + reply = dbus_message_new_method_return(msg); + if (reply == NULL) + return NULL; + + dbus_message_iter_init_append(reply, &array); + + dbus_message_iter_open_container(&array, DBUS_TYPE_ARRAY, + DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING + DBUS_TYPE_STRING_AS_STRING DBUS_TYPE_VARIANT_AS_STRING + DBUS_DICT_ENTRY_END_CHAR_AS_STRING, &dict); + + connman_dbus_dict_append_variant(&dict, "Name", + DBUS_TYPE_STRING, &name); + + dbus_message_iter_close_container(&array, &dict); + + return reply; +} + static GDBusMethodTable profile_methods[] = { + { "GetProperties", "", "a{sv}", get_properties }, { }, };