comparison libpurple/blist.h @ 20550:28493a27849b

Looking at purple_contact_set_alias and purple_blist_alias_contact functions in blist.c, the only difference I see is that the latter function notifies any existing conversation with the contact so that it can update its title, while the former doesn't. I can't think of a reason why they should behave differently, or why we should have both of them. I was going to deprecate purple_blist_alias_contact in favour of purple_contact_set_alias, but seeing we do purple_blist_alias_ for buddy and chats, I am deprecating purple_contact_set_alias instead. OK?
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 19 Sep 2007 10:01:45 +0000
parents 6bf32c9e15a7
children 18cf8aa44f55 f296be2a1039 34de8ef19294
comparison
equal deleted inserted replaced
20549:ec75e26e72b3 20550:28493a27849b
63 ((b) != NULL && purple_account_is_connected((b)->account) && \ 63 ((b) != NULL && purple_account_is_connected((b)->account) && \
64 purple_presence_is_online(purple_buddy_get_presence(b))) 64 purple_presence_is_online(purple_buddy_get_presence(b)))
65 65
66 typedef enum 66 typedef enum
67 { 67 {
68 PURPLE_BLIST_NODE_FLAG_NO_SAVE = 1 /**< node should not be saved with the buddy list */ 68 PURPLE_BLIST_NODE_FLAG_NO_SAVE = 1 << 0, /**< node should not be saved with the buddy list */
69 69
70 } PurpleBlistNodeFlags; 70 } PurpleBlistNodeFlags;
71 71
72 #define PURPLE_BLIST_NODE_HAS_FLAG(b, f) ((b)->flags & (f)) 72 #define PURPLE_BLIST_NODE_HAS_FLAG(b, f) (((PurpleBlistNode*)(b))->flags & (f))
73 #define PURPLE_BLIST_NODE_SHOULD_SAVE(b) (! PURPLE_BLIST_NODE_HAS_FLAG(b, PURPLE_BLIST_NODE_FLAG_NO_SAVE)) 73 #define PURPLE_BLIST_NODE_SHOULD_SAVE(b) (! PURPLE_BLIST_NODE_HAS_FLAG(b, PURPLE_BLIST_NODE_FLAG_NO_SAVE))
74 74
75 #define PURPLE_BLIST_NODE_NAME(n) ((n)->type == PURPLE_BLIST_CHAT_NODE ? purple_chat_get_name((PurpleChat*)n) : \ 75 #define PURPLE_BLIST_NODE_NAME(n) ((n)->type == PURPLE_BLIST_CHAT_NODE ? purple_chat_get_name((PurpleChat*)n) : \
76 (n)->type == PURPLE_BLIST_BUDDY_NODE ? purple_buddy_get_name((PurpleBuddy*)n) : NULL) 76 (n)->type == PURPLE_BLIST_BUDDY_NODE ? purple_buddy_get_name((PurpleBuddy*)n) : NULL)
77 77
486 /** 486 /**
487 * Sets the alias for a contact. 487 * Sets the alias for a contact.
488 * 488 *
489 * @param contact The contact 489 * @param contact The contact
490 * @param alias The alias to set, or NULL to unset 490 * @param alias The alias to set, or NULL to unset
491 *
492 * @deprecated Use purple_blist_alias_contact() instead.
491 */ 493 */
492 void purple_contact_set_alias(PurpleContact *contact, const char *alias); 494 void purple_contact_set_alias(PurpleContact *contact, const char *alias);
493 495
494 /** 496 /**
495 * Gets the alias for a contact. 497 * Gets the alias for a contact.