Sun, 11 May 2008 05:08:08 +0000
Assorted cleanups, mostly to the Doxygen comments. I added a few missing
@since tags.
| 5228 | 1 | /** |
|
5497
da3c08f3af25
[gaim-migrate @ 5893]
Mark Doliner <markdoliner@pidgin.im>
parents:
5277
diff
changeset
|
2 | * @file blist.h Buddy List API |
| 5228 | 3 | * @ingroup core |
|
20889
3d0ef192f98c
All the links to libpurple signal pages were in the comment containing the
Will Thompson <resiak@pidgin.im>
parents:
20620
diff
changeset
|
4 | * @see @ref blist-signals |
|
20147
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
5 | */ |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
6 | |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
7 | /* purple |
| 5228 | 8 | * |
| 15884 | 9 | * Purple is the legal property of its developers, whose names are too numerous |
| 8046 | 10 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 11 | * source distribution. | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
12 | * |
| 5228 | 13 | * This program is free software; you can redistribute it and/or modify |
| 14 | * it under the terms of the GNU General Public License as published by | |
| 15 | * the Free Software Foundation; either version 2 of the License, or | |
| 16 | * (at your option) any later version. | |
| 17 | * | |
| 18 | * This program is distributed in the hope that it will be useful, | |
| 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 21 | * GNU General Public License for more details. | |
| 22 | * | |
| 23 | * You should have received a copy of the GNU General Public License | |
| 24 | * along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
18414
diff
changeset
|
25 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 5228 | 26 | */ |
| 15884 | 27 | #ifndef _PURPLE_BLIST_H_ |
| 28 | #define _PURPLE_BLIST_H_ | |
| 5228 | 29 | |
| 30 | /* I can't believe I let ChipX86 inspire me to write good code. -Sean */ | |
| 31 | ||
| 32 | #include <glib.h> | |
| 33 | ||
| 15884 | 34 | typedef struct _PurpleBuddyList PurpleBuddyList; |
| 35 | typedef struct _PurpleBlistUiOps PurpleBlistUiOps; | |
| 36 | typedef struct _PurpleBlistNode PurpleBlistNode; | |
|
5564
1779a1bfbdb8
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
37 | |
| 15884 | 38 | typedef struct _PurpleChat PurpleChat; |
| 39 | typedef struct _PurpleGroup PurpleGroup; | |
| 40 | typedef struct _PurpleContact PurpleContact; | |
| 41 | typedef struct _PurpleBuddy PurpleBuddy; | |
|
5564
1779a1bfbdb8
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
42 | |
| 5228 | 43 | /**************************************************************************/ |
| 44 | /* Enumerations */ | |
| 45 | /**************************************************************************/ | |
|
7098
22eabd4f5ed4
[gaim-migrate @ 7663]
Christian Hammond <chipx86@chipx86.com>
parents:
7060
diff
changeset
|
46 | typedef enum |
|
22eabd4f5ed4
[gaim-migrate @ 7663]
Christian Hammond <chipx86@chipx86.com>
parents:
7060
diff
changeset
|
47 | { |
| 15884 | 48 | PURPLE_BLIST_GROUP_NODE, |
| 49 | PURPLE_BLIST_CONTACT_NODE, | |
| 50 | PURPLE_BLIST_BUDDY_NODE, | |
| 51 | PURPLE_BLIST_CHAT_NODE, | |
| 52 | PURPLE_BLIST_OTHER_NODE | |
|
7098
22eabd4f5ed4
[gaim-migrate @ 7663]
Christian Hammond <chipx86@chipx86.com>
parents:
7060
diff
changeset
|
53 | |
| 15884 | 54 | } PurpleBlistNodeType; |
| 5228 | 55 | |
|
22334
6eec04817c0d
Add API so Finch doesn't need to touch the internals of PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22283
diff
changeset
|
56 | #define PURPLE_BLIST_NODE_IS_CHAT(n) (purple_blist_node_get_type(n) == PURPLE_BLIST_CHAT_NODE) |
|
6eec04817c0d
Add API so Finch doesn't need to touch the internals of PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22283
diff
changeset
|
57 | #define PURPLE_BLIST_NODE_IS_BUDDY(n) (purple_blist_node_get_type(n) == PURPLE_BLIST_BUDDY_NODE) |
|
6eec04817c0d
Add API so Finch doesn't need to touch the internals of PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22283
diff
changeset
|
58 | #define PURPLE_BLIST_NODE_IS_CONTACT(n) (purple_blist_node_get_type(n) == PURPLE_BLIST_CONTACT_NODE) |
|
6eec04817c0d
Add API so Finch doesn't need to touch the internals of PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22283
diff
changeset
|
59 | #define PURPLE_BLIST_NODE_IS_GROUP(n) (purple_blist_node_get_type(n) == PURPLE_BLIST_GROUP_NODE) |
| 5228 | 60 | |
| 15884 | 61 | #define PURPLE_BUDDY_IS_ONLINE(b) \ |
|
22341
ed341c90116e
Add accessor and update finch to not touch the internals of PurpleBuddy and PurpleChat.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22334
diff
changeset
|
62 | ((b) != NULL && purple_account_is_connected(purple_buddy_get_account(b)) && \ |
| 15884 | 63 | purple_presence_is_online(purple_buddy_get_presence(b))) |
| 5228 | 64 | |
|
9787
a88b7e860699
[gaim-migrate @ 10655]
Christopher O'Brien <siege@pidgin.im>
parents:
9754
diff
changeset
|
65 | typedef enum |
|
a88b7e860699
[gaim-migrate @ 10655]
Christopher O'Brien <siege@pidgin.im>
parents:
9754
diff
changeset
|
66 | { |
|
20620
daa111825e61
Looking at purple_contact_set_alias and purple_blist_alias_contact functions
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
67 | PURPLE_BLIST_NODE_FLAG_NO_SAVE = 1 << 0, /**< node should not be saved with the buddy list */ |
|
10008
1de3454a0dca
[gaim-migrate @ 10925]
Mark Doliner <markdoliner@pidgin.im>
parents:
9997
diff
changeset
|
68 | |
| 15884 | 69 | } PurpleBlistNodeFlags; |
|
9787
a88b7e860699
[gaim-migrate @ 10655]
Christopher O'Brien <siege@pidgin.im>
parents:
9754
diff
changeset
|
70 | |
|
20620
daa111825e61
Looking at purple_contact_set_alias and purple_blist_alias_contact functions
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
71 | #define PURPLE_BLIST_NODE_HAS_FLAG(b, f) (((PurpleBlistNode*)(b))->flags & (f)) |
| 15884 | 72 | #define PURPLE_BLIST_NODE_SHOULD_SAVE(b) (! PURPLE_BLIST_NODE_HAS_FLAG(b, PURPLE_BLIST_NODE_FLAG_NO_SAVE)) |
|
9787
a88b7e860699
[gaim-migrate @ 10655]
Christopher O'Brien <siege@pidgin.im>
parents:
9754
diff
changeset
|
73 | |
| 15884 | 74 | #define PURPLE_BLIST_NODE_NAME(n) ((n)->type == PURPLE_BLIST_CHAT_NODE ? purple_chat_get_name((PurpleChat*)n) : \ |
| 75 | (n)->type == PURPLE_BLIST_BUDDY_NODE ? purple_buddy_get_name((PurpleBuddy*)n) : NULL) | |
| 12519 | 76 | |
|
10008
1de3454a0dca
[gaim-migrate @ 10925]
Mark Doliner <markdoliner@pidgin.im>
parents:
9997
diff
changeset
|
77 | #include "account.h" |
|
1de3454a0dca
[gaim-migrate @ 10925]
Mark Doliner <markdoliner@pidgin.im>
parents:
9997
diff
changeset
|
78 | #include "buddyicon.h" |
|
1de3454a0dca
[gaim-migrate @ 10925]
Mark Doliner <markdoliner@pidgin.im>
parents:
9997
diff
changeset
|
79 | #include "status.h" |
| 5228 | 80 | |
| 81 | /**************************************************************************/ | |
| 82 | /* Data Structures */ | |
| 83 | /**************************************************************************/ | |
| 84 | ||
| 85 | /** | |
| 10566 | 86 | * A Buddy list node. This can represent a group, a buddy, or anything else. |
| 87 | * This is a base class for struct buddy and struct group and for anything | |
| 88 | * else that wants to put itself in the buddy list. */ | |
| 15884 | 89 | struct _PurpleBlistNode { |
| 90 | PurpleBlistNodeType type; /**< The type of node this is */ | |
| 91 | PurpleBlistNode *prev; /**< The sibling before this buddy. */ | |
| 92 | PurpleBlistNode *next; /**< The sibling after this buddy. */ | |
| 93 | PurpleBlistNode *parent; /**< The parent of this node */ | |
| 94 | PurpleBlistNode *child; /**< The child of this node */ | |
| 7693 | 95 | GHashTable *settings; /**< per-node settings */ |
|
7098
22eabd4f5ed4
[gaim-migrate @ 7663]
Christian Hammond <chipx86@chipx86.com>
parents:
7060
diff
changeset
|
96 | void *ui_data; /**< The UI can put data here. */ |
| 15884 | 97 | PurpleBlistNodeFlags flags; /**< The buddy flags */ |
| 5228 | 98 | }; |
| 99 | ||
| 100 | /** | |
| 15884 | 101 | * A buddy. This contains everything Purple will ever need to know about someone on the buddy list. Everything. |
| 5228 | 102 | */ |
| 15884 | 103 | struct _PurpleBuddy { |
| 104 | PurpleBlistNode node; /**< The node that this buddy inherits from */ | |
| 5228 | 105 | char *name; /**< The screenname of the buddy. */ |
| 106 | char *alias; /**< The user-set alias of the buddy */ | |
| 6695 | 107 | char *server_alias; /**< The server-specified alias of the buddy. (i.e. MSN "Friendly Names") */ |
| 5228 | 108 | void *proto_data; /**< This allows the prpl to associate whatever data it wants with a buddy */ |
| 15884 | 109 | PurpleBuddyIcon *icon; /**< The buddy icon. */ |
| 110 | PurpleAccount *account; /**< the account this buddy belongs to */ | |
| 111 | PurplePresence *presence; | |
| 5228 | 112 | }; |
| 113 | ||
| 114 | /** | |
| 15884 | 115 | * A contact. This contains everything Purple will ever need to know about a contact. |
| 6695 | 116 | */ |
| 15884 | 117 | struct _PurpleContact { |
| 118 | PurpleBlistNode node; /**< The node that this contact inherits from. */ | |
| 6755 | 119 | char *alias; /**< The user-set alias of the contact */ |
| 120 | int totalsize; /**< The number of buddies in this contact */ | |
| 121 | int currentsize; /**< The number of buddies in this contact corresponding to online accounts */ | |
| 122 | int online; /**< The number of buddies in this contact who are currently online */ | |
| 15884 | 123 | PurpleBuddy *priority; /**< The "top" buddy for this contact */ |
| 10378 | 124 | gboolean priority_valid; /**< Is priority valid? */ |
| 6695 | 125 | }; |
| 126 | ||
| 127 | ||
| 128 | /** | |
| 15884 | 129 | * A group. This contains everything Purple will ever need to know about a group. |
| 5228 | 130 | */ |
| 15884 | 131 | struct _PurpleGroup { |
| 132 | PurpleBlistNode node; /**< The node that this group inherits from */ | |
| 5228 | 133 | char *name; /**< The name of this group. */ |
| 6695 | 134 | int totalsize; /**< The number of chats and contacts in this group */ |
| 135 | int currentsize; /**< The number of chats and contacts in this group corresponding to online accounts */ | |
| 136 | int online; /**< The number of chats and contacts in this group who are currently online */ | |
| 5228 | 137 | }; |
| 138 | ||
| 5234 | 139 | /** |
| 15884 | 140 | * A chat. This contains everything Purple needs to put a chat room in the |
| 5234 | 141 | * buddy list. |
| 142 | */ | |
| 15884 | 143 | struct _PurpleChat { |
| 144 | PurpleBlistNode node; /**< The node that this chat inherits from */ | |
| 5234 | 145 | char *alias; /**< The display name of this chat. */ |
| 146 | GHashTable *components; /**< the stuff the protocol needs to know to join the chat */ | |
| 15884 | 147 | PurpleAccount *account; /**< The account this chat is attached to */ |
| 5234 | 148 | }; |
| 149 | ||
| 5228 | 150 | |
| 151 | /** | |
| 152 | * The Buddy List | |
| 153 | */ | |
| 15884 | 154 | struct _PurpleBuddyList { |
| 155 | PurpleBlistNode *root; /**< The first node in the buddy list */ | |
|
7098
22eabd4f5ed4
[gaim-migrate @ 7663]
Christian Hammond <chipx86@chipx86.com>
parents:
7060
diff
changeset
|
156 | GHashTable *buddies; /**< Every buddy in this list */ |
|
22eabd4f5ed4
[gaim-migrate @ 7663]
Christian Hammond <chipx86@chipx86.com>
parents:
7060
diff
changeset
|
157 | void *ui_data; /**< UI-specific data. */ |
| 5228 | 158 | }; |
| 159 | ||
| 12054 | 160 | /** |
| 161 | * Buddy list UI operations. | |
| 162 | * | |
| 15884 | 163 | * Any UI representing a buddy list must assign a filled-out PurpleBlistUiOps |
| 12054 | 164 | * structure to the buddy list core. |
| 165 | */ | |
| 15884 | 166 | struct _PurpleBlistUiOps |
| 12054 | 167 | { |
| 15884 | 168 | void (*new_list)(PurpleBuddyList *list); /**< Sets UI-specific data on a buddy list. */ |
| 169 | void (*new_node)(PurpleBlistNode *node); /**< Sets UI-specific data on a node. */ | |
| 170 | void (*show)(PurpleBuddyList *list); /**< The core will call this when it's finished doing its core stuff */ | |
| 171 | void (*update)(PurpleBuddyList *list, | |
| 172 | PurpleBlistNode *node); /**< This will update a node in the buddy list. */ | |
| 173 | void (*remove)(PurpleBuddyList *list, | |
| 174 | PurpleBlistNode *node); /**< This removes a node from the list */ | |
| 175 | void (*destroy)(PurpleBuddyList *list); /**< When the list gets destroyed, this gets called to destroy the UI. */ | |
| 176 | void (*set_visible)(PurpleBuddyList *list, | |
| 12054 | 177 | gboolean show); /**< Hides or unhides the buddy list */ |
| 15884 | 178 | void (*request_add_buddy)(PurpleAccount *account, const char *username, |
| 12054 | 179 | const char *group, const char *alias); |
| 15884 | 180 | void (*request_add_chat)(PurpleAccount *account, PurpleGroup *group, |
| 12054 | 181 | const char *alias, const char *name); |
| 182 | void (*request_add_group)(void); | |
|
16743
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
183 | |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
184 | void (*_purple_reserved1)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
185 | void (*_purple_reserved2)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
186 | void (*_purple_reserved3)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
187 | void (*_purple_reserved4)(void); |
| 12054 | 188 | }; |
| 189 | ||
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5906
diff
changeset
|
190 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5906
diff
changeset
|
191 | extern "C" { |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5906
diff
changeset
|
192 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5906
diff
changeset
|
193 | |
| 5228 | 194 | /**************************************************************************/ |
| 195 | /** @name Buddy List API */ | |
| 196 | /**************************************************************************/ | |
| 197 | /*@{*/ | |
| 198 | ||
| 199 | /** | |
| 200 | * Creates a new buddy list | |
|
10071
d2ba11541693
[gaim-migrate @ 11047]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
10052
diff
changeset
|
201 | * |
|
d2ba11541693
[gaim-migrate @ 11047]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
10052
diff
changeset
|
202 | * @return The new buddy list. |
| 5228 | 203 | */ |
| 15884 | 204 | PurpleBuddyList *purple_blist_new(void); |
| 5228 | 205 | |
| 206 | /** | |
| 207 | * Sets the main buddy list. | |
| 208 | * | |
|
10071
d2ba11541693
[gaim-migrate @ 11047]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
10052
diff
changeset
|
209 | * @param blist The buddy list you want to use. |
| 5228 | 210 | */ |
| 15884 | 211 | void purple_set_blist(PurpleBuddyList *blist); |
| 5228 | 212 | |
| 213 | /** | |
| 214 | * Returns the main buddy list. | |
| 215 | * | |
| 216 | * @return The main buddy list. | |
| 217 | */ | |
| 15884 | 218 | PurpleBuddyList *purple_get_blist(void); |
| 5228 | 219 | |
| 220 | /** | |
| 13485 | 221 | * Returns the root node of the main buddy list. |
| 222 | * | |
| 223 | * @return The root node. | |
| 224 | */ | |
| 15884 | 225 | PurpleBlistNode *purple_blist_get_root(void); |
| 13485 | 226 | |
| 227 | /** | |
|
12112
86a24bbf9a2c
[gaim-migrate @ 14412]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
12088
diff
changeset
|
228 | * Returns the next node of a given node. This function is to be used to iterate |
| 15884 | 229 | * over the tree returned by purple_get_blist. |
|
12112
86a24bbf9a2c
[gaim-migrate @ 14412]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
12088
diff
changeset
|
230 | * |
|
86a24bbf9a2c
[gaim-migrate @ 14412]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
12088
diff
changeset
|
231 | * @param node A node. |
|
86a24bbf9a2c
[gaim-migrate @ 14412]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
12088
diff
changeset
|
232 | * @param offline Whether to include nodes for offline accounts |
|
86a24bbf9a2c
[gaim-migrate @ 14412]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
12088
diff
changeset
|
233 | * @return The next node |
|
22282
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
234 | * @see purple_blist_node_get_parent |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
235 | * @see purple_blist_node_get_first_child |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
236 | * @see purple_blist_node_get_sibling_next |
|
22334
6eec04817c0d
Add API so Finch doesn't need to touch the internals of PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22283
diff
changeset
|
237 | * @see purple_blist_node_get_sibling_prev |
|
12112
86a24bbf9a2c
[gaim-migrate @ 14412]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
12088
diff
changeset
|
238 | */ |
| 15884 | 239 | PurpleBlistNode *purple_blist_node_next(PurpleBlistNode *node, gboolean offline); |
|
12112
86a24bbf9a2c
[gaim-migrate @ 14412]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
12088
diff
changeset
|
240 | |
|
86a24bbf9a2c
[gaim-migrate @ 14412]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
12088
diff
changeset
|
241 | /** |
|
22282
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
242 | * Returns the parent node of a given node. |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
243 | * |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
244 | * @param node A node. |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
245 | * @return The parent node. |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
246 | * @since 2.4.0 |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
247 | * @see purple_blist_node_get_first_child |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
248 | * @see purple_blist_node_get_sibling_next |
|
22334
6eec04817c0d
Add API so Finch doesn't need to touch the internals of PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22283
diff
changeset
|
249 | * @see purple_blist_node_get_sibling_prev |
|
22282
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
250 | * @see purple_blist_node_next |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
251 | */ |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
252 | PurpleBlistNode *purple_blist_node_get_parent(PurpleBlistNode *node); |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
253 | |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
254 | /** |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
255 | * Returns the the first child node of a given node. |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
256 | * |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
257 | * @param node A node. |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
258 | * @return The child node. |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
259 | * @since 2.4.0 |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
260 | * @see purple_blist_node_get_parent |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
261 | * @see purple_blist_node_get_sibling_next |
|
22334
6eec04817c0d
Add API so Finch doesn't need to touch the internals of PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22283
diff
changeset
|
262 | * @see purple_blist_node_get_sibling_prev |
|
22282
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
263 | * @see purple_blist_node_next |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
264 | */ |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
265 | PurpleBlistNode *purple_blist_node_get_first_child(PurpleBlistNode *node); |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
266 | |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
267 | /** |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
268 | * Returns the sibling node of a given node. |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
269 | * |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
270 | * @param node A node. |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
271 | * @return The sibling node. |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
272 | * @since 2.4.0 |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
273 | * @see purple_blist_node_get_parent |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
274 | * @see purple_blist_node_get_first_child |
|
22334
6eec04817c0d
Add API so Finch doesn't need to touch the internals of PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22283
diff
changeset
|
275 | * @see purple_blist_node_get_sibling_prev |
|
22282
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
276 | * @see purple_blist_node_next |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
277 | */ |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
278 | PurpleBlistNode *purple_blist_node_get_sibling_next(PurpleBlistNode *node); |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
279 | |
|
a964668bd7e4
Add some accessor functions for PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21999
diff
changeset
|
280 | /** |
|
22334
6eec04817c0d
Add API so Finch doesn't need to touch the internals of PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22283
diff
changeset
|
281 | * Returns the previous sibling node of a given node. |
|
6eec04817c0d
Add API so Finch doesn't need to touch the internals of PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22283
diff
changeset
|
282 | * |
|
6eec04817c0d
Add API so Finch doesn't need to touch the internals of PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22283
diff
changeset
|
283 | * @param node A node. |
|
6eec04817c0d
Add API so Finch doesn't need to touch the internals of PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22283
diff
changeset
|
284 | * @return The sibling node. |
|
6eec04817c0d
Add API so Finch doesn't need to touch the internals of PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22283
diff
changeset
|
285 | * @since 2.4.0 |
|
6eec04817c0d
Add API so Finch doesn't need to touch the internals of PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22283
diff
changeset
|
286 | * @see purple_blist_node_get_parent |
|
6eec04817c0d
Add API so Finch doesn't need to touch the internals of PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22283
diff
changeset
|
287 | * @see purple_blist_node_get_first_child |
|
6eec04817c0d
Add API so Finch doesn't need to touch the internals of PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22283
diff
changeset
|
288 | * @see purple_blist_node_get_sibling_next |
|
6eec04817c0d
Add API so Finch doesn't need to touch the internals of PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22283
diff
changeset
|
289 | * @see purple_blist_node_next |
|
6eec04817c0d
Add API so Finch doesn't need to touch the internals of PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22283
diff
changeset
|
290 | */ |
|
6eec04817c0d
Add API so Finch doesn't need to touch the internals of PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22283
diff
changeset
|
291 | PurpleBlistNode *purple_blist_node_get_sibling_prev(PurpleBlistNode *node); |
|
6eec04817c0d
Add API so Finch doesn't need to touch the internals of PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22283
diff
changeset
|
292 | |
|
6eec04817c0d
Add API so Finch doesn't need to touch the internals of PurpleBlistNode.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22283
diff
changeset
|
293 | /** |
| 5228 | 294 | * Shows the buddy list, creating a new one if necessary. |
| 295 | */ | |
| 15884 | 296 | void purple_blist_show(void); |
| 5228 | 297 | |
| 298 | ||
| 299 | /** | |
| 300 | * Destroys the buddy list window. | |
| 301 | */ | |
| 15884 | 302 | void purple_blist_destroy(void); |
| 5228 | 303 | |
| 304 | /** | |
| 305 | * Hides or unhides the buddy list. | |
| 306 | * | |
| 307 | * @param show Whether or not to show the buddy list | |
| 308 | */ | |
| 15884 | 309 | void purple_blist_set_visible(gboolean show); |
| 5228 | 310 | |
| 311 | /** | |
| 312 | * Updates a buddy's status. | |
| 5234 | 313 | * |
|
10052
329dad7e2da3
[gaim-migrate @ 11013]
Dave West <kat@users.sourceforge.net>
parents:
10037
diff
changeset
|
314 | * @param buddy The buddy whose status has changed. |
|
329dad7e2da3
[gaim-migrate @ 11013]
Dave West <kat@users.sourceforge.net>
parents:
10037
diff
changeset
|
315 | * @param old_status The status from which we are changing. |
| 5228 | 316 | */ |
| 15884 | 317 | void purple_blist_update_buddy_status(PurpleBuddy *buddy, PurpleStatus *old_status); |
| 5228 | 318 | |
| 7950 | 319 | /** |
| 5228 | 320 | * Updates a buddy's icon. |
| 321 | * | |
| 322 | * @param buddy The buddy whose buddy icon has changed | |
| 323 | */ | |
| 15884 | 324 | void purple_blist_update_buddy_icon(PurpleBuddy *buddy); |
| 5228 | 325 | |
| 326 | /** | |
| 327 | * Renames a buddy in the buddy list. | |
| 328 | * | |
| 329 | * @param buddy The buddy whose name will be changed. | |
| 330 | * @param name The new name of the buddy. | |
| 331 | */ | |
| 15884 | 332 | void purple_blist_rename_buddy(PurpleBuddy *buddy, const char *name); |
| 5228 | 333 | |
|
12319
42a0e8cecea3
[gaim-migrate @ 14623]
Richard Laager <rlaager@pidgin.im>
parents:
12286
diff
changeset
|
334 | /** |
|
42a0e8cecea3
[gaim-migrate @ 14623]
Richard Laager <rlaager@pidgin.im>
parents:
12286
diff
changeset
|
335 | * Aliases a contact in the buddy list. |
|
42a0e8cecea3
[gaim-migrate @ 14623]
Richard Laager <rlaager@pidgin.im>
parents:
12286
diff
changeset
|
336 | * |
|
42a0e8cecea3
[gaim-migrate @ 14623]
Richard Laager <rlaager@pidgin.im>
parents:
12286
diff
changeset
|
337 | * @param contact The contact whose alias will be changed. |
|
42a0e8cecea3
[gaim-migrate @ 14623]
Richard Laager <rlaager@pidgin.im>
parents:
12286
diff
changeset
|
338 | * @param alias The contact's alias. |
|
42a0e8cecea3
[gaim-migrate @ 14623]
Richard Laager <rlaager@pidgin.im>
parents:
12286
diff
changeset
|
339 | */ |
| 15884 | 340 | void purple_blist_alias_contact(PurpleContact *contact, const char *alias); |
| 5228 | 341 | |
| 342 | /** | |
| 343 | * Aliases a buddy in the buddy list. | |
| 344 | * | |
| 345 | * @param buddy The buddy whose alias will be changed. | |
| 346 | * @param alias The buddy's alias. | |
| 347 | */ | |
| 15884 | 348 | void purple_blist_alias_buddy(PurpleBuddy *buddy, const char *alias); |
| 5228 | 349 | |
| 5234 | 350 | /** |
|
6059
9934c862ca14
[gaim-migrate @ 6509]
John Silvestri <john.silvestri@gmail.com>
parents:
6058
diff
changeset
|
351 | * Sets the server-sent alias of a buddy in the buddy list. |
|
13952
2bc729a80bd3
[gaim-migrate @ 16372]
Mark Doliner <markdoliner@pidgin.im>
parents:
13929
diff
changeset
|
352 | * PRPLs should call serv_got_alias() instead of this. |
|
6058
0d5c66a5da5d
[gaim-migrate @ 6508]
Mark Doliner <markdoliner@pidgin.im>
parents:
6036
diff
changeset
|
353 | * |
|
0d5c66a5da5d
[gaim-migrate @ 6508]
Mark Doliner <markdoliner@pidgin.im>
parents:
6036
diff
changeset
|
354 | * @param buddy The buddy whose alias will be changed. |
|
0d5c66a5da5d
[gaim-migrate @ 6508]
Mark Doliner <markdoliner@pidgin.im>
parents:
6036
diff
changeset
|
355 | * @param alias The buddy's "official" alias. |
|
0d5c66a5da5d
[gaim-migrate @ 6508]
Mark Doliner <markdoliner@pidgin.im>
parents:
6036
diff
changeset
|
356 | */ |
| 15884 | 357 | void purple_blist_server_alias_buddy(PurpleBuddy *buddy, const char *alias); |
|
6058
0d5c66a5da5d
[gaim-migrate @ 6508]
Mark Doliner <markdoliner@pidgin.im>
parents:
6036
diff
changeset
|
358 | |
|
0d5c66a5da5d
[gaim-migrate @ 6508]
Mark Doliner <markdoliner@pidgin.im>
parents:
6036
diff
changeset
|
359 | /** |
| 5234 | 360 | * Aliases a chat in the buddy list. |
| 361 | * | |
| 362 | * @param chat The chat whose alias will be changed. | |
| 363 | * @param alias The chat's new alias. | |
| 364 | */ | |
| 15884 | 365 | void purple_blist_alias_chat(PurpleChat *chat, const char *alias); |
| 5228 | 366 | |
| 367 | /** | |
| 368 | * Renames a group | |
| 369 | * | |
| 370 | * @param group The group to rename | |
| 371 | * @param name The new name | |
| 372 | */ | |
| 15884 | 373 | void purple_blist_rename_group(PurpleGroup *group, const char *name); |
| 5228 | 374 | |
| 5234 | 375 | /** |
| 376 | * Creates a new chat for the buddy list | |
| 377 | * | |
| 378 | * @param account The account this chat will get added to | |
| 379 | * @param alias The alias of the new chat | |
|
15203
1a092806f344
[gaim-migrate @ 17927]
Mark Doliner <markdoliner@pidgin.im>
parents:
14814
diff
changeset
|
380 | * @param components The info the prpl needs to join the chat. The |
|
1a092806f344
[gaim-migrate @ 17927]
Mark Doliner <markdoliner@pidgin.im>
parents:
14814
diff
changeset
|
381 | * hash function should be g_str_hash() and the |
|
1a092806f344
[gaim-migrate @ 17927]
Mark Doliner <markdoliner@pidgin.im>
parents:
14814
diff
changeset
|
382 | * equal function should be g_str_equal(). |
| 5234 | 383 | * @return A newly allocated chat |
| 384 | */ | |
| 15884 | 385 | PurpleChat *purple_chat_new(PurpleAccount *account, const char *alias, GHashTable *components); |
| 5234 | 386 | |
| 387 | /** | |
| 388 | * Adds a new chat to the buddy list. | |
| 389 | * | |
| 390 | * The chat will be inserted right after node or appended to the end | |
| 391 | * of group if node is NULL. If both are NULL, the buddy will be added to | |
| 392 | * the "Chats" group. | |
| 393 | * | |
| 394 | * @param chat The new chat who gets added | |
| 395 | * @param group The group to add the new chat to. | |
| 396 | * @param node The insertion point | |
| 397 | */ | |
| 15884 | 398 | void purple_blist_add_chat(PurpleChat *chat, PurpleGroup *group, PurpleBlistNode *node); |
| 5228 | 399 | |
| 400 | /** | |
| 401 | * Creates a new buddy | |
| 402 | * | |
| 403 | * @param account The account this buddy will get added to | |
| 404 | * @param screenname The screenname of the new buddy | |
| 405 | * @param alias The alias of the new buddy (or NULL if unaliased) | |
| 406 | * @return A newly allocated buddy | |
| 407 | */ | |
| 15884 | 408 | PurpleBuddy *purple_buddy_new(PurpleAccount *account, const char *screenname, const char *alias); |
| 5228 | 409 | |
| 410 | /** | |
|
6846
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6843
diff
changeset
|
411 | * Sets a buddy's icon. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6843
diff
changeset
|
412 | * |
| 15884 | 413 | * This should only be called from within Purple. You probably want to |
| 414 | * call purple_buddy_icon_set_data(). | |
|
6846
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6843
diff
changeset
|
415 | * |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6843
diff
changeset
|
416 | * @param buddy The buddy. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6843
diff
changeset
|
417 | * @param icon The buddy icon. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6843
diff
changeset
|
418 | * |
| 15884 | 419 | * @see purple_buddy_icon_set_data() |
|
6846
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6843
diff
changeset
|
420 | */ |
| 15884 | 421 | void purple_buddy_set_icon(PurpleBuddy *buddy, PurpleBuddyIcon *icon); |
|
6846
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6843
diff
changeset
|
422 | |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6843
diff
changeset
|
423 | /** |
|
10037
5f5b72040fa2
[gaim-migrate @ 10996]
Dave West <kat@users.sourceforge.net>
parents:
10012
diff
changeset
|
424 | * Returns a buddy's account. |
|
5f5b72040fa2
[gaim-migrate @ 10996]
Dave West <kat@users.sourceforge.net>
parents:
10012
diff
changeset
|
425 | * |
|
5f5b72040fa2
[gaim-migrate @ 10996]
Dave West <kat@users.sourceforge.net>
parents:
10012
diff
changeset
|
426 | * @param buddy The buddy. |
|
5f5b72040fa2
[gaim-migrate @ 10996]
Dave West <kat@users.sourceforge.net>
parents:
10012
diff
changeset
|
427 | * |
|
5f5b72040fa2
[gaim-migrate @ 10996]
Dave West <kat@users.sourceforge.net>
parents:
10012
diff
changeset
|
428 | * @return The account |
|
5f5b72040fa2
[gaim-migrate @ 10996]
Dave West <kat@users.sourceforge.net>
parents:
10012
diff
changeset
|
429 | */ |
| 15884 | 430 | PurpleAccount *purple_buddy_get_account(const PurpleBuddy *buddy); |
|
10037
5f5b72040fa2
[gaim-migrate @ 10996]
Dave West <kat@users.sourceforge.net>
parents:
10012
diff
changeset
|
431 | |
|
5f5b72040fa2
[gaim-migrate @ 10996]
Dave West <kat@users.sourceforge.net>
parents:
10012
diff
changeset
|
432 | /** |
|
5f5b72040fa2
[gaim-migrate @ 10996]
Dave West <kat@users.sourceforge.net>
parents:
10012
diff
changeset
|
433 | * Returns a buddy's name |
|
5f5b72040fa2
[gaim-migrate @ 10996]
Dave West <kat@users.sourceforge.net>
parents:
10012
diff
changeset
|
434 | * |
|
5f5b72040fa2
[gaim-migrate @ 10996]
Dave West <kat@users.sourceforge.net>
parents:
10012
diff
changeset
|
435 | * @param buddy The buddy. |
|
5f5b72040fa2
[gaim-migrate @ 10996]
Dave West <kat@users.sourceforge.net>
parents:
10012
diff
changeset
|
436 | * |
|
5f5b72040fa2
[gaim-migrate @ 10996]
Dave West <kat@users.sourceforge.net>
parents:
10012
diff
changeset
|
437 | * @return The name. |
|
5f5b72040fa2
[gaim-migrate @ 10996]
Dave West <kat@users.sourceforge.net>
parents:
10012
diff
changeset
|
438 | */ |
| 15884 | 439 | const char *purple_buddy_get_name(const PurpleBuddy *buddy); |
|
10037
5f5b72040fa2
[gaim-migrate @ 10996]
Dave West <kat@users.sourceforge.net>
parents:
10012
diff
changeset
|
440 | |
|
5f5b72040fa2
[gaim-migrate @ 10996]
Dave West <kat@users.sourceforge.net>
parents:
10012
diff
changeset
|
441 | /** |
|
6846
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6843
diff
changeset
|
442 | * Returns a buddy's icon. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6843
diff
changeset
|
443 | * |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6843
diff
changeset
|
444 | * @param buddy The buddy. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6843
diff
changeset
|
445 | * |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6843
diff
changeset
|
446 | * @return The buddy icon. |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6843
diff
changeset
|
447 | */ |
| 15884 | 448 | PurpleBuddyIcon *purple_buddy_get_icon(const PurpleBuddy *buddy); |
|
6846
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6843
diff
changeset
|
449 | |
|
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6843
diff
changeset
|
450 | /** |
| 7312 | 451 | * Returns a buddy's contact. |
| 452 | * | |
| 453 | * @param buddy The buddy. | |
| 454 | * | |
| 455 | * @return The buddy's contact. | |
| 456 | */ | |
| 15884 | 457 | PurpleContact *purple_buddy_get_contact(PurpleBuddy *buddy); |
| 7312 | 458 | |
| 459 | /** | |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9939
diff
changeset
|
460 | * Returns a buddy's presence. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9939
diff
changeset
|
461 | * |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9939
diff
changeset
|
462 | * @param buddy The buddy. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9939
diff
changeset
|
463 | * |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9939
diff
changeset
|
464 | * @return The buddy's presence. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9939
diff
changeset
|
465 | */ |
| 15884 | 466 | PurplePresence *purple_buddy_get_presence(const PurpleBuddy *buddy); |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9939
diff
changeset
|
467 | |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9939
diff
changeset
|
468 | /** |
| 5228 | 469 | * Adds a new buddy to the buddy list. |
| 470 | * | |
| 6695 | 471 | * The buddy will be inserted right after node or prepended to the |
| 472 | * group if node is NULL. If both are NULL, the buddy will be added to | |
| 5228 | 473 | * the "Buddies" group. |
| 474 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6695
diff
changeset
|
475 | * @param buddy The new buddy who gets added |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6695
diff
changeset
|
476 | * @param contact The optional contact to place the buddy in. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6695
diff
changeset
|
477 | * @param group The group to add the new buddy to. |
|
22819
7d360024a0df
Super minor documentation improvement
Mark Doliner <markdoliner@pidgin.im>
parents:
22341
diff
changeset
|
478 | * @param node The insertion point. Pass in NULL to add the node as |
|
7d360024a0df
Super minor documentation improvement
Mark Doliner <markdoliner@pidgin.im>
parents:
22341
diff
changeset
|
479 | * the last child in the given group. |
| 5228 | 480 | */ |
| 15884 | 481 | void purple_blist_add_buddy(PurpleBuddy *buddy, PurpleContact *contact, PurpleGroup *group, PurpleBlistNode *node); |
| 5228 | 482 | |
| 483 | /** | |
| 484 | * Creates a new group | |
| 485 | * | |
| 6695 | 486 | * You can't have more than one group with the same name. Sorry. If you pass |
| 487 | * this the * name of a group that already exists, it will return that group. | |
| 5228 | 488 | * |
| 489 | * @param name The name of the new group | |
| 6695 | 490 | * @return A new group struct |
| 5228 | 491 | */ |
| 15884 | 492 | PurpleGroup *purple_group_new(const char *name); |
| 5228 | 493 | |
| 494 | /** | |
| 495 | * Adds a new group to the buddy list. | |
| 496 | * | |
| 6695 | 497 | * The new group will be inserted after insert or prepended to the list if |
| 498 | * node is NULL. | |
| 499 | * | |
| 500 | * @param group The group | |
| 501 | * @param node The insertion point | |
| 502 | */ | |
| 15884 | 503 | void purple_blist_add_group(PurpleGroup *group, PurpleBlistNode *node); |
| 6695 | 504 | |
| 505 | /** | |
| 506 | * Creates a new contact | |
| 5228 | 507 | * |
| 6695 | 508 | * @return A new contact struct |
| 5228 | 509 | */ |
| 15884 | 510 | PurpleContact *purple_contact_new(void); |
| 6695 | 511 | |
| 512 | /** | |
| 513 | * Adds a new contact to the buddy list. | |
| 514 | * | |
| 515 | * The new contact will be inserted after insert or prepended to the list if | |
| 516 | * node is NULL. | |
| 517 | * | |
| 518 | * @param contact The contact | |
| 519 | * @param group The group to add the contact to | |
| 520 | * @param node The insertion point | |
| 521 | */ | |
| 15884 | 522 | void purple_blist_add_contact(PurpleContact *contact, PurpleGroup *group, PurpleBlistNode *node); |
| 6695 | 523 | |
| 524 | /** | |
| 6965 | 525 | * Merges two contacts |
| 526 | * | |
| 527 | * All of the buddies from source will be moved to target | |
| 528 | * | |
| 529 | * @param source The contact to merge | |
| 7246 | 530 | * @param node The place to merge to (a buddy or contact) |
| 6965 | 531 | */ |
| 15884 | 532 | void purple_blist_merge_contact(PurpleContact *source, PurpleBlistNode *node); |
| 6965 | 533 | |
| 534 | /** | |
| 6695 | 535 | * Returns the highest priority buddy for a given contact. |
| 536 | * | |
| 537 | * @param contact The contact | |
| 538 | * @return The highest priority buddy | |
| 539 | */ | |
| 15884 | 540 | PurpleBuddy *purple_contact_get_priority_buddy(PurpleContact *contact); |
| 5228 | 541 | |
|
20808
e3524e9d502c
Honor a PURPLE_DISABLE_DEPRECATED define to allow plugins to catch
Richard Laager <rlaager@pidgin.im>
parents:
20620
diff
changeset
|
542 | #ifndef PURPLE_DISABLE_DEPRECATED |
| 5228 | 543 | /** |
| 6755 | 544 | * Sets the alias for a contact. |
| 545 | * | |
| 546 | * @param contact The contact | |
| 547 | * @param alias The alias to set, or NULL to unset | |
|
20620
daa111825e61
Looking at purple_contact_set_alias and purple_blist_alias_contact functions
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
548 | * |
|
daa111825e61
Looking at purple_contact_set_alias and purple_blist_alias_contact functions
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
549 | * @deprecated Use purple_blist_alias_contact() instead. |
| 6755 | 550 | */ |
| 15884 | 551 | void purple_contact_set_alias(PurpleContact *contact, const char *alias); |
|
20808
e3524e9d502c
Honor a PURPLE_DISABLE_DEPRECATED define to allow plugins to catch
Richard Laager <rlaager@pidgin.im>
parents:
20620
diff
changeset
|
552 | #endif |
| 6755 | 553 | |
| 554 | /** | |
| 555 | * Gets the alias for a contact. | |
| 556 | * | |
| 557 | * @param contact The contact | |
| 558 | * @return The alias, or NULL if it is not set. | |
| 559 | */ | |
| 15884 | 560 | const char *purple_contact_get_alias(PurpleContact *contact); |
| 6755 | 561 | |
| 562 | /** | |
|
9787
a88b7e860699
[gaim-migrate @ 10655]
Christopher O'Brien <siege@pidgin.im>
parents:
9754
diff
changeset
|
563 | * Determines whether an account owns any buddies in a given contact |
|
a88b7e860699
[gaim-migrate @ 10655]
Christopher O'Brien <siege@pidgin.im>
parents:
9754
diff
changeset
|
564 | * |
|
a88b7e860699
[gaim-migrate @ 10655]
Christopher O'Brien <siege@pidgin.im>
parents:
9754
diff
changeset
|
565 | * @param contact The contact to search through. |
|
a88b7e860699
[gaim-migrate @ 10655]
Christopher O'Brien <siege@pidgin.im>
parents:
9754
diff
changeset
|
566 | * @param account The account. |
|
a88b7e860699
[gaim-migrate @ 10655]
Christopher O'Brien <siege@pidgin.im>
parents:
9754
diff
changeset
|
567 | * |
|
a88b7e860699
[gaim-migrate @ 10655]
Christopher O'Brien <siege@pidgin.im>
parents:
9754
diff
changeset
|
568 | * @return TRUE if there are any buddies from account in the contact, or FALSE otherwise. |
|
a88b7e860699
[gaim-migrate @ 10655]
Christopher O'Brien <siege@pidgin.im>
parents:
9754
diff
changeset
|
569 | */ |
| 15884 | 570 | gboolean purple_contact_on_account(PurpleContact *contact, PurpleAccount *account); |
|
9787
a88b7e860699
[gaim-migrate @ 10655]
Christopher O'Brien <siege@pidgin.im>
parents:
9754
diff
changeset
|
571 | |
|
a88b7e860699
[gaim-migrate @ 10655]
Christopher O'Brien <siege@pidgin.im>
parents:
9754
diff
changeset
|
572 | /** |
| 10378 | 573 | * Invalidates the priority buddy so that the next call to |
| 15884 | 574 | * purple_contact_get_priority_buddy recomputes it. |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9939
diff
changeset
|
575 | * |
| 10378 | 576 | * @param contact The contact |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9939
diff
changeset
|
577 | */ |
| 15884 | 578 | void purple_contact_invalidate_priority_buddy(PurpleContact *contact); |
|
21611
d38b7c292df5
Clarify what purple_blist_remove_buddy() does somewhat.
Daniel Atallah <datallah@pidgin.im>
parents:
21208
diff
changeset
|
579 | |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9939
diff
changeset
|
580 | /** |
| 5228 | 581 | * Removes a buddy from the buddy list and frees the memory allocated to it. |
|
21611
d38b7c292df5
Clarify what purple_blist_remove_buddy() does somewhat.
Daniel Atallah <datallah@pidgin.im>
parents:
21208
diff
changeset
|
582 | * This doesn't actually try to remove the buddy from the server list, nor does |
|
21615
06f882be93e3
Fix something I mistyped.
Daniel Atallah <datallah@pidgin.im>
parents:
21611
diff
changeset
|
583 | * it clean up the prpl_data. |
| 5228 | 584 | * |
| 585 | * @param buddy The buddy to be removed | |
| 586 | */ | |
| 15884 | 587 | void purple_blist_remove_buddy(PurpleBuddy *buddy); |
| 6695 | 588 | |
| 589 | /** | |
| 590 | * Removes a contact, and any buddies it contains, and frees the memory | |
| 591 | * allocated to it. | |
| 592 | * | |
| 593 | * @param contact The contact to be removed | |
| 594 | */ | |
| 15884 | 595 | void purple_blist_remove_contact(PurpleContact *contact); |
| 5228 | 596 | |
| 597 | /** | |
| 5234 | 598 | * Removes a chat from the buddy list and frees the memory allocated to it. |
| 599 | * | |
| 600 | * @param chat The chat to be removed | |
| 601 | */ | |
| 15884 | 602 | void purple_blist_remove_chat(PurpleChat *chat); |
| 5234 | 603 | |
| 604 | /** | |
| 5228 | 605 | * Removes a group from the buddy list and frees the memory allocated to it and to |
| 606 | * its children | |
| 607 | * | |
| 608 | * @param group The group to be removed | |
| 609 | */ | |
| 15884 | 610 | void purple_blist_remove_group(PurpleGroup *group); |
| 5228 | 611 | |
| 612 | /** | |
| 613 | * Returns the alias of a buddy. | |
| 614 | * | |
| 615 | * @param buddy The buddy whose name will be returned. | |
| 10349 | 616 | * @return The alias (if set), server alias (if set), |
| 617 | * or NULL. | |
| 5228 | 618 | */ |
| 15884 | 619 | const char *purple_buddy_get_alias_only(PurpleBuddy *buddy); |
| 5228 | 620 | |
|
14553
905eb6bb4afb
[gaim-migrate @ 17210]
Jérôme Poulin <ticpu@users.sourceforge.net>
parents:
14254
diff
changeset
|
621 | /** |
|
905eb6bb4afb
[gaim-migrate @ 17210]
Jérôme Poulin <ticpu@users.sourceforge.net>
parents:
14254
diff
changeset
|
622 | * Gets the server alias for a buddy. |
|
905eb6bb4afb
[gaim-migrate @ 17210]
Jérôme Poulin <ticpu@users.sourceforge.net>
parents:
14254
diff
changeset
|
623 | * |
|
905eb6bb4afb
[gaim-migrate @ 17210]
Jérôme Poulin <ticpu@users.sourceforge.net>
parents:
14254
diff
changeset
|
624 | * @param buddy The buddy whose name will be returned |
|
905eb6bb4afb
[gaim-migrate @ 17210]
Jérôme Poulin <ticpu@users.sourceforge.net>
parents:
14254
diff
changeset
|
625 | * @return The server alias, or NULL if it is not set. |
|
905eb6bb4afb
[gaim-migrate @ 17210]
Jérôme Poulin <ticpu@users.sourceforge.net>
parents:
14254
diff
changeset
|
626 | */ |
| 15884 | 627 | const char *purple_buddy_get_server_alias(PurpleBuddy *buddy); |
| 5228 | 628 | |
| 629 | /** | |
|
9620
fe99fcea5c1c
[gaim-migrate @ 10464]
Christopher O'Brien <siege@pidgin.im>
parents:
9460
diff
changeset
|
630 | * Returns the correct name to display for a buddy, taking the contact alias |
|
fe99fcea5c1c
[gaim-migrate @ 10464]
Christopher O'Brien <siege@pidgin.im>
parents:
9460
diff
changeset
|
631 | * into account. In order of precedence: the buddy's alias; the buddy's |
|
fe99fcea5c1c
[gaim-migrate @ 10464]
Christopher O'Brien <siege@pidgin.im>
parents:
9460
diff
changeset
|
632 | * contact alias; the buddy's server alias; the buddy's user name. |
|
fe99fcea5c1c
[gaim-migrate @ 10464]
Christopher O'Brien <siege@pidgin.im>
parents:
9460
diff
changeset
|
633 | * |
|
fe99fcea5c1c
[gaim-migrate @ 10464]
Christopher O'Brien <siege@pidgin.im>
parents:
9460
diff
changeset
|
634 | * @param buddy The buddy whose name will be returned |
|
9635
4f705de0334c
[gaim-migrate @ 10479]
Mark Doliner <markdoliner@pidgin.im>
parents:
9620
diff
changeset
|
635 | * @return The appropriate name or alias, or NULL. |
|
9620
fe99fcea5c1c
[gaim-migrate @ 10464]
Christopher O'Brien <siege@pidgin.im>
parents:
9460
diff
changeset
|
636 | * |
|
fe99fcea5c1c
[gaim-migrate @ 10464]
Christopher O'Brien <siege@pidgin.im>
parents:
9460
diff
changeset
|
637 | */ |
| 15884 | 638 | const char *purple_buddy_get_contact_alias(PurpleBuddy *buddy); |
|
9620
fe99fcea5c1c
[gaim-migrate @ 10464]
Christopher O'Brien <siege@pidgin.im>
parents:
9460
diff
changeset
|
639 | |
| 10349 | 640 | /** |
| 641 | * Returns the correct alias for this user, ignoring server aliases. Used | |
| 642 | * when a user-recognizable name is required. In order: buddy's alias; buddy's | |
| 643 | * contact alias; buddy's user name. | |
| 644 | * | |
| 645 | * @param buddy The buddy whose alias will be returned. | |
| 646 | * @return The appropriate name or alias. | |
| 647 | */ | |
| 15884 | 648 | const char *purple_buddy_get_local_alias(PurpleBuddy *buddy); |
|
9620
fe99fcea5c1c
[gaim-migrate @ 10464]
Christopher O'Brien <siege@pidgin.im>
parents:
9460
diff
changeset
|
649 | |
|
fe99fcea5c1c
[gaim-migrate @ 10464]
Christopher O'Brien <siege@pidgin.im>
parents:
9460
diff
changeset
|
650 | /** |
|
fe99fcea5c1c
[gaim-migrate @ 10464]
Christopher O'Brien <siege@pidgin.im>
parents:
9460
diff
changeset
|
651 | * Returns the correct name to display for a buddy. In order of precedence: |
|
fe99fcea5c1c
[gaim-migrate @ 10464]
Christopher O'Brien <siege@pidgin.im>
parents:
9460
diff
changeset
|
652 | * the buddy's alias; the buddy's server alias; the buddy's contact alias; |
|
fe99fcea5c1c
[gaim-migrate @ 10464]
Christopher O'Brien <siege@pidgin.im>
parents:
9460
diff
changeset
|
653 | * the buddy's user name. |
| 5228 | 654 | * |
| 655 | * @param buddy The buddy whose name will be returned. | |
|
9635
4f705de0334c
[gaim-migrate @ 10479]
Mark Doliner <markdoliner@pidgin.im>
parents:
9620
diff
changeset
|
656 | * @return The appropriate name or alias, or NULL |
| 5228 | 657 | */ |
| 15884 | 658 | const char *purple_buddy_get_alias(PurpleBuddy *buddy); |
| 5228 | 659 | |
| 660 | /** | |
| 6744 | 661 | * Returns the correct name to display for a blist chat. |
| 662 | * | |
| 663 | * @param chat The chat whose name will be returned. | |
| 664 | * @return The alias (if set), or first component value. | |
| 665 | */ | |
| 15884 | 666 | const char *purple_chat_get_name(PurpleChat *chat); |
| 6744 | 667 | |
| 668 | /** | |
| 5228 | 669 | * Finds the buddy struct given a screenname and an account |
| 670 | * | |
|
10071
d2ba11541693
[gaim-migrate @ 11047]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
10052
diff
changeset
|
671 | * @param account The account this buddy belongs to |
| 6872 | 672 | * @param name The buddy's screenname |
| 5228 | 673 | * @return The buddy or NULL if the buddy does not exist |
| 674 | */ | |
| 15884 | 675 | PurpleBuddy *purple_find_buddy(PurpleAccount *account, const char *name); |
| 6245 | 676 | |
| 677 | /** | |
| 6872 | 678 | * Finds the buddy struct given a screenname, an account, and a group |
| 679 | * | |
|
10071
d2ba11541693
[gaim-migrate @ 11047]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
10052
diff
changeset
|
680 | * @param account The account this buddy belongs to |
| 6872 | 681 | * @param name The buddy's screenname |
| 682 | * @param group The group to look in | |
| 683 | * @return The buddy or NULL if the buddy does not exist in the group | |
| 684 | */ | |
| 15884 | 685 | PurpleBuddy *purple_find_buddy_in_group(PurpleAccount *account, const char *name, |
| 686 | PurpleGroup *group); | |
| 6872 | 687 | |
| 688 | /** | |
| 15884 | 689 | * Finds all PurpleBuddy structs given a screenname and an account |
| 6245 | 690 | * |
|
10071
d2ba11541693
[gaim-migrate @ 11047]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
10052
diff
changeset
|
691 | * @param account The account this buddy belongs to |
|
14814
479ac60fb641
[gaim-migrate @ 17509]
Daniel Atallah <datallah@pidgin.im>
parents:
14553
diff
changeset
|
692 | * @param name The buddy's screenname (or NULL to return all buddies in the account) |
| 6245 | 693 | * |
| 694 | * @return A GSList of buddies (which must be freed), or NULL if the buddy doesn't exist | |
| 695 | */ | |
| 15884 | 696 | GSList *purple_find_buddies(PurpleAccount *account, const char *name); |
| 6245 | 697 | |
| 5228 | 698 | |
| 699 | /** | |
| 700 | * Finds a group by name | |
| 701 | * | |
|
18414
b08108fc6ffc
Add a missing apostrophe in a comment.
Will Thompson <resiak@pidgin.im>
parents:
18412
diff
changeset
|
702 | * @param name The group's name |
| 5228 | 703 | * @return The group or NULL if the group does not exist |
| 704 | */ | |
| 15884 | 705 | PurpleGroup *purple_find_group(const char *name); |
| 6695 | 706 | |
| 707 | /** | |
|
6456
e4e7dee16c1a
[gaim-migrate @ 6965]
Christian Hammond <chipx86@chipx86.com>
parents:
6245
diff
changeset
|
708 | * Finds a chat by name. |
|
e4e7dee16c1a
[gaim-migrate @ 6965]
Christian Hammond <chipx86@chipx86.com>
parents:
6245
diff
changeset
|
709 | * |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6695
diff
changeset
|
710 | * @param account The chat's account. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6695
diff
changeset
|
711 | * @param name The chat's name. |
|
6456
e4e7dee16c1a
[gaim-migrate @ 6965]
Christian Hammond <chipx86@chipx86.com>
parents:
6245
diff
changeset
|
712 | * |
|
e4e7dee16c1a
[gaim-migrate @ 6965]
Christian Hammond <chipx86@chipx86.com>
parents:
6245
diff
changeset
|
713 | * @return The chat, or @c NULL if the chat does not exist. |
|
e4e7dee16c1a
[gaim-migrate @ 6965]
Christian Hammond <chipx86@chipx86.com>
parents:
6245
diff
changeset
|
714 | */ |
| 15884 | 715 | PurpleChat *purple_blist_find_chat(PurpleAccount *account, const char *name); |
|
6456
e4e7dee16c1a
[gaim-migrate @ 6965]
Christian Hammond <chipx86@chipx86.com>
parents:
6245
diff
changeset
|
716 | |
|
e4e7dee16c1a
[gaim-migrate @ 6965]
Christian Hammond <chipx86@chipx86.com>
parents:
6245
diff
changeset
|
717 | /** |
|
e4e7dee16c1a
[gaim-migrate @ 6965]
Christian Hammond <chipx86@chipx86.com>
parents:
6245
diff
changeset
|
718 | * Returns the group of which the chat is a member. |
|
e4e7dee16c1a
[gaim-migrate @ 6965]
Christian Hammond <chipx86@chipx86.com>
parents:
6245
diff
changeset
|
719 | * |
|
e4e7dee16c1a
[gaim-migrate @ 6965]
Christian Hammond <chipx86@chipx86.com>
parents:
6245
diff
changeset
|
720 | * @param chat The chat. |
|
e4e7dee16c1a
[gaim-migrate @ 6965]
Christian Hammond <chipx86@chipx86.com>
parents:
6245
diff
changeset
|
721 | * |
|
e4e7dee16c1a
[gaim-migrate @ 6965]
Christian Hammond <chipx86@chipx86.com>
parents:
6245
diff
changeset
|
722 | * @return The parent group, or @c NULL if the chat is not in a group. |
|
e4e7dee16c1a
[gaim-migrate @ 6965]
Christian Hammond <chipx86@chipx86.com>
parents:
6245
diff
changeset
|
723 | */ |
| 15884 | 724 | PurpleGroup *purple_chat_get_group(PurpleChat *chat); |
|
6456
e4e7dee16c1a
[gaim-migrate @ 6965]
Christian Hammond <chipx86@chipx86.com>
parents:
6245
diff
changeset
|
725 | |
|
e4e7dee16c1a
[gaim-migrate @ 6965]
Christian Hammond <chipx86@chipx86.com>
parents:
6245
diff
changeset
|
726 | /** |
|
22283
078d7f35f0f1
Add an accessor function for PurpleChat.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22282
diff
changeset
|
727 | * Returns the account the chat belongs to. |
|
078d7f35f0f1
Add an accessor function for PurpleChat.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22282
diff
changeset
|
728 | * |
|
078d7f35f0f1
Add an accessor function for PurpleChat.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22282
diff
changeset
|
729 | * @param chat The chat. |
|
078d7f35f0f1
Add an accessor function for PurpleChat.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22282
diff
changeset
|
730 | * |
|
078d7f35f0f1
Add an accessor function for PurpleChat.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22282
diff
changeset
|
731 | * @return The account the chat belongs to. |
|
078d7f35f0f1
Add an accessor function for PurpleChat.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22282
diff
changeset
|
732 | * @since 2.4.0 |
|
078d7f35f0f1
Add an accessor function for PurpleChat.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22282
diff
changeset
|
733 | */ |
|
078d7f35f0f1
Add an accessor function for PurpleChat.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22282
diff
changeset
|
734 | PurpleAccount *purple_chat_get_account(PurpleChat *chat); |
|
078d7f35f0f1
Add an accessor function for PurpleChat.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22282
diff
changeset
|
735 | |
|
078d7f35f0f1
Add an accessor function for PurpleChat.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22282
diff
changeset
|
736 | /** |
|
22341
ed341c90116e
Add accessor and update finch to not touch the internals of PurpleBuddy and PurpleChat.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22334
diff
changeset
|
737 | * Get a hashtable containing information about a chat. |
|
ed341c90116e
Add accessor and update finch to not touch the internals of PurpleBuddy and PurpleChat.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22334
diff
changeset
|
738 | * |
|
ed341c90116e
Add accessor and update finch to not touch the internals of PurpleBuddy and PurpleChat.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22334
diff
changeset
|
739 | * @param chat The chat. |
|
ed341c90116e
Add accessor and update finch to not touch the internals of PurpleBuddy and PurpleChat.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22334
diff
changeset
|
740 | * |
|
ed341c90116e
Add accessor and update finch to not touch the internals of PurpleBuddy and PurpleChat.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22334
diff
changeset
|
741 | * @constreturn The hashtable. |
|
ed341c90116e
Add accessor and update finch to not touch the internals of PurpleBuddy and PurpleChat.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22334
diff
changeset
|
742 | * @since 2.4.0 |
|
ed341c90116e
Add accessor and update finch to not touch the internals of PurpleBuddy and PurpleChat.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22334
diff
changeset
|
743 | */ |
|
ed341c90116e
Add accessor and update finch to not touch the internals of PurpleBuddy and PurpleChat.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22334
diff
changeset
|
744 | GHashTable *purple_chat_get_components(PurpleChat *chat); |
|
ed341c90116e
Add accessor and update finch to not touch the internals of PurpleBuddy and PurpleChat.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22334
diff
changeset
|
745 | |
|
ed341c90116e
Add accessor and update finch to not touch the internals of PurpleBuddy and PurpleChat.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22334
diff
changeset
|
746 | /** |
| 5228 | 747 | * Returns the group of which the buddy is a member. |
| 748 | * | |
| 749 | * @param buddy The buddy | |
| 750 | * @return The group or NULL if the buddy is not in a group | |
| 751 | */ | |
| 15884 | 752 | PurpleGroup *purple_buddy_get_group(PurpleBuddy *buddy); |
| 5228 | 753 | |
| 754 | ||
| 755 | /** | |
| 756 | * Returns a list of accounts that have buddies in this group | |
| 757 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6695
diff
changeset
|
758 | * @param g The group |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6695
diff
changeset
|
759 | * |
|
21999
471bfda14434
Fix up a doxygen comment about a function return value.
Etan Reisner <deryni@pidgin.im>
parents:
21648
diff
changeset
|
760 | * @return A GSList of accounts (which must be freed), or NULL if the group |
|
471bfda14434
Fix up a doxygen comment about a function return value.
Etan Reisner <deryni@pidgin.im>
parents:
21648
diff
changeset
|
761 | * has no accounts. |
| 5228 | 762 | */ |
| 15884 | 763 | GSList *purple_group_get_accounts(PurpleGroup *g); |
| 5228 | 764 | |
| 765 | /** | |
| 766 | * Determines whether an account owns any buddies in a given group | |
| 767 | * | |
| 768 | * @param g The group to search through. | |
| 769 | * @param account The account. | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6695
diff
changeset
|
770 | * |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6695
diff
changeset
|
771 | * @return TRUE if there are any buddies in the group, or FALSE otherwise. |
| 5228 | 772 | */ |
| 15884 | 773 | gboolean purple_group_on_account(PurpleGroup *g, PurpleAccount *account); |
| 5228 | 774 | |
| 775 | /** | |
|
16822
d1ee7a30e9b8
Add a missing function useful for dbus clients, requested by Andrey Kostenko. And fix a crash from badly written dbus code.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
776 | * Returns the name of a group. |
|
d1ee7a30e9b8
Add a missing function useful for dbus clients, requested by Andrey Kostenko. And fix a crash from badly written dbus code.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
777 | * |
|
d1ee7a30e9b8
Add a missing function useful for dbus clients, requested by Andrey Kostenko. And fix a crash from badly written dbus code.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
778 | * @param group The group. |
|
d1ee7a30e9b8
Add a missing function useful for dbus clients, requested by Andrey Kostenko. And fix a crash from badly written dbus code.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
779 | * |
|
d1ee7a30e9b8
Add a missing function useful for dbus clients, requested by Andrey Kostenko. And fix a crash from badly written dbus code.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
780 | * @return The name of the group. |
|
d1ee7a30e9b8
Add a missing function useful for dbus clients, requested by Andrey Kostenko. And fix a crash from badly written dbus code.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
781 | */ |
|
d1ee7a30e9b8
Add a missing function useful for dbus clients, requested by Andrey Kostenko. And fix a crash from badly written dbus code.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
782 | const char *purple_group_get_name(PurpleGroup *group); |
|
d1ee7a30e9b8
Add a missing function useful for dbus clients, requested by Andrey Kostenko. And fix a crash from badly written dbus code.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
783 | |
|
d1ee7a30e9b8
Add a missing function useful for dbus clients, requested by Andrey Kostenko. And fix a crash from badly written dbus code.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
784 | /** |
| 5234 | 785 | * Called when an account gets signed on. Tells the UI to update all the |
| 786 | * buddies. | |
| 787 | * | |
| 788 | * @param account The account | |
| 789 | */ | |
| 15884 | 790 | void purple_blist_add_account(PurpleAccount *account); |
| 5234 | 791 | |
| 792 | ||
| 793 | /** | |
| 5228 | 794 | * Called when an account gets signed off. Sets the presence of all the buddies to 0 |
| 795 | * and tells the UI to update them. | |
| 796 | * | |
| 6695 | 797 | * @param account The account |
| 5228 | 798 | */ |
| 15884 | 799 | void purple_blist_remove_account(PurpleAccount *account); |
| 5228 | 800 | |
| 801 | ||
| 802 | /** | |
| 803 | * Determines the total size of a group | |
| 804 | * | |
| 805 | * @param group The group | |
| 806 | * @param offline Count buddies in offline accounts | |
| 807 | * @return The number of buddies in the group | |
| 808 | */ | |
| 15884 | 809 | int purple_blist_get_group_size(PurpleGroup *group, gboolean offline); |
| 5228 | 810 | |
| 811 | /** | |
| 812 | * Determines the number of online buddies in a group | |
| 813 | * | |
| 814 | * @param group The group | |
| 815 | * @return The number of online buddies in the group, or 0 if the group is NULL | |
| 816 | */ | |
| 15884 | 817 | int purple_blist_get_group_online_count(PurpleGroup *group); |
| 5228 | 818 | |
| 819 | /*@}*/ | |
| 820 | ||
| 821 | /****************************************************************************************/ | |
| 822 | /** @name Buddy list file management API */ | |
| 823 | /****************************************************************************************/ | |
| 824 | ||
| 825 | /** | |
| 15884 | 826 | * Loads the buddy list from ~/.purple/blist.xml. |
| 5228 | 827 | */ |
| 15884 | 828 | void purple_blist_load(void); |
| 5228 | 829 | |
| 830 | /** | |
|
10704
99a466f384d2
[gaim-migrate @ 12288]
Mark Doliner <markdoliner@pidgin.im>
parents:
10662
diff
changeset
|
831 | * Schedule a save of the blist.xml file. This is used by the privacy |
|
99a466f384d2
[gaim-migrate @ 12288]
Mark Doliner <markdoliner@pidgin.im>
parents:
10662
diff
changeset
|
832 | * API whenever the privacy settings are changed. If you make a change |
|
99a466f384d2
[gaim-migrate @ 12288]
Mark Doliner <markdoliner@pidgin.im>
parents:
10662
diff
changeset
|
833 | * to blist.xml using one of the functions in the buddy list API, then |
|
99a466f384d2
[gaim-migrate @ 12288]
Mark Doliner <markdoliner@pidgin.im>
parents:
10662
diff
changeset
|
834 | * the buddy list is saved automatically, so you should not need to |
|
99a466f384d2
[gaim-migrate @ 12288]
Mark Doliner <markdoliner@pidgin.im>
parents:
10662
diff
changeset
|
835 | * call this. |
|
10350
a72a43212626
[gaim-migrate @ 11565]
Mark Doliner <markdoliner@pidgin.im>
parents:
10349
diff
changeset
|
836 | */ |
| 15884 | 837 | void purple_blist_schedule_save(void); |
|
10350
a72a43212626
[gaim-migrate @ 11565]
Mark Doliner <markdoliner@pidgin.im>
parents:
10349
diff
changeset
|
838 | |
|
a72a43212626
[gaim-migrate @ 11565]
Mark Doliner <markdoliner@pidgin.im>
parents:
10349
diff
changeset
|
839 | /** |
|
7060
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
840 | * Requests from the user information needed to add a buddy to the |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
841 | * buddy list. |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
842 | * |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
843 | * @param account The account the buddy is added to. |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
844 | * @param username The username of the buddy. |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
845 | * @param group The name of the group to place the buddy in. |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
846 | * @param alias The optional alias for the buddy. |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
847 | */ |
| 15884 | 848 | void purple_blist_request_add_buddy(PurpleAccount *account, const char *username, |
|
7060
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
849 | const char *group, const char *alias); |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
850 | |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
851 | /** |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
852 | * Requests from the user information needed to add a chat to the |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
853 | * buddy list. |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
854 | * |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
855 | * @param account The account the buddy is added to. |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
856 | * @param group The optional group to add the chat to. |
| 9000 | 857 | * @param alias The optional alias for the chat. |
| 9939 | 858 | * @param name The required chat name. |
|
7060
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
859 | */ |
| 15884 | 860 | void purple_blist_request_add_chat(PurpleAccount *account, PurpleGroup *group, |
|
9754
3a17eee239b2
[gaim-migrate @ 10621]
Nathan Fredrickson <nathan@silverorange.com>
parents:
9713
diff
changeset
|
861 | const char *alias, const char *name); |
|
7060
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
862 | |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
863 | /** |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
864 | * Requests from the user information needed to add a group to the |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
865 | * buddy list. |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
866 | */ |
| 15884 | 867 | void purple_blist_request_add_group(void); |
|
7060
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
868 | |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
869 | /** |
| 7693 | 870 | * Associates a boolean with a node in the buddy list |
| 871 | * | |
| 872 | * @param node The node to associate the data with | |
| 873 | * @param key The identifier for the data | |
| 874 | * @param value The value to set | |
| 875 | */ | |
| 15884 | 876 | void purple_blist_node_set_bool(PurpleBlistNode *node, const char *key, gboolean value); |
| 7693 | 877 | |
| 878 | /** | |
|
8735
01248ea222d3
[gaim-migrate @ 9490]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
8710
diff
changeset
|
879 | * Retrieves a named boolean setting from a node in the buddy list |
| 7693 | 880 | * |
|
8735
01248ea222d3
[gaim-migrate @ 9490]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
8710
diff
changeset
|
881 | * @param node The node to retrieve the data from |
| 7693 | 882 | * @param key The identifier of the data |
| 883 | * | |
| 884 | * @return The value, or FALSE if there is no setting | |
| 885 | */ | |
| 15884 | 886 | gboolean purple_blist_node_get_bool(PurpleBlistNode *node, const char *key); |
| 7693 | 887 | |
| 888 | /** | |
| 889 | * Associates an integer with a node in the buddy list | |
| 890 | * | |
| 891 | * @param node The node to associate the data with | |
| 892 | * @param key The identifier for the data | |
| 893 | * @param value The value to set | |
| 894 | */ | |
| 15884 | 895 | void purple_blist_node_set_int(PurpleBlistNode *node, const char *key, int value); |
| 7693 | 896 | |
| 897 | /** | |
|
8735
01248ea222d3
[gaim-migrate @ 9490]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
8710
diff
changeset
|
898 | * Retrieves a named integer setting from a node in the buddy list |
| 7693 | 899 | * |
|
8735
01248ea222d3
[gaim-migrate @ 9490]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
8710
diff
changeset
|
900 | * @param node The node to retrieve the data from |
| 7693 | 901 | * @param key The identifier of the data |
| 902 | * | |
| 903 | * @return The value, or 0 if there is no setting | |
| 904 | */ | |
| 15884 | 905 | int purple_blist_node_get_int(PurpleBlistNode *node, const char *key); |
| 7693 | 906 | |
| 907 | /** | |
| 908 | * Associates a string with a node in the buddy list | |
| 909 | * | |
| 910 | * @param node The node to associate the data with | |
| 911 | * @param key The identifier for the data | |
| 912 | * @param value The value to set | |
| 913 | */ | |
| 15884 | 914 | void purple_blist_node_set_string(PurpleBlistNode *node, const char *key, |
| 7693 | 915 | const char *value); |
| 916 | ||
| 917 | /** | |
|
8735
01248ea222d3
[gaim-migrate @ 9490]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
8710
diff
changeset
|
918 | * Retrieves a named string setting from a node in the buddy list |
| 7693 | 919 | * |
|
8735
01248ea222d3
[gaim-migrate @ 9490]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
8710
diff
changeset
|
920 | * @param node The node to retrieve the data from |
| 7693 | 921 | * @param key The identifier of the data |
| 922 | * | |
| 923 | * @return The value, or NULL if there is no setting | |
| 924 | */ | |
| 15884 | 925 | const char *purple_blist_node_get_string(PurpleBlistNode *node, const char *key); |
| 7693 | 926 | |
| 927 | /** | |
| 7811 | 928 | * Removes a named setting from a blist node |
| 929 | * | |
| 930 | * @param node The node from which to remove the setting | |
| 931 | * @param key The name of the setting | |
| 932 | */ | |
| 15884 | 933 | void purple_blist_node_remove_setting(PurpleBlistNode *node, const char *key); |
| 7811 | 934 | |
|
10548
990b3ec2758e
[gaim-migrate @ 11918]
Mark Doliner <markdoliner@pidgin.im>
parents:
10433
diff
changeset
|
935 | /** |
|
990b3ec2758e
[gaim-migrate @ 11918]
Mark Doliner <markdoliner@pidgin.im>
parents:
10433
diff
changeset
|
936 | * Set the flags for the given node. Setting a node's flags will overwrite |
|
990b3ec2758e
[gaim-migrate @ 11918]
Mark Doliner <markdoliner@pidgin.im>
parents:
10433
diff
changeset
|
937 | * the old flags, so if you want to save them, you must first call |
| 15884 | 938 | * purple_blist_node_get_flags and modify that appropriately. |
|
10548
990b3ec2758e
[gaim-migrate @ 11918]
Mark Doliner <markdoliner@pidgin.im>
parents:
10433
diff
changeset
|
939 | * |
|
990b3ec2758e
[gaim-migrate @ 11918]
Mark Doliner <markdoliner@pidgin.im>
parents:
10433
diff
changeset
|
940 | * @param node The node on which to set the flags. |
|
990b3ec2758e
[gaim-migrate @ 11918]
Mark Doliner <markdoliner@pidgin.im>
parents:
10433
diff
changeset
|
941 | * @param flags The flags to set. This is a bitmask. |
|
990b3ec2758e
[gaim-migrate @ 11918]
Mark Doliner <markdoliner@pidgin.im>
parents:
10433
diff
changeset
|
942 | */ |
| 15884 | 943 | void purple_blist_node_set_flags(PurpleBlistNode *node, PurpleBlistNodeFlags flags); |
|
10548
990b3ec2758e
[gaim-migrate @ 11918]
Mark Doliner <markdoliner@pidgin.im>
parents:
10433
diff
changeset
|
944 | |
|
990b3ec2758e
[gaim-migrate @ 11918]
Mark Doliner <markdoliner@pidgin.im>
parents:
10433
diff
changeset
|
945 | /** |
|
990b3ec2758e
[gaim-migrate @ 11918]
Mark Doliner <markdoliner@pidgin.im>
parents:
10433
diff
changeset
|
946 | * Get the current flags on a given node. |
|
990b3ec2758e
[gaim-migrate @ 11918]
Mark Doliner <markdoliner@pidgin.im>
parents:
10433
diff
changeset
|
947 | * |
|
990b3ec2758e
[gaim-migrate @ 11918]
Mark Doliner <markdoliner@pidgin.im>
parents:
10433
diff
changeset
|
948 | * @param node The node from which to get the flags. |
|
990b3ec2758e
[gaim-migrate @ 11918]
Mark Doliner <markdoliner@pidgin.im>
parents:
10433
diff
changeset
|
949 | * |
|
990b3ec2758e
[gaim-migrate @ 11918]
Mark Doliner <markdoliner@pidgin.im>
parents:
10433
diff
changeset
|
950 | * @return The flags on the node. This is a bitmask. |
|
990b3ec2758e
[gaim-migrate @ 11918]
Mark Doliner <markdoliner@pidgin.im>
parents:
10433
diff
changeset
|
951 | */ |
| 15884 | 952 | PurpleBlistNodeFlags purple_blist_node_get_flags(PurpleBlistNode *node); |
|
10548
990b3ec2758e
[gaim-migrate @ 11918]
Mark Doliner <markdoliner@pidgin.im>
parents:
10433
diff
changeset
|
953 | |
|
17859
afbace92af8d
New function purple_blist_node_get_type.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16822
diff
changeset
|
954 | /** |
|
afbace92af8d
New function purple_blist_node_get_type.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16822
diff
changeset
|
955 | * Get the type of a given node. |
|
afbace92af8d
New function purple_blist_node_get_type.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16822
diff
changeset
|
956 | * |
|
afbace92af8d
New function purple_blist_node_get_type.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16822
diff
changeset
|
957 | * @param node The node. |
|
afbace92af8d
New function purple_blist_node_get_type.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16822
diff
changeset
|
958 | * |
|
afbace92af8d
New function purple_blist_node_get_type.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16822
diff
changeset
|
959 | * @return The type of the node. |
|
23063
9458eafda32c
Assorted cleanups, mostly to the Doxygen comments. I added a few missing
Richard Laager <rlaager@pidgin.im>
parents:
22819
diff
changeset
|
960 | * @since 2.1.0 |
|
17859
afbace92af8d
New function purple_blist_node_get_type.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16822
diff
changeset
|
961 | */ |
|
afbace92af8d
New function purple_blist_node_get_type.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16822
diff
changeset
|
962 | PurpleBlistNodeType purple_blist_node_get_type(PurpleBlistNode *node); |
|
afbace92af8d
New function purple_blist_node_get_type.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16822
diff
changeset
|
963 | |
| 5228 | 964 | /*@}*/ |
| 965 | ||
|
8710
360b660e428d
[gaim-migrate @ 9464]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
966 | /** |
|
9030
7b574a641391
[gaim-migrate @ 9806]
Mark Doliner <markdoliner@pidgin.im>
parents:
9013
diff
changeset
|
967 | * Retrieves the extended menu items for a buddy list node. |
| 12286 | 968 | * @param n The blist node for which to obtain the extended menu items. |
| 15884 | 969 | * @return A list of PurpleMenuAction items, as harvested by the |
| 12286 | 970 | * blist-node-extended-menu signal. |
|
9030
7b574a641391
[gaim-migrate @ 9806]
Mark Doliner <markdoliner@pidgin.im>
parents:
9013
diff
changeset
|
971 | */ |
| 15884 | 972 | GList *purple_blist_node_get_extended_menu(PurpleBlistNode *n); |
|
9030
7b574a641391
[gaim-migrate @ 9806]
Mark Doliner <markdoliner@pidgin.im>
parents:
9013
diff
changeset
|
973 | |
| 5228 | 974 | /**************************************************************************/ |
| 12054 | 975 | /** @name UI Registration Functions */ |
| 976 | /**************************************************************************/ | |
| 977 | /*@{*/ | |
| 978 | ||
| 979 | /** | |
| 980 | * Sets the UI operations structure to be used for the buddy list. | |
| 981 | * | |
| 982 | * @param ops The ops struct. | |
| 983 | */ | |
| 15884 | 984 | void purple_blist_set_ui_ops(PurpleBlistUiOps *ops); |
| 12054 | 985 | |
| 986 | /** | |
| 987 | * Returns the UI operations structure to be used for the buddy list. | |
| 988 | * | |
| 989 | * @return The UI operations structure. | |
| 990 | */ | |
| 15884 | 991 | PurpleBlistUiOps *purple_blist_get_ui_ops(void); |
| 12054 | 992 | |
| 993 | /*@}*/ | |
| 994 | ||
| 995 | /**************************************************************************/ | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
996 | /** @name Buddy List Subsystem */ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
997 | /**************************************************************************/ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
998 | /*@{*/ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
999 | |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
1000 | /** |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
1001 | * Returns the handle for the buddy list subsystem. |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
1002 | * |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
1003 | * @return The buddy list subsystem handle. |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
1004 | */ |
| 15884 | 1005 | void *purple_blist_get_handle(void); |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
1006 | |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
1007 | /** |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
1008 | * Initializes the buddy list subsystem. |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
1009 | */ |
| 15884 | 1010 | void purple_blist_init(void); |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
1011 | |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
1012 | /** |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
1013 | * Uninitializes the buddy list subsystem. |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
1014 | */ |
| 15884 | 1015 | void purple_blist_uninit(void); |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
1016 | |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
1017 | /*@}*/ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
1018 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5906
diff
changeset
|
1019 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5906
diff
changeset
|
1020 | } |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5906
diff
changeset
|
1021 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5906
diff
changeset
|
1022 | |
| 15884 | 1023 | #endif /* _PURPLE_BLIST_H_ */ |