comparison libpurple/conversation.h @ 32698:c39583aad67c

Hide struct _PurpleConvChatBuddy. Add accessor methods: * purple_conv_chat_cb_get_alias * purple_conv_chat_cb_get_flags * purple_conv_chat_cb_is_buddy * purple_conv_chat_cb_get_ui_data * purple_conv_chat_cb_set_ui_data
author andrew.victor@mxit.com
date Sat, 01 Oct 2011 13:03:38 +0000
parents fe20ff3d4e7a
children 3e2191125ad7
comparison
equal deleted inserted replaced
32697:fe20ff3d4e7a 32698:c39583aad67c
248 void (*_purple_reserved3)(void); 248 void (*_purple_reserved3)(void);
249 void (*_purple_reserved4)(void); 249 void (*_purple_reserved4)(void);
250 }; 250 };
251 251
252 /** 252 /**
253 * Data for "Chat Buddies"
254 */
255 struct _PurpleConvChatBuddy
256 {
257 /** The chat participant's name in the chat. */
258 char *name;
259
260 /** The chat participant's alias, if known; @a NULL otherwise. */
261 char *alias;
262
263 /**
264 * A string by which this buddy will be sorted, or @c NULL if the
265 * buddy should be sorted by its @c name. (This is currently always
266 * @c NULL.
267 */
268 char *alias_key;
269
270 /**
271 * @a TRUE if this chat participant is on the buddy list;
272 * @a FALSE otherwise.
273 */
274 gboolean buddy;
275
276 /**
277 * A bitwise OR of flags for this participant, such as whether they
278 * are a channel operator.
279 */
280 PurpleConvChatBuddyFlags flags;
281
282 /**
283 * A hash table of attributes about the user, such as real name,
284 * user\@host, etc.
285 */
286 GHashTable *attributes;
287
288 /** The UI can put whatever it wants here. */
289 gpointer ui_data;
290 };
291
292 /**
293 * Description of a conversation message 253 * Description of a conversation message
294 */ 254 */
295 struct _PurpleConvMessage 255 struct _PurpleConvMessage
296 { 256 {
297 char *who; 257 char *who;
1362 * @param name The name of the chat buddy to find. 1322 * @param name The name of the chat buddy to find.
1363 */ 1323 */
1364 PurpleConvChatBuddy *purple_conv_chat_cb_find(PurpleConvChat *chat, const char *name); 1324 PurpleConvChatBuddy *purple_conv_chat_cb_find(PurpleConvChat *chat, const char *name);
1365 1325
1366 /** 1326 /**
1327 * Set the UI data associated with this chat buddy.
1328 *
1329 * @param cb The chat buddy
1330 * @param ui_data A pointer to associate with this chat buddy.
1331 */
1332 void purple_conv_chat_cb_set_ui_data(PurpleConvChatBuddy *cb, gpointer ui_data);
1333
1334 /**
1335 * Get the UI data associated with this chat buddy.
1336 *
1337 * @param cb The chat buddy.
1338 *
1339 * @return The UI data associated with this chat buddy. This is a
1340 * convenience field provided to the UIs--it is not
1341 * used by the libpurple core.
1342 */
1343 gpointer purple_conv_chat_cb_get_ui_data(const PurpleConvChatBuddy *conv);
1344
1345 /**
1346 * Get the alias of a chat buddy
1347 *
1348 * @param cb The chat buddy.
1349 *
1350 * @return The alias of the chat buddy.
1351 */
1352 const char *purple_conv_chat_cb_get_alias(const PurpleConvChatBuddy *cb);
1353
1354 /**
1367 * Get the name of a chat buddy 1355 * Get the name of a chat buddy
1368 * 1356 *
1369 * @param cb The chat buddy. 1357 * @param cb The chat buddy.
1370 * 1358 *
1371 * @return The name of the chat buddy. 1359 * @return The name of the chat buddy.
1372 */ 1360 */
1373 const char *purple_conv_chat_cb_get_name(PurpleConvChatBuddy *cb); 1361 const char *purple_conv_chat_cb_get_name(const PurpleConvChatBuddy *cb);
1362
1363 /**
1364 * Get the flags of a chat buddy.
1365 *
1366 * @param cb The chat buddy.
1367 *
1368 * @return The flags of the chat buddy.
1369 */
1370 PurpleConvChatBuddyFlags purple_conv_chat_cb_get_flags(const PurpleConvChatBuddy *cb);
1371
1372 /**
1373 * Indicates if this chat buddy is on the buddy list.
1374 *
1375 * @param cb The chat buddy.
1376 *
1377 * @return TRUE if the chat buddy is on the buddy list.
1378 */
1379 gboolean purple_conv_chat_cb_is_buddy(const PurpleConvChatBuddy *cb);
1374 1380
1375 /** 1381 /**
1376 * Destroys a chat buddy 1382 * Destroys a chat buddy
1377 * 1383 *
1378 * @param cb The chat buddy to destroy 1384 * @param cb The chat buddy to destroy