Thu, 12 Sep 2013 20:03:12 +0530
Renamed purple_roomlist_[gs]et_proto_data to purple_roomlist_[gs]et_protocol_data
| 8113 | 1 | /** |
| 2 | * @file roomlist.h Room List API | |
| 3 | * @ingroup core | |
|
20147
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
4 | */ |
|
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 | /* purple |
| 8113 | 7 | * |
| 15884 | 8 | * Purple is the legal property of its developers, whose names are too numerous |
|
8146
4961c9c5fd61
[gaim-migrate @ 8854]
John Silvestri <john.silvestri@gmail.com>
parents:
8113
diff
changeset
|
9 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
4961c9c5fd61
[gaim-migrate @ 8854]
John Silvestri <john.silvestri@gmail.com>
parents:
8113
diff
changeset
|
10 | * source distribution. |
| 8113 | 11 | * |
| 12 | * This program is free software; you can redistribute it and/or modify | |
| 13 | * it under the terms of the GNU General Public License as published by | |
| 14 | * the Free Software Foundation; either version 2 of the License, or | |
| 15 | * (at your option) any later version. | |
| 16 | * | |
| 17 | * This program is distributed in the hope that it will be useful, | |
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 20 | * GNU General Public License for more details. | |
| 21 | * | |
| 22 | * You should have received a copy of the GNU General Public License | |
| 23 | * 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:
16743
diff
changeset
|
24 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 8113 | 25 | */ |
| 26 | ||
| 15884 | 27 | #ifndef _PURPLE_ROOMLIST_H_ |
| 28 | #define _PURPLE_ROOMLIST_H_ | |
| 8113 | 29 | |
|
34931
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
30 | #define PURPLE_TYPE_ROOMLIST (purple_roomlist_get_type()) |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
31 | #define PURPLE_ROOMLIST(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_ROOMLIST, PurpleRoomlist)) |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
32 | #define PURPLE_ROOMLIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_ROOMLIST, PurpleRoomlistClass)) |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
33 | #define PURPLE_IS_ROOMLIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_ROOMLIST)) |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
34 | #define PURPLE_IS_ROOMLIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_ROOMLIST)) |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
35 | #define PURPLE_ROOMLIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_ROOMLIST, PurpleRoomlistClass)) |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
36 | |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
37 | /** @copydoc _PurpleRoomlist */ |
| 15884 | 38 | typedef struct _PurpleRoomlist PurpleRoomlist; |
|
34931
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
39 | /** @copydoc _PurpleRoomlistClass */ |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
40 | typedef struct _PurpleRoomlistClass PurpleRoomlistClass; |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
41 | |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
42 | #define PURPLE_TYPE_ROOMLIST_ROOM (purple_roomlist_room_get_gtype()) |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
43 | |
| 15884 | 44 | typedef struct _PurpleRoomlistRoom PurpleRoomlistRoom; |
|
34931
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
45 | |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
46 | #define PURPLE_TYPE_ROOMLIST_FIELD (purple_roomlist_field_get_gtype()) |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
47 | |
| 15884 | 48 | typedef struct _PurpleRoomlistField PurpleRoomlistField; |
|
34931
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
49 | |
|
23514
f5c4c1cb7b6f
Sprinkle @copydoc around to squash "ref could not be resolved" Doxygen warnings,
Will Thompson <resiak@pidgin.im>
parents:
22134
diff
changeset
|
50 | /** @copydoc _PurpleRoomlistUiOps */ |
| 15884 | 51 | typedef struct _PurpleRoomlistUiOps PurpleRoomlistUiOps; |
|
9030
7b574a641391
[gaim-migrate @ 9806]
Mark Doliner <markdoliner@pidgin.im>
parents:
9000
diff
changeset
|
52 | |
|
9999
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
9030
diff
changeset
|
53 | /** |
|
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
9030
diff
changeset
|
54 | * The types of rooms. |
|
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
9030
diff
changeset
|
55 | * |
|
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
9030
diff
changeset
|
56 | * These are ORable flags. |
|
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
9030
diff
changeset
|
57 | */ |
|
34931
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
58 | typedef enum /*< flags >*/ |
|
9999
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
9030
diff
changeset
|
59 | { |
| 15884 | 60 | PURPLE_ROOMLIST_ROOMTYPE_CATEGORY = 0x01, /**< It's a category, but not a room you can join. */ |
| 61 | PURPLE_ROOMLIST_ROOMTYPE_ROOM = 0x02 /**< It's a room, like the kind you can join. */ | |
|
9999
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
9030
diff
changeset
|
62 | |
| 15884 | 63 | } PurpleRoomlistRoomType; |
|
9999
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
9030
diff
changeset
|
64 | |
|
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
9030
diff
changeset
|
65 | /** |
|
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
9030
diff
changeset
|
66 | * The types of fields. |
|
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
9030
diff
changeset
|
67 | */ |
|
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
9030
diff
changeset
|
68 | typedef enum |
|
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
9030
diff
changeset
|
69 | { |
| 15884 | 70 | PURPLE_ROOMLIST_FIELD_BOOL, |
| 71 | PURPLE_ROOMLIST_FIELD_INT, | |
| 72 | PURPLE_ROOMLIST_FIELD_STRING /**< We do a g_strdup on the passed value if it's this type. */ | |
|
9999
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
9030
diff
changeset
|
73 | |
| 15884 | 74 | } PurpleRoomlistFieldType; |
|
9999
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
9030
diff
changeset
|
75 | |
|
9030
7b574a641391
[gaim-migrate @ 9806]
Mark Doliner <markdoliner@pidgin.im>
parents:
9000
diff
changeset
|
76 | #include "account.h" |
|
30374
e9df8757ff89
roomlist: "glib.h" -> <glib.h>; seems correct-er to me
Paul Aurich <darkrain42@pidgin.im>
parents:
23514
diff
changeset
|
77 | #include <glib.h> |
|
9030
7b574a641391
[gaim-migrate @ 9806]
Mark Doliner <markdoliner@pidgin.im>
parents:
9000
diff
changeset
|
78 | |
| 8113 | 79 | /**************************************************************************/ |
| 80 | /** Data Structures */ | |
| 81 | /**************************************************************************/ | |
| 82 | ||
| 83 | /** | |
| 84 | * The room list ops to be filled out by the UI. | |
| 85 | */ | |
| 15884 | 86 | struct _PurpleRoomlistUiOps { |
| 87 | void (*show_with_account)(PurpleAccount *account); /**< Force the ui to pop up a dialog and get the list */ | |
| 88 | void (*create)(PurpleRoomlist *list); /**< A new list was created. */ | |
| 89 | void (*set_fields)(PurpleRoomlist *list, GList *fields); /**< Sets the columns. */ | |
| 90 | void (*add_room)(PurpleRoomlist *list, PurpleRoomlistRoom *room); /**< Add a room to the list. */ | |
| 91 | void (*in_progress)(PurpleRoomlist *list, gboolean flag); /**< Are we fetching stuff still? */ | |
| 92 | void (*destroy)(PurpleRoomlist *list); /**< We're destroying list. */ | |
|
16743
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
93 | |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
94 | void (*_purple_reserved1)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
95 | void (*_purple_reserved2)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
96 | void (*_purple_reserved3)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
97 | void (*_purple_reserved4)(void); |
| 8113 | 98 | }; |
| 99 | ||
|
34931
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
100 | /** |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
101 | * Represents a list of rooms for a given connection on a given protocol. |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
102 | */ |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
103 | struct _PurpleRoomlist { |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
104 | /*< private >*/ |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
105 | GObject gparent; |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
106 | |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
107 | /** The UI data associated with this room list. This is a convenience |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
108 | * field provided to the UIs -- it is not used by the libpurple core. |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
109 | */ |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
110 | gpointer ui_data; |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
111 | }; |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
112 | |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
113 | /** Base class for all #PurpleRoomlist's */ |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
114 | struct _PurpleRoomlistClass { |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
115 | /*< private >*/ |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
116 | GObjectClass parent_class; |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
117 | |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
118 | void (*_purple_reserved1)(void); |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
119 | void (*_purple_reserved2)(void); |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
120 | void (*_purple_reserved3)(void); |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
121 | void (*_purple_reserved4)(void); |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
122 | }; |
| 8113 | 123 | |
|
32787
7072f190d6ad
Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32604
diff
changeset
|
124 | G_BEGIN_DECLS |
| 8113 | 125 | |
| 126 | /**************************************************************************/ | |
| 127 | /** @name Room List API */ | |
| 128 | /**************************************************************************/ | |
| 129 | /*@{*/ | |
| 130 | ||
| 131 | /** | |
|
34931
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
132 | * Returns the GType for the Room List object. |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
133 | */ |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
134 | GType purple_roomlist_get_type(void); |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
135 | |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
136 | /** |
| 8352 | 137 | * This is used to get the room list on an account, asking the UI |
| 138 | * to pop up a dialog with the specified account already selected, | |
| 139 | * and pretend the user clicked the get list button. | |
| 140 | * While we're pretending, predend I didn't say anything about dialogs | |
| 141 | * or buttons, since this is the core. | |
| 142 | * | |
| 143 | * @param account The account to get the list on. | |
| 144 | */ | |
| 15884 | 145 | void purple_roomlist_show_with_account(PurpleAccount *account); |
| 8352 | 146 | |
| 147 | /** | |
| 8113 | 148 | * Returns a newly created room list object. |
| 149 | * | |
| 150 | * @param account The account that's listing rooms. | |
| 151 | * @return The new room list handle. | |
| 152 | */ | |
| 15884 | 153 | PurpleRoomlist *purple_roomlist_new(PurpleAccount *account); |
| 8113 | 154 | |
| 155 | /** | |
|
32218
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
156 | * Retrieve the PurpleAccount that was given when the room list was |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
157 | * created. |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
158 | * |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
159 | * @return The PurpleAccount tied to this room list. |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
160 | */ |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
161 | PurpleAccount *purple_roomlist_get_account(PurpleRoomlist *list); |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
162 | |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
163 | /** |
| 8113 | 164 | * Set the different field types and their names for this protocol. |
| 165 | * | |
| 15884 | 166 | * This must be called before purple_roomlist_room_add(). |
| 8113 | 167 | * |
| 168 | * @param list The room list. | |
| 15884 | 169 | * @param fields A GList of PurpleRoomlistField's. UI's are encouraged |
| 8113 | 170 | * to default to displaying them in the order given. |
| 171 | */ | |
| 15884 | 172 | void purple_roomlist_set_fields(PurpleRoomlist *list, GList *fields); |
| 8113 | 173 | |
| 174 | /** | |
| 175 | * Set the "in progress" state of the room list. | |
| 176 | * | |
|
8735
01248ea222d3
[gaim-migrate @ 9490]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
8584
diff
changeset
|
177 | * The UI is encouraged to somehow hint to the user |
| 8113 | 178 | * whether or not we're busy downloading a room list or not. |
| 179 | * | |
| 180 | * @param list The room list. | |
| 181 | * @param in_progress We're downloading it, or we're not. | |
| 182 | */ | |
| 15884 | 183 | void purple_roomlist_set_in_progress(PurpleRoomlist *list, gboolean in_progress); |
| 8113 | 184 | |
| 185 | /** | |
| 8199 | 186 | * Gets the "in progress" state of the room list. |
| 187 | * | |
|
8735
01248ea222d3
[gaim-migrate @ 9490]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
8584
diff
changeset
|
188 | * The UI is encouraged to somehow hint to the user |
| 8199 | 189 | * whether or not we're busy downloading a room list or not. |
| 190 | * | |
| 191 | * @param list The room list. | |
| 8866 | 192 | * @return True if we're downloading it, or false if we're not. |
| 8199 | 193 | */ |
| 15884 | 194 | gboolean purple_roomlist_get_in_progress(PurpleRoomlist *list); |
| 8199 | 195 | |
| 196 | /** | |
| 8113 | 197 | * Adds a room to the list of them. |
| 198 | * | |
| 199 | * @param list The room list. | |
| 200 | * @param room The room to add to the list. The GList of fields must be in the same | |
| 15884 | 201 | order as was given in purple_roomlist_set_fields(). |
| 8113 | 202 | */ |
| 15884 | 203 | void purple_roomlist_room_add(PurpleRoomlist *list, PurpleRoomlistRoom *room); |
| 8113 | 204 | |
| 205 | /** | |
| 15884 | 206 | * Returns a PurpleRoomlist structure from the prpl, and |
| 8113 | 207 | * instructs the prpl to start fetching the list. |
| 208 | * | |
| 15884 | 209 | * @param gc The PurpleConnection to have get a list. |
| 8113 | 210 | * |
| 15884 | 211 | * @return A PurpleRoomlist* or @c NULL if the protocol |
| 8113 | 212 | * doesn't support that. |
| 213 | */ | |
| 15884 | 214 | PurpleRoomlist *purple_roomlist_get_list(PurpleConnection *gc); |
| 8113 | 215 | |
| 216 | /** | |
| 217 | * Tells the prpl to stop fetching the list. | |
| 218 | * If this is possible and done, the prpl will | |
| 219 | * call set_in_progress with @c FALSE and possibly | |
| 220 | * unref the list if it took a reference. | |
| 221 | * | |
| 222 | * @param list The room list to cancel a get_list on. | |
| 223 | */ | |
| 15884 | 224 | void purple_roomlist_cancel_get_list(PurpleRoomlist *list); |
| 8113 | 225 | |
| 226 | /** | |
| 8584 | 227 | * Tells the prpl that a category was expanded. |
| 8113 | 228 | * |
| 8584 | 229 | * On some protocols, the rooms in the category |
| 8113 | 230 | * won't be fetched until this is called. |
| 231 | * | |
| 9000 | 232 | * @param list The room list. |
| 233 | * @param category The category that was expanded. The expression | |
| 15884 | 234 | * (category->type & PURPLE_ROOMLIST_ROOMTYPE_CATEGORY) |
| 9000 | 235 | * must be true. |
| 8113 | 236 | */ |
| 15884 | 237 | void purple_roomlist_expand_category(PurpleRoomlist *list, PurpleRoomlistRoom *category); |
| 8113 | 238 | |
|
22134
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
239 | /** |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
240 | * Get the list of fields for a roomlist. |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
241 | * |
|
32218
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
242 | * @param roomlist The roomlist, which must not be @c NULL. |
|
22134
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
243 | * @constreturn A list of fields |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
244 | */ |
|
32218
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
245 | GList *purple_roomlist_get_fields(PurpleRoomlist *roomlist); |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
246 | |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
247 | /** |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
248 | * Get the protocol data associated with this room list. |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
249 | * |
|
32554
0d844fac6679
Fix a bunch of tiny problems generating our doxygen documentation
Mark Doliner <markdoliner@pidgin.im>
parents:
32249
diff
changeset
|
250 | * @param list The roomlist, which must not be @c NULL. |
|
32218
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
251 | * |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
252 | * @return The protocol data associated with this room list. This is a |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
253 | * convenience field provided to the protocol plugin--it is not |
|
32249
b636d2273c64
Added accessor functions purple_xfer_get_ui_data() and purple_xfer_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
32218
diff
changeset
|
254 | * used the libpurple core. |
|
32218
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
255 | */ |
|
34942
e1783e620a85
Renamed purple_roomlist_[gs]et_proto_data to purple_roomlist_[gs]et_protocol_data
Ankit Vani <a@nevitus.org>
parents:
34931
diff
changeset
|
256 | gpointer purple_roomlist_get_protocol_data(PurpleRoomlist *list); |
|
32218
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
257 | |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
258 | /** |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
259 | * Set the protocol data associated with this room list. |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
260 | * |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
261 | * @param list The roomlist, which must not be @c NULL. |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
262 | * @param proto_data A pointer to associate with this room list. |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
263 | */ |
|
34942
e1783e620a85
Renamed purple_roomlist_[gs]et_proto_data to purple_roomlist_[gs]et_protocol_data
Ankit Vani <a@nevitus.org>
parents:
34931
diff
changeset
|
264 | void purple_roomlist_set_protocol_data(PurpleRoomlist *list, gpointer proto_data); |
|
32218
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
265 | |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
266 | /** |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
267 | * Get the UI data associated with this room list. |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
268 | * |
|
32554
0d844fac6679
Fix a bunch of tiny problems generating our doxygen documentation
Mark Doliner <markdoliner@pidgin.im>
parents:
32249
diff
changeset
|
269 | * @param list The roomlist, which must not be @c NULL. |
|
32218
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
270 | * |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
271 | * @return The UI data associated with this room list. This is a |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
272 | * convenience field provided to the UIs--it is not |
|
32249
b636d2273c64
Added accessor functions purple_xfer_get_ui_data() and purple_xfer_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
32218
diff
changeset
|
273 | * used by the libpurple core. |
|
32218
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
274 | */ |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
275 | gpointer purple_roomlist_get_ui_data(PurpleRoomlist *list); |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
276 | |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
277 | /** |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
278 | * Set the UI data associated with this room list. |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
279 | * |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
280 | * @param list The roomlist, which must not be @c NULL. |
|
32554
0d844fac6679
Fix a bunch of tiny problems generating our doxygen documentation
Mark Doliner <markdoliner@pidgin.im>
parents:
32249
diff
changeset
|
281 | * @param ui_data A pointer to associate with this room list. |
|
32218
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
282 | */ |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
283 | void purple_roomlist_set_ui_data(PurpleRoomlist *list, gpointer ui_data); |
|
22134
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
284 | |
| 8113 | 285 | /*@}*/ |
| 286 | ||
| 287 | /**************************************************************************/ | |
| 288 | /** @name Room API */ | |
| 289 | /**************************************************************************/ | |
| 290 | /*@{*/ | |
| 291 | ||
| 292 | /** | |
|
34931
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
293 | * Returns the GType for the PurpleRoomlistRoom boxed structure. |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
294 | */ |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
295 | GType purple_roomlist_room_get_gtype(void); |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
296 | |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
297 | /** |
| 8113 | 298 | * Creates a new room, to be added to the list. |
| 299 | * | |
| 300 | * @param type The type of room. | |
| 301 | * @param name The name of the room. | |
| 302 | * @param parent The room's parent, if any. | |
| 303 | * | |
| 304 | * @return A new room. | |
| 305 | */ | |
| 15884 | 306 | PurpleRoomlistRoom *purple_roomlist_room_new(PurpleRoomlistRoomType type, const gchar *name, |
| 307 | PurpleRoomlistRoom *parent); | |
| 8113 | 308 | |
| 309 | /** | |
| 310 | * Adds a field to a room. | |
| 311 | * | |
| 312 | * @param list The room list the room belongs to. | |
| 313 | * @param room The room. | |
| 314 | * @param field The field to append. Strings get g_strdup'd internally. | |
| 315 | */ | |
| 15884 | 316 | void purple_roomlist_room_add_field(PurpleRoomlist *list, PurpleRoomlistRoom *room, gconstpointer field); |
| 8113 | 317 | |
| 8199 | 318 | /** |
| 15884 | 319 | * Join a room, given a PurpleRoomlistRoom and it's associated PurpleRoomlist. |
| 8199 | 320 | * |
| 321 | * @param list The room list the room belongs to. | |
| 322 | * @param room The room to join. | |
| 323 | */ | |
| 15884 | 324 | void purple_roomlist_room_join(PurpleRoomlist *list, PurpleRoomlistRoom *room); |
| 8199 | 325 | |
|
22134
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
326 | /** |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
327 | * Get the type of a room. |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
328 | * @param room The room, which must not be @c NULL. |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
329 | * @return The type of the room. |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
330 | */ |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
331 | PurpleRoomlistRoomType purple_roomlist_room_get_type(PurpleRoomlistRoom *room); |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
332 | |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
333 | /** |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
334 | * Get the name of a room. |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
335 | * @param room The room, which must not be @c NULL. |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
336 | * @return The name of the room. |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
337 | */ |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
338 | const char * purple_roomlist_room_get_name(PurpleRoomlistRoom *room); |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
339 | |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
340 | /** |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
341 | * Get the parent of a room. |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
342 | * @param room The room, which must not be @c NULL. |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
343 | * @return The parent of the room, which can be @c NULL. |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
344 | */ |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
345 | PurpleRoomlistRoom * purple_roomlist_room_get_parent(PurpleRoomlistRoom *room); |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
346 | |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
347 | /** |
|
32218
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
348 | * Get the value of the expanded_once flag. |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
349 | * |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
350 | * @param room The room, which must not be @c NULL. |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
351 | * |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
352 | * @return The value of the expanded_once flag. |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
353 | */ |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
354 | gboolean purple_roomlist_room_get_expanded_once(PurpleRoomlistRoom *room); |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
355 | |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
356 | /** |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
357 | * Set the expanded_once flag. |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
358 | * |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
359 | * @param room The room, which must not be @c NULL. |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
360 | * @param expanded_once The new value of the expanded_once flag. |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
361 | */ |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
362 | void purple_roomlist_room_set_expanded_once(PurpleRoomlistRoom *room, gboolean expanded_once); |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
363 | |
|
f27b05250351
Some struct hiding. What a pain.
Mark Doliner <markdoliner@pidgin.im>
parents:
30374
diff
changeset
|
364 | /** |
|
22134
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
365 | * Get the list of fields for a room. |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
366 | * |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
367 | * @param room The room, which must not be @c NULL. |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
368 | * @constreturn A list of fields |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
369 | */ |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
370 | GList * purple_roomlist_room_get_fields(PurpleRoomlistRoom *room); |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
371 | |
| 8113 | 372 | /*@}*/ |
| 373 | ||
| 374 | /**************************************************************************/ | |
| 375 | /** @name Room Field API */ | |
| 376 | /**************************************************************************/ | |
| 377 | /*@{*/ | |
| 378 | ||
| 379 | /** | |
|
34931
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
380 | * Returns the GType for the PurpleRoomlistField boxed structure. |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
381 | */ |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
382 | GType purple_roomlist_field_get_gtype(void); |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
383 | |
|
6ea8ce77ec34
Started GObjectification of PurpleRoomlist
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
384 | /** |
| 8113 | 385 | * Creates a new field. |
| 386 | * | |
| 9000 | 387 | * @param type The type of the field. |
| 388 | * @param label The i18n'ed, user displayable name. | |
| 389 | * @param name The internal name of the field. | |
| 390 | * @param hidden Hide the field. | |
| 8113 | 391 | * |
| 15884 | 392 | * @return A new PurpleRoomlistField, ready to be added to a GList and passed to |
| 393 | * purple_roomlist_set_fields(). | |
| 8113 | 394 | */ |
| 15884 | 395 | PurpleRoomlistField *purple_roomlist_field_new(PurpleRoomlistFieldType type, |
| 8113 | 396 | const gchar *label, const gchar *name, |
| 397 | gboolean hidden); | |
|
22134
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
398 | |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
399 | /** |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
400 | * Get the type of a field. |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
401 | * |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
402 | * @param field A PurpleRoomlistField, which must not be @c NULL. |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
403 | * |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
404 | * @return The type of the field. |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
405 | */ |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
406 | PurpleRoomlistFieldType purple_roomlist_field_get_type(PurpleRoomlistField *field); |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
407 | |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
408 | /** |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
409 | * Get the label of a field. |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
410 | * |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
411 | * @param field A PurpleRoomlistField, which must not be @c NULL. |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
412 | * |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
413 | * @return The label of the field. |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
414 | */ |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
415 | const char * purple_roomlist_field_get_label(PurpleRoomlistField *field); |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
416 | |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
417 | /** |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
418 | * Check whether a roomlist-field is hidden. |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
419 | * @param field A PurpleRoomlistField, which must not be @c NULL. |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
420 | * |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
421 | * @return @c TRUE if the field is hidden, @c FALSE otherwise. |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
422 | */ |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
423 | gboolean purple_roomlist_field_get_hidden(PurpleRoomlistField *field); |
|
692ceed9d307
A list of accessor functions to the roomlist API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
424 | |
| 8113 | 425 | /*@}*/ |
| 426 | ||
| 427 | /**************************************************************************/ | |
| 428 | /** @name UI Registration Functions */ | |
| 429 | /**************************************************************************/ | |
| 430 | /*@{*/ | |
| 431 | ||
| 432 | /** | |
| 15884 | 433 | * Sets the UI operations structure to be used in all purple room lists. |
| 8113 | 434 | * |
| 435 | * @param ops The UI operations structure. | |
| 436 | */ | |
| 15884 | 437 | void purple_roomlist_set_ui_ops(PurpleRoomlistUiOps *ops); |
| 8113 | 438 | |
| 439 | /** | |
| 15884 | 440 | * Returns the purple window UI operations structure to be used in |
| 8113 | 441 | * new windows. |
| 442 | * | |
| 15884 | 443 | * @return A filled-out PurpleRoomlistUiOps structure. |
| 8113 | 444 | */ |
| 15884 | 445 | PurpleRoomlistUiOps *purple_roomlist_get_ui_ops(void); |
| 8113 | 446 | |
| 447 | /*@}*/ | |
| 448 | ||
|
32787
7072f190d6ad
Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32604
diff
changeset
|
449 | G_END_DECLS |
| 8113 | 450 | |
| 15884 | 451 | #endif /* _PURPLE_ROOMLIST_H_ */ |