Fri, 31 Jan 2014 18:23:41 +0530
Merged gtkdoc-conversion branch
| 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 | |
|
34789
9b185d915f57
Started GObjectification of PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34788
diff
changeset
|
34 | #define PURPLE_TYPE_BUDDY_LIST (purple_buddy_list_get_type()) |
|
9b185d915f57
Started GObjectification of PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34788
diff
changeset
|
35 | #define PURPLE_BUDDY_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_BUDDY_LIST, PurpleBuddyList)) |
|
9b185d915f57
Started GObjectification of PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34788
diff
changeset
|
36 | #define PURPLE_BUDDY_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_BUDDY_LIST, PurpleBuddyListClass)) |
|
9b185d915f57
Started GObjectification of PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34788
diff
changeset
|
37 | #define PURPLE_IS_BUDDY_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_BUDDY_LIST)) |
|
9b185d915f57
Started GObjectification of PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34788
diff
changeset
|
38 | #define PURPLE_IS_BUDDY_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_BUDDY_LIST)) |
|
9b185d915f57
Started GObjectification of PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34788
diff
changeset
|
39 | #define PURPLE_BUDDY_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_BUDDY_LIST, PurpleBuddyListClass)) |
|
34725
5acc823db81d
Added GBoxed wrapping to PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34722
diff
changeset
|
40 | |
|
34690
bac0fdf2cf1b
Begun GObjectification of buddy list. Hid private data and added class structs.
Ankit Vani <a@nevitus.org>
parents:
33888
diff
changeset
|
41 | /** @copydoc _PurpleBuddyList */ |
|
34789
9b185d915f57
Started GObjectification of PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34788
diff
changeset
|
42 | typedef struct _PurpleBuddyList PurpleBuddyList; |
|
9b185d915f57
Started GObjectification of PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34788
diff
changeset
|
43 | /** @copydoc _PurpleBuddyList */ |
|
9b185d915f57
Started GObjectification of PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34788
diff
changeset
|
44 | typedef struct _PurpleBuddyListClass PurpleBuddyListClass; |
|
9b185d915f57
Started GObjectification of PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34788
diff
changeset
|
45 | |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34789
diff
changeset
|
46 | /** @copydoc _PurpleBlistUiOps */ |
|
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34789
diff
changeset
|
47 | 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
|
48 | |
| 5228 | 49 | /**************************************************************************/ |
| 50 | /* Data Structures */ | |
| 51 | /**************************************************************************/ | |
|
34725
5acc823db81d
Added GBoxed wrapping to PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34722
diff
changeset
|
52 | /** |
| 5228 | 53 | * The Buddy List |
| 54 | */ | |
| 15884 | 55 | struct _PurpleBuddyList { |
|
34789
9b185d915f57
Started GObjectification of PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34788
diff
changeset
|
56 | GObject gparent; |
|
9b185d915f57
Started GObjectification of PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34788
diff
changeset
|
57 | |
|
35024
eb3afb7643ce
Added /*< private >*/ for padding members, clean them up and add missing ones
Ankit Vani <a@nevitus.org>
parents:
34864
diff
changeset
|
58 | /** The first node in the buddy list */ |
|
eb3afb7643ce
Added /*< private >*/ for padding members, clean them up and add missing ones
Ankit Vani <a@nevitus.org>
parents:
34864
diff
changeset
|
59 | PurpleBlistNode *root; |
|
eb3afb7643ce
Added /*< private >*/ for padding members, clean them up and add missing ones
Ankit Vani <a@nevitus.org>
parents:
34864
diff
changeset
|
60 | |
|
34789
9b185d915f57
Started GObjectification of PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34788
diff
changeset
|
61 | /** The UI data associated with this buddy list. This is a convenience |
|
9b185d915f57
Started GObjectification of PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34788
diff
changeset
|
62 | * field provided to the UIs -- it is not used by the libpurple core. |
|
9b185d915f57
Started GObjectification of PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34788
diff
changeset
|
63 | */ |
|
9b185d915f57
Started GObjectification of PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34788
diff
changeset
|
64 | gpointer ui_data; |
|
9b185d915f57
Started GObjectification of PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34788
diff
changeset
|
65 | }; |
|
9b185d915f57
Started GObjectification of PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34788
diff
changeset
|
66 | |
|
9b185d915f57
Started GObjectification of PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34788
diff
changeset
|
67 | /** The base class for all #PurpleBuddyList's. */ |
|
9b185d915f57
Started GObjectification of PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34788
diff
changeset
|
68 | struct _PurpleBuddyListClass { |
|
9b185d915f57
Started GObjectification of PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34788
diff
changeset
|
69 | GObjectClass gparent_class; |
|
9b185d915f57
Started GObjectification of PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34788
diff
changeset
|
70 | |
|
35024
eb3afb7643ce
Added /*< private >*/ for padding members, clean them up and add missing ones
Ankit Vani <a@nevitus.org>
parents:
34864
diff
changeset
|
71 | /*< private >*/ |
|
34789
9b185d915f57
Started GObjectification of PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34788
diff
changeset
|
72 | void (*_purple_reserved1)(void); |
|
9b185d915f57
Started GObjectification of PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34788
diff
changeset
|
73 | void (*_purple_reserved2)(void); |
|
9b185d915f57
Started GObjectification of PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34788
diff
changeset
|
74 | void (*_purple_reserved3)(void); |
|
9b185d915f57
Started GObjectification of PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34788
diff
changeset
|
75 | void (*_purple_reserved4)(void); |
|
34690
bac0fdf2cf1b
Begun GObjectification of buddy list. Hid private data and added class structs.
Ankit Vani <a@nevitus.org>
parents:
33888
diff
changeset
|
76 | }; |
|
bac0fdf2cf1b
Begun GObjectification of buddy list. Hid private data and added class structs.
Ankit Vani <a@nevitus.org>
parents:
33888
diff
changeset
|
77 | |
| 12054 | 78 | /** |
| 79 | * Buddy list UI operations. | |
| 80 | * | |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34789
diff
changeset
|
81 | * Any UI representing a buddy list must assign a filled-out PurpleBlistUiOps |
| 12054 | 82 | * structure to the buddy list core. |
| 83 | */ | |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34789
diff
changeset
|
84 | struct _PurpleBlistUiOps |
| 12054 | 85 | { |
| 15884 | 86 | void (*new_list)(PurpleBuddyList *list); /**< Sets UI-specific data on a buddy list. */ |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34789
diff
changeset
|
87 | void (*new_node)(PurpleBlistNode *node); /**< Sets UI-specific data on a node. */ |
| 15884 | 88 | void (*show)(PurpleBuddyList *list); /**< The core will call this when it's finished doing its core stuff */ |
| 89 | void (*update)(PurpleBuddyList *list, | |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34789
diff
changeset
|
90 | PurpleBlistNode *node); /**< This will update a node in the buddy list. */ |
| 15884 | 91 | void (*remove)(PurpleBuddyList *list, |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34789
diff
changeset
|
92 | 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
|
93 | void (*destroy)(PurpleBuddyList *list); /**< When the list is destroyed, this is called to destroy the UI. */ |
| 15884 | 94 | void (*set_visible)(PurpleBuddyList *list, |
| 12054 | 95 | gboolean show); /**< Hides or unhides the buddy list */ |
| 15884 | 96 | void (*request_add_buddy)(PurpleAccount *account, const char *username, |
| 12054 | 97 | const char *group, const char *alias); |
| 15884 | 98 | void (*request_add_chat)(PurpleAccount *account, PurpleGroup *group, |
| 12054 | 99 | const char *alias, const char *name); |
| 100 | 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
|
101 | |
|
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
|
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 | * 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
|
104 | * |
|
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 | * 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
|
106 | * 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
|
107 | * 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
|
108 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
109 | * @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
|
110 | */ |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34789
diff
changeset
|
111 | 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
|
112 | |
|
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 | * 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
|
115 | * 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
|
116 | * 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
|
117 | * |
|
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
|
118 | * 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
|
119 | * 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
|
120 | * 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
|
121 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
122 | * @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
|
123 | */ |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34789
diff
changeset
|
124 | 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
|
125 | |
|
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
|
126 | /** |
|
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
|
127 | * 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
|
128 | * 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
|
129 | * 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
|
130 | * |
|
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
|
131 | * 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
|
132 | * 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
|
133 | * 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
|
134 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
135 | * @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
|
136 | * 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
|
137 | */ |
|
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
|
138 | 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
|
139 | |
|
35024
eb3afb7643ce
Added /*< private >*/ for padding members, clean them up and add missing ones
Ankit Vani <a@nevitus.org>
parents:
34864
diff
changeset
|
140 | /*< private >*/ |
|
16743
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
141 | void (*_purple_reserved1)(void); |
|
35024
eb3afb7643ce
Added /*< private >*/ for padding members, clean them up and add missing ones
Ankit Vani <a@nevitus.org>
parents:
34864
diff
changeset
|
142 | void (*_purple_reserved2)(void); |
|
eb3afb7643ce
Added /*< private >*/ for padding members, clean them up and add missing ones
Ankit Vani <a@nevitus.org>
parents:
34864
diff
changeset
|
143 | void (*_purple_reserved3)(void); |
|
eb3afb7643ce
Added /*< private >*/ for padding members, clean them up and add missing ones
Ankit Vani <a@nevitus.org>
parents:
34864
diff
changeset
|
144 | void (*_purple_reserved4)(void); |
| 12054 | 145 | }; |
| 146 | ||
|
32787
7072f190d6ad
Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32714
diff
changeset
|
147 | G_BEGIN_DECLS |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5906
diff
changeset
|
148 | |
| 5228 | 149 | /**************************************************************************/ |
| 150 | /** @name Buddy List API */ | |
| 151 | /**************************************************************************/ | |
| 152 | /*@{*/ | |
| 34733 | 153 | |
| 5228 | 154 | /** |
|
34789
9b185d915f57
Started GObjectification of PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34788
diff
changeset
|
155 | * Returns the GType for the PurpleBuddyList object. |
|
34725
5acc823db81d
Added GBoxed wrapping to PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34722
diff
changeset
|
156 | */ |
|
5acc823db81d
Added GBoxed wrapping to PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34722
diff
changeset
|
157 | GType purple_buddy_list_get_type(void); |
|
5acc823db81d
Added GBoxed wrapping to PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34722
diff
changeset
|
158 | |
|
5acc823db81d
Added GBoxed wrapping to PurpleBuddyList
Ankit Vani <a@nevitus.org>
parents:
34722
diff
changeset
|
159 | /** |
| 5228 | 160 | * Returns the main buddy list. |
| 161 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
162 | * Returns: The main buddy list. |
| 5228 | 163 | */ |
|
34726
af52ff6660c0
Replaced purple_get_blist() with purple_blist_get_buddy_list()
Ankit Vani <a@nevitus.org>
parents:
34725
diff
changeset
|
164 | PurpleBuddyList *purple_blist_get_buddy_list(void); |
| 5228 | 165 | |
| 166 | /** | |
| 13485 | 167 | * Returns the root node of the main buddy list. |
| 168 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
169 | * Returns: The root node. |
| 13485 | 170 | */ |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34789
diff
changeset
|
171 | PurpleBlistNode *purple_blist_get_root(void); |
| 13485 | 172 | |
| 173 | /** | |
|
26994
2dbadd391e9c
Me fail English? That's unpossible!
Paul Aurich <darkrain42@pidgin.im>
parents:
26990
diff
changeset
|
174 | * 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
|
175 | * discouraged if you do not actually need every buddy in the list. Use |
|
34728
8efd73063ecf
Renamed buddy list functions to more appropriate/simler names.
Ankit Vani <a@nevitus.org>
parents:
34727
diff
changeset
|
176 | * purple_blist_find_buddies instead. |
|
26388
b692a63519cb
Exposing the GHashTable seems crazy to me. See #8644.
Paul Aurich <darkrain42@pidgin.im>
parents:
25889
diff
changeset
|
177 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
178 | * Returns: A list of every buddy in the list. Caller is responsible for |
|
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
|
179 | * 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
|
180 | * |
|
34728
8efd73063ecf
Renamed buddy list functions to more appropriate/simler names.
Ankit Vani <a@nevitus.org>
parents:
34727
diff
changeset
|
181 | * @see purple_blist_find_buddies |
| 24953 | 182 | */ |
|
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
|
183 | GSList *purple_blist_get_buddies(void); |
| 24953 | 184 | |
| 185 | /** | |
|
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
|
186 | * 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
|
187 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
188 | * Returns: The UI data for the list. |
|
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
|
189 | */ |
|
26390
b0cde401fca4
More documentation (mostly little changes)
Paul Aurich <darkrain42@pidgin.im>
parents:
26388
diff
changeset
|
190 | 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
|
191 | |
|
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
|
192 | /** |
|
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
|
193 | * 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
|
194 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
195 | * @ui_data: The UI data for the list. |
|
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
|
196 | */ |
|
26390
b0cde401fca4
More documentation (mostly little changes)
Paul Aurich <darkrain42@pidgin.im>
parents:
26388
diff
changeset
|
197 | 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
|
198 | |
|
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
|
199 | /** |
| 5228 | 200 | * Shows the buddy list, creating a new one if necessary. |
| 201 | */ | |
| 15884 | 202 | void purple_blist_show(void); |
| 5228 | 203 | |
| 204 | /** | |
| 205 | * Hides or unhides the buddy list. | |
| 206 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
207 | * @show: Whether or not to show the buddy list |
| 5228 | 208 | */ |
| 15884 | 209 | void purple_blist_set_visible(gboolean show); |
| 5228 | 210 | |
| 211 | /** | |
|
34727
579e9a8dbd5f
Moved methods from buddylist.[ch] to the appropriate object files
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
212 | * Updates the buddies hash table when a buddy has been renamed. This only |
|
579e9a8dbd5f
Moved methods from buddylist.[ch] to the appropriate object files
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
213 | * updates the cache, the caller is responsible for the actual renaming of |
|
579e9a8dbd5f
Moved methods from buddylist.[ch] to the appropriate object files
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
214 | * the buddy after updating the cache. |
| 5228 | 215 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
216 | * @buddy: The buddy whose name will be changed. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
217 | * @name: The new name of the buddy. |
| 5228 | 218 | */ |
|
34729
7f5a2fc8ef9c
Refactored blistnodetypes and BuddyList.xs according to API changes
Ankit Vani <a@nevitus.org>
parents:
34728
diff
changeset
|
219 | void purple_blist_update_buddies_cache(PurpleBuddy *buddy, const char *new_name); |
|
7f5a2fc8ef9c
Refactored blistnodetypes and BuddyList.xs according to API changes
Ankit Vani <a@nevitus.org>
parents:
34728
diff
changeset
|
220 | |
|
7f5a2fc8ef9c
Refactored blistnodetypes and BuddyList.xs according to API changes
Ankit Vani <a@nevitus.org>
parents:
34728
diff
changeset
|
221 | /** |
|
7f5a2fc8ef9c
Refactored blistnodetypes and BuddyList.xs according to API changes
Ankit Vani <a@nevitus.org>
parents:
34728
diff
changeset
|
222 | * Updates the groups hash table when a group has been renamed. This only |
|
7f5a2fc8ef9c
Refactored blistnodetypes and BuddyList.xs according to API changes
Ankit Vani <a@nevitus.org>
parents:
34728
diff
changeset
|
223 | * updates the cache, the caller is responsible for the actual renaming of |
|
7f5a2fc8ef9c
Refactored blistnodetypes and BuddyList.xs according to API changes
Ankit Vani <a@nevitus.org>
parents:
34728
diff
changeset
|
224 | * the group after updating the cache. |
|
7f5a2fc8ef9c
Refactored blistnodetypes and BuddyList.xs according to API changes
Ankit Vani <a@nevitus.org>
parents:
34728
diff
changeset
|
225 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
226 | * @group: The group whose name will be changed. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
227 | * @name: The new name of the group. |
|
34729
7f5a2fc8ef9c
Refactored blistnodetypes and BuddyList.xs according to API changes
Ankit Vani <a@nevitus.org>
parents:
34728
diff
changeset
|
228 | */ |
|
7f5a2fc8ef9c
Refactored blistnodetypes and BuddyList.xs according to API changes
Ankit Vani <a@nevitus.org>
parents:
34728
diff
changeset
|
229 | void purple_blist_update_groups_cache(PurpleGroup *group, const char *new_name); |
| 5228 | 230 | |
| 5234 | 231 | /** |
| 232 | * Adds a new chat to the buddy list. | |
| 233 | * | |
| 234 | * The chat will be inserted right after node or appended to the end | |
| 235 | * of group if node is NULL. If both are NULL, the buddy will be added to | |
| 236 | * the "Chats" group. | |
| 237 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
238 | * @chat: The new chat who gets added |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
239 | * @group: The group to add the new chat to. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
240 | * @node: The insertion point |
| 5234 | 241 | */ |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34789
diff
changeset
|
242 | void purple_blist_add_chat(PurpleChat *chat, PurpleGroup *group, PurpleBlistNode *node); |
| 5228 | 243 | |
| 244 | /** | |
| 245 | * Adds a new buddy to the buddy list. | |
| 246 | * | |
| 6695 | 247 | * The buddy will be inserted right after node or prepended to the |
| 248 | * group if node is NULL. If both are NULL, the buddy will be added to | |
| 5228 | 249 | * the "Buddies" group. |
| 250 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
251 | * @buddy: The new buddy who gets added |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
252 | * @contact: The optional contact to place the buddy in. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
253 | * @group: The group to add the new buddy to. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
254 | * @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
|
255 | * the first child in the given group. |
| 5228 | 256 | */ |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34789
diff
changeset
|
257 | void purple_blist_add_buddy(PurpleBuddy *buddy, PurpleContact *contact, PurpleGroup *group, PurpleBlistNode *node); |
| 5228 | 258 | |
| 259 | /** | |
| 260 | * Adds a new group to the buddy list. | |
| 261 | * | |
| 6695 | 262 | * The new group will be inserted after insert or prepended to the list if |
| 263 | * node is NULL. | |
| 264 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
265 | * @group: The group |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
266 | * @node: The insertion point |
| 6695 | 267 | */ |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34789
diff
changeset
|
268 | void purple_blist_add_group(PurpleGroup *group, PurpleBlistNode *node); |
| 6695 | 269 | |
| 270 | /** | |
| 271 | * Adds a new contact to the buddy list. | |
| 272 | * | |
| 273 | * The new contact will be inserted after insert or prepended to the list if | |
| 274 | * node is NULL. | |
| 275 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
276 | * @contact: The contact |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
277 | * @group: The group to add the contact to |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
278 | * @node: The insertion point |
| 6695 | 279 | */ |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34789
diff
changeset
|
280 | void purple_blist_add_contact(PurpleContact *contact, PurpleGroup *group, PurpleBlistNode *node); |
| 6695 | 281 | |
| 282 | /** | |
| 5228 | 283 | * 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
|
284 | * This doesn't actually try to remove the buddy from the server list. |
| 5228 | 285 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
286 | * @buddy: The buddy to be removed |
|
26390
b0cde401fca4
More documentation (mostly little changes)
Paul Aurich <darkrain42@pidgin.im>
parents:
26388
diff
changeset
|
287 | * |
|
b0cde401fca4
More documentation (mostly little changes)
Paul Aurich <darkrain42@pidgin.im>
parents:
26388
diff
changeset
|
288 | * @see purple_account_remove_buddy |
| 5228 | 289 | */ |
| 15884 | 290 | void purple_blist_remove_buddy(PurpleBuddy *buddy); |
| 6695 | 291 | |
| 292 | /** | |
| 293 | * 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
|
294 | * 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
|
295 | * doesn't remove the buddies from the server list. |
| 6695 | 296 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
297 | * @contact: The contact to be removed |
|
26390
b0cde401fca4
More documentation (mostly little changes)
Paul Aurich <darkrain42@pidgin.im>
parents:
26388
diff
changeset
|
298 | * |
|
b0cde401fca4
More documentation (mostly little changes)
Paul Aurich <darkrain42@pidgin.im>
parents:
26388
diff
changeset
|
299 | * @see purple_blist_remove_buddy |
| 6695 | 300 | */ |
| 15884 | 301 | void purple_blist_remove_contact(PurpleContact *contact); |
| 5228 | 302 | |
| 303 | /** | |
| 5234 | 304 | * Removes a chat from the buddy list and frees the memory allocated to it. |
| 305 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
306 | * @chat: The chat to be removed |
| 5234 | 307 | */ |
| 15884 | 308 | void purple_blist_remove_chat(PurpleChat *chat); |
| 5234 | 309 | |
| 310 | /** | |
| 5228 | 311 | * Removes a group from the buddy list and frees the memory allocated to it and to |
| 312 | * its children | |
| 313 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
314 | * @group: The group to be removed |
| 5228 | 315 | */ |
| 15884 | 316 | void purple_blist_remove_group(PurpleGroup *group); |
| 5228 | 317 | |
| 6744 | 318 | /** |
|
25889
26d9ca30335c
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <markdoliner@pidgin.im>
parents:
25888
diff
changeset
|
319 | * Finds the buddy struct given a name and an account |
| 5228 | 320 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
321 | * @account: The account this buddy belongs to |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
322 | * @name: The buddy's name |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
323 | * Returns: The buddy or NULL if the buddy does not exist |
| 5228 | 324 | */ |
|
34728
8efd73063ecf
Renamed buddy list functions to more appropriate/simler names.
Ankit Vani <a@nevitus.org>
parents:
34727
diff
changeset
|
325 | PurpleBuddy *purple_blist_find_buddy(PurpleAccount *account, const char *name); |
| 6245 | 326 | |
| 327 | /** | |
|
25889
26d9ca30335c
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <markdoliner@pidgin.im>
parents:
25888
diff
changeset
|
328 | * Finds the buddy struct given a name, an account, and a group |
| 6872 | 329 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
330 | * @account: The account this buddy belongs to |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
331 | * @name: The buddy's name |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
332 | * @group: The group to look in |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
333 | * Returns: The buddy or NULL if the buddy does not exist in the group |
| 6872 | 334 | */ |
|
34728
8efd73063ecf
Renamed buddy list functions to more appropriate/simler names.
Ankit Vani <a@nevitus.org>
parents:
34727
diff
changeset
|
335 | PurpleBuddy *purple_blist_find_buddy_in_group(PurpleAccount *account, const char *name, |
| 15884 | 336 | PurpleGroup *group); |
| 6872 | 337 | |
| 338 | /** | |
|
25889
26d9ca30335c
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <markdoliner@pidgin.im>
parents:
25888
diff
changeset
|
339 | * Finds all PurpleBuddy structs given a name and an account |
| 6245 | 340 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
341 | * @account: The account this buddy belongs to |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
342 | * @name: The buddy's name (or NULL to return all buddies for the account) |
| 6245 | 343 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
344 | * Returns: NULL if the buddy doesn't exist, or a GSList of |
|
33888
5338b7ae4f73
Be more clear in the doc about what should be freed.
Mark Doliner <mark@kingant.net>
parents:
33643
diff
changeset
|
345 | * 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
|
346 | * 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
|
347 | * the list points to. |
| 6245 | 348 | */ |
|
34728
8efd73063ecf
Renamed buddy list functions to more appropriate/simler names.
Ankit Vani <a@nevitus.org>
parents:
34727
diff
changeset
|
349 | GSList *purple_blist_find_buddies(PurpleAccount *account, const char *name); |
| 6245 | 350 | |
| 5228 | 351 | /** |
| 352 | * Finds a group by name | |
| 353 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
354 | * @name: The group's name |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
355 | * Returns: The group or NULL if the group does not exist |
| 5228 | 356 | */ |
|
34728
8efd73063ecf
Renamed buddy list functions to more appropriate/simler names.
Ankit Vani <a@nevitus.org>
parents:
34727
diff
changeset
|
357 | PurpleGroup *purple_blist_find_group(const char *name); |
| 6695 | 358 | |
| 359 | /** | |
|
6456
e4e7dee16c1a
[gaim-migrate @ 6965]
Christian Hammond <chipx86@chipx86.com>
parents:
6245
diff
changeset
|
360 | * Finds a chat by name. |
|
e4e7dee16c1a
[gaim-migrate @ 6965]
Christian Hammond <chipx86@chipx86.com>
parents:
6245
diff
changeset
|
361 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
362 | * @account: The chat's account. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
363 | * @name: The chat's name. |
|
6456
e4e7dee16c1a
[gaim-migrate @ 6965]
Christian Hammond <chipx86@chipx86.com>
parents:
6245
diff
changeset
|
364 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
365 | * Returns: The chat, or %NULL if the chat does not exist. |
|
6456
e4e7dee16c1a
[gaim-migrate @ 6965]
Christian Hammond <chipx86@chipx86.com>
parents:
6245
diff
changeset
|
366 | */ |
| 15884 | 367 | PurpleChat *purple_blist_find_chat(PurpleAccount *account, const char *name); |
|
6456
e4e7dee16c1a
[gaim-migrate @ 6965]
Christian Hammond <chipx86@chipx86.com>
parents:
6245
diff
changeset
|
368 | |
|
e4e7dee16c1a
[gaim-migrate @ 6965]
Christian Hammond <chipx86@chipx86.com>
parents:
6245
diff
changeset
|
369 | /** |
|
26390
b0cde401fca4
More documentation (mostly little changes)
Paul Aurich <darkrain42@pidgin.im>
parents:
26388
diff
changeset
|
370 | * Called when an account connects. Tells the UI to update all the |
| 5234 | 371 | * buddies. |
| 372 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
373 | * @account: The account |
| 5234 | 374 | */ |
| 15884 | 375 | void purple_blist_add_account(PurpleAccount *account); |
| 5234 | 376 | |
| 377 | /** | |
|
26390
b0cde401fca4
More documentation (mostly little changes)
Paul Aurich <darkrain42@pidgin.im>
parents:
26388
diff
changeset
|
378 | * Called when an account disconnects. Sets the presence of all the buddies to 0 |
| 5228 | 379 | * and tells the UI to update them. |
| 380 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
381 | * @account: The account |
| 5228 | 382 | */ |
| 15884 | 383 | void purple_blist_remove_account(PurpleAccount *account); |
| 5228 | 384 | |
| 385 | /*@}*/ | |
| 386 | ||
| 387 | /****************************************************************************************/ | |
| 388 | /** @name Buddy list file management API */ | |
| 389 | /****************************************************************************************/ | |
| 390 | ||
| 391 | /** | |
|
10704
99a466f384d2
[gaim-migrate @ 12288]
Mark Doliner <markdoliner@pidgin.im>
parents:
10662
diff
changeset
|
392 | * 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
|
393 | * 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
|
394 | * 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
|
395 | * 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
|
396 | * call this. |
|
10350
a72a43212626
[gaim-migrate @ 11565]
Mark Doliner <markdoliner@pidgin.im>
parents:
10349
diff
changeset
|
397 | */ |
| 15884 | 398 | void purple_blist_schedule_save(void); |
|
10350
a72a43212626
[gaim-migrate @ 11565]
Mark Doliner <markdoliner@pidgin.im>
parents:
10349
diff
changeset
|
399 | |
|
a72a43212626
[gaim-migrate @ 11565]
Mark Doliner <markdoliner@pidgin.im>
parents:
10349
diff
changeset
|
400 | /** |
|
7060
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
401 | * 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
|
402 | * buddy list. |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
403 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
404 | * @account: The account the buddy is added to. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
405 | * @username: The username of the buddy. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
406 | * @group: The name of the group to place the buddy in. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
407 | * @alias: The optional alias for the buddy. |
|
7060
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
408 | */ |
| 15884 | 409 | 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
|
410 | const char *group, const char *alias); |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
411 | |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
412 | /** |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
413 | * 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
|
414 | * buddy list. |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
415 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
416 | * @account: The account the buddy is added to. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
417 | * @group: The optional group to add the chat to. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
418 | * @alias: The optional alias for the chat. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
419 | * @name: The required chat name. |
|
7060
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
420 | */ |
| 15884 | 421 | void purple_blist_request_add_chat(PurpleAccount *account, PurpleGroup *group, |
|
9754
3a17eee239b2
[gaim-migrate @ 10621]
Nathan Fredrickson <nathan@silverorange.com>
parents:
9713
diff
changeset
|
422 | const char *alias, const char *name); |
|
7060
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
423 | |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
424 | /** |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
425 | * 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
|
426 | * buddy list. |
|
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
427 | */ |
| 15884 | 428 | void purple_blist_request_add_group(void); |
|
7060
717cbeb22b6d
[gaim-migrate @ 7623]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
429 | |
| 5228 | 430 | /**************************************************************************/ |
| 12054 | 431 | /** @name UI Registration Functions */ |
| 432 | /**************************************************************************/ | |
| 433 | /*@{*/ | |
| 434 | ||
| 435 | /** | |
| 436 | * Sets the UI operations structure to be used for the buddy list. | |
| 437 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
438 | * @ops: The ops struct. |
| 12054 | 439 | */ |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34789
diff
changeset
|
440 | void purple_blist_set_ui_ops(PurpleBlistUiOps *ops); |
| 12054 | 441 | |
| 442 | /** | |
| 443 | * Returns the UI operations structure to be used for the buddy list. | |
| 444 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
445 | * Returns: The UI operations structure. |
| 12054 | 446 | */ |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34789
diff
changeset
|
447 | PurpleBlistUiOps *purple_blist_get_ui_ops(void); |
| 12054 | 448 | |
| 449 | /*@}*/ | |
| 450 | ||
| 451 | /**************************************************************************/ | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
452 | /** @name Buddy List Subsystem */ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
453 | /**************************************************************************/ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
454 | /*@{*/ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
455 | |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
456 | /** |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
457 | * Returns the handle for the buddy list subsystem. |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
458 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
459 | * Returns: The buddy list subsystem handle. |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
460 | */ |
| 15884 | 461 | void *purple_blist_get_handle(void); |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
462 | |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
463 | /** |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
464 | * Initializes the buddy list subsystem. |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
465 | */ |
| 15884 | 466 | void purple_blist_init(void); |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
467 | |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
468 | /** |
|
33643
6f7deddb8850
Move blist loading into purple_core_init.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32827
diff
changeset
|
469 | * Loads the buddy list. |
|
6f7deddb8850
Move blist loading into purple_core_init.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32827
diff
changeset
|
470 | * |
|
6f7deddb8850
Move blist loading into purple_core_init.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32827
diff
changeset
|
471 | * 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
|
472 | */ |
|
6f7deddb8850
Move blist loading into purple_core_init.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32827
diff
changeset
|
473 | void purple_blist_boot(void); |
|
6f7deddb8850
Move blist loading into purple_core_init.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32827
diff
changeset
|
474 | |
|
6f7deddb8850
Move blist loading into purple_core_init.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32827
diff
changeset
|
475 | /** |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
476 | * Uninitializes the buddy list subsystem. |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
477 | */ |
| 15884 | 478 | void purple_blist_uninit(void); |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
479 | |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
480 | /*@}*/ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6456
diff
changeset
|
481 | |
|
32787
7072f190d6ad
Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32714
diff
changeset
|
482 | G_END_DECLS |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5906
diff
changeset
|
483 | |
|
34710
6182323fbb0c
Renamed gg's buddylist.[ch] to blist.[ch]
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
484 | #endif /* _PURPLE_BUDDY_LIST_H_ */ |