| 202 void purple_blist_show(void); |
202 void purple_blist_show(void); |
| 203 |
203 |
| 204 /** |
204 /** |
| 205 * Hides or unhides the buddy list. |
205 * Hides or unhides the buddy list. |
| 206 * |
206 * |
| 207 * @param show Whether or not to show the buddy list |
207 * @show: Whether or not to show the buddy list |
| 208 */ |
208 */ |
| 209 void purple_blist_set_visible(gboolean show); |
209 void purple_blist_set_visible(gboolean show); |
| 210 |
210 |
| 211 /** |
211 /** |
| 212 * Updates the buddies hash table when a buddy has been renamed. This only |
212 * Updates the buddies hash table when a buddy has been renamed. This only |
| 213 * updates the cache, the caller is responsible for the actual renaming of |
213 * updates the cache, the caller is responsible for the actual renaming of |
| 214 * the buddy after updating the cache. |
214 * the buddy after updating the cache. |
| 215 * |
215 * |
| 216 * @param buddy The buddy whose name will be changed. |
216 * @buddy: The buddy whose name will be changed. |
| 217 * @param name The new name of the buddy. |
217 * @name: The new name of the buddy. |
| 218 */ |
218 */ |
| 219 void purple_blist_update_buddies_cache(PurpleBuddy *buddy, const char *new_name); |
219 void purple_blist_update_buddies_cache(PurpleBuddy *buddy, const char *new_name); |
| 220 |
220 |
| 221 /** |
221 /** |
| 222 * Updates the groups hash table when a group has been renamed. This only |
222 * Updates the groups hash table when a group has been renamed. This only |
| 223 * updates the cache, the caller is responsible for the actual renaming of |
223 * updates the cache, the caller is responsible for the actual renaming of |
| 224 * the group after updating the cache. |
224 * the group after updating the cache. |
| 225 * |
225 * |
| 226 * @param group The group whose name will be changed. |
226 * @group: The group whose name will be changed. |
| 227 * @param name The new name of the group. |
227 * @name: The new name of the group. |
| 228 */ |
228 */ |
| 229 void purple_blist_update_groups_cache(PurpleGroup *group, const char *new_name); |
229 void purple_blist_update_groups_cache(PurpleGroup *group, const char *new_name); |
| 230 |
230 |
| 231 /** |
231 /** |
| 232 * Adds a new chat to the buddy list. |
232 * Adds a new chat to the buddy list. |
| 233 * |
233 * |
| 234 * The chat will be inserted right after node or appended to the end |
234 * The chat will be inserted right after node or appended to the end |
| 235 * of group if node is NULL. If both are NULL, the buddy will be added to |
235 * of group if node is NULL. If both are NULL, the buddy will be added to |
| 236 * the "Chats" group. |
236 * the "Chats" group. |
| 237 * |
237 * |
| 238 * @param chat The new chat who gets added |
238 * @chat: The new chat who gets added |
| 239 * @param group The group to add the new chat to. |
239 * @group: The group to add the new chat to. |
| 240 * @param node The insertion point |
240 * @node: The insertion point |
| 241 */ |
241 */ |
| 242 void purple_blist_add_chat(PurpleChat *chat, PurpleGroup *group, PurpleBlistNode *node); |
242 void purple_blist_add_chat(PurpleChat *chat, PurpleGroup *group, PurpleBlistNode *node); |
| 243 |
243 |
| 244 /** |
244 /** |
| 245 * Adds a new buddy to the buddy list. |
245 * Adds a new buddy to the buddy list. |
| 246 * |
246 * |
| 247 * The buddy will be inserted right after node or prepended to the |
247 * The buddy will be inserted right after node or prepended to the |
| 248 * group if node is NULL. If both are NULL, the buddy will be added to |
248 * group if node is NULL. If both are NULL, the buddy will be added to |
| 249 * the "Buddies" group. |
249 * the "Buddies" group. |
| 250 * |
250 * |
| 251 * @param buddy The new buddy who gets added |
251 * @buddy: The new buddy who gets added |
| 252 * @param contact The optional contact to place the buddy in. |
252 * @contact: The optional contact to place the buddy in. |
| 253 * @param group The group to add the new buddy to. |
253 * @group: The group to add the new buddy to. |
| 254 * @param node The insertion point. Pass in NULL to add the node as |
254 * @node: The insertion point. Pass in NULL to add the node as |
| 255 * the first child in the given group. |
255 * the first child in the given group. |
| 256 */ |
256 */ |
| 257 void purple_blist_add_buddy(PurpleBuddy *buddy, PurpleContact *contact, PurpleGroup *group, PurpleBlistNode *node); |
257 void purple_blist_add_buddy(PurpleBuddy *buddy, PurpleContact *contact, PurpleGroup *group, PurpleBlistNode *node); |
| 258 |
258 |
| 259 /** |
259 /** |
| 260 * Adds a new group to the buddy list. |
260 * Adds a new group to the buddy list. |
| 261 * |
261 * |
| 262 * The new group will be inserted after insert or prepended to the list if |
262 * The new group will be inserted after insert or prepended to the list if |
| 263 * node is NULL. |
263 * node is NULL. |
| 264 * |
264 * |
| 265 * @param group The group |
265 * @group: The group |
| 266 * @param node The insertion point |
266 * @node: The insertion point |
| 267 */ |
267 */ |
| 268 void purple_blist_add_group(PurpleGroup *group, PurpleBlistNode *node); |
268 void purple_blist_add_group(PurpleGroup *group, PurpleBlistNode *node); |
| 269 |
269 |
| 270 /** |
270 /** |
| 271 * Adds a new contact to the buddy list. |
271 * Adds a new contact to the buddy list. |
| 272 * |
272 * |
| 273 * The new contact will be inserted after insert or prepended to the list if |
273 * The new contact will be inserted after insert or prepended to the list if |
| 274 * node is NULL. |
274 * node is NULL. |
| 275 * |
275 * |
| 276 * @param contact The contact |
276 * @contact: The contact |
| 277 * @param group The group to add the contact to |
277 * @group: The group to add the contact to |
| 278 * @param node The insertion point |
278 * @node: The insertion point |
| 279 */ |
279 */ |
| 280 void purple_blist_add_contact(PurpleContact *contact, PurpleGroup *group, PurpleBlistNode *node); |
280 void purple_blist_add_contact(PurpleContact *contact, PurpleGroup *group, PurpleBlistNode *node); |
| 281 |
281 |
| 282 /** |
282 /** |
| 283 * Removes a buddy from the buddy list and frees the memory allocated to it. |
283 * Removes a buddy from the buddy list and frees the memory allocated to it. |
| 284 * This doesn't actually try to remove the buddy from the server list. |
284 * This doesn't actually try to remove the buddy from the server list. |
| 285 * |
285 * |
| 286 * @param buddy The buddy to be removed |
286 * @buddy: The buddy to be removed |
| 287 * |
287 * |
| 288 * @see purple_account_remove_buddy |
288 * @see purple_account_remove_buddy |
| 289 */ |
289 */ |
| 290 void purple_blist_remove_buddy(PurpleBuddy *buddy); |
290 void purple_blist_remove_buddy(PurpleBuddy *buddy); |
| 291 |
291 |
| 292 /** |
292 /** |
| 293 * Removes a contact, and any buddies it contains, and frees the memory |
293 * Removes a contact, and any buddies it contains, and frees the memory |
| 294 * allocated to it. This calls purple_blist_remove_buddy and therefore |
294 * allocated to it. This calls purple_blist_remove_buddy and therefore |
| 295 * doesn't remove the buddies from the server list. |
295 * doesn't remove the buddies from the server list. |
| 296 * |
296 * |
| 297 * @param contact The contact to be removed |
297 * @contact: The contact to be removed |
| 298 * |
298 * |
| 299 * @see purple_blist_remove_buddy |
299 * @see purple_blist_remove_buddy |
| 300 */ |
300 */ |
| 301 void purple_blist_remove_contact(PurpleContact *contact); |
301 void purple_blist_remove_contact(PurpleContact *contact); |
| 302 |
302 |
| 303 /** |
303 /** |
| 304 * Removes a chat from the buddy list and frees the memory allocated to it. |
304 * Removes a chat from the buddy list and frees the memory allocated to it. |
| 305 * |
305 * |
| 306 * @param chat The chat to be removed |
306 * @chat: The chat to be removed |
| 307 */ |
307 */ |
| 308 void purple_blist_remove_chat(PurpleChat *chat); |
308 void purple_blist_remove_chat(PurpleChat *chat); |
| 309 |
309 |
| 310 /** |
310 /** |
| 311 * Removes a group from the buddy list and frees the memory allocated to it and to |
311 * Removes a group from the buddy list and frees the memory allocated to it and to |
| 312 * its children |
312 * its children |
| 313 * |
313 * |
| 314 * @param group The group to be removed |
314 * @group: The group to be removed |
| 315 */ |
315 */ |
| 316 void purple_blist_remove_group(PurpleGroup *group); |
316 void purple_blist_remove_group(PurpleGroup *group); |
| 317 |
317 |
| 318 /** |
318 /** |
| 319 * Finds the buddy struct given a name and an account |
319 * Finds the buddy struct given a name and an account |
| 320 * |
320 * |
| 321 * @param account The account this buddy belongs to |
321 * @account: The account this buddy belongs to |
| 322 * @param name The buddy's name |
322 * @name: The buddy's name |
| 323 * @return The buddy or NULL if the buddy does not exist |
323 * Returns: The buddy or NULL if the buddy does not exist |
| 324 */ |
324 */ |
| 325 PurpleBuddy *purple_blist_find_buddy(PurpleAccount *account, const char *name); |
325 PurpleBuddy *purple_blist_find_buddy(PurpleAccount *account, const char *name); |
| 326 |
326 |
| 327 /** |
327 /** |
| 328 * Finds the buddy struct given a name, an account, and a group |
328 * Finds the buddy struct given a name, an account, and a group |
| 329 * |
329 * |
| 330 * @param account The account this buddy belongs to |
330 * @account: The account this buddy belongs to |
| 331 * @param name The buddy's name |
331 * @name: The buddy's name |
| 332 * @param group The group to look in |
332 * @group: The group to look in |
| 333 * @return The buddy or NULL if the buddy does not exist in the group |
333 * Returns: The buddy or NULL if the buddy does not exist in the group |
| 334 */ |
334 */ |
| 335 PurpleBuddy *purple_blist_find_buddy_in_group(PurpleAccount *account, const char *name, |
335 PurpleBuddy *purple_blist_find_buddy_in_group(PurpleAccount *account, const char *name, |
| 336 PurpleGroup *group); |
336 PurpleGroup *group); |
| 337 |
337 |
| 338 /** |
338 /** |
| 339 * Finds all PurpleBuddy structs given a name and an account |
339 * Finds all PurpleBuddy structs given a name and an account |
| 340 * |
340 * |
| 341 * @param account The account this buddy belongs to |
341 * @account: The account this buddy belongs to |
| 342 * @param name The buddy's name (or NULL to return all buddies for the account) |
342 * @name: The buddy's name (or NULL to return all buddies for the account) |
| 343 * |
343 * |
| 344 * @return NULL if the buddy doesn't exist, or a GSList of |
344 * Returns: NULL if the buddy doesn't exist, or a GSList of |
| 345 * PurpleBuddy structs. You must free the GSList using |
345 * PurpleBuddy structs. You must free the GSList using |
| 346 * g_slist_free. Do not free the PurpleBuddy structs that |
346 * g_slist_free. Do not free the PurpleBuddy structs that |
| 347 * the list points to. |
347 * the list points to. |
| 348 */ |
348 */ |
| 349 GSList *purple_blist_find_buddies(PurpleAccount *account, const char *name); |
349 GSList *purple_blist_find_buddies(PurpleAccount *account, const char *name); |
| 350 |
350 |
| 351 /** |
351 /** |
| 352 * Finds a group by name |
352 * Finds a group by name |
| 353 * |
353 * |
| 354 * @param name The group's name |
354 * @name: The group's name |
| 355 * @return The group or NULL if the group does not exist |
355 * Returns: The group or NULL if the group does not exist |
| 356 */ |
356 */ |
| 357 PurpleGroup *purple_blist_find_group(const char *name); |
357 PurpleGroup *purple_blist_find_group(const char *name); |
| 358 |
358 |
| 359 /** |
359 /** |
| 360 * Finds a chat by name. |
360 * Finds a chat by name. |
| 361 * |
361 * |
| 362 * @param account The chat's account. |
362 * @account: The chat's account. |
| 363 * @param name The chat's name. |
363 * @name: The chat's name. |
| 364 * |
364 * |
| 365 * @return The chat, or @c NULL if the chat does not exist. |
365 * Returns: The chat, or @c NULL if the chat does not exist. |
| 366 */ |
366 */ |
| 367 PurpleChat *purple_blist_find_chat(PurpleAccount *account, const char *name); |
367 PurpleChat *purple_blist_find_chat(PurpleAccount *account, const char *name); |
| 368 |
368 |
| 369 /** |
369 /** |
| 370 * Called when an account connects. Tells the UI to update all the |
370 * Called when an account connects. Tells the UI to update all the |
| 371 * buddies. |
371 * buddies. |
| 372 * |
372 * |
| 373 * @param account The account |
373 * @account: The account |
| 374 */ |
374 */ |
| 375 void purple_blist_add_account(PurpleAccount *account); |
375 void purple_blist_add_account(PurpleAccount *account); |
| 376 |
376 |
| 377 /** |
377 /** |
| 378 * Called when an account disconnects. Sets the presence of all the buddies to 0 |
378 * Called when an account disconnects. Sets the presence of all the buddies to 0 |
| 379 * and tells the UI to update them. |
379 * and tells the UI to update them. |
| 380 * |
380 * |
| 381 * @param account The account |
381 * @account: The account |
| 382 */ |
382 */ |
| 383 void purple_blist_remove_account(PurpleAccount *account); |
383 void purple_blist_remove_account(PurpleAccount *account); |
| 384 |
384 |
| 385 /*@}*/ |
385 /*@}*/ |
| 386 |
386 |