Merge remote-tracking branch 'incertia/master'

This commit is contained in:
James Booth
2014-11-24 00:54:51 +00:00
4 changed files with 31 additions and 3 deletions

View File

@@ -307,6 +307,24 @@ roster_get_contacts(void)
return result;
}
GSList *
roster_get_contacts_online(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)) {
if(strcmp(p_contact_presence(value), "offline"))
result = g_slist_insert_sorted(result, value, (GCompareFunc)_compare_contacts);
}
// resturn all contact structs
return result;
}
gboolean
roster_has_pending_subscriptions(void)
{