From 0f2035e4adc361b7f850adbbe82f6edea7f18d8b Mon Sep 17 00:00:00 2001 From: Will Song Date: Sun, 23 Nov 2014 01:33:23 -0600 Subject: add functions for getting roster list without offline contacts (but not implemented) --- src/roster_list.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/roster_list.c') diff --git a/src/roster_list.c b/src/roster_list.c index 941b6321..792d804c 100644 --- a/src/roster_list.c +++ b/src/roster_list.c @@ -307,6 +307,23 @@ roster_get_contacts(void) return result; } +GSList * +roster_get_contacts_nooffline(void) +{ + GSList *result = NULL; + GHashTableIter iter; + gpointer key; + gpointer value; + + g_hash_table_iter_init(&iter, contacts); + while (g_hash_table_iter_next(&iter, &key, &value)) { + result = g_slist_insert_sorted(result, value, (GCompareFunc)_compare_contacts); + } + + // resturn all contact structs + return result; +} + gboolean roster_has_pending_subscriptions(void) { -- cgit 1.4.1-2-gfad0