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