Added occupantswin.c

This commit is contained in:
James Booth
2014-12-16 23:37:23 +00:00
parent 052eee3c3e
commit 4dc48b4b48
8 changed files with 184 additions and 113 deletions

View File

@@ -183,6 +183,25 @@ wins_get_by_recipient(const char * const recipient)
return NULL;
}
ProfMucWin *
wins_get_muc_win(const char * const roomjid)
{
GList *values = g_hash_table_get_values(windows);
GList *curr = values;
while (curr != NULL) {
ProfWin *window = curr->data;
if ((g_strcmp0(window->from, roomjid) == 0) && window->type == WIN_MUC) {
g_list_free(values);
return (ProfMucWin*)window;
}
curr = g_list_next(curr);
}
g_list_free(values);
return NULL;
}
int
wins_get_num(ProfWin *window)
{