comparison libpurple/blist.h @ 32687:02a2e8183b1d

Clean the API documentation in preparation for 3.0.0 by removing all the old @since tags.
author andrew.victor@mxit.com
date Sun, 25 Sep 2011 18:56:58 +0000
parents 38ce2e217fcb
children d288f5215a9a
comparison
equal deleted inserted replaced
32685:9d5b87e1a4d0 32687:02a2e8183b1d
73 { 73 {
74 PURPLE_BLIST_NODE_FLAG_NO_SAVE = 1 << 0 /**< node should not be saved with the buddy list */ 74 PURPLE_BLIST_NODE_FLAG_NO_SAVE = 1 << 0 /**< node should not be saved with the buddy list */
75 75
76 } PurpleBlistNodeFlags; 76 } PurpleBlistNodeFlags;
77 77
78 /**
79 * @since 2.6.0
80 */
81 #define PURPLE_BLIST_NODE(obj) ((PurpleBlistNode *)(obj)) 78 #define PURPLE_BLIST_NODE(obj) ((PurpleBlistNode *)(obj))
82 79
83 #define PURPLE_BLIST_NODE_HAS_FLAG(b, f) (purple_blist_node_get_flags((PurpleBlistNode*)(b)) & (f)) 80 #define PURPLE_BLIST_NODE_HAS_FLAG(b, f) (purple_blist_node_get_flags((PurpleBlistNode*)(b)) & (f))
84 #define PURPLE_BLIST_NODE_SHOULD_SAVE(b) (! PURPLE_BLIST_NODE_HAS_FLAG(b, PURPLE_BLIST_NODE_FLAG_NO_SAVE)) 81 #define PURPLE_BLIST_NODE_SHOULD_SAVE(b) (! PURPLE_BLIST_NODE_HAS_FLAG(b, PURPLE_BLIST_NODE_FLAG_NO_SAVE))
85 82
86 #define PURPLE_BLIST_NODE_NAME(n) (purple_blist_node_get_type(n) == PURPLE_BLIST_CHAT_NODE ? purple_chat_get_name((PurpleChat*)n) : \ 83 #define PURPLE_BLIST_NODE_NAME(n) (purple_blist_node_get_type(n) == PURPLE_BLIST_CHAT_NODE ? purple_chat_get_name((PurpleChat*)n) : \
87 purple_blist_node_get_type(n) == PURPLE_BLIST_BUDDY_NODE ? purple_buddy_get_name((PurpleBuddy*)n) : NULL) 84 purple_blist_node_get_type(n) == PURPLE_BLIST_BUDDY_NODE ? purple_buddy_get_name((PurpleBuddy*)n) : NULL)
88 85
89 /**
90 * @since 2.6.0
91 */
92 #define PURPLE_GROUP(obj) ((PurpleGroup *)(obj)) 86 #define PURPLE_GROUP(obj) ((PurpleGroup *)(obj))
93 87
94 /**
95 * @since 2.6.0
96 */
97 #define PURPLE_CONTACT(obj) ((PurpleContact *)(obj)) 88 #define PURPLE_CONTACT(obj) ((PurpleContact *)(obj))
98 89
99 /**
100 * @since 2.6.0
101 */
102 #define PURPLE_BUDDY(obj) ((PurpleBuddy *)(obj)) 90 #define PURPLE_BUDDY(obj) ((PurpleBuddy *)(obj))
103 91
104 /**
105 * @since 2.6.0
106 */
107 #define PURPLE_CHAT(obj) ((PurpleChat *)(obj)) 92 #define PURPLE_CHAT(obj) ((PurpleChat *)(obj))
108 93
109 #include "account.h" 94 #include "account.h"
110 #include "buddyicon.h" 95 #include "buddyicon.h"
111 #include "media.h" 96 #include "media.h"
224 * Implementation of this UI op is OPTIONAL. If not implemented, it will 209 * Implementation of this UI op is OPTIONAL. If not implemented, it will
225 * be set to a fallback function that saves data to blist.xml like in 210 * be set to a fallback function that saves data to blist.xml like in
226 * previous libpurple versions. 211 * previous libpurple versions.
227 * 212 *
228 * @param node The node which has been modified. 213 * @param node The node which has been modified.
229 *
230 * @since 2.6.0.
231 */ 214 */
232 void (*save_node)(PurpleBlistNode *node); 215 void (*save_node)(PurpleBlistNode *node);
233 216
234 /** 217 /**
235 * Called when a node is about to be removed from the buddy list. 218 * Called when a node is about to be removed from the buddy list.
239 * Implementation of this UI op is OPTIONAL. If not implemented, it will 222 * Implementation of this UI op is OPTIONAL. If not implemented, it will
240 * be set to a fallback function that saves data to blist.xml like in 223 * be set to a fallback function that saves data to blist.xml like in
241 * previous libpurple versions. 224 * previous libpurple versions.
242 * 225 *
243 * @param node The node which has been modified. 226 * @param node The node which has been modified.
244 * @since 2.6.0.
245 */ 227 */
246 void (*remove_node)(PurpleBlistNode *node); 228 void (*remove_node)(PurpleBlistNode *node);
247 229
248 /** 230 /**
249 * Called to save all the data for an account. If the UI sets this, 231 * Called to save all the data for an account. If the UI sets this,
254 * be set to a fallback function that saves data to blist.xml like in 236 * be set to a fallback function that saves data to blist.xml like in
255 * previous libpurple versions. 237 * previous libpurple versions.
256 * 238 *
257 * @param account The account whose data to save. If NULL, save all data 239 * @param account The account whose data to save. If NULL, save all data
258 * for all accounts. 240 * for all accounts.
259 * @since 2.6.0.
260 */ 241 */
261 void (*save_account)(PurpleAccount *account); 242 void (*save_account)(PurpleAccount *account);
262 243
263 void (*_purple_reserved1)(void); 244 void (*_purple_reserved1)(void);
264 }; 245 };
309 * 290 *
310 * @return A list of every buddy in the list. Caller is responsible for 291 * @return A list of every buddy in the list. Caller is responsible for
311 * freeing the list. 292 * freeing the list.
312 * 293 *
313 * @see purple_find_buddies 294 * @see purple_find_buddies
314 * @since 2.6.0
315 */ 295 */
316 GSList *purple_blist_get_buddies(void); 296 GSList *purple_blist_get_buddies(void);
317 297
318 /** 298 /**
319 * Returns the UI data for the list. 299 * Returns the UI data for the list.
320 * 300 *
321 * @return The UI data for the list. 301 * @return The UI data for the list.
322 *
323 * @since 2.6.0
324 */ 302 */
325 gpointer purple_blist_get_ui_data(void); 303 gpointer purple_blist_get_ui_data(void);
326 304
327 /** 305 /**
328 * Sets the UI data for the list. 306 * Sets the UI data for the list.
329 * 307 *
330 * @param ui_data The UI data for the list. 308 * @param ui_data The UI data for the list.
331 *
332 * @since 2.6.0
333 */ 309 */
334 void purple_blist_set_ui_data(gpointer ui_data); 310 void purple_blist_set_ui_data(gpointer ui_data);
335 311
336 /** 312 /**
337 * Returns the next node of a given node. This function is to be used to iterate 313 * Returns the next node of a given node. This function is to be used to iterate
350 /** 326 /**
351 * Returns the parent node of a given node. 327 * Returns the parent node of a given node.
352 * 328 *
353 * @param node A node. 329 * @param node A node.
354 * @return The parent node. 330 * @return The parent node.
355 * @since 2.4.0 331 *
356 * @see purple_blist_node_get_first_child 332 * @see purple_blist_node_get_first_child
357 * @see purple_blist_node_get_sibling_next 333 * @see purple_blist_node_get_sibling_next
358 * @see purple_blist_node_get_sibling_prev 334 * @see purple_blist_node_get_sibling_prev
359 * @see purple_blist_node_next 335 * @see purple_blist_node_next
360 */ 336 */
363 /** 339 /**
364 * Returns the the first child node of a given node. 340 * Returns the the first child node of a given node.
365 * 341 *
366 * @param node A node. 342 * @param node A node.
367 * @return The child node. 343 * @return The child node.
368 * @since 2.4.0 344 *
369 * @see purple_blist_node_get_parent 345 * @see purple_blist_node_get_parent
370 * @see purple_blist_node_get_sibling_next 346 * @see purple_blist_node_get_sibling_next
371 * @see purple_blist_node_get_sibling_prev 347 * @see purple_blist_node_get_sibling_prev
372 * @see purple_blist_node_next 348 * @see purple_blist_node_next
373 */ 349 */
376 /** 352 /**
377 * Returns the sibling node of a given node. 353 * Returns the sibling node of a given node.
378 * 354 *
379 * @param node A node. 355 * @param node A node.
380 * @return The sibling node. 356 * @return The sibling node.
381 * @since 2.4.0 357 *
382 * @see purple_blist_node_get_parent 358 * @see purple_blist_node_get_parent
383 * @see purple_blist_node_get_first_child 359 * @see purple_blist_node_get_first_child
384 * @see purple_blist_node_get_sibling_prev 360 * @see purple_blist_node_get_sibling_prev
385 * @see purple_blist_node_next 361 * @see purple_blist_node_next
386 */ 362 */
389 /** 365 /**
390 * Returns the previous sibling node of a given node. 366 * Returns the previous sibling node of a given node.
391 * 367 *
392 * @param node A node. 368 * @param node A node.
393 * @return The sibling node. 369 * @return The sibling node.
394 * @since 2.4.0 370 *
395 * @see purple_blist_node_get_parent 371 * @see purple_blist_node_get_parent
396 * @see purple_blist_node_get_first_child 372 * @see purple_blist_node_get_first_child
397 * @see purple_blist_node_get_sibling_next 373 * @see purple_blist_node_get_sibling_next
398 * @see purple_blist_node_next 374 * @see purple_blist_node_next
399 */ 375 */
402 /** 378 /**
403 * Returns the UI data of a given node. 379 * Returns the UI data of a given node.
404 * 380 *
405 * @param node The node. 381 * @param node The node.
406 * @return The UI data. 382 * @return The UI data.
407 * @since 2.6.0
408 */ 383 */
409 gpointer purple_blist_node_get_ui_data(const PurpleBlistNode *node); 384 gpointer purple_blist_node_get_ui_data(const PurpleBlistNode *node);
410 385
411 /** 386 /**
412 * Sets the UI data of a given node. 387 * Sets the UI data of a given node.
413 * 388 *
414 * @param node The node. 389 * @param node The node.
415 * @param ui_data The UI data. 390 * @param ui_data The UI data.
416 *
417 * @since 2.6.0
418 */ 391 */
419 void purple_blist_node_set_ui_data(PurpleBlistNode *node, gpointer ui_data); 392 void purple_blist_node_set_ui_data(PurpleBlistNode *node, gpointer ui_data);
420 393
421 /** 394 /**
422 * Shows the buddy list, creating a new one if necessary. 395 * Shows the buddy list, creating a new one if necessary.
609 * 582 *
610 * @param buddy The buddy. 583 * @param buddy The buddy.
611 * @return The protocol data. 584 * @return The protocol data.
612 * 585 *
613 * @see purple_buddy_set_protocol_data() 586 * @see purple_buddy_set_protocol_data()
614 * @since 2.6.0
615 */ 587 */
616 gpointer purple_buddy_get_protocol_data(const PurpleBuddy *buddy); 588 gpointer purple_buddy_get_protocol_data(const PurpleBuddy *buddy);
617 589
618 /** 590 /**
619 * Sets a buddy's protocol-specific data. 591 * Sets a buddy's protocol-specific data.
622 * 594 *
623 * @param buddy The buddy. 595 * @param buddy The buddy.
624 * @param data The data. 596 * @param data The data.
625 * 597 *
626 * @see purple_buddy_get_protocol_data() 598 * @see purple_buddy_get_protocol_data()
627 * @since 2.6.0
628 */ 599 */
629 void purple_buddy_set_protocol_data(PurpleBuddy *buddy, gpointer data); 600 void purple_buddy_set_protocol_data(PurpleBuddy *buddy, gpointer data);
630 601
631 /** 602 /**
632 * Returns a buddy's contact. 603 * Returns a buddy's contact.
649 /** 620 /**
650 * Gets the media caps from a buddy. 621 * Gets the media caps from a buddy.
651 * 622 *
652 * @param buddy The buddy. 623 * @param buddy The buddy.
653 * @return The media caps. 624 * @return The media caps.
654 *
655 * @since 2.7.0
656 */ 625 */
657 PurpleMediaCaps purple_buddy_get_media_caps(const PurpleBuddy *buddy); 626 PurpleMediaCaps purple_buddy_get_media_caps(const PurpleBuddy *buddy);
658 627
659 /** 628 /**
660 * Sets the media caps for a buddy. 629 * Sets the media caps for a buddy.
725 /** 694 /**
726 * Gets the PurpleGroup from a PurpleContact 695 * Gets the PurpleGroup from a PurpleContact
727 * 696 *
728 * @param contact The contact 697 * @param contact The contact
729 * @return The group 698 * @return The group
730 *
731 * @since 2.7.0
732 */ 699 */
733 PurpleGroup *purple_contact_get_group(const PurpleContact *contact); 700 PurpleGroup *purple_contact_get_group(const PurpleContact *contact);
734 701
735 /** 702 /**
736 * Adds a new contact to the buddy list. 703 * Adds a new contact to the buddy list.
865 /** 832 /**
866 * Returns the local alias for the buddy, or @c NULL if none exists. 833 * Returns the local alias for the buddy, or @c NULL if none exists.
867 * 834 *
868 * @param buddy The buddy 835 * @param buddy The buddy
869 * @return The local alias for the buddy 836 * @return The local alias for the buddy
870 *
871 * @since 2.6.0
872 */ 837 */
873 const char *purple_buddy_get_local_buddy_alias(PurpleBuddy *buddy); 838 const char *purple_buddy_get_local_buddy_alias(PurpleBuddy *buddy);
874 839
875 /** 840 /**
876 * Returns the correct name to display for a blist chat. 841 * Returns the correct name to display for a blist chat.
942 * Returns the account the chat belongs to. 907 * Returns the account the chat belongs to.
943 * 908 *
944 * @param chat The chat. 909 * @param chat The chat.
945 * 910 *
946 * @return The account the chat belongs to. 911 * @return The account the chat belongs to.
947 *
948 * @since 2.4.0
949 */ 912 */
950 PurpleAccount *purple_chat_get_account(PurpleChat *chat); 913 PurpleAccount *purple_chat_get_account(PurpleChat *chat);
951 914
952 /** 915 /**
953 * Get a hashtable containing information about a chat. 916 * Get a hashtable containing information about a chat.
954 * 917 *
955 * @param chat The chat. 918 * @param chat The chat.
956 * 919 *
957 * @constreturn The hashtable. 920 * @constreturn The hashtable.
958 *
959 * @since 2.4.0
960 */ 921 */
961 GHashTable *purple_chat_get_components(PurpleChat *chat); 922 GHashTable *purple_chat_get_components(PurpleChat *chat);
962 923
963 /** 924 /**
964 * Returns the group of which the buddy is a member. 925 * Returns the group of which the buddy is a member.
1172 * Get the type of a given node. 1133 * Get the type of a given node.
1173 * 1134 *
1174 * @param node The node. 1135 * @param node The node.
1175 * 1136 *
1176 * @return The type of the node. 1137 * @return The type of the node.
1177 *
1178 * @since 2.1.0
1179 */ 1138 */
1180 PurpleBlistNodeType purple_blist_node_get_type(PurpleBlistNode *node); 1139 PurpleBlistNodeType purple_blist_node_get_type(PurpleBlistNode *node);
1181 1140
1182 /*@}*/ 1141 /*@}*/
1183 1142