libpurple/conversation.h

branch
soc.2013.gobjectification
changeset 34641
3b8a466c18c5
parent 34622
753f46dd000f
child 34646
e7f4631e93f7
equal deleted inserted replaced
34640:71bf359300e1 34641:3b8a466c18c5
154 #include "log.h" 154 #include "log.h"
155 155
156 /**************************************************************************/ 156 /**************************************************************************/
157 /** PurpleConversationUiOps */ 157 /** PurpleConversationUiOps */
158 /**************************************************************************/ 158 /**************************************************************************/
159 typedef struct _PurpleIMConversation PurpleIMConversation;
160 typedef struct _PurpleChatConversation PurpleChatConversation;
159 /** 161 /**
160 * Conversation operations and events. 162 * Conversation operations and events.
161 * 163 *
162 * Any UI representing a conversation must assign a filled-out 164 * Any UI representing a conversation must assign a filled-out
163 * PurpleConversationUiOps structure to the PurpleConversation. 165 * PurpleConversationUiOps structure to the PurpleConversation.
173 void (*destroy_conversation)(PurpleConversation *conv); 175 void (*destroy_conversation)(PurpleConversation *conv);
174 /** Write a message to a chat. If this field is @c NULL, libpurple will 176 /** Write a message to a chat. If this field is @c NULL, libpurple will
175 * fall back to using #write_conv. 177 * fall back to using #write_conv.
176 * @see purple_chat_conversation_write() 178 * @see purple_chat_conversation_write()
177 */ 179 */
178 void (*write_chat)(PurpleConversation *conv, const char *who, 180 void (*write_chat)(PurpleChatConversation *chat, const char *who,
179 const char *message, PurpleMessageFlags flags, 181 const char *message, PurpleMessageFlags flags,
180 time_t mtime); 182 time_t mtime);
181 /** Write a message to an IM conversation. If this field is @c NULL, 183 /** Write a message to an IM conversation. If this field is @c NULL,
182 * libpurple will fall back to using #write_conv. 184 * libpurple will fall back to using #write_conv.
183 * @see purple_im_conversation_write() 185 * @see purple_im_conversation_write()
184 */ 186 */
185 void (*write_im)(PurpleConversation *conv, const char *who, 187 void (*write_im)(PurpleIMConversation *im, const char *who,
186 const char *message, PurpleMessageFlags flags, 188 const char *message, PurpleMessageFlags flags,
187 time_t mtime); 189 time_t mtime);
188 /** Write a message to a conversation. This is used rather than the 190 /** Write a message to a conversation. This is used rather than the
189 * chat- or im-specific ops for errors, system messages (such as "x is 191 * chat- or im-specific ops for errors, system messages (such as "x is
190 * now know as y"), and as the fallback if #write_im and #write_chat 192 * now know as y"), and as the fallback if #write_im and #write_chat
205 * @param new_arrivals Whether join notices should be shown. 207 * @param new_arrivals Whether join notices should be shown.
206 * (Join notices are actually written to the 208 * (Join notices are actually written to the
207 * conversation by 209 * conversation by
208 * #purple_chat_conversation_add_users().) 210 * #purple_chat_conversation_add_users().)
209 */ 211 */
210 void (*chat_add_users)(PurpleConversation *conv, 212 void (*chat_add_users)(PurpleChatConversation *chat,
211 GList *cbuddies, 213 GList *cbuddies,
212 gboolean new_arrivals); 214 gboolean new_arrivals);
213 /** Rename the user in this chat named @a old_name to @a new_name. (The 215 /** Rename the user in this chat named @a old_name to @a new_name. (The
214 * rename message is written to the conversation by libpurple.) 216 * rename message is written to the conversation by libpurple.)
215 * @param new_alias @a new_name's new alias, if they have one. 217 * @param new_alias @a new_name's new alias, if they have one.
216 * @see purple_chat_conversation_add_users() 218 * @see purple_chat_conversation_add_users()
217 */ 219 */
218 void (*chat_rename_user)(PurpleConversation *conv, const char *old_name, 220 void (*chat_rename_user)(PurpleChatConversation *chat, const char *old_name,
219 const char *new_name, const char *new_alias); 221 const char *new_name, const char *new_alias);
220 /** Remove @a users from a chat. 222 /** Remove @a users from a chat.
221 * @param users A @c GList of <tt>const char *</tt>s. 223 * @param users A @c GList of <tt>const char *</tt>s.
222 * @see purple_chat_conversation_rename_user() 224 * @see purple_chat_conversation_rename_user()
223 */ 225 */
224 void (*chat_remove_users)(PurpleConversation *conv, GList *users); 226 void (*chat_remove_users)(PurpleChatConversation *chat, GList *users);
225 /** Called when a user's flags are changed. 227 /** Called when a user's flags are changed.
226 * @see purple_chat_conversation_user_set_flags() 228 * @see purple_chat_conversation_user_set_flags()
227 */ 229 */
228 void (*chat_update_user)(PurpleConversation *conv, const char *user); 230 void (*chat_update_user)(PurpleChatConversation *chat, const char *user);
229 231
230 /** Present this conversation to the user; for example, by displaying 232 /** Present this conversation to the user; for example, by displaying
231 * the IM dialog. 233 * the IM dialog.
232 */ 234 */
233 void (*present)(PurpleConversation *conv); 235 void (*present)(PurpleConversation *conv);

mercurial