Mercurial > pidgin
comparison src/blist.h @ 7118:bf630f7dfdcd
[gaim-migrate @ 7685]
Here's a commit that I think will make faceprint happy. GaimWindow ->
GaimConvWindow, GaimIm -> GaimConvIm, GaimChat -> GaimConvChat,
GaimBlistChat -> GaimChat, and updated the API functions as well. Plugin
authors are going to hunt me down and murder me. I can feel it..
committer: Tailor Script <tailor@pidgin.im>
| author | Christian Hammond <chipx86@chipx86.com> |
|---|---|
| date | Thu, 02 Oct 2003 02:54:07 +0000 |
| parents | 943085b0ff8b |
| children | 208cb260d7a7 |
comparison
equal
deleted
inserted
replaced
| 7117:943085b0ff8b | 7118:bf630f7dfdcd |
|---|---|
| 30 | 30 |
| 31 typedef struct _GaimBuddyList GaimBuddyList; | 31 typedef struct _GaimBuddyList GaimBuddyList; |
| 32 typedef struct _GaimBlistUiOps GaimBlistUiOps; | 32 typedef struct _GaimBlistUiOps GaimBlistUiOps; |
| 33 typedef struct _GaimBlistNode GaimBlistNode; | 33 typedef struct _GaimBlistNode GaimBlistNode; |
| 34 | 34 |
| 35 typedef struct _GaimBlistChat GaimBlistChat; | 35 typedef struct _GaimChat GaimChat; |
| 36 typedef struct _GaimGroup GaimGroup; | 36 typedef struct _GaimGroup GaimGroup; |
| 37 typedef struct _GaimContact GaimContact; | 37 typedef struct _GaimContact GaimContact; |
| 38 typedef struct _GaimBuddy GaimBuddy; | 38 typedef struct _GaimBuddy GaimBuddy; |
| 39 | 39 |
| 40 #include "account.h" | 40 #include "account.h" |
| 136 | 136 |
| 137 /** | 137 /** |
| 138 * A chat. This contains everything Gaim needs to put a chat room in the | 138 * A chat. This contains everything Gaim needs to put a chat room in the |
| 139 * buddy list. | 139 * buddy list. |
| 140 */ | 140 */ |
| 141 struct _GaimBlistChat { | 141 struct _GaimChat { |
| 142 GaimBlistNode node; /**< The node that this chat inherits from */ | 142 GaimBlistNode node; /**< The node that this chat inherits from */ |
| 143 char *alias; /**< The display name of this chat. */ | 143 char *alias; /**< The display name of this chat. */ |
| 144 GHashTable *components; /**< the stuff the protocol needs to know to join the chat */ | 144 GHashTable *components; /**< the stuff the protocol needs to know to join the chat */ |
| 145 GaimAccount *account; /**< The account this chat is attached to */ | 145 GaimAccount *account; /**< The account this chat is attached to */ |
| 146 GHashTable *settings; /**< per-chat settings from the XML buddy list, set by plugins and the likes. */ | 146 GHashTable *settings; /**< per-chat settings from the XML buddy list, set by plugins and the likes. */ |
| 159 }; | 159 }; |
| 160 | 160 |
| 161 /** | 161 /** |
| 162 * Buddy list UI operations. | 162 * Buddy list UI operations. |
| 163 * | 163 * |
| 164 * Any UI representing a buddy list must assign a filled-out gaim_window_ops | 164 * Any UI representing a buddy list must assign a filled-out gaim_conv_window_ops |
| 165 * structure to the buddy list core. | 165 * structure to the buddy list core. |
| 166 */ | 166 */ |
| 167 struct _GaimBlistUiOps | 167 struct _GaimBlistUiOps |
| 168 { | 168 { |
| 169 void (*new_list)(GaimBuddyList *list); /**< Sets UI-specific data on a buddy list. */ | 169 void (*new_list)(GaimBuddyList *list); /**< Sets UI-specific data on a buddy list. */ |
| 302 * Aliases a chat in the buddy list. | 302 * Aliases a chat in the buddy list. |
| 303 * | 303 * |
| 304 * @param chat The chat whose alias will be changed. | 304 * @param chat The chat whose alias will be changed. |
| 305 * @param alias The chat's new alias. | 305 * @param alias The chat's new alias. |
| 306 */ | 306 */ |
| 307 void gaim_blist_alias_chat(GaimBlistChat *chat, const char *alias); | 307 void gaim_blist_alias_chat(GaimChat *chat, const char *alias); |
| 308 | 308 |
| 309 /** | 309 /** |
| 310 * Renames a group | 310 * Renames a group |
| 311 * | 311 * |
| 312 * @param group The group to rename | 312 * @param group The group to rename |
| 320 * @param account The account this chat will get added to | 320 * @param account The account this chat will get added to |
| 321 * @param alias The alias of the new chat | 321 * @param alias The alias of the new chat |
| 322 * @param components The info the prpl needs to join the chat | 322 * @param components The info the prpl needs to join the chat |
| 323 * @return A newly allocated chat | 323 * @return A newly allocated chat |
| 324 */ | 324 */ |
| 325 GaimBlistChat *gaim_blist_chat_new(GaimAccount *account, const char *alias, GHashTable *components); | 325 GaimChat *gaim_blist_chat_new(GaimAccount *account, const char *alias, GHashTable *components); |
| 326 | 326 |
| 327 /** | 327 /** |
| 328 * Gets the alias of the chat, or the chat name if the alias does not exist | 328 * Gets the alias of the chat, or the chat name if the alias does not exist |
| 329 * | 329 * |
| 330 * @param chat The chat | 330 * @param chat The chat |
| 331 * @return The display name of the chat | 331 * @return The display name of the chat |
| 332 */ | 332 */ |
| 333 char *gaim_blist_chat_get_display_name(GaimBlistChat *chat); | 333 char *gaim_blist_chat_get_display_name(GaimChat *chat); |
| 334 | 334 |
| 335 /** | 335 /** |
| 336 * Adds a new chat to the buddy list. | 336 * Adds a new chat to the buddy list. |
| 337 * | 337 * |
| 338 * The chat will be inserted right after node or appended to the end | 338 * The chat will be inserted right after node or appended to the end |
| 341 * | 341 * |
| 342 * @param chat The new chat who gets added | 342 * @param chat The new chat who gets added |
| 343 * @param group The group to add the new chat to. | 343 * @param group The group to add the new chat to. |
| 344 * @param node The insertion point | 344 * @param node The insertion point |
| 345 */ | 345 */ |
| 346 void gaim_blist_add_chat(GaimBlistChat *chat, GaimGroup *group, GaimBlistNode *node); | 346 void gaim_blist_add_chat(GaimChat *chat, GaimGroup *group, GaimBlistNode *node); |
| 347 | 347 |
| 348 /** | 348 /** |
| 349 * Creates a new buddy | 349 * Creates a new buddy |
| 350 * | 350 * |
| 351 * @param account The account this buddy will get added to | 351 * @param account The account this buddy will get added to |
| 484 /** | 484 /** |
| 485 * Removes a chat from the buddy list and frees the memory allocated to it. | 485 * Removes a chat from the buddy list and frees the memory allocated to it. |
| 486 * | 486 * |
| 487 * @param chat The chat to be removed | 487 * @param chat The chat to be removed |
| 488 */ | 488 */ |
| 489 void gaim_blist_remove_chat(GaimBlistChat *chat); | 489 void gaim_blist_remove_chat(GaimChat *chat); |
| 490 | 490 |
| 491 /** | 491 /** |
| 492 * Removes a group from the buddy list and frees the memory allocated to it and to | 492 * Removes a group from the buddy list and frees the memory allocated to it and to |
| 493 * its children | 493 * its children |
| 494 * | 494 * |
| 517 * Returns the correct name to display for a blist chat. | 517 * Returns the correct name to display for a blist chat. |
| 518 * | 518 * |
| 519 * @param chat The chat whose name will be returned. | 519 * @param chat The chat whose name will be returned. |
| 520 * @return The alias (if set), or first component value. | 520 * @return The alias (if set), or first component value. |
| 521 */ | 521 */ |
| 522 const char *gaim_blist_chat_get_name(GaimBlistChat *chat); | 522 const char *gaim_blist_chat_get_name(GaimChat *chat); |
| 523 | 523 |
| 524 /** | 524 /** |
| 525 * Finds the buddy struct given a screenname and an account | 525 * Finds the buddy struct given a screenname and an account |
| 526 * | 526 * |
| 527 * @param name The buddy's screenname | 527 * @param name The buddy's screenname |
| 575 * @param account The chat's account. | 575 * @param account The chat's account. |
| 576 * @param name The chat's name. | 576 * @param name The chat's name. |
| 577 * | 577 * |
| 578 * @return The chat, or @c NULL if the chat does not exist. | 578 * @return The chat, or @c NULL if the chat does not exist. |
| 579 */ | 579 */ |
| 580 GaimBlistChat *gaim_blist_find_chat(GaimAccount *account, const char *name); | 580 GaimChat *gaim_blist_find_chat(GaimAccount *account, const char *name); |
| 581 | 581 |
| 582 /** | 582 /** |
| 583 * Returns the group of which the chat is a member. | 583 * Returns the group of which the chat is a member. |
| 584 * | 584 * |
| 585 * @param chat The chat. | 585 * @param chat The chat. |
| 586 * | 586 * |
| 587 * @return The parent group, or @c NULL if the chat is not in a group. | 587 * @return The parent group, or @c NULL if the chat is not in a group. |
| 588 */ | 588 */ |
| 589 GaimGroup *gaim_blist_chat_get_group(GaimBlistChat *chat); | 589 GaimGroup *gaim_blist_chat_get_group(GaimChat *chat); |
| 590 | 590 |
| 591 /** | 591 /** |
| 592 * Returns the group of which the buddy is a member. | 592 * Returns the group of which the buddy is a member. |
| 593 * | 593 * |
| 594 * @param buddy The buddy | 594 * @param buddy The buddy |
| 727 * | 727 * |
| 728 * @param c The chat the data is associated with | 728 * @param c The chat the data is associated with |
| 729 * @param key The key used to retrieve the data | 729 * @param key The key used to retrieve the data |
| 730 * @param value The data to set | 730 * @param value The data to set |
| 731 */ | 731 */ |
| 732 void gaim_blist_chat_set_setting(GaimBlistChat *c, const char *key, const char *value); | 732 void gaim_blist_chat_set_setting(GaimChat *c, const char *key, const char *value); |
| 733 | 733 |
| 734 /** | 734 /** |
| 735 * Retrieves data from the XML buddy list set by gaim_blist_chat_set_setting()) | 735 * Retrieves data from the XML buddy list set by gaim_blist_chat_set_setting()) |
| 736 * | 736 * |
| 737 * @param c The chat to retrieve data from | 737 * @param c The chat to retrieve data from |
| 738 * @param key The key to retrieve the data with | 738 * @param key The key to retrieve the data with |
| 739 * | 739 * |
| 740 * @return The associated data or NULL if no data is associated | 740 * @return The associated data or NULL if no data is associated |
| 741 */ | 741 */ |
| 742 char *gaim_blist_chat_get_setting(GaimBlistChat *c, const char *key); | 742 char *gaim_blist_chat_get_setting(GaimChat *c, const char *key); |
| 743 | 743 |
| 744 /** | 744 /** |
| 745 * Associates some data with the buddy in the xml buddy list | 745 * Associates some data with the buddy in the xml buddy list |
| 746 * | 746 * |
| 747 * @param b The buddy the data is associated with | 747 * @param b The buddy the data is associated with |
