comparison src/conversation.h @ 6407:ba0b99a72be2

[gaim-migrate @ 6913] Added API commands for adding or removing a batch of users at once to/from a chat. IRC no longer has half a billion "Diablo-D3 has entered the room." messages anymore. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Thu, 07 Aug 2003 20:47:29 +0000
parents 96de6d9eb422
children 874a5c9f4eb8
comparison
equal deleted inserted replaced
6406:efaff39618a5 6407:ba0b99a72be2
141 void (*write_conv)(GaimConversation *conv, const char *who, 141 void (*write_conv)(GaimConversation *conv, const char *who,
142 const char *message, size_t length, int flags, 142 const char *message, size_t length, int flags,
143 time_t mtime); 143 time_t mtime);
144 144
145 void (*chat_add_user)(GaimConversation *conv, const char *user); 145 void (*chat_add_user)(GaimConversation *conv, const char *user);
146 void (*chat_add_users)(GaimConversation *conv, GList *users);
146 void (*chat_rename_user)(GaimConversation *conv, 147 void (*chat_rename_user)(GaimConversation *conv,
147 const char *old_name, const char *new_name); 148 const char *old_name, const char *new_name);
148 void (*chat_remove_user)(GaimConversation *conv, const char *user); 149 void (*chat_remove_user)(GaimConversation *conv, const char *user);
150 void (*chat_remove_users)(GaimConversation *conv, GList *users);
149 151
150 void (*set_title)(GaimConversation *conv, const char *title); 152 void (*set_title)(GaimConversation *conv, const char *title);
151 void (*update_progress)(GaimConversation *conv, float percent); 153 void (*update_progress)(GaimConversation *conv, float percent);
152 154
153 /* Events */ 155 /* Events */
913 GaimConversation *gaim_chat_get_conversation(const GaimChat *chat); 915 GaimConversation *gaim_chat_get_conversation(const GaimChat *chat);
914 916
915 /** 917 /**
916 * Sets the list of users in the chat room. 918 * Sets the list of users in the chat room.
917 * 919 *
920 * @note Calling this function will not update the display of the users.
921 * Please use gaim_chat_add_user(), gaim_chat_add_users(),
922 * gaim_chat_remove_user(), and gaim_chat_remove_users() instead.
923 *
918 * @param chat The chat. 924 * @param chat The chat.
919 * @param users The list of users. 925 * @param users The list of users.
920 * 926 *
921 * @return The list passed. 927 * @return The list passed.
922 */ 928 */
1059 */ 1065 */
1060 void gaim_chat_add_user(GaimChat *chat, const char *user, 1066 void gaim_chat_add_user(GaimChat *chat, const char *user,
1061 const char *extra_msg); 1067 const char *extra_msg);
1062 1068
1063 /** 1069 /**
1070 * Adds a list of users to a chat.
1071 *
1072 * The data is copied from @a users, so it is up to the developer to
1073 * free this list after calling this function.
1074 *
1075 * @param chat The chat.
1076 * @param users The list of users to add.
1077 */
1078 void gaim_chat_add_users(GaimChat *chat, GList *users);
1079
1080 /**
1064 * Renames a user in a chat. 1081 * Renames a user in a chat.
1065 * 1082 *
1066 * @param chat The chat. 1083 * @param chat The chat.
1067 * @param old_user The old username. 1084 * @param old_user The old username.
1068 * @param new_user The new username. 1085 * @param new_user The new username.
1071 const char *new_user); 1088 const char *new_user);
1072 1089
1073 /** 1090 /**
1074 * Removes a user from a chat, optionally with a reason. 1091 * Removes a user from a chat, optionally with a reason.
1075 * 1092 *
1093 * It is up to the developer to free this list after calling this function.
1094 *
1076 * @param chat The chat. 1095 * @param chat The chat.
1077 * @param user The user that is being removed. 1096 * @param user The user that is being removed.
1078 * @param reason The optional reason given for the removal. Can be @c NULL. 1097 * @param reason The optional reason given for the removal. Can be @c NULL.
1079 */ 1098 */
1080 void gaim_chat_remove_user(GaimChat *chat, const char *user, 1099 void gaim_chat_remove_user(GaimChat *chat, const char *user,
1081 const char *reason); 1100 const char *reason);
1082 1101
1083 /** 1102 /**
1103 * Removes a list of users from a chat, optionally with a single reason.
1104 *
1105 * @param chat The chat.
1106 * @param users The users that are being removed.
1107 * @param reason The optional reason given for the removal. Can be @c NULL.
1108 */
1109 void gaim_chat_remove_users(GaimChat *chat, GList *users, const char *reason);
1110
1111 /**
1084 * Finds a chat with the specified chat ID. 1112 * Finds a chat with the specified chat ID.
1085 * 1113 *
1086 * @param gc The gaim_connection. 1114 * @param gc The gaim_connection.
1087 * @param id The chat ID. 1115 * @param id The chat ID.
1088 * 1116 *