Tue, 09 Jul 2013 01:38:29 +0530
Added GBoxed wrapping to PurpleBuddyList
| 5228 | 1 | /** |
|
34706
02cb08146888
Renamed blist.[ch] to buddylist.[ch]
Ankit Vani <a@nevitus.org>
parents:
34702
diff
changeset
|
2 | * @file buddylist.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 | */ |
|
34710
6182323fbb0c
Renamed gg's buddylist.[ch] to blist.[ch]
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
27 | #ifndef _PURPLE_BUDDY_LIST_H_ |
|
6182323fbb0c
Renamed gg's buddylist.[ch] to blist.[ch]
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
28 | #define _PURPLE_BUDDY_LIST_H_ |
| 5228 | 29 | |
| 30 | /* I can't believe I let ChipX86 inspire me to write good code. -Sean */ | |
| 31 | ||
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
34706
diff
changeset
|
32 | #include "blistnodetypes.h" |
| 5228 | 33 | |
|
34725
5acc823db81d
Added GBoxed wrapping to PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34722
diff
changeset
|
34 | #define PURPLE_TYPE_BUDDY_LIST (purple_buddy_list_get_type()) |
|
5acc823db81d
Added GBoxed wrapping to PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34722
diff
changeset
|
35 | |
|
34690
bac0fdf2cf1b
Begun GObjectification of buddy list. Hid private data and added class structs.
Ankit Vani <a@nevitus.org>
parents:
33888
diff
changeset
|
36 | /** @copydoc _PurpleBuddyList */ |
|
bac0fdf2cf1b
Begun GObjectification of buddy list. Hid private data and added class structs.
Ankit Vani <a@nevitus.org>
parents:
33888
diff
changeset
|
37 | typedef struct _PurpleBuddyList PurpleBuddyList; |
|
34709
3484aac07f02
Replaced PurpleBlistUiOps with PurpleBListUiOps for uniform naming
Ankit Vani <a@nevitus.org>
parents:
34707
diff
changeset
|
38 | /** @copydoc _PurpleBListUiOps */ |
|
3484aac07f02
Replaced PurpleBlistUiOps with PurpleBListUiOps for uniform naming
Ankit Vani <a@nevitus.org>
parents:
34707
diff
changeset
|
39 | typedef struct _PurpleBListUiOps PurpleBListUiOps; |
|
24968
2d500d10773f
Added purple_blist_get_ui_data, purple_blist_set_ui_data, purple_blist_node_get_ui_data, and purple_blist_node_set_ui_data functions.
Gary Kramlich <grim@reaperworld.com>
parents:
24957
diff
changeset
|
40 | |
| 5228 | 41 | /**************************************************************************/ |
| 42 | /* Data Structures */ | |
| 43 | /**************************************************************************/ | |
| 44 | ||
|
34725
5acc823db81d
Added GBoxed wrapping to PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34722
diff
changeset
|
45 | /** |
| 5228 | 46 | * The Buddy List |
| 47 | */ | |
| 15884 | 48 | struct _PurpleBuddyList { |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
34706
diff
changeset
|
49 | PurpleBListNode *root; /**< The first node in the buddy list */ |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
34706
diff
changeset
|
50 | GHashTable *buddies; /**< Every buddy in this list */ |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
34706
diff
changeset
|
51 | void *ui_data; /**< UI-specific data. */ |
|
34690
bac0fdf2cf1b
Begun GObjectification of buddy list. Hid private data and added class structs.
Ankit Vani <a@nevitus.org>
parents:
33888
diff
changeset
|
52 | }; |
|
bac0fdf2cf1b
Begun GObjectification of buddy list. Hid private data and added class structs.
Ankit Vani <a@nevitus.org>
parents:
33888
diff
changeset
|
53 | |
| 12054 | 54 | /** |
| 55 | * Buddy list UI operations. | |
| 56 | * | |
|
34709
3484aac07f02
Replaced PurpleBlistUiOps with PurpleBListUiOps for uniform naming
Ankit Vani <a@nevitus.org>
parents:
34707
diff
changeset
|
57 | * Any UI representing a buddy list must assign a filled-out PurpleBListUiOps |
| 12054 | 58 | * structure to the buddy list core. |
| 59 | */ | |
|
34709
3484aac07f02
Replaced PurpleBlistUiOps with PurpleBListUiOps for uniform naming
Ankit Vani <a@nevitus.org>
parents:
34707
diff
changeset
|
60 | struct _PurpleBListUiOps |
| 12054 | 61 | { |
| 15884 | 62 | void (*new_list)(PurpleBuddyList *list); /**< Sets UI-specific data on a buddy list. */ |
|
34699
09b2c9219b57
Renamed PurpleBlistNode to PurpleBListNode
Ankit Vani <a@nevitus.org>
parents:
34698
diff
changeset
|
63 | void (*new_node)(PurpleBListNode *node); /**< Sets UI-specific data on a node. */ |
| 15884 | 64 | void (*show)(PurpleBuddyList *list); /**< The core will call this when it's finished doing its core stuff */ |
| 65 | void (*update)(PurpleBuddyList *list, | |
|
34699
09b2c9219b57
Renamed PurpleBlistNode to PurpleBListNode
Ankit Vani <a@nevitus.org>
parents:
34698
diff
changeset
|
66 | PurpleBListNode *node); /**< This will update a node in the buddy list. */ |
| 15884 | 67 | void (*remove)(PurpleBuddyList *list, |
|
34699
09b2c9219b57
Renamed PurpleBlistNode to PurpleBListNode
Ankit Vani <a@nevitus.org>
parents:
34698
diff
changeset
|
68 | PurpleBListNode *node); /**< This removes a node from the list */ |
|
26388
b692a63519cb
Exposing the GHashTable seems crazy to me. See #8644.
Paul Aurich <darkrain42@pidgin.im>
parents:
25889
diff
changeset
|
69 | void (*destroy)(PurpleBuddyList *list); /**< When the list is destroyed, this is called to destroy the UI. */ |
| 15884 | 70 | void (*set_visible)(PurpleBuddyList *list, |
| 12054 | 71 | gboolean show); /**< Hides or unhides the buddy list */ |
| 15884 | 72 | void (*request_add_buddy)(PurpleAccount *account, const char *username, |
| 12054 | 73 | const char *group, const char *alias); |
| 15884 | 74 | void (*request_add_chat)(PurpleAccount *account, PurpleGroup *group, |
| 12054 | 75 | const char *alias, const char *name); |
| 76 | 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
|
77 | |
|
27969
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
78 | /** |
|
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
79 | * This is called when a node has been modified and should be saved. |
|
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
80 | * |
|
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
81 | * Implementation of this UI op is OPTIONAL. If not implemented, it will |
|
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
82 | * be set to a fallback function that saves data to blist.xml like in |
|
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
83 | * previous libpurple versions. |
|
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
84 | * |
|
28423
c12dbb691b04
Fix a bunch of doxygen warnings.
Paul Aurich <darkrain42@pidgin.im>
parents:
27969
diff
changeset
|
85 | * @param node The node which has been modified. |
|
27969
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
86 | */ |
|
34699
09b2c9219b57
Renamed PurpleBlistNode to PurpleBListNode
Ankit Vani <a@nevitus.org>
parents:
34698
diff
changeset
|
87 | void (*save_node)(PurpleBListNode *node); |
|
27969
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
88 | |
|
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
89 | /** |
|
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
90 | * Called when a node is about to be removed from the buddy list. |
|
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
91 | * The UI op should update the relevant data structures to remove this |
|
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
92 | * node (for example, removing a buddy from the group this node is in). |
|
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
93 | * |
|
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
94 | * Implementation of this UI op is OPTIONAL. If not implemented, it will |
|
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
95 | * be set to a fallback function that saves data to blist.xml like in |
|
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
96 | * previous libpurple versions. |
|
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
97 | * |
|
28423
c12dbb691b04
Fix a bunch of doxygen warnings.
Paul Aurich <darkrain42@pidgin.im>
parents:
27969
diff
changeset
|
98 | * @param node The node which has been modified. |
|
27969
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
99 | */ |
|
34699
09b2c9219b57
Renamed PurpleBlistNode to PurpleBListNode
Ankit Vani <a@nevitus.org>
parents:
34698
diff
changeset
|
100 | void (*remove_node)(PurpleBListNode *node); |
|
27969
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
101 | |
|
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
102 | /** |
|
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
103 | * Called to save all the data for an account. If the UI sets this, |
|
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
104 | * the callback must save the privacy and buddy list data for an account. |
|
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
105 | * If the account is NULL, save the data for all accounts. |
|
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
106 | * |
|
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
107 | * Implementation of this UI op is OPTIONAL. If not implemented, it will |
|
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
108 | * be set to a fallback function that saves data to blist.xml like in |
|
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
109 | * previous libpurple versions. |
|
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
110 | * |
|
28423
c12dbb691b04
Fix a bunch of doxygen warnings.
Paul Aurich <darkrain42@pidgin.im>
parents:
27969
diff
changeset
|
111 | * @param account The account whose data to save. If NULL, save all data |
|
27969
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
112 | * for all accounts. |
|
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
113 | */ |
|
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
114 | void (*save_account)(PurpleAccount *account); |
|
ed5bf3c3e328
Add blist ui-ops to overload the saving of data to blist.xml. Closes #9630.
Jan Kaluza <hanzz.k@gmail.com>
parents:
27739
diff
changeset
|
115 | |
|
16743
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
116 | void (*_purple_reserved1)(void); |
| 12054 | 117 | }; |
| 118 | ||
|
32787
7072f190d6ad
Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32714
diff
changeset
|
119 | G_BEGIN_DECLS |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5906
diff
changeset
|
120 | |
| 5228 | 121 | /**************************************************************************/ |
| 122 | /** @name Buddy List API */ | |
| 123 | /**************************************************************************/ | |
| 124 | /*@{*/ | |
| 34720 | 125 | /* TODO move node methods to appropriate nodes */ |
| 5228 | 126 | /** |
|
34725
5acc823db81d
Added GBoxed wrapping to PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34722
diff
changeset
|
127 | * Returns the GType for the PurpleBuddyList boxed structure. |
|
5acc823db81d
Added GBoxed wrapping to PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34722
diff
changeset
|
128 | */ |
|
5acc823db81d
Added GBoxed wrapping to PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34722
diff
changeset
|
129 | GType purple_buddy_list_get_type(void); |
|
5acc823db81d
Added GBoxed wrapping to PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34722
diff
changeset
|
130 | |
|
5acc823db81d
Added GBoxed wrapping to PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34722
diff
changeset
|
131 | /** |
| 5228 | 132 | * Returns the main buddy list. |
| 133 | * | |
| 134 | * @return The main buddy list. | |
| 135 | */ | |
| 15884 | 136 | PurpleBuddyList *purple_get_blist(void); |
| 5228 | 137 | |
| 138 | /** | |
| 13485 | 139 | * Returns the root node of the main buddy list. |
| 140 | * | |
| 141 | * @return The root node. | |
| 142 | */ | |
|
34699
09b2c9219b57
Renamed PurpleBlistNode to PurpleBListNode
Ankit Vani <a@nevitus.org>
parents:
34698
diff
changeset
|
143 | PurpleBListNode *purple_blist_get_root(void); |
| 13485 | 144 | |
| 145 | /** | |
|
26994
2dbadd391e9c
Me fail English? That's unpossible!
Paul Aurich <darkrain42@pidgin.im>
parents:
26990
diff
changeset
|
146 | * Returns a list of every buddy in the list. Use of this function is |
|
2dbadd391e9c
Me fail English? That's unpossible!
Paul Aurich <darkrain42@pidgin.im>
parents:
26990
diff
changeset
|
147 | * discouraged if you do not actually need every buddy in the list. Use |
|
26990
385ad4d15ae5
Use more efficient purple_find_buddies in bonjour.
Paul Aurich <darkrain42@pidgin.im>
parents:
26831
diff
changeset
|
148 | * purple_find_buddies instead. |
|
26388
b692a63519cb
Exposing the GHashTable seems crazy to me. See #8644.
Paul Aurich <darkrain42@pidgin.im>
parents:
25889
diff
changeset
|
149 | * |
|
26767
7489049a3bde
Change purple_blist_get_buddies to return a list instead of the hash table.
Paul Aurich <darkrain42@pidgin.im>
parents:
26742
diff
changeset
|
150 | * @return A list of every buddy in the list. Caller is responsible for |
|
7489049a3bde
Change purple_blist_get_buddies to return a list instead of the hash table.
Paul Aurich <darkrain42@pidgin.im>
parents:
26742
diff
changeset
|
151 | * freeing the list. |
|
25885
5b5e2ca316b2
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents:
25119
diff
changeset
|
152 | * |
|
26990
385ad4d15ae5
Use more efficient purple_find_buddies in bonjour.
Paul Aurich <darkrain42@pidgin.im>
parents:
26831
diff
changeset
|
153 | * @see purple_find_buddies |
| 24953 | 154 | */ |
|
26767
7489049a3bde
Change purple_blist_get_buddies to return a list instead of the hash table.
Paul Aurich <darkrain42@pidgin.im>
parents:
26742
diff
changeset
|
155 | GSList *purple_blist_get_buddies(void); |
| 24953 | 156 | |
| 157 | /** | |
|
24968
2d500d10773f
Added purple_blist_get_ui_data, purple_blist_set_ui_data, purple_blist_node_get_ui_data, and purple_blist_node_set_ui_data functions.
Gary Kramlich <grim@reaperworld.com>
parents:
24957
diff
changeset
|
158 | * Returns the UI data for the list. |
|
2d500d10773f
Added purple_blist_get_ui_data, purple_blist_set_ui_data, purple_blist_node_get_ui_data, and purple_blist_node_set_ui_data functions.
Gary Kramlich <grim@reaperworld.com>
parents:
24957
diff
changeset
|
159 | * |
|
2d500d10773f
Added purple_blist_get_ui_data, purple_blist_set_ui_data, purple_blist_node_get_ui_data, and purple_blist_node_set_ui_data functions.
Gary Kramlich <grim@reaperworld.com>
parents:
24957
diff
changeset
|
160 | * @return The UI data for the list. |
|
2d500d10773f
Added purple_blist_get_ui_data, purple_blist_set_ui_data, purple_blist_node_get_ui_data, and purple_blist_node_set_ui_data functions.
Gary Kramlich <grim@reaperworld.com>
parents:
24957
diff
changeset
|
161 | */ |
|
26390
b0cde401fca4
More documentation (mostly little changes)
Paul Aurich <darkrain42@pidgin.im>
parents:
26388
diff
changeset
|
162 | gpointer purple_blist_get_ui_data(void); |
|
24968
2d500d10773f
Added purple_blist_get_ui_data, purple_blist_set_ui_data, purple_blist_node_get_ui_data, and purple_blist_node_set_ui_data functions.
Gary Kramlich <grim@reaperworld.com>
parents:
24957
diff
changeset
|
163 | |
|
2d500d10773f
Added purple_blist_get_ui_data, purple_blist_set_ui_data, purple_blist_node_get_ui_data, and purple_blist_node_set_ui_data functions.
Gary Kramlich <grim@reaperworld.com>
parents:
24957
diff
changeset
|
164 | /** |
|
2d500d10773f
Added purple_blist_get_ui_data, purple_blist_set_ui_data, purple_blist_node_get_ui_data, and purple_blist_node_set_ui_data functions.
Gary Kramlich <grim@reaperworld.com>
parents:
24957
diff
changeset
|
165 | * Sets the UI data for the list. |
|
2d500d10773f
Added purple_blist_get_ui_data, purple_blist_set_ui_data, purple_blist_node_get_ui_data, and purple_blist_node_set_ui_data functions.
Gary Kramlich <grim@reaperworld.com>
parents:
24957
diff
changeset
|
166 | * |
|
2d500d10773f
Added purple_blist_get_ui_data, purple_blist_set_ui_data, purple_blist_node_get_ui_data, and purple_blist_node_set_ui_data functions.
Gary Kramlich <grim@reaperworld.com>
parents:
24957
diff
changeset
|
167 | * @param ui_data The UI data for the list. |
|
2d500d10773f
Added purple_blist_get_ui_data, purple_blist_set_ui_data, purple_blist_node_get_ui_data, and purple_blist_node_set_ui_data functions.
Gary Kramlich <grim@reaperworld.com>
parents:
24957
diff
changeset
|
168 | */ |
|
26390
b0cde401fca4
More documentation (mostly little changes)
Paul Aurich <darkrain42@pidgin.im>
parents:
26388
diff
changeset
|
169 | void purple_blist_set_ui_data(gpointer ui_data); |
|
24968
2d500d10773f
Added purple_blist_get_ui_data, purple_blist_set_ui_data, purple_blist_node_get_ui_data, and purple_blist_node_set_ui_data functions.
Gary Kramlich <grim@reaperworld.com>
parents:
24957
diff
changeset
|
170 | |
|
2d500d10773f
Added purple_blist_get_ui_data, purple_blist_set_ui_data, purple_blist_node_get_ui_data, and purple_blist_node_set_ui_data functions.
Gary Kramlich <grim@reaperworld.com>
parents:
24957
diff
changeset
|
171 | /** |
| 5228 | 172 | * Shows the buddy list, creating a new one if necessary. |
| 173 | */ | |
| 15884 | 174 | void purple_blist_show(void); |
| 5228 | 175 | |
| 176 | /** | |
| 177 | * Hides or unhides the buddy list. | |
| 178 | * | |
| 179 | * @param show Whether or not to show the buddy list | |
| 180 | */ | |
| 15884 | 181 | void purple_blist_set_visible(gboolean show); |
| 5228 | 182 | |
| 183 | /** | |
| 184 | * Updates a buddy's status. | |
| 5234 | 185 | * |
|
26390
b0cde401fca4
More documentation (mostly little changes)
Paul Aurich <darkrain42@pidgin.im>
parents:
26388
diff
changeset
|
186 | * This should only be called from within Purple. |
|
b0cde401fca4
More documentation (mostly little changes)
Paul Aurich <darkrain42@pidgin.im>
parents:
26388
diff
changeset
|
187 | * |
|
10052
329dad7e2da3
[gaim-migrate @ 11013]
Dave West <kat@users.sourceforge.net>
parents:
10037
diff
changeset
|
188 | * @param buddy The buddy whose status has changed. |
|
329dad7e2da3
[gaim-migrate @ 11013]
Dave West <kat@users.sourceforge.net>
parents:
10037
diff
changeset
|
189 | * @param old_status The status from which we are changing. |
| 5228 | 190 | */ |
| 15884 | 191 | void purple_blist_update_buddy_status(PurpleBuddy *buddy, PurpleStatus *old_status); |
| 5228 | 192 | |
| 7950 | 193 | /** |
|
23282
ceef4b18f664
Add the purple_blist_update_node_icon function and deprecate the
Etan Reisner <deryni@pidgin.im>
parents:
23063
diff
changeset
|
194 | * 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
|
195 | * |
|
34699
09b2c9219b57
Renamed PurpleBlistNode to PurpleBListNode
Ankit Vani <a@nevitus.org>
parents:
34698
diff
changeset
|
196 | * @param node The PurpleBListNode whose custom 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
|
197 | */ |
|
34699
09b2c9219b57
Renamed PurpleBlistNode to PurpleBListNode
Ankit Vani <a@nevitus.org>
parents:
34698
diff
changeset
|
198 | void purple_blist_update_node_icon(PurpleBListNode *node); |
|
23282
ceef4b18f664
Add the purple_blist_update_node_icon function and deprecate the
Etan Reisner <deryni@pidgin.im>
parents:
23063
diff
changeset
|
199 | |
| 5228 | 200 | /** |
| 201 | * Renames a buddy in the buddy list. | |
| 202 | * | |
| 203 | * @param buddy The buddy whose name will be changed. | |
| 204 | * @param name The new name of the buddy. | |
| 205 | */ | |
| 15884 | 206 | void purple_blist_rename_buddy(PurpleBuddy *buddy, const char *name); |
| 5228 | 207 | |
|
12319
42a0e8cecea3
[gaim-migrate @ 14623]
Richard Laager <rlaager@pidgin.im>
parents:
12286
diff
changeset
|
208 | /** |
|
42a0e8cecea3
[gaim-migrate @ 14623]
Richard Laager <rlaager@pidgin.im>
parents:
12286
diff
changeset
|
209 | * Aliases a contact in the buddy list. |
|
42a0e8cecea3
[gaim-migrate @ 14623]
Richard Laager <rlaager@pidgin.im>
parents:
12286
diff
changeset
|
210 | * |
|
42a0e8cecea3
[gaim-migrate @ 14623]
Richard Laager <rlaager@pidgin.im>
parents:
12286
diff
changeset
|
211 | * @param contact The contact whose alias will be changed. |
|
42a0e8cecea3
[gaim-migrate @ 14623]
Richard Laager <rlaager@pidgin.im>
parents:
12286
diff
changeset
|
212 | * @param alias The contact's alias. |
|
42a0e8cecea3
[gaim-migrate @ 14623]
Richard Laager <rlaager@pidgin.im>
parents:
12286
diff
changeset
|
213 | */ |
| 15884 | 214 | void purple_blist_alias_contact(PurpleContact *contact, const char *alias); |
| 5228 | 215 | |
| 216 | /** | |
| 217 | * Aliases a buddy in the buddy list. | |
| 218 | * | |
| 219 | * @param buddy The buddy whose alias will be changed. | |
| 220 | * @param alias The buddy's alias. | |
| 221 | */ | |
| 15884 | 222 | void purple_blist_alias_buddy(PurpleBuddy *buddy, const char *alias); |
| 5228 | 223 | |
| 5234 | 224 | /** |
|
6059
9934c862ca14
[gaim-migrate @ 6509]
John Silvestri <john.silvestri@gmail.com>
parents:
6058
diff
changeset
|
225 | * 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
|
226 | * PRPLs should call serv_got_alias() instead of this. |
|
6058
0d5c66a5da5d
[gaim-migrate @ 6508]
Mark Doliner <markdoliner@pidgin.im>
parents:
6036
diff
changeset
|
227 | * |
|
0d5c66a5da5d
[gaim-migrate @ 6508]
Mark Doliner <markdoliner@pidgin.im>
parents:
6036
diff
changeset
|
228 | * @param buddy The buddy whose alias will be changed. |
|
0d5c66a5da5d
[gaim-migrate @ 6508]
Mark Doliner <markdoliner@pidgin.im>
parents:
6036
diff
changeset
|
229 | * @param alias The buddy's "official" alias. |
|
0d5c66a5da5d
[gaim-migrate @ 6508]
Mark Doliner <markdoliner@pidgin.im>
parents:
6036
diff
changeset
|
230 | */ |
| 15884 | 231 | 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
|
232 | |
|
0d5c66a5da5d
[gaim-migrate @ 6508]
Mark Doliner <markdoliner@pidgin.im>
parents:
6036
diff
changeset
|
233 | /** |
| 5234 | 234 | * Aliases a chat in the buddy list. |
| 235 | * | |
| 236 | * @param chat The chat whose alias will be changed. | |
| 237 | * @param alias The chat's new alias. | |
| 238 | */ | |
| 15884 | 239 | void purple_blist_alias_chat(PurpleChat *chat, const char *alias); |
| 5228 | 240 | |
| 241 | /** | |
| 242 | * Renames a group | |
| 243 | * | |
| 244 | * @param group The group to rename | |
| 245 | * @param name The new name | |
| 246 | */ | |
| 15884 | 247 | void purple_blist_rename_group(PurpleGroup *group, const char *name); |
| 5228 | 248 | |
| 5234 | 249 | /** |
| 250 | * Adds a new chat to the buddy list. | |
| 251 | * | |
| 252 | * The chat will be inserted right after node or appended to the end | |
| 253 | * of group if node is NULL. If both are NULL, the buddy will be added to | |
| 254 | * the "Chats" group. | |
| 255 | * | |
| 256 | * @param chat The new chat who gets added | |
| 257 | * @param group The group to add the new chat to. | |
| 258 | * @param node The insertion point | |
| 259 | */ | |
|
34699
09b2c9219b57
Renamed PurpleBlistNode to PurpleBListNode
Ankit Vani <a@nevitus.org>
parents:
34698
diff
changeset
|
260 | void purple_blist_add_chat(PurpleChat *chat, PurpleGroup *group, PurpleBListNode *node); |
| 5228 | 261 | |
| 262 | /** | |
| 263 | * Adds a new buddy to the buddy list. | |
| 264 | * | |
| 6695 | 265 | * The buddy will be inserted right after node or prepended to the |
| 266 | * group if node is NULL. If both are NULL, the buddy will be added to | |
| 5228 | 267 | * the "Buddies" group. |
| 268 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6695
diff
changeset
|
269 | * @param buddy The new buddy who gets added |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6695
diff
changeset
|
270 | * @param contact The optional contact to place the buddy in. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6695
diff
changeset
|
271 | * @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
|
272 | * @param node The insertion point. Pass in NULL to add the node as |
|
26471
f02860c88d01
Uh, I think this comment is wrong. Or the code is wrong and does silly
Mark Doliner <markdoliner@pidgin.im>
parents:
25889
diff
changeset
|
273 | * the first child in the given group. |
| 5228 | 274 | */ |
|
34699
09b2c9219b57
Renamed PurpleBlistNode to PurpleBListNode
Ankit Vani <a@nevitus.org>
parents:
34698
diff
changeset
|
275 | void purple_blist_add_buddy(PurpleBuddy *buddy, PurpleContact *contact, PurpleGroup *group, PurpleBListNode *node); |
| 5228 | 276 | |
| 277 | /** | |
| 278 | * Adds a new group to the buddy list. | |
| 279 | * | |
| 6695 | 280 | * The new group will be inserted after insert or prepended to the list if |
| 281 | * node is NULL. | |
| 282 | * | |
| 283 | * @param group The group | |
| 284 | * @param node The insertion point | |
| 285 | */ | |
|
34699
09b2c9219b57
Renamed PurpleBlistNode to PurpleBListNode
Ankit Vani <a@nevitus.org>
parents:
34698
diff
changeset
|
286 | void purple_blist_add_group(PurpleGroup *group, PurpleBListNode *node); |
| 6695 | 287 | |
| 288 | /** | |
| 289 | * Adds a new contact to the buddy list. | |
| 290 | * | |
| 291 | * The new contact will be inserted after insert or prepended to the list if | |
| 292 | * node is NULL. | |
| 293 | * | |
| 294 | * @param contact The contact | |
| 295 | * @param group The group to add the contact to | |
| 296 | * @param node The insertion point | |
| 297 | */ | |
|
34699
09b2c9219b57
Renamed PurpleBlistNode to PurpleBListNode
Ankit Vani <a@nevitus.org>
parents:
34698
diff
changeset
|
298 | void purple_blist_add_contact(PurpleContact *contact, PurpleGroup *group, PurpleBListNode *node); |
| 6695 | 299 | |
| 300 | /** | |
| 6965 | 301 | * Merges two contacts |
| 302 | * | |
| 303 | * All of the buddies from source will be moved to target | |
| 304 | * | |
| 305 | * @param source The contact to merge | |
| 7246 | 306 | * @param node The place to merge to (a buddy or contact) |
| 6965 | 307 | */ |
|
34699
09b2c9219b57
Renamed PurpleBlistNode to PurpleBListNode
Ankit Vani <a@nevitus.org>
parents:
34698
diff
changeset
|
308 | void purple_blist_merge_contact(PurpleContact *source, PurpleBListNode *node); |
| 6965 | 309 | |
| 310 | /** | |
| 5228 | 311 | * Removes a buddy from the buddy list and frees the memory allocated to it. |
|
26390
b0cde401fca4
More documentation (mostly little changes)
Paul Aurich <darkrain42@pidgin.im>
parents:
26388
diff
changeset
|
312 | * This doesn't actually try to remove the buddy from the server list. |
| 5228 | 313 | * |
| 314 | * @param buddy The buddy to be removed | |
|
26390
b0cde401fca4
More documentation (mostly little changes)
Paul Aurich <darkrain42@pidgin.im>
parents:
26388
diff
changeset
|
315 | * |
|
b0cde401fca4
More documentation (mostly little changes)
Paul Aurich <darkrain42@pidgin.im>
parents:
26388
diff
changeset
|
316 | * @see purple_account_remove_buddy |
| 5228 | 317 | */ |
| 15884 | 318 | void purple_blist_remove_buddy(PurpleBuddy *buddy); |
| 6695 | 319 | |
| 320 | /** | |
| 321 | * Removes a contact, and any buddies it contains, and frees the memory | |
|
26390
b0cde401fca4
More documentation (mostly little changes)
Paul Aurich <darkrain42@pidgin.im>
parents:
26388
diff
changeset
|
322 | * allocated to it. This calls purple_blist_remove_buddy and therefore |
|
b0cde401fca4
More documentation (mostly little changes)
Paul Aurich <darkrain42@pidgin.im>
parents:
26388
diff
changeset
|
323 | * doesn't remove the buddies from the server list. |
| 6695 | 324 | * |
| 325 | * @param contact The contact to be removed | |
|
26390
b0cde401fca4
More documentation (mostly little changes)
Paul Aurich <darkrain42@pidgin.im>
parents:
26388
diff
changeset
|
326 | * |
|
b0cde401fca4
More documentation (mostly little changes)
Paul Aurich <darkrain42@pidgin.im>
parents:
26388
diff
changeset
|
327 | * @see purple_blist_remove_buddy |
| 6695 | 328 | */ |
| 15884 | 329 | void purple_blist_remove_contact(PurpleContact *contact); |
| 5228 | 330 | |
| 331 | /** | |
| 5234 | 332 | * Removes a chat from the buddy list and frees the memory allocated to it. |
| 333 | * | |
| 334 | * @param chat The chat to be removed | |
| 335 | */ | |
| 15884 | 336 | void purple_blist_remove_chat(PurpleChat *chat); |
| 5234 | 337 | |
| 338 | /** | |
| 5228 | 339 | * Removes a group from the buddy list and frees the memory allocated to it and to |
| 340 | * its children | |
| 341 | * | |
| 342 | * @param group The group to be removed | |
| 343 | */ | |
| 15884 | 344 | void purple_blist_remove_group(PurpleGroup *group); |
| 5228 | 345 | |
| 346 | ||
| 6744 | 347 | |
| 348 | /** | |
|
25889
26d9ca30335c
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <markdoliner@pidgin.im>
parents:
25888
diff
changeset
|
349 | * Finds the buddy struct given a name and an account |
| 5228 | 350 | * |
|
10071
d2ba11541693
[gaim-migrate @ 11047]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
10052
diff
changeset
|
351 | * @param account The account this buddy belongs to |
|
25889
26d9ca30335c
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <markdoliner@pidgin.im>
parents:
25888
diff
changeset
|
352 | * @param name The buddy's name |
| 5228 | 353 | * @return The buddy or NULL if the buddy does not exist |
| 354 | */ | |
| 15884 | 355 | PurpleBuddy *purple_find_buddy(PurpleAccount *account, const char *name); |
| 6245 | 356 | |
| 357 | /** | |
|
25889
26d9ca30335c
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <markdoliner@pidgin.im>
parents:
25888
diff
changeset
|
358 | * Finds the buddy struct given a name, an account, and a group |
| 6872 | 359 | * |
|
10071
d2ba11541693
[gaim-migrate @ 11047]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
10052
diff
changeset
|
360 | * @param account The account this buddy belongs to |
|
25889
26d9ca30335c
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <markdoliner@pidgin.im>
parents:
25888
diff
changeset
|
361 | * @param name The buddy's name |
| 6872 | 362 | * @param group The group to look in |
| 363 | * @return The buddy or NULL if the buddy does not exist in the group | |
| 364 | */ | |
| 15884 | 365 | PurpleBuddy *purple_find_buddy_in_group(PurpleAccount *account, const char *name, |
| 366 | PurpleGroup *group); | |
| 6872 | 367 | |
| 368 | /** | |
|
25889
26d9ca30335c
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <markdoliner@pidgin.im>
parents:
25888
diff
changeset
|
369 | * Finds all PurpleBuddy structs given a name and an account |
| 6245 | 370 | * |
|
10071
d2ba11541693
[gaim-migrate @ 11047]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
10052
diff
changeset
|
371 | * @param account The account this buddy belongs to |
|
26390
b0cde401fca4
More documentation (mostly little changes)
Paul Aurich <darkrain42@pidgin.im>
parents:
26388
diff
changeset
|
372 | * @param name The buddy's name (or NULL to return all buddies for the account) |
| 6245 | 373 | * |
|
33888
5338b7ae4f73
Be more clear in the doc about what should be freed.
Mark Doliner <mark@kingant.net>
parents:
33643
diff
changeset
|
374 | * @return NULL if the buddy doesn't exist, or a GSList of |
|
5338b7ae4f73
Be more clear in the doc about what should be freed.
Mark Doliner <mark@kingant.net>
parents:
33643
diff
changeset
|
375 | * PurpleBuddy structs. You must free the GSList using |
|
5338b7ae4f73
Be more clear in the doc about what should be freed.
Mark Doliner <mark@kingant.net>
parents:
33643
diff
changeset
|
376 | * g_slist_free. Do not free the PurpleBuddy structs that |
|
5338b7ae4f73
Be more clear in the doc about what should be freed.
Mark Doliner <mark@kingant.net>
parents:
33643
diff
changeset
|
377 | * the list points to. |
| 6245 | 378 | */ |
| 15884 | 379 | GSList *purple_find_buddies(PurpleAccount *account, const char *name); |
| 6245 | 380 | |
| 5228 | 381 | /** |
| 382 | * Finds a group by name | |
| 383 | * | |
|
18414
b08108fc6ffc
Add a missing apostrophe in a comment.
Will Thompson <resiak@pidgin.im>
parents:
18412
diff
changeset
|
384 | * @param name The group's name |
| 5228 | 385 | * @return The group or NULL if the group does not exist |
| 386 | */ | |
| 15884 | 387 | PurpleGroup *purple_find_group(const char *name); |
| 6695 | 388 | |
| 389 | /** | |
|
6456
e4e7dee16c1a
[gaim-migrate @ 6965]
Christian Hammond <chipx86@chipx86.com>
parents:
6245
diff
changeset
|
390 | * Finds a chat by name. |
|
e4e7dee16c1a
[gaim-migrate @ 6965]
Christian Hammond <chipx86@chipx86.com>
parents:
6245
diff
changeset
|
391 | * |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6695
diff
changeset
|
392 | * @param account The chat's account. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6695
diff
changeset
|
393 | * @param name The chat's name. |
|
6456
e4e7dee16c1a
[gaim-migrate @ 6965]
Christian Hammond <chipx86@chipx86.com>
parents:
6245
diff
changeset
|
394 | * |
|
e4e7dee16c1a
[gaim-migrate @ 6965]
Christian Hammond <chipx86@chipx86.com>
parents:
6245
diff
changeset
|
395 | * @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
|
396 | */ |
| 15884 | 397 | PurpleChat *purple_blist_find_chat(PurpleAccount *account, const char *name); |
|
6456
e4e7dee16c1a
[gaim-migrate @ 6965]
Christian Hammond <chipx86@chipx86.com>
parents:
6245
diff
changeset
|
398 | |
|
e4e7dee16c1a
[gaim-migrate @ 6965]
Christian Hammond <chipx86@chipx86.com>
parents:
6245
diff
changeset
|
399 | /** |
|
26390
b0cde401fca4
More documentation (mostly little changes)
Paul Aurich <darkrain42@pidgin.im>
parents:
26388
diff
changeset
|
400 | * Called when an account connects. Tells the UI to update all the |
| 5234 | 401 | * buddies. |
| 402 | * | |
| 403 | * @param account The account | |
| 404 | */ | |
| 15884 | 405 | void purple_blist_add_account(PurpleAccount *account); |
| 5234 | 406 | |
| 407 | /** | |
|
26390
b0cde401fca4
More documentation (mostly little changes)
Paul Aurich <darkrain42@pidgin.im>
parents:
26388
diff
changeset
|
408 | * Called when an account disconnects. Sets the presence of all the buddies to 0 |
| 5228 | 409 | * and tells the UI to update them. |
| 410 | * | |
| 6695 | 411 | * @param account The account |
| 5228 | 412 | */ |
| 15884 | 413 | void purple_blist_remove_account(PurpleAccount *account); |
| 5228 | 414 | |
| 415 | /*@}*/ | |
| 416 | ||
| 417 | /****************************************************************************************/ | |
| 418 | /** @name Buddy list file management API */ | |
| 419 | /****************************************************************************************/ | |
| 420 | ||
| 421 | /** | |
|
10704
99a466f384d2
[gaim-migrate @ 12288]
Mark Doliner <markdoliner@pidgin.im>
parents:
10662
diff
changeset
|
422 | * 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
|
423 | * 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
|
424 | * 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
|
425 | * 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
|
426 | * call this. |
|
10350
a72a43212626
[gaim-migrate @ 11565]
Mark Doliner <markdoliner@pidgin.im>
parents:
10349
diff
changeset
|
427 | */ |
| 15884 | 428 | void purple_blist_schedule_save(void); |
|
10350
a72a43212626
[gaim-migrate @ 11565]
Mark Doliner <markdoliner@pidgin.im>
parents:
10349
diff
changeset
|
429 | |
|
a72a43212626
[gaim-migrate @ 11565]
Mark Doliner <markdoliner@pidgin.im>
parents:
10349
diff
changeset
|
430 | /** |
|
7060
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
431 | * 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
|
432 | * buddy list. |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
433 | * |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
434 | * @param account The account the buddy is added to. |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
435 | * @param username The username of the buddy. |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
436 | * @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
|
437 | * @param alias The optional alias for the buddy. |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
438 | */ |
| 15884 | 439 | 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
|
440 | const char *group, const char *alias); |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
441 | |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
442 | /** |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
443 | * 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
|
444 | * buddy list. |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
445 | * |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
446 | * @param account The account the buddy is added to. |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
447 | * @param group The optional group to add the chat to. |
| 9000 | 448 | * @param alias The optional alias for the chat. |
| 9939 | 449 | * @param name The required chat name. |
|
7060
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
450 | */ |
| 15884 | 451 | void purple_blist_request_add_chat(PurpleAccount *account, PurpleGroup *group, |
|
9754
3a17eee239b2
[gaim-migrate @ 10621]
Nathan Fredrickson <nathan@silverorange.com>
parents:
9713
diff
changeset
|
452 | const char *alias, const char *name); |
|
7060
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
453 | |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
454 | /** |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
455 | * 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
|
456 | * buddy list. |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
457 | */ |
| 15884 | 458 | void purple_blist_request_add_group(void); |
|
7060
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
459 | |
| 5228 | 460 | /**************************************************************************/ |
| 12054 | 461 | /** @name UI Registration Functions */ |
| 462 | /**************************************************************************/ | |
| 463 | /*@{*/ | |
| 464 | ||
| 465 | /** | |
| 466 | * Sets the UI operations structure to be used for the buddy list. | |
| 467 | * | |
| 468 | * @param ops The ops struct. | |
| 469 | */ | |
|
34709
3484aac07f02
Replaced PurpleBlistUiOps with PurpleBListUiOps for uniform naming
Ankit Vani <a@nevitus.org>
parents:
34707
diff
changeset
|
470 | void purple_blist_set_ui_ops(PurpleBListUiOps *ops); |
| 12054 | 471 | |
| 472 | /** | |
| 473 | * Returns the UI operations structure to be used for the buddy list. | |
| 474 | * | |
| 475 | * @return The UI operations structure. | |
| 476 | */ | |
|
34709
3484aac07f02
Replaced PurpleBlistUiOps with PurpleBListUiOps for uniform naming
Ankit Vani <a@nevitus.org>
parents:
34707
diff
changeset
|
477 | PurpleBListUiOps *purple_blist_get_ui_ops(void); |
| 12054 | 478 | |
| 479 | /*@}*/ | |
| 480 | ||
| 481 | /**************************************************************************/ | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
482 | /** @name Buddy List Subsystem */ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
483 | /**************************************************************************/ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
484 | /*@{*/ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
485 | |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
486 | /** |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
487 | * Returns the handle for the buddy list subsystem. |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
488 | * |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
489 | * @return The buddy list subsystem handle. |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
490 | */ |
| 15884 | 491 | void *purple_blist_get_handle(void); |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
492 | |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
493 | /** |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
494 | * Initializes the buddy list subsystem. |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
495 | */ |
| 15884 | 496 | void purple_blist_init(void); |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
497 | |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
498 | /** |
|
33643
6f7deddb8850
Move blist loading into purple_core_init.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32827
diff
changeset
|
499 | * Loads the buddy list. |
|
6f7deddb8850
Move blist loading into purple_core_init.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32827
diff
changeset
|
500 | * |
|
6f7deddb8850
Move blist loading into purple_core_init.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32827
diff
changeset
|
501 | * You shouldn't call this. purple_core_init() will do it for you. |
|
6f7deddb8850
Move blist loading into purple_core_init.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32827
diff
changeset
|
502 | */ |
|
6f7deddb8850
Move blist loading into purple_core_init.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32827
diff
changeset
|
503 | void purple_blist_boot(void); |
|
6f7deddb8850
Move blist loading into purple_core_init.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32827
diff
changeset
|
504 | |
|
6f7deddb8850
Move blist loading into purple_core_init.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32827
diff
changeset
|
505 | /** |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
506 | * Uninitializes the buddy list subsystem. |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
507 | */ |
| 15884 | 508 | void purple_blist_uninit(void); |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
509 | |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
510 | /*@}*/ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
511 | |
|
32787
7072f190d6ad
Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32714
diff
changeset
|
512 | G_END_DECLS |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5906
diff
changeset
|
513 | |
|
34710
6182323fbb0c
Renamed gg's buddylist.[ch] to blist.[ch]
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
514 | #endif /* _PURPLE_BUDDY_LIST_H_ */ |