diff options
author | Will Song <incertia9474@gmail.com> | 2014-11-23 01:33:23 -0600 |
---|---|---|
committer | Will Song <incertia9474@gmail.com> | 2014-11-23 01:33:23 -0600 |
commit | 0f2035e4adc361b7f850adbbe82f6edea7f18d8b (patch) | |
tree | 0a87a485dc52397eff1bdffaad5de18e268ca156 /src/roster_list.c | |
parent | f486b5884b79cb3ed0d7c4e732b56e73e9236a77 (diff) | |
download | profani-tty-0f2035e4adc361b7f850adbbe82f6edea7f18d8b.tar.gz |
add functions for getting roster list without offline contacts (but not implemented)
Diffstat (limited to 'src/roster_list.c')
-rw-r--r-- | src/roster_list.c | 17 |
1 files changed, 17 insertions, 0 deletions
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) { |