diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-04-04 04:39:57 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-04-04 04:39:57 +0200 |
commit | 21cfc6e634c485a13229aff75dbe3f119989d90c (patch) | |
tree | 0a9a13c1f72b4731d1cfd6506f9b49aeb855d69b | |
parent | 0d706f23d1d89f0359ffddb05a07a00bfcb84385 (diff) | |
download | connman-21cfc6e634c485a13229aff75dbe3f119989d90c.tar.gz connman-21cfc6e634c485a13229aff75dbe3f119989d90c.tar.bz2 connman-21cfc6e634c485a13229aff75dbe3f119989d90c.zip |
Add support for favorite service setting
-rw-r--r-- | src/profile.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/profile.c b/src/profile.c index a2706546..9b1d2e72 100644 --- a/src/profile.c +++ b/src/profile.c @@ -37,6 +37,7 @@ struct connman_group { char *mode; char *security; connman_uint8_t strength; + connman_bool_t favorite; struct connman_network *network; }; @@ -84,6 +85,9 @@ static DBusMessage *get_properties(DBusConnection *conn, connman_dbus_dict_append_variant(&dict, "Strength", DBUS_TYPE_BYTE, &group->strength); + connman_dbus_dict_append_variant(&dict, "Favorite", + DBUS_TYPE_BOOLEAN, &group->favorite); + dbus_message_iter_close_container(&array, &dict); return reply; @@ -131,6 +135,8 @@ static struct connman_group *lookup_group(const char *name) group->type = CONNMAN_ELEMENT_TYPE_UNKNOWN; group->path = g_strdup_printf("%s/%s", PROFILE_DEFAULT, name); + group->favorite = FALSE; + g_hash_table_insert(groups, g_strdup(name), group); g_dbus_register_interface(connection, group->path, |