diff --git a/src/command/commands.c b/src/command/commands.c index d8408937..540300de 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -1158,7 +1158,7 @@ _who_room(ProfWin *window, const char *const command, gchar **args) // no arg, show all contacts if ((presence == NULL) || (g_strcmp0(presence, "any") == 0)) { - ui_room_roster(mucwin->roomjid, occupants, NULL); + mucwin_roster(mucwin->roomjid, occupants, NULL); // available } else if (strcmp("available", presence) == 0) { @@ -1172,7 +1172,7 @@ _who_room(ProfWin *window, const char *const command, gchar **args) occupants = g_list_next(occupants); } - ui_room_roster(mucwin->roomjid, filtered, "available"); + mucwin_roster(mucwin->roomjid, filtered, "available"); // unavailable } else if (strcmp("unavailable", presence) == 0) { @@ -1186,7 +1186,7 @@ _who_room(ProfWin *window, const char *const command, gchar **args) occupants = g_list_next(occupants); } - ui_room_roster(mucwin->roomjid, filtered, "unavailable"); + mucwin_roster(mucwin->roomjid, filtered, "unavailable"); // show specific status } else { @@ -1201,7 +1201,7 @@ _who_room(ProfWin *window, const char *const command, gchar **args) occupants = g_list_next(occupants); } - ui_room_roster(mucwin->roomjid, filtered, presence); + mucwin_roster(mucwin->roomjid, filtered, presence); } g_list_free(occupants); @@ -1209,32 +1209,32 @@ _who_room(ProfWin *window, const char *const command, gchar **args) // role or affiliation filter } else { if (g_strcmp0(args[0], "moderator") == 0) { - ui_show_room_role_list(mucwin, MUC_ROLE_MODERATOR); + mucwin_show_role_list(mucwin, MUC_ROLE_MODERATOR); return; } if (g_strcmp0(args[0], "participant") == 0) { - ui_show_room_role_list(mucwin, MUC_ROLE_PARTICIPANT); + mucwin_show_role_list(mucwin, MUC_ROLE_PARTICIPANT); return; } if (g_strcmp0(args[0], "visitor") == 0) { - ui_show_room_role_list(mucwin, MUC_ROLE_VISITOR); + mucwin_show_role_list(mucwin, MUC_ROLE_VISITOR); return; } if (g_strcmp0(args[0], "owner") == 0) { - ui_show_room_affiliation_list(mucwin, MUC_AFFILIATION_OWNER); + mucwin_show_affiliation_list(mucwin, MUC_AFFILIATION_OWNER); return; } if (g_strcmp0(args[0], "admin") == 0) { - ui_show_room_affiliation_list(mucwin, MUC_AFFILIATION_ADMIN); + mucwin_show_affiliation_list(mucwin, MUC_AFFILIATION_ADMIN); return; } if (g_strcmp0(args[0], "member") == 0) { - ui_show_room_affiliation_list(mucwin, MUC_AFFILIATION_MEMBER); + mucwin_show_affiliation_list(mucwin, MUC_AFFILIATION_MEMBER); return; } if (g_strcmp0(args[0], "outcast") == 0) { - ui_show_room_affiliation_list(mucwin, MUC_AFFILIATION_OUTCAST); + mucwin_show_affiliation_list(mucwin, MUC_AFFILIATION_OUTCAST); return; } } @@ -2085,7 +2085,7 @@ cmd_info(ProfWin *window, const char *const command, gchar **args) ProfMucWin *mucwin = (ProfMucWin*)window; assert(mucwin->memcheck == PROFMUCWIN_MEMCHECK); iq_room_info_request(mucwin->roomjid, TRUE); - ui_show_room_info(mucwin); + mucwin_info(mucwin); return TRUE; } break; @@ -3171,16 +3171,16 @@ cmd_occupants(ProfWin *window, const char *const command, gchar **args) if (g_strcmp0(args[0], "show") == 0) { if (g_strcmp0(args[1], "jid") == 0) { mucwin->showjid = TRUE; - ui_room_update_occupants(mucwin->roomjid); + mucwin_update_occupants(mucwin->roomjid); } else { - ui_room_show_occupants(mucwin->roomjid); + mucwin_show_occupants(mucwin->roomjid); } } else if (g_strcmp0(args[0], "hide") == 0) { if (g_strcmp0(args[1], "jid") == 0) { mucwin->showjid = FALSE; - ui_room_update_occupants(mucwin->roomjid); + mucwin_update_occupants(mucwin->roomjid); } else { - ui_room_hide_occupants(mucwin->roomjid); + mucwin_hide_occupants(mucwin->roomjid); } } else { cons_bad_cmd_usage(command); diff --git a/src/event/server_events.c b/src/event/server_events.c index bfac6ddd..7d39267b 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -136,7 +136,7 @@ void sv_ev_room_broadcast(const char *const room_jid, const char *const message) { if (muc_roster_complete(room_jid)) { - ui_room_broadcast(room_jid, message); + mucwin_broadcast(room_jid, message); } else { muc_pending_broadcasts_add(room_jid, message); } @@ -147,7 +147,7 @@ sv_ev_room_subject(const char *const room, const char *const nick, const char *c { muc_set_subject(room, subject); if (muc_roster_complete(room)) { - ui_room_subject(room, nick, subject); + mucwin_subject(room, nick, subject); } } @@ -155,14 +155,14 @@ void sv_ev_room_history(const char *const room_jid, const char *const nick, GDateTime *timestamp, const char *const message) { - ui_room_history(room_jid, nick, timestamp, message); + mucwin_history(room_jid, nick, timestamp, message); } void sv_ev_room_message(const char *const room_jid, const char *const nick, const char *const message) { - ui_room_message(room_jid, nick, message); + mucwin_message(room_jid, nick, message); if (prefs_get_boolean(PREF_GRLOG)) { Jid *jid = jid_create(jabber_get_fulljid()); @@ -486,7 +486,7 @@ sv_ev_room_occupant_offline(const char *const room, const char *const nick, char *muc_status_pref = prefs_get_string(PREF_STATUSES_MUC); if (g_strcmp0(muc_status_pref, "none") != 0) { - ui_room_member_offline(room, nick); + mucwin_occupant_offline(room, nick); } prefs_free_string(muc_status_pref); occupantswin_occupants(room); @@ -497,7 +497,7 @@ sv_ev_room_occupent_kicked(const char *const room, const char *const nick, const const char *const reason) { muc_roster_remove(room, nick); - ui_room_member_kicked(room, nick, actor, reason); + mucwin_occupant_kicked(room, nick, actor, reason); occupantswin_occupants(room); } @@ -506,7 +506,7 @@ sv_ev_room_occupent_banned(const char *const room, const char *const nick, const const char *const reason) { muc_roster_remove(room, nick); - ui_room_member_banned(room, nick, actor, reason); + mucwin_occupant_banned(room, nick, actor, reason); occupantswin_occupants(room); } @@ -541,7 +541,7 @@ sv_ev_muc_self_online(const char *const room, const char *const nick, gboolean c // handle self nick change if (muc_nick_change_pending(room)) { muc_nick_change_complete(room, nick); - ui_room_nick_change(room, nick); + mucwin_nick_change(room, nick); // handle roster complete } else if (!muc_roster_complete(room)) { @@ -559,20 +559,20 @@ sv_ev_muc_self_online(const char *const room, const char *const nick, gboolean c // show roster if occupants list disabled by default if (!prefs_get_boolean(PREF_OCCUPANTS)) { GList *occupants = muc_roster(room); - ui_room_roster(room, occupants, NULL); + mucwin_roster(room, occupants, NULL); g_list_free(occupants); } char *subject = muc_subject(room); if (subject) { - ui_room_subject(room, NULL, subject); + mucwin_subject(room, NULL, subject); } GList *pending_broadcasts = muc_pending_broadcasts(room); if (pending_broadcasts) { GList *curr = pending_broadcasts; while (curr) { - ui_room_broadcast(room, curr->data); + mucwin_broadcast(room, curr->data); curr = g_list_next(curr); } } @@ -580,7 +580,7 @@ sv_ev_muc_self_online(const char *const room, const char *const nick, gboolean c // room configuration required if (config_required) { muc_set_requires_config(room, TRUE); - ui_room_requires_config(room); + mucwin_requires_config(room); } // check for change in role/affiliation @@ -588,15 +588,15 @@ sv_ev_muc_self_online(const char *const room, const char *const nick, gboolean c if (prefs_get_boolean(PREF_MUC_PRIVILEGES)) { // both changed if ((g_strcmp0(role, old_role) != 0) && (g_strcmp0(affiliation, old_affiliation) != 0)) { - ui_room_role_and_affiliation_change(room, role, affiliation, actor, reason); + mucwin_role_and_affiliation_change(room, role, affiliation, actor, reason); // role changed } else if (g_strcmp0(role, old_role) != 0) { - ui_room_role_change(room, role, actor, reason); + mucwin_role_change(room, role, actor, reason); // affiliation changed } else if (g_strcmp0(affiliation, old_affiliation) != 0) { - ui_room_affiliation_change(room, affiliation, actor, reason); + mucwin_affiliation_change(room, affiliation, actor, reason); } } } @@ -628,7 +628,7 @@ sv_ev_muc_occupant_online(const char *const room, const char *const nick, const // handle nickname change char *old_nick = muc_roster_nick_change_complete(room, nick); if (old_nick) { - ui_room_member_nick_change(room, old_nick, nick); + mucwin_occupant_nick_change(room, old_nick, nick); free(old_nick); occupantswin_occupants(room); return; @@ -638,7 +638,7 @@ sv_ev_muc_occupant_online(const char *const room, const char *const nick, const if (!occupant) { char *muc_status_pref = prefs_get_string(PREF_STATUSES_MUC); if (g_strcmp0(muc_status_pref, "none") != 0) { - ui_room_member_online(room, nick, role, affiliation, show, status); + mucwin_occupant_online(room, nick, role, affiliation, show, status); } prefs_free_string(muc_status_pref); occupantswin_occupants(room); @@ -649,7 +649,7 @@ sv_ev_muc_occupant_online(const char *const room, const char *const nick, const if (updated) { char *muc_status_pref = prefs_get_string(PREF_STATUSES_MUC); if (g_strcmp0(muc_status_pref, "all") == 0) { - ui_room_member_presence(room, nick, show, status); + mucwin_occupant_presence(room, nick, show, status); } prefs_free_string(muc_status_pref); occupantswin_occupants(room); @@ -659,15 +659,15 @@ sv_ev_muc_occupant_online(const char *const room, const char *const nick, const if (prefs_get_boolean(PREF_MUC_PRIVILEGES)) { // both changed if ((g_strcmp0(role, old_role) != 0) && (g_strcmp0(affiliation, old_affiliation) != 0)) { - ui_room_occupant_role_and_affiliation_change(room, nick, role, affiliation, actor, reason); + mucwin_occupant_role_and_affiliation_change(room, nick, role, affiliation, actor, reason); // role changed } else if (g_strcmp0(role, old_role) != 0) { - ui_room_occupant_role_change(room, nick, role, actor, reason); + mucwin_occupant_role_change(room, nick, role, actor, reason); // affiliation changed } else if (g_strcmp0(affiliation, old_affiliation) != 0) { - ui_room_occupant_affiliation_change(room, nick, affiliation, actor, reason); + mucwin_occupant_affiliation_change(room, nick, affiliation, actor, reason); } } occupantswin_occupants(room); diff --git a/src/ui/core.c b/src/ui/core.c index 6fcfc8f5..b6cc5b3c 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -647,7 +647,7 @@ ui_hide_all_room_rosters(void) if (window->type == WIN_MUC && win_has_active_subwin(window)) { ProfMucWin *mucwin = (ProfMucWin*)window; assert(mucwin->memcheck == PROFMUCWIN_MEMCHECK); - ui_room_hide_occupants(mucwin->roomjid); + mucwin_hide_occupants(mucwin->roomjid); } curr = g_list_next(curr); } @@ -668,7 +668,7 @@ ui_show_all_room_rosters(void) if (window->type == WIN_MUC && !win_has_active_subwin(window)) { ProfMucWin *mucwin = (ProfMucWin*)window; assert(mucwin->memcheck == PROFMUCWIN_MEMCHECK); - ui_room_show_occupants(mucwin->roomjid); + mucwin_show_occupants(mucwin->roomjid); } curr = g_list_next(curr); } diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index 5e54a24d..2e722585 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -39,7 +39,7 @@ #include "ui/window.h" void -ui_room_role_change(const char *const roomjid, const char *const role, const char *const actor, +mucwin_role_change(const char *const roomjid, const char *const role, const char *const actor, const char *const reason) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); @@ -54,7 +54,7 @@ ui_room_role_change(const char *const roomjid, const char *const role, const cha } void -ui_room_affiliation_change(const char *const roomjid, const char *const affiliation, const char *const actor, +mucwin_affiliation_change(const char *const roomjid, const char *const affiliation, const char *const actor, const char *const reason) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); @@ -69,7 +69,7 @@ ui_room_affiliation_change(const char *const roomjid, const char *const affiliat } void -ui_room_role_and_affiliation_change(const char *const roomjid, const char *const role, const char *const affiliation, +mucwin_role_and_affiliation_change(const char *const roomjid, const char *const role, const char *const affiliation, const char *const actor, const char *const reason) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); @@ -85,7 +85,7 @@ ui_room_role_and_affiliation_change(const char *const roomjid, const char *const void -ui_room_occupant_role_change(const char *const roomjid, const char *const nick, const char *const role, +mucwin_occupant_role_change(const char *const roomjid, const char *const nick, const char *const role, const char *const actor, const char *const reason) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); @@ -100,7 +100,7 @@ ui_room_occupant_role_change(const char *const roomjid, const char *const nick, } void -ui_room_occupant_affiliation_change(const char *const roomjid, const char *const nick, const char *const affiliation, +mucwin_occupant_affiliation_change(const char *const roomjid, const char *const nick, const char *const affiliation, const char *const actor, const char *const reason) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); @@ -115,7 +115,7 @@ ui_room_occupant_affiliation_change(const char *const roomjid, const char *const } void -ui_room_occupant_role_and_affiliation_change(const char *const roomjid, const char *const nick, const char *const role, +mucwin_occupant_role_and_affiliation_change(const char *const roomjid, const char *const nick, const char *const role, const char *const affiliation, const char *const actor, const char *const reason) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); @@ -130,7 +130,7 @@ ui_room_occupant_role_and_affiliation_change(const char *const roomjid, const ch } void -ui_handle_room_info_error(const char *const roomjid, const char *const error) +mucwin_room_info_error(const char *const roomjid, const char *const error) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); if (window) { @@ -140,7 +140,7 @@ ui_handle_room_info_error(const char *const roomjid, const char *const error) } void -ui_show_room_disco_info(const char *const roomjid, GSList *identities, GSList *features) +mucwin_room_disco_info(const char *const roomjid, GSList *identities, GSList *features) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); if (window) { @@ -181,7 +181,7 @@ ui_show_room_disco_info(const char *const roomjid, GSList *identities, GSList *f } void -ui_room_roster(const char *const roomjid, GList *roster, const char *const presence) +mucwin_roster(const char *const roomjid, GList *roster, const char *const presence) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); if (window == NULL) { @@ -221,7 +221,7 @@ ui_room_roster(const char *const roomjid, GList *roster, const char *const prese } void -ui_room_member_offline(const char *const roomjid, const char *const nick) +mucwin_occupant_offline(const char *const roomjid, const char *const nick) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); if (window == NULL) { @@ -232,7 +232,7 @@ ui_room_member_offline(const char *const roomjid, const char *const nick) } void -ui_room_member_kicked(const char *const roomjid, const char *const nick, const char *const actor, +mucwin_occupant_kicked(const char *const roomjid, const char *const nick, const char *const actor, const char *const reason) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); @@ -256,7 +256,7 @@ ui_room_member_kicked(const char *const roomjid, const char *const nick, const c } void -ui_room_member_banned(const char *const roomjid, const char *const nick, const char *const actor, +mucwin_occupant_banned(const char *const roomjid, const char *const nick, const char *const actor, const char *const reason) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); @@ -280,7 +280,7 @@ ui_room_member_banned(const char *const roomjid, const char *const nick, const c } void -ui_room_member_online(const char *const roomjid, const char *const nick, const char *const role, +mucwin_occupant_online(const char *const roomjid, const char *const nick, const char *const role, const char *const affiliation, const char *const show, const char *const status) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); @@ -301,7 +301,7 @@ ui_room_member_online(const char *const roomjid, const char *const nick, const c } void -ui_room_member_presence(const char *const roomjid, const char *const nick, +mucwin_occupant_presence(const char *const roomjid, const char *const nick, const char *const show, const char *const status) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); @@ -313,7 +313,7 @@ ui_room_member_presence(const char *const roomjid, const char *const nick, } void -ui_room_member_nick_change(const char *const roomjid, +mucwin_occupant_nick_change(const char *const roomjid, const char *const old_nick, const char *const nick) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); @@ -325,7 +325,7 @@ ui_room_member_nick_change(const char *const roomjid, } void -ui_room_nick_change(const char *const roomjid, const char *const nick) +mucwin_nick_change(const char *const roomjid, const char *const nick) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); if (window == NULL) { @@ -336,7 +336,7 @@ ui_room_nick_change(const char *const roomjid, const char *const nick) } void -ui_room_history(const char *const roomjid, const char *const nick, +mucwin_history(const char *const roomjid, const char *const nick, GDateTime *timestamp, const char *const message) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); @@ -362,7 +362,7 @@ ui_room_history(const char *const roomjid, const char *const nick, } void -ui_room_message(const char *const roomjid, const char *const nick, +mucwin_message(const char *const roomjid, const char *const nick, const char *const message) { ProfMucWin *mucwin = wins_get_muc(roomjid); @@ -446,7 +446,7 @@ ui_room_message(const char *const roomjid, const char *const nick, } void -ui_room_requires_config(const char *const roomjid) +mucwin_requires_config(const char *const roomjid) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); if (window == NULL) { @@ -481,7 +481,7 @@ ui_room_requires_config(const char *const roomjid) } void -ui_room_subject(const char *const roomjid, const char *const nick, const char *const subject) +mucwin_subject(const char *const roomjid, const char *const nick, const char *const subject) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); if (window == NULL) { @@ -517,7 +517,7 @@ ui_room_subject(const char *const roomjid, const char *const nick, const char *c } void -ui_handle_room_kick_error(const char *const roomjid, const char *const nick, const char *const error) +mucwin_kick_error(const char *const roomjid, const char *const nick, const char *const error) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); if (window == NULL) { @@ -528,7 +528,7 @@ ui_handle_room_kick_error(const char *const roomjid, const char *const nick, con } void -ui_room_broadcast(const char *const roomjid, const char *const message) +mucwin_broadcast(const char *const roomjid, const char *const message) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); if (window == NULL) { @@ -551,7 +551,7 @@ ui_room_broadcast(const char *const roomjid, const char *const message) } void -ui_handle_room_affiliation_list_error(const char *const roomjid, const char *const affiliation, +mucwin_affiliation_list_error(const char *const roomjid, const char *const affiliation, const char *const error) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); @@ -561,7 +561,7 @@ ui_handle_room_affiliation_list_error(const char *const roomjid, const char *con } void -ui_handle_room_affiliation_list(const char *const roomjid, const char *const affiliation, GSList *jids) +mucwin_handle_affiliation_list(const char *const roomjid, const char *const affiliation, GSList *jids) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); if (window) { @@ -582,133 +582,7 @@ ui_handle_room_affiliation_list(const char *const roomjid, const char *const aff } void -ui_handle_room_role_list_error(const char *const roomjid, const char *const role, const char *const error) -{ - ProfWin *window = (ProfWin*)wins_get_muc(roomjid); - if (window) { - win_vprint(window, '!', 0, NULL, 0, THEME_ERROR, "", "Error retrieving %s list: %s", role, error); - } -} - -void -ui_handle_room_role_list(const char *const roomjid, const char *const role, GSList *nicks) -{ - ProfWin *window = (ProfWin*)wins_get_muc(roomjid); - if (window) { - if (nicks) { - win_vprint(window, '!', 0, NULL, 0, 0, "", "Role: %s", role); - GSList *curr_nick = nicks; - while (curr_nick) { - char *nick = curr_nick->data; - Occupant *occupant = muc_roster_item(roomjid, nick); - if (occupant) { - if (occupant->jid) { - win_vprint(window, '!', 0, NULL, 0, 0, "", " %s (%s)", nick, occupant->jid); - } else { - win_vprint(window, '!', 0, NULL, 0, 0, "", " %s", nick); - } - } else { - win_vprint(window, '!', 0, NULL, 0, 0, "", " %s", nick); - } - curr_nick = g_slist_next(curr_nick); - } - win_print(window, '!', 0, NULL, 0, 0, "", ""); - } else { - win_vprint(window, '!', 0, NULL, 0, 0, "", "No occupants found with role: %s", role); - win_print(window, '!', 0, NULL, 0, 0, "", ""); - } - } -} - -void -ui_handle_room_affiliation_set_error(const char *const roomjid, const char *const jid, const char *const affiliation, - const char *const error) -{ - ProfWin *window = (ProfWin*)wins_get_muc(roomjid); - if (window) { - win_vprint(window, '!', 0, NULL, 0, THEME_ERROR, "", "Error setting %s affiliation for %s: %s", affiliation, jid, error); - } -} - -void -ui_handle_room_role_set_error(const char *const roomjid, const char *const nick, const char *const role, - const char *const error) -{ - ProfWin *window = (ProfWin*)wins_get_muc(roomjid); - if (window) { - win_vprint(window, '!', 0, NULL, 0, THEME_ERROR, "", "Error setting %s role for %s: %s", role, nick, error); - } -} - -void -ui_show_room_info(ProfMucWin *mucwin) -{ - char *role = muc_role_str(mucwin->roomjid); - char *affiliation = muc_affiliation_str(mucwin->roomjid); - - ProfWin *window = (ProfWin*) mucwin; - win_vprint(window, '!', 0, NULL, 0, 0, "", "Room: %s", mucwin->roomjid); - win_vprint(window, '!', 0, NULL, 0, 0, "", "Affiliation: %s", affiliation); - win_vprint(window, '!', 0, NULL, 0, 0, "", "Role: %s", role); - win_print(window, '-', 0, NULL, 0, 0, "", ""); -} - -void -ui_show_room_role_list(ProfMucWin *mucwin, muc_role_t role) -{ - ProfWin *window = (ProfWin*) mucwin; - GSList *occupants = muc_occupants_by_role(mucwin->roomjid, role); - - if (!occupants) { - switch (role) { - case MUC_ROLE_MODERATOR: - win_print(window, '!', 0, NULL, 0, 0, "", "No moderators found."); - break; - case MUC_ROLE_PARTICIPANT: - win_print(window, '!', 0, NULL, 0, 0, "", "No participants found."); - break; - case MUC_ROLE_VISITOR: - win_print(window, '!', 0, NULL, 0, 0, "", "No visitors found."); - break; - default: - break; - } - win_print(window, '-', 0, NULL, 0, 0, "", ""); - } else { - switch (role) { - case MUC_ROLE_MODERATOR: - win_print(window, '!', 0, NULL, 0, 0, "", "Moderators:"); - break; - case MUC_ROLE_PARTICIPANT: - win_print(window, '!', 0, NULL, 0, 0, "", "Participants:"); - break; - case MUC_ROLE_VISITOR: - win_print(window, '!', 0, NULL, 0, 0, "", "Visitors:"); - break; - default: - break; - } - - GSList *curr_occupant = occupants; - while(curr_occupant) { - Occupant *occupant = curr_occupant->data; - if (occupant->role == role) { - if (occupant->jid) { - win_vprint(window, '!', 0, NULL, 0, 0, "", " %s (%s)", occupant->nick, occupant->jid); - } else { - win_vprint(window, '!', 0, NULL, 0, 0, "", " %s", occupant->nick); - } - } - - curr_occupant = g_slist_next(curr_occupant); - } - - win_print(window, '-', 0, NULL, 0, 0, "", ""); - } -} - -void -ui_show_room_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation) +mucwin_show_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation) { ProfWin *window = (ProfWin*) mucwin; GSList *occupants = muc_occupants_by_affiliation(mucwin->roomjid, affiliation); @@ -768,7 +642,133 @@ ui_show_room_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation) } void -ui_room_update_occupants(const char *const roomjid) +mucwin_role_list_error(const char *const roomjid, const char *const role, const char *const error) +{ + ProfWin *window = (ProfWin*)wins_get_muc(roomjid); + if (window) { + win_vprint(window, '!', 0, NULL, 0, THEME_ERROR, "", "Error retrieving %s list: %s", role, error); + } +} + +void +mucwin_handle_role_list(const char *const roomjid, const char *const role, GSList *nicks) +{ + ProfWin *window = (ProfWin*)wins_get_muc(roomjid); + if (window) { + if (nicks) { + win_vprint(window, '!', 0, NULL, 0, 0, "", "Role: %s", role); + GSList *curr_nick = nicks; + while (curr_nick) { + char *nick = curr_nick->data; + Occupant *occupant = muc_roster_item(roomjid, nick); + if (occupant) { + if (occupant->jid) { + win_vprint(window, '!', 0, NULL, 0, 0, "", " %s (%s)", nick, occupant->jid); + } else { + win_vprint(window, '!', 0, NULL, 0, 0, "", " %s", nick); + } + } else { + win_vprint(window, '!', 0, NULL, 0, 0, "", " %s", nick); + } + curr_nick = g_slist_next(curr_nick); + } + win_print(window, '!', 0, NULL, 0, 0, "", ""); + } else { + win_vprint(window, '!', 0, NULL, 0, 0, "", "No occupants found with role: %s", role); + win_print(window, '!', 0, NULL, 0, 0, "", ""); + } + } +} + +void +mucwin_show_role_list(ProfMucWin *mucwin, muc_role_t role) +{ + ProfWin *window = (ProfWin*) mucwin; + GSList *occupants = muc_occupants_by_role(mucwin->roomjid, role); + + if (!occupants) { + switch (role) { + case MUC_ROLE_MODERATOR: + win_print(window, '!', 0, NULL, 0, 0, "", "No moderators found."); + break; + case MUC_ROLE_PARTICIPANT: + win_print(window, '!', 0, NULL, 0, 0, "", "No participants found."); + break; + case MUC_ROLE_VISITOR: + win_print(window, '!', 0, NULL, 0, 0, "", "No visitors found."); + break; + default: + break; + } + win_print(window, '-', 0, NULL, 0, 0, "", ""); + } else { + switch (role) { + case MUC_ROLE_MODERATOR: + win_print(window, '!', 0, NULL, 0, 0, "", "Moderators:"); + break; + case MUC_ROLE_PARTICIPANT: + win_print(window, '!', 0, NULL, 0, 0, "", "Participants:"); + break; + case MUC_ROLE_VISITOR: + win_print(window, '!', 0, NULL, 0, 0, "", "Visitors:"); + break; + default: + break; + } + + GSList *curr_occupant = occupants; + while(curr_occupant) { + Occupant *occupant = curr_occupant->data; + if (occupant->role == role) { + if (occupant->jid) { + win_vprint(window, '!', 0, NULL, 0, 0, "", " %s (%s)", occupant->nick, occupant->jid); + } else { + win_vprint(window, '!', 0, NULL, 0, 0, "", " %s", occupant->nick); + } + } + + curr_occupant = g_slist_next(curr_occupant); + } + + win_print(window, '-', 0, NULL, 0, 0, "", ""); + } +} + +void +mucwin_affiliation_set_error(const char *const roomjid, const char *const jid, const char *const affiliation, + const char *const error) +{ + ProfWin *window = (ProfWin*)wins_get_muc(roomjid); + if (window) { + win_vprint(window, '!', 0, NULL, 0, THEME_ERROR, "", "Error setting %s affiliation for %s: %s", affiliation, jid, error); + } +} + +void +mucwin_role_set_error(const char *const roomjid, const char *const nick, const char *const role, + const char *const error) +{ + ProfWin *window = (ProfWin*)wins_get_muc(roomjid); + if (window) { + win_vprint(window, '!', 0, NULL, 0, THEME_ERROR, "", "Error setting %s role for %s: %s", role, nick, error); + } +} + +void +mucwin_info(ProfMucWin *mucwin) +{ + char *role = muc_role_str(mucwin->roomjid); + char *affiliation = muc_affiliation_str(mucwin->roomjid); + + ProfWin *window = (ProfWin*) mucwin; + win_vprint(window, '!', 0, NULL, 0, 0, "", "Room: %s", mucwin->roomjid); + win_vprint(window, '!', 0, NULL, 0, 0, "", "Affiliation: %s", affiliation); + win_vprint(window, '!', 0, NULL, 0, 0, "", "Role: %s", role); + win_print(window, '-', 0, NULL, 0, 0, "", ""); +} + +void +mucwin_update_occupants(const char *const roomjid) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); if (window && win_has_active_subwin(window)) { @@ -777,7 +777,7 @@ ui_room_update_occupants(const char *const roomjid) } void -ui_room_show_occupants(const char *const roomjid) +mucwin_show_occupants(const char *const roomjid) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); if (window && !win_has_active_subwin(window)) { @@ -787,7 +787,7 @@ ui_room_show_occupants(const char *const roomjid) } void -ui_room_hide_occupants(const char *const roomjid) +mucwin_hide_occupants(const char *const roomjid) { ProfWin *window = (ProfWin*)wins_get_muc(roomjid); if (window && win_has_active_subwin(window)) { diff --git a/src/ui/ui.h b/src/ui/ui.h index 52389a11..226d31aa 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -92,50 +92,12 @@ void ui_disconnected(void); void ui_outgoing_private_msg(ProfPrivateWin *privwin, const char *const message); void ui_room_join(const char *const roomjid, gboolean focus); void ui_switch_to_room(const char *const roomjid); -void ui_room_role_change(const char *const roomjid, const char *const role, const char *const actor, - const char *const reason); -void ui_room_affiliation_change(const char *const roomjid, const char *const affiliation, const char *const actor, - const char *const reason); -void ui_room_role_and_affiliation_change(const char *const roomjid, const char *const role, - const char *const affiliation, const char *const actor, const char *const reason); -void ui_room_occupant_role_change(const char *const roomjid, const char *const nick, const char *const role, - const char *const actor, const char *const reason); -void ui_room_occupant_affiliation_change(const char *const roomjid, const char *const nick, - const char *const affiliation, const char *const actor, const char *const reason); -void ui_room_occupant_role_and_affiliation_change(const char *const roomjid, const char *const nick, - const char *const role, const char *const affiliation, const char *const actor, const char *const reason); -void ui_room_roster(const char *const roomjid, GList *occupants, const char *const presence); -void ui_room_history(const char *const roomjid, const char *const nick, GDateTime *timestamp, - const char *const message); -void ui_room_message(const char *const roomjid, const char *const nick, const char *const message); -void ui_room_subject(const char *const roomjid, const char *const nick, const char *const subject); -void ui_room_requires_config(const char *const roomjid); void ui_room_destroy(const char *const roomjid); -void ui_show_room_info(ProfMucWin *mucwin); -void ui_show_room_role_list(ProfMucWin *mucwin, muc_role_t role); -void ui_show_room_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation); -void ui_handle_room_info_error(const char *const roomjid, const char *const error); -void ui_show_room_disco_info(const char *const roomjid, GSList *identities, GSList *features); void ui_room_destroyed(const char *const roomjid, const char *const reason, const char *const new_jid, const char *const password); void ui_room_kicked(const char *const roomjid, const char *const actor, const char *const reason); -void ui_room_member_kicked(const char *const roomjid, const char *const nick, const char *const actor, - const char *const reason); void ui_room_banned(const char *const roomjid, const char *const actor, const char *const reason); -void ui_room_member_banned(const char *const roomjid, const char *const nick, const char *const actor, - const char *const reason); void ui_leave_room(const char *const roomjid); -void ui_room_broadcast(const char *const roomjid, const char *const message); -void ui_room_member_offline(const char *const roomjid, const char *const nick); -void ui_room_member_online(const char *const roomjid, const char *const nick, const char *const roles, - const char *const affiliation, const char *const show, const char *const status); -void ui_room_member_nick_change(const char *const roomjid, const char *const old_nick, const char *const nick); -void ui_room_nick_change(const char *const roomjid, const char *const nick); -void ui_room_member_presence(const char *const roomjid, const char *const nick, const char *const show, - const char *const status); -void ui_room_update_occupants(const char *const roomjid); -void ui_room_show_occupants(const char *const roomjid); -void ui_room_hide_occupants(const char *const roomjid); void ui_show_roster(void); void ui_hide_roster(void); void ui_roster_add(const char *const barejid, const char *const name); @@ -155,16 +117,6 @@ void ui_handle_room_configuration(const char *const roomjid, DataForm *form); void ui_handle_room_configuration_form_error(const char *const roomjid, const char *const message); void ui_handle_room_config_submit_result(const char *const roomjid); void ui_handle_room_config_submit_result_error(const char *const roomjid, const char *const message); -void ui_handle_room_affiliation_list_error(const char *const roomjid, const char *const affiliation, - const char *const error); -void ui_handle_room_affiliation_list(const char *const roomjid, const char *const affiliation, GSList *jids); -void ui_handle_room_affiliation_set_error(const char *const roomjid, const char *const jid, - const char *const affiliation, const char *const error); -void ui_handle_room_role_set_error(const char *const roomjid, const char *const nick, const char *const role, - const char *const error); -void ui_handle_room_role_list_error(const char *const roomjid, const char *const role, const char *const error); -void ui_handle_room_role_list(const char *const roomjid, const char *const role, GSList *nicks); -void ui_handle_room_kick_error(const char *const roomjid, const char *const nick, const char *const error); void ui_show_form(ProfMucConfWin *confwin); void ui_show_form_field(ProfWin *window, DataForm *form, char *tag); void ui_show_form_help(ProfMucConfWin *confwin); @@ -208,6 +160,56 @@ void chatwin_otr_untrust(ProfChatWin *chatwin); void chatwin_otr_smp_event(ProfChatWin *chatwin, prof_otr_smp_event_t event, void *data); #endif +// MUC window +void mucwin_role_change(const char *const roomjid, const char *const role, const char *const actor, + const char *const reason); +void mucwin_affiliation_change(const char *const roomjid, const char *const affiliation, const char *const actor, + const char *const reason); +void mucwin_role_and_affiliation_change(const char *const roomjid, const char *const role, + const char *const affiliation, const char *const actor, const char *const reason); +void mucwin_occupant_role_change(const char *const roomjid, const char *const nick, const char *const role, + const char *const actor, const char *const reason); +void mucwin_occupant_affiliation_change(const char *const roomjid, const char *const nick, + const char *const affiliation, const char *const actor, const char *const reason); +void mucwin_occupant_role_and_affiliation_change(const char *const roomjid, const char *const nick, + const char *const role, const char *const affiliation, const char *const actor, const char *const reason); +void mucwin_roster(const char *const roomjid, GList *occupants, const char *const presence); +void mucwin_history(const char *const roomjid, const char *const nick, GDateTime *timestamp, + const char *const message); +void mucwin_message(const char *const roomjid, const char *const nick, const char *const message); +void mucwin_subject(const char *const roomjid, const char *const nick, const char *const subject); +void mucwin_requires_config(const char *const roomjid); +void mucwin_info(ProfMucWin *mucwin); +void mucwin_show_role_list(ProfMucWin *mucwin, muc_role_t role); +void mucwin_show_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation); +void mucwin_room_info_error(const char *const roomjid, const char *const error); +void mucwin_room_disco_info(const char *const roomjid, GSList *identities, GSList *features); +void mucwin_occupant_kicked(const char *const roomjid, const char *const nick, const char *const actor, + const char *const reason); +void mucwin_occupant_banned(const char *const roomjid, const char *const nick, const char *const actor, + const char *const reason); +void mucwin_broadcast(const char *const roomjid, const char *const message); +void mucwin_occupant_offline(const char *const roomjid, const char *const nick); +void mucwin_occupant_online(const char *const roomjid, const char *const nick, const char *const roles, + const char *const affiliation, const char *const show, const char *const status); +void mucwin_occupant_nick_change(const char *const roomjid, const char *const old_nick, const char *const nick); +void mucwin_nick_change(const char *const roomjid, const char *const nick); +void mucwin_occupant_presence(const char *const roomjid, const char *const nick, const char *const show, + const char *const status); +void mucwin_update_occupants(const char *const roomjid); +void mucwin_show_occupants(const char *const roomjid); +void mucwin_hide_occupants(const char *const roomjid); +void mucwin_affiliation_list_error(const char *const roomjid, const char *const affiliation, + const char *const error); +void mucwin_handle_affiliation_list(const char *const roomjid, const char *const affiliation, GSList *jids); +void mucwin_affiliation_set_error(const char *const roomjid, const char *const jid, + const char *const affiliation, const char *const error); +void mucwin_role_set_error(const char *const roomjid, const char *const nick, const char *const role, + const char *const error); +void mucwin_role_list_error(const char *const roomjid, const char *const role, const char *const error); +void mucwin_handle_role_list(const char *const roomjid, const char *const role, GSList *nicks); +void mucwin_kick_error(const char *const roomjid, const char *const nick, const char *const error); + // xml console void xmlwin_show(ProfXMLWin *xmlwin, const char *const msg); diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c index 8f19871b..034be2a2 100644 --- a/src/xmpp/iq.c +++ b/src/xmpp/iq.c @@ -1283,7 +1283,7 @@ _room_affiliation_set_result_handler(xmpp_conn_t *const conn, xmpp_stanza_t *con if (g_strcmp0(type, STANZA_TYPE_ERROR) == 0) { char *error_message = stanza_get_error_message(stanza); log_debug("Error setting affiliation %s list for room %s, user %s: %s", affiliation_set->privilege, from, affiliation_set->item, error_message); - ui_handle_room_affiliation_set_error(from, affiliation_set->item, affiliation_set->privilege, error_message); + mucwin_affiliation_set_error(from, affiliation_set->item, affiliation_set->privilege, error_message); free(error_message); } @@ -1313,7 +1313,7 @@ _room_role_set_result_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stan if (g_strcmp0(type, STANZA_TYPE_ERROR) == 0) { char *error_message = stanza_get_error_message(stanza); log_debug("Error setting role %s list for room %s, user %s: %s", role_set->privilege, from, role_set->item, error_message); - ui_handle_room_role_set_error(from, role_set->item, role_set->privilege, error_message); + mucwin_role_set_error(from, role_set->item, role_set->privilege, error_message); free(error_message); } @@ -1342,7 +1342,7 @@ _room_affiliation_list_result_handler(xmpp_conn_t *const conn, xmpp_stanza_t *co if (g_strcmp0(type, STANZA_TYPE_ERROR) == 0) { char *error_message = stanza_get_error_message(stanza); log_debug("Error retrieving %s list for room %s: %s", affiliation, from, error_message); - ui_handle_room_affiliation_list_error(from, affiliation, error_message); + mucwin_affiliation_list_error(from, affiliation, error_message); free(error_message); free(affiliation); return 0; @@ -1365,7 +1365,7 @@ _room_affiliation_list_result_handler(xmpp_conn_t *const conn, xmpp_stanza_t *co } muc_jid_autocomplete_add_all(from, jids); - ui_handle_room_affiliation_list(from, affiliation, jids); + mucwin_handle_affiliation_list(from, affiliation, jids); free(affiliation); g_slist_free(jids); @@ -1390,7 +1390,7 @@ _room_role_list_result_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const sta if (g_strcmp0(type, STANZA_TYPE_ERROR) == 0) { char *error_message = stanza_get_error_message(stanza); log_debug("Error retrieving %s list for room %s: %s", role, from, error_message); - ui_handle_room_role_list_error(from, role, error_message); + mucwin_role_list_error(from, role, error_message); free(error_message); free(role); return 0; @@ -1412,7 +1412,7 @@ _room_role_list_result_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const sta } } - ui_handle_room_role_list(from, role, nicks); + mucwin_handle_role_list(from, role, nicks); free(role); g_slist_free(nicks); @@ -1463,7 +1463,7 @@ _room_kick_result_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza, // handle error responses if (g_strcmp0(type, STANZA_TYPE_ERROR) == 0) { char *error_message = stanza_get_error_message(stanza); - ui_handle_room_kick_error(from, nick, error_message); + mucwin_kick_error(from, nick, error_message); free(error_message); free(nick); return 0; @@ -1507,7 +1507,7 @@ _room_info_response_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza if (g_strcmp0(type, STANZA_TYPE_ERROR) == 0) { if (cb_data->display) { char *error_message = stanza_get_error_message(stanza); - ui_handle_room_info_error(cb_data->room, error_message); + mucwin_room_info_error(cb_data->room, error_message); free(error_message); } free(cb_data->room); @@ -1561,7 +1561,7 @@ _room_info_response_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza muc_set_features(cb_data->room, features); if (cb_data->display) { - ui_show_room_disco_info(cb_data->room, identities, features); + mucwin_room_disco_info(cb_data->room, identities, features); } g_slist_free_full(features, free); diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index d146341a..9a3f704a 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -191,53 +191,53 @@ void ui_outgoing_private_msg(ProfPrivateWin *privwin, const char * const message void ui_room_join(const char * const roomjid, gboolean focus) {} void ui_switch_to_room(const char * const roomjid) {} -void ui_room_role_change(const char * const roomjid, const char * const role, const char * const actor, +void mucwin_role_change(const char * const roomjid, const char * const role, const char * const actor, const char * const reason) {} -void ui_room_affiliation_change(const char * const roomjid, const char * const affiliation, const char * const actor, +void mucwin_affiliation_change(const char * const roomjid, const char * const affiliation, const char * const actor, const char * const reason) {} -void ui_room_role_and_affiliation_change(const char * const roomjid, const char * const role, +void mucwin_role_and_affiliation_change(const char * const roomjid, const char * const role, const char * const affiliation, const char * const actor, const char * const reason) {} -void ui_room_occupant_role_change(const char * const roomjid, const char * const nick, const char * const role, +void mucwin_occupant_role_change(const char * const roomjid, const char * const nick, const char * const role, const char * const actor, const char * const reason) {} -void ui_room_occupant_affiliation_change(const char * const roomjid, const char * const nick, const char * const affiliation, +void mucwin_occupant_affiliation_change(const char * const roomjid, const char * const nick, const char * const affiliation, const char * const actor, const char * const reason) {} -void ui_room_occupant_role_and_affiliation_change(const char * const roomjid, const char * const nick, const char * const role, +void mucwin_occupant_role_and_affiliation_change(const char * const roomjid, const char * const nick, const char * const role, const char * const affiliation, const char * const actor, const char * const reason) {} -void ui_room_roster(const char * const roomjid, GList *occupants, const char * const presence) {} -void ui_room_history(const char * const roomjid, const char * const nick, +void mucwin_roster(const char * const roomjid, GList *occupants, const char * const presence) {} +void mucwin_history(const char * const roomjid, const char * const nick, GDateTime *timestamp, const char * const message) {} -void ui_room_message(const char * const roomjid, const char * const nick, +void mucwin_message(const char * const roomjid, const char * const nick, const char * const message) {} -void ui_room_subject(const char * const roomjid, const char * const nick, const char * const subject) {} -void ui_room_requires_config(const char * const roomjid) {} +void mucwin_subject(const char * const roomjid, const char * const nick, const char * const subject) {} +void mucwin_requires_config(const char * const roomjid) {} void ui_room_destroy(const char * const roomjid) {} -void ui_show_room_info(ProfMucWin *mucwin) {} -void ui_show_room_role_list(ProfMucWin *mucwin, muc_role_t role) {} -void ui_show_room_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation) {} -void ui_handle_room_info_error(const char * const roomjid, const char * const error) {} -void ui_show_room_disco_info(const char * const roomjid, GSList *identities, GSList *features) {} +void mucwin_info(ProfMucWin *mucwin) {} +void mucwin_show_role_list(ProfMucWin *mucwin, muc_role_t role) {} +void mucwin_show_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation) {} +void mucwin_room_info_error(const char * const roomjid, const char * const error) {} +void mucwin_room_disco_info(const char * const roomjid, GSList *identities, GSList *features) {} void ui_room_destroyed(const char * const roomjid, const char * const reason, const char * const new_jid, const char * const password) {} void ui_room_kicked(const char * const roomjid, const char * const actor, const char * const reason) {} -void ui_room_member_kicked(const char * const roomjid, const char * const nick, const char * const actor, +void mucwin_occupant_kicked(const char * const roomjid, const char * const nick, const char * const actor, const char * const reason) {} void ui_room_banned(const char * const roomjid, const char * const actor, const char * const reason) {} -void ui_room_member_banned(const char * const roomjid, const char * const nick, const char * const actor, +void mucwin_occupant_banned(const char * const roomjid, const char * const nick, const char * const actor, const char * const reason) {} void ui_leave_room(const char * const roomjid) {} -void ui_room_broadcast(const char * const roomjid, +void mucwin_broadcast(const char * const roomjid, const char * const message) {} -void ui_room_member_offline(const char * const roomjid, const char * const nick) {} -void ui_room_member_online(const char * const roomjid, const char * const nick, const char * const roles, +void mucwin_occupant_offline(const char * const roomjid, const char * const nick) {} +void mucwin_occupant_online(const char * const roomjid, const char * const nick, const char * const roles, const char * const affiliation, const char * const show, const char * const status) {} -void ui_room_member_nick_change(const char * const roomjid, +void mucwin_occupant_nick_change(const char * const roomjid, const char * const old_nick, const char * const nick) {} -void ui_room_nick_change(const char * const roomjid, const char * const nick) {} -void ui_room_member_presence(const char * const roomjid, +void mucwin_nick_change(const char * const roomjid, const char * const nick) {} +void mucwin_occupant_presence(const char * const roomjid, const char * const nick, const char * const show, const char * const status) {} -void ui_room_update_occupants(const char * const roomjid) {} -void ui_room_show_occupants(const char * const roomjid) {} -void ui_room_hide_occupants(const char * const roomjid) {} +void mucwin_update_occupants(const char * const roomjid) {} +void mucwin_show_occupants(const char * const roomjid) {} +void mucwin_hide_occupants(const char * const roomjid) {} void ui_show_roster(void) {} void ui_hide_roster(void) {} void ui_roster_add(const char * const barejid, const char * const name) {} @@ -275,16 +275,16 @@ void ui_handle_room_configuration(const char * const roomjid, DataForm *form) {} void ui_handle_room_configuration_form_error(const char * const roomjid, const char * const message) {} void ui_handle_room_config_submit_result(const char * const roomjid) {} void ui_handle_room_config_submit_result_error(const char * const roomjid, const char * const message) {} -void ui_handle_room_affiliation_list_error(const char * const roomjid, const char * const affiliation, +void mucwin_affiliation_list_error(const char * const roomjid, const char * const affiliation, const char * const error) {} -void ui_handle_room_affiliation_list(const char * const roomjid, const char * const affiliation, GSList *jids) {} -void ui_handle_room_affiliation_set_error(const char * const roomjid, const char * const jid, +void mucwin_handle_affiliation_list(const char * const roomjid, const char * const affiliation, GSList *jids) {} +void mucwin_affiliation_set_error(const char * const roomjid, const char * const jid, const char * const affiliation, const char * const error) {} -void ui_handle_room_role_set_error(const char * const roomjid, const char * const nick, const char * const role, +void mucwin_role_set_error(const char * const roomjid, const char * const nick, const char * const role, const char * const error) {} -void ui_handle_room_role_list_error(const char * const roomjid, const char * const role, const char * const error) {} -void ui_handle_room_role_list(const char * const roomjid, const char * const role, GSList *nicks) {} -void ui_handle_room_kick_error(const char * const roomjid, const char * const nick, const char * const error) {} +void mucwin_role_list_error(const char * const roomjid, const char * const role, const char * const error) {} +void mucwin_handle_role_list(const char * const roomjid, const char * const role, GSList *nicks) {} +void mucwin_kick_error(const char * const roomjid, const char * const nick, const char * const error) {} void ui_show_form(ProfMucConfWin *confwin) {} void ui_show_form_field(ProfWin *window, DataForm *form, char *tag) {} void ui_show_form_help(ProfMucConfWin *confwin) {}