diff options
Diffstat (limited to 'src/muc.h')
-rw-r--r-- | src/muc.h | 116 |
1 files changed, 74 insertions, 42 deletions
diff --git a/src/muc.h b/src/muc.h index 722e4a17..3bf836ee 100644 --- a/src/muc.h +++ b/src/muc.h @@ -41,56 +41,88 @@ #include "jid.h" #include "tools/autocomplete.h" +typedef enum { + MUC_ROLE_NONE, + MUC_ROLE_VISITOR, + MUC_ROLE_PARTICIPANT, + MUC_ROLE_MODERATOR +} muc_role_t; + +typedef enum { + MUC_AFFILIATION_NONE, + MUC_AFFILIATION_OUTCAST, + MUC_AFFILIATION_MEMBER, + MUC_AFFILIATION_ADMIN, + MUC_AFFILIATION_OWNER +} muc_affiliation_t; + +typedef struct _muc_occupant_t { + char *nick; + muc_role_t role; + muc_affiliation_t affiliation; + resource_presence_t presence; + char *status; +} Occupant; + void muc_init(void); void muc_close(void); -void muc_join_room(const char * const room, const char * const nick, - const char * const password, gboolean autojoin); -void muc_leave_room(const char * const room); -gboolean muc_room_is_active(const char * const room); -gboolean muc_room_is_autojoin(const char * const room); -GList* muc_get_active_room_list(void); -char* muc_get_room_nick(const char * const room); -char* muc_get_room_password(const char * const room); - -void muc_set_room_pending_nick_change(const char * const room, const char * const new_nick); -gboolean muc_is_room_pending_nick_change(const char * const room); -void muc_complete_room_nick_change(const char * const room, - const char * const nick); -char * muc_get_old_nick(const char * const room, const char * const new_nick); - -gboolean muc_add_to_roster(const char * const room, const char * const nick, - const char * const show, const char * const status); -void muc_remove_from_roster(const char * const room, const char * const nick); -GList * muc_get_roster(const char * const room); -Autocomplete muc_get_roster_ac(const char * const room); -gboolean muc_nick_in_roster(const char * const room, const char * const nick); -PContact muc_get_participant(const char * const room, const char * const nick); -void muc_set_roster_received(const char * const room); -gboolean muc_get_roster_received(const char * const room); - -void muc_set_roster_pending_nick_change(const char * const room, - const char * const new_nick, const char * const old_nick); -char* muc_complete_roster_nick_change(const char * const room, - const char * const nick); - -void muc_add_invite(const char *room); -void muc_remove_invite(const char * const room); -gint muc_invite_count(void); -GSList* muc_get_invites(void); -gboolean muc_invites_include(const char * const room); -void muc_reset_invites_ac(void); -char* muc_find_invite(char *search_str); -void muc_clear_invites(void); + +void muc_join(const char * const room, const char * const nick, const char * const password, gboolean autojoin); +void muc_leave(const char * const room); + +gboolean muc_active(const char * const room); +gboolean muc_autojoin(const char * const room); + +GList* muc_rooms(void); + +char* muc_nick(const char * const room); +char* muc_password(const char * const room); + +void muc_nick_change_start(const char * const room, const char * const new_nick); +void muc_nick_change_complete(const char * const room, const char * const nick); +gboolean muc_nick_change_pending(const char * const room); +char* muc_old_nick(const char * const room, const char * const new_nick); + +gboolean muc_roster_contains_nick(const char * const room, const char * const nick); +gboolean muc_roster_complete(const char * const room); +gboolean muc_roster_add(const char * const room, const char * const nick, const char * const role, + const char * const affiliation, const char * const show, + const char * const status); +void muc_roster_remove(const char * const room, const char * const nick); +void muc_roster_set_complete(const char * const room); +GList * muc_roster(const char * const room); +Autocomplete muc_roster_ac(const char * const room); +Occupant* muc_roster_item(const char * const room, const char * const nick); + +gboolean muc_occupant_available(Occupant *occupant); + +void muc_roster_nick_change_start(const char * const room, const char * const new_nick, const char * const old_nick); +char* muc_roster_nick_change_complete(const char * const room, const char * const nick); + +void muc_invites_add(const char * const room); +void muc_invites_remove(const char * const room); +gint muc_invites_count(void); +GSList* muc_invites(void); +gboolean muc_invites_contain(const char * const room); +void muc_invites_reset_ac(void); +char* muc_invites_find(char *search_str); +void muc_invites_clear(void); void muc_set_subject(const char * const room, const char * const subject); -char * muc_get_subject(const char * const room); -void muc_add_pending_broadcast(const char * const room, const char * const message); -GList * muc_get_pending_broadcasts(const char * const room); +char* muc_subject(const char * const room); + +void muc_pending_broadcasts_add(const char * const room, const char * const message); +GList * muc_pending_broadcasts(const char * const room); void muc_autocomplete(char *input, int *size); -void muc_reset_autocomplete(const char * const room); +void muc_autocomplete_reset(const char * const room); gboolean muc_requires_config(const char * const room); void muc_set_requires_config(const char * const room, gboolean val); +void muc_set_role(const char * const room, const char * const role); +void muc_set_affiliation(const char * const room, const char * const affiliation); +char *muc_role_str(const char * const room); +char *muc_affiliation_str(const char * const room); + #endif |