Mercurial > pidgin
comparison libpurple/blist.h @ 22212:6bb29f94862c
Add API so Finch doesn't need to touch the internals of PurpleBlistNode.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sat, 26 Jan 2008 20:32:26 +0000 |
parents | 8c5d0180c326 |
children | 797230b3e48e |
comparison
equal
deleted
inserted
replaced
22211:eddcf0f2da51 | 22212:6bb29f94862c |
---|---|
51 PURPLE_BLIST_CHAT_NODE, | 51 PURPLE_BLIST_CHAT_NODE, |
52 PURPLE_BLIST_OTHER_NODE | 52 PURPLE_BLIST_OTHER_NODE |
53 | 53 |
54 } PurpleBlistNodeType; | 54 } PurpleBlistNodeType; |
55 | 55 |
56 #define PURPLE_BLIST_NODE_IS_CHAT(n) ((n)->type == PURPLE_BLIST_CHAT_NODE) | 56 #define PURPLE_BLIST_NODE_IS_CHAT(n) (purple_blist_node_get_type(n) == PURPLE_BLIST_CHAT_NODE) |
57 #define PURPLE_BLIST_NODE_IS_BUDDY(n) ((n)->type == PURPLE_BLIST_BUDDY_NODE) | 57 #define PURPLE_BLIST_NODE_IS_BUDDY(n) (purple_blist_node_get_type(n) == PURPLE_BLIST_BUDDY_NODE) |
58 #define PURPLE_BLIST_NODE_IS_CONTACT(n) ((n)->type == PURPLE_BLIST_CONTACT_NODE) | 58 #define PURPLE_BLIST_NODE_IS_CONTACT(n) (purple_blist_node_get_type(n) == PURPLE_BLIST_CONTACT_NODE) |
59 #define PURPLE_BLIST_NODE_IS_GROUP(n) ((n)->type == PURPLE_BLIST_GROUP_NODE) | 59 #define PURPLE_BLIST_NODE_IS_GROUP(n) (purple_blist_node_get_type(n) == PURPLE_BLIST_GROUP_NODE) |
60 | 60 |
61 #define PURPLE_BUDDY_IS_ONLINE(b) \ | 61 #define PURPLE_BUDDY_IS_ONLINE(b) \ |
62 ((b) != NULL && purple_account_is_connected((b)->account) && \ | 62 ((b) != NULL && purple_account_is_connected((b)->account) && \ |
63 purple_presence_is_online(purple_buddy_get_presence(b))) | 63 purple_presence_is_online(purple_buddy_get_presence(b))) |
64 | 64 |
232 * @param offline Whether to include nodes for offline accounts | 232 * @param offline Whether to include nodes for offline accounts |
233 * @return The next node | 233 * @return The next node |
234 * @see purple_blist_node_get_parent | 234 * @see purple_blist_node_get_parent |
235 * @see purple_blist_node_get_first_child | 235 * @see purple_blist_node_get_first_child |
236 * @see purple_blist_node_get_sibling_next | 236 * @see purple_blist_node_get_sibling_next |
237 * @see purple_blist_node_get_sibling_prev | |
237 */ | 238 */ |
238 PurpleBlistNode *purple_blist_node_next(PurpleBlistNode *node, gboolean offline); | 239 PurpleBlistNode *purple_blist_node_next(PurpleBlistNode *node, gboolean offline); |
239 | 240 |
240 /** | 241 /** |
241 * Returns the parent node of a given node. | 242 * Returns the parent node of a given node. |
243 * @param node A node. | 244 * @param node A node. |
244 * @return The parent node. | 245 * @return The parent node. |
245 * @since 2.4.0 | 246 * @since 2.4.0 |
246 * @see purple_blist_node_get_first_child | 247 * @see purple_blist_node_get_first_child |
247 * @see purple_blist_node_get_sibling_next | 248 * @see purple_blist_node_get_sibling_next |
249 * @see purple_blist_node_get_sibling_prev | |
248 * @see purple_blist_node_next | 250 * @see purple_blist_node_next |
249 */ | 251 */ |
250 PurpleBlistNode *purple_blist_node_get_parent(PurpleBlistNode *node); | 252 PurpleBlistNode *purple_blist_node_get_parent(PurpleBlistNode *node); |
251 | 253 |
252 /** | 254 /** |
255 * @param node A node. | 257 * @param node A node. |
256 * @return The child node. | 258 * @return The child node. |
257 * @since 2.4.0 | 259 * @since 2.4.0 |
258 * @see purple_blist_node_get_parent | 260 * @see purple_blist_node_get_parent |
259 * @see purple_blist_node_get_sibling_next | 261 * @see purple_blist_node_get_sibling_next |
262 * @see purple_blist_node_get_sibling_prev | |
260 * @see purple_blist_node_next | 263 * @see purple_blist_node_next |
261 */ | 264 */ |
262 PurpleBlistNode *purple_blist_node_get_first_child(PurpleBlistNode *node); | 265 PurpleBlistNode *purple_blist_node_get_first_child(PurpleBlistNode *node); |
263 | 266 |
264 /** | 267 /** |
267 * @param node A node. | 270 * @param node A node. |
268 * @return The sibling node. | 271 * @return The sibling node. |
269 * @since 2.4.0 | 272 * @since 2.4.0 |
270 * @see purple_blist_node_get_parent | 273 * @see purple_blist_node_get_parent |
271 * @see purple_blist_node_get_first_child | 274 * @see purple_blist_node_get_first_child |
275 * @see purple_blist_node_get_sibling_prev | |
272 * @see purple_blist_node_next | 276 * @see purple_blist_node_next |
273 */ | 277 */ |
274 PurpleBlistNode *purple_blist_node_get_sibling_next(PurpleBlistNode *node); | 278 PurpleBlistNode *purple_blist_node_get_sibling_next(PurpleBlistNode *node); |
279 | |
280 /** | |
281 * Returns the previous sibling node of a given node. | |
282 * | |
283 * @param node A node. | |
284 * @return The sibling node. | |
285 * @since 2.4.0 | |
286 * @see purple_blist_node_get_parent | |
287 * @see purple_blist_node_get_first_child | |
288 * @see purple_blist_node_get_sibling_next | |
289 * @see purple_blist_node_next | |
290 */ | |
291 PurpleBlistNode *purple_blist_node_get_sibling_prev(PurpleBlistNode *node); | |
275 | 292 |
276 /** | 293 /** |
277 * Shows the buddy list, creating a new one if necessary. | 294 * Shows the buddy list, creating a new one if necessary. |
278 */ | 295 */ |
279 void purple_blist_show(void); | 296 void purple_blist_show(void); |