27 #ifndef _PURPLE_BLIST_H_
28 #define _PURPLE_BLIST_H_
55 PURPLE_BLIST_GROUP_NODE,
56 PURPLE_BLIST_CONTACT_NODE,
57 PURPLE_BLIST_BUDDY_NODE,
58 PURPLE_BLIST_CHAT_NODE,
59 PURPLE_BLIST_OTHER_NODE
61 } PurpleBlistNodeType;
63 #define PURPLE_BLIST_NODE_IS_CHAT(n) (purple_blist_node_get_type(n) == PURPLE_BLIST_CHAT_NODE)
64 #define PURPLE_BLIST_NODE_IS_BUDDY(n) (purple_blist_node_get_type(n) == PURPLE_BLIST_BUDDY_NODE)
65 #define PURPLE_BLIST_NODE_IS_CONTACT(n) (purple_blist_node_get_type(n) == PURPLE_BLIST_CONTACT_NODE)
66 #define PURPLE_BLIST_NODE_IS_GROUP(n) (purple_blist_node_get_type(n) == PURPLE_BLIST_GROUP_NODE)
68 #define PURPLE_BUDDY_IS_ONLINE(b) \
69 ((b) != NULL && purple_account_is_connected(purple_buddy_get_account(b)) && \
70 purple_presence_is_online(purple_buddy_get_presence(b)))
81 #define PURPLE_BLIST_NODE(obj) ((PurpleBlistNode *)(obj))
83 #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))
86 #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)
92 #define PURPLE_GROUP(obj) ((PurpleGroup *)(obj))
97 #define PURPLE_CONTACT(obj) ((PurpleContact *)(obj))
102 #define PURPLE_BUDDY(obj) ((PurpleBuddy *)(obj))
107 #define PURPLE_CHAT(obj) ((PurpleChat *)(obj))
118 #if !(defined PURPLE_HIDE_STRUCTS) || (defined _PURPLE_BLIST_C_)
146 PurplePresence *presence;
215 void (*request_add_buddy)(
PurpleAccount *account,
const char *username,
216 const char *group,
const char *alias);
218 const char *alias,
const char *name);
219 void (*request_add_group)(void);
263 void (*_purple_reserved1)(void);
462 #if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_BLIST_C_)
777 #if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_BLIST_C_)
879 #if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_BLIST_C_)
1103 const char *group,
const char *alias);
1115 const char *alias,
const char *name);