Fri, 31 Jan 2014 18:22:41 +0530
Initial replacements for this branch
| 5441 | 1 | /** |
| 2 | * @file prefs.h Prefs API | |
|
10066
606927534c36
[gaim-migrate @ 11041]
Mark Doliner <markdoliner@pidgin.im>
parents:
9713
diff
changeset
|
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 |
| 5441 | 7 | * |
| 15884 | 8 | * Purple is the legal property of its developers, whose names are too numerous |
| 8046 | 9 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 10 | * source distribution. | |
| 5441 | 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:
18814
diff
changeset
|
24 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 5441 | 25 | * |
| 26 | */ | |
| 15884 | 27 | #ifndef _PURPLE_PREFS_H_ |
| 28 | #define _PURPLE_PREFS_H_ | |
| 5441 | 29 | |
|
5638
53e752c88ea1
[gaim-migrate @ 6047]
Christian Hammond <chipx86@chipx86.com>
parents:
5561
diff
changeset
|
30 | #include <glib.h> |
|
53e752c88ea1
[gaim-migrate @ 6047]
Christian Hammond <chipx86@chipx86.com>
parents:
5561
diff
changeset
|
31 | |
| 5441 | 32 | /** |
|
25631
2506d2a66c9f
Document the PURPLE_MAJOR_VERSION, PURPLE_MINOR_VERSION, and
Etan Reisner <deryni@pidgin.im>
parents:
23129
diff
changeset
|
33 | * Preference data types. |
| 5441 | 34 | */ |
|
32206
a2c62b07ae5a
Please correct me if I'm wrong, but I don't think we gain anything
Mark Doliner <markdoliner@pidgin.im>
parents:
29267
diff
changeset
|
35 | typedef enum |
| 5441 | 36 | { |
|
25631
2506d2a66c9f
Document the PURPLE_MAJOR_VERSION, PURPLE_MINOR_VERSION, and
Etan Reisner <deryni@pidgin.im>
parents:
23129
diff
changeset
|
37 | PURPLE_PREF_NONE, /**< No type. */ |
|
2506d2a66c9f
Document the PURPLE_MAJOR_VERSION, PURPLE_MINOR_VERSION, and
Etan Reisner <deryni@pidgin.im>
parents:
23129
diff
changeset
|
38 | PURPLE_PREF_BOOLEAN, /**< Boolean. */ |
|
2506d2a66c9f
Document the PURPLE_MAJOR_VERSION, PURPLE_MINOR_VERSION, and
Etan Reisner <deryni@pidgin.im>
parents:
23129
diff
changeset
|
39 | PURPLE_PREF_INT, /**< Integer. */ |
|
2506d2a66c9f
Document the PURPLE_MAJOR_VERSION, PURPLE_MINOR_VERSION, and
Etan Reisner <deryni@pidgin.im>
parents:
23129
diff
changeset
|
40 | PURPLE_PREF_STRING, /**< String. */ |
|
2506d2a66c9f
Document the PURPLE_MAJOR_VERSION, PURPLE_MINOR_VERSION, and
Etan Reisner <deryni@pidgin.im>
parents:
23129
diff
changeset
|
41 | PURPLE_PREF_STRING_LIST, /**< List of strings. */ |
|
2506d2a66c9f
Document the PURPLE_MAJOR_VERSION, PURPLE_MINOR_VERSION, and
Etan Reisner <deryni@pidgin.im>
parents:
23129
diff
changeset
|
42 | PURPLE_PREF_PATH, /**< Path. */ |
|
2506d2a66c9f
Document the PURPLE_MAJOR_VERSION, PURPLE_MINOR_VERSION, and
Etan Reisner <deryni@pidgin.im>
parents:
23129
diff
changeset
|
43 | PURPLE_PREF_PATH_LIST /**< List of paths. */ |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
44 | |
| 15884 | 45 | } PurplePrefType; |
| 5441 | 46 | |
| 47 | /** | |
|
21427
fad701d9ba43
Document PurplePrefCallback.
Will Thompson <resiak@pidgin.im>
parents:
21054
diff
changeset
|
48 | * The type of callbacks for preference changes. |
|
fad701d9ba43
Document PurplePrefCallback.
Will Thompson <resiak@pidgin.im>
parents:
21054
diff
changeset
|
49 | * |
|
37034
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
50 | * @name: the name of the preference which has changed. |
|
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
51 | * @type: the type of the preferenced named @a name |
|
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
52 | * @val: the new value of the preferencs; should be cast to the correct |
|
21427
fad701d9ba43
Document PurplePrefCallback.
Will Thompson <resiak@pidgin.im>
parents:
21054
diff
changeset
|
53 | * type. For instance, to recover the value of a #PURPLE_PREF_INT |
|
fad701d9ba43
Document PurplePrefCallback.
Will Thompson <resiak@pidgin.im>
parents:
21054
diff
changeset
|
54 | * preference, use <tt>GPOINTER_TO_INT(val)</tt>. Alternatively, |
|
fad701d9ba43
Document PurplePrefCallback.
Will Thompson <resiak@pidgin.im>
parents:
21054
diff
changeset
|
55 | * just call purple_prefs_get_int(), purple_prefs_get_string_list() |
|
fad701d9ba43
Document PurplePrefCallback.
Will Thompson <resiak@pidgin.im>
parents:
21054
diff
changeset
|
56 | * etc. |
|
37034
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
57 | * @data: Arbitrary data specified when the callback was connected with |
|
21427
fad701d9ba43
Document PurplePrefCallback.
Will Thompson <resiak@pidgin.im>
parents:
21054
diff
changeset
|
58 | * purple_prefs_connect_callback(). |
|
fad701d9ba43
Document PurplePrefCallback.
Will Thompson <resiak@pidgin.im>
parents:
21054
diff
changeset
|
59 | * |
|
fad701d9ba43
Document PurplePrefCallback.
Will Thompson <resiak@pidgin.im>
parents:
21054
diff
changeset
|
60 | * @see purple_prefs_connect_callback() |
| 5441 | 61 | */ |
| 15884 | 62 | typedef void (*PurplePrefCallback) (const char *name, PurplePrefType type, |
|
12816
5f93e09fa9a6
[gaim-migrate @ 15164]
Mark Doliner <markdoliner@pidgin.im>
parents:
12712
diff
changeset
|
63 | gconstpointer val, gpointer data); |
| 5441 | 64 | |
|
32787
7072f190d6ad
Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32438
diff
changeset
|
65 | G_BEGIN_DECLS |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
66 | |
| 5441 | 67 | /**************************************************************************/ |
|
25888
d0fdd378a635
Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
23129
diff
changeset
|
68 | /** @name Prefs API |
|
d0fdd378a635
Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
23129
diff
changeset
|
69 | Preferences are named according to a directory-like structure. |
|
17436
a3e9be0f17ef
- Added a description of preference grouping to the Prefs API code
William Ehlhardt <williamehlhardt@gmail.com>
parents:
15884
diff
changeset
|
70 | Example: "/plugins/core/potato/is_from_idaho" (probably a boolean) */ |
| 5441 | 71 | /**************************************************************************/ |
| 72 | /*@{*/ | |
| 73 | ||
| 74 | /** | |
|
10443
aa7dcc1c796a
[gaim-migrate @ 11703]
Mark Doliner <markdoliner@pidgin.im>
parents:
10087
diff
changeset
|
75 | * Returns the prefs subsystem handle. |
|
aa7dcc1c796a
[gaim-migrate @ 11703]
Mark Doliner <markdoliner@pidgin.im>
parents:
10087
diff
changeset
|
76 | * |
|
37034
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
77 | * Returns: The prefs subsystem handle. |
|
10443
aa7dcc1c796a
[gaim-migrate @ 11703]
Mark Doliner <markdoliner@pidgin.im>
parents:
10087
diff
changeset
|
78 | */ |
| 15884 | 79 | void *purple_prefs_get_handle(void); |
|
10443
aa7dcc1c796a
[gaim-migrate @ 11703]
Mark Doliner <markdoliner@pidgin.im>
parents:
10087
diff
changeset
|
80 | |
|
aa7dcc1c796a
[gaim-migrate @ 11703]
Mark Doliner <markdoliner@pidgin.im>
parents:
10087
diff
changeset
|
81 | /** |
| 5441 | 82 | * Initialize core prefs |
| 83 | */ | |
| 15884 | 84 | void purple_prefs_init(void); |
| 5441 | 85 | |
| 86 | /** | |
| 8235 | 87 | * Uninitializes the prefs subsystem. |
| 88 | */ | |
| 15884 | 89 | void purple_prefs_uninit(void); |
| 8235 | 90 | |
| 91 | /** | |
| 5441 | 92 | * Add a new typeless pref. |
| 93 | * | |
|
37034
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
94 | * @name: The name of the pref |
| 5441 | 95 | */ |
| 15884 | 96 | void purple_prefs_add_none(const char *name); |
| 5441 | 97 | |
| 98 | /** | |
| 99 | * Add a new boolean pref. | |
| 100 | * | |
|
37034
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
101 | * @name: The name of the pref |
|
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
102 | * @value: The initial value to set |
| 5441 | 103 | */ |
| 15884 | 104 | void purple_prefs_add_bool(const char *name, gboolean value); |
| 5441 | 105 | |
| 106 | /** | |
| 107 | * Add a new integer pref. | |
| 108 | * | |
|
37034
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
109 | * @name: The name of the pref |
|
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
110 | * @value: The initial value to set |
| 5441 | 111 | */ |
| 15884 | 112 | void purple_prefs_add_int(const char *name, int value); |
| 5441 | 113 | |
| 114 | /** | |
| 115 | * Add a new string pref. | |
| 116 | * | |
|
37034
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
117 | * @name: The name of the pref |
|
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
118 | * @value: The initial value to set |
| 5441 | 119 | */ |
| 15884 | 120 | void purple_prefs_add_string(const char *name, const char *value); |
| 5441 | 121 | |
| 122 | /** | |
| 5561 | 123 | * Add a new string list pref. |
| 124 | * | |
|
37034
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
125 | * @name: The name of the pref |
|
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
126 | * @value: The initial value to set |
|
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
127 | * Note: This function takes a copy of the strings in the value list. The list |
|
21054
6a5d95fe1c8a
Add notes about how the value argument to the
Etan Reisner <deryni@pidgin.im>
parents:
20940
diff
changeset
|
128 | * itself and original copies of the strings are up to the caller to |
|
6a5d95fe1c8a
Add notes about how the value argument to the
Etan Reisner <deryni@pidgin.im>
parents:
20940
diff
changeset
|
129 | * free. |
| 5561 | 130 | */ |
| 15884 | 131 | void purple_prefs_add_string_list(const char *name, GList *value); |
| 5561 | 132 | |
| 133 | /** | |
| 15370 | 134 | * Add a new path pref. |
| 135 | * | |
|
37034
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
136 | * @name: The name of the pref |
|
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
137 | * @value: The initial value to set |
| 15370 | 138 | */ |
| 15884 | 139 | void purple_prefs_add_path(const char *name, const char *value); |
| 15370 | 140 | |
| 141 | /** | |
| 142 | * Add a new path list pref. | |
| 143 | * | |
|
37034
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
144 | * @name: The name of the pref |
|
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
145 | * @value: The initial value to set |
|
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
146 | * Note: This function takes a copy of the strings in the value list. The list |
|
21054
6a5d95fe1c8a
Add notes about how the value argument to the
Etan Reisner <deryni@pidgin.im>
parents:
20940
diff
changeset
|
147 | * itself and original copies of the strings are up to the caller to |
|
6a5d95fe1c8a
Add notes about how the value argument to the
Etan Reisner <deryni@pidgin.im>
parents:
20940
diff
changeset
|
148 | * free. |
| 15370 | 149 | */ |
| 15884 | 150 | void purple_prefs_add_path_list(const char *name, GList *value); |
| 15370 | 151 | |
| 152 | ||
| 153 | /** | |
| 5441 | 154 | * Remove a pref. |
| 155 | * | |
|
37034
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
156 | * @name: The name of the pref |
| 5441 | 157 | */ |
| 15884 | 158 | void purple_prefs_remove(const char *name); |
| 5441 | 159 | |
| 160 | /** | |
| 6693 | 161 | * Rename a pref |
| 162 | * | |
|
37034
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
163 | * @oldname: The old name of the pref |
|
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
164 | * @newname: The new name for the pref |
| 6693 | 165 | */ |
| 15884 | 166 | void purple_prefs_rename(const char *oldname, const char *newname); |
| 6693 | 167 | |
| 168 | /** | |
| 8705 | 169 | * Rename a boolean pref, toggling it's value |
| 170 | * | |
|
37034
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
171 | * @oldname: The old name of the pref |
|
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
172 | * @newname: The new name for the pref |
| 8705 | 173 | */ |
| 15884 | 174 | void purple_prefs_rename_boolean_toggle(const char *oldname, const char *newname); |
| 8705 | 175 | |
| 176 | /** | |
| 5441 | 177 | * Remove all prefs. |
| 178 | */ | |
| 15884 | 179 | void purple_prefs_destroy(void); |
| 5441 | 180 | |
| 181 | /** | |
| 182 | * Set boolean pref value | |
| 183 | * | |
|
37034
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
184 | * @name: The name of the pref |
|
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
185 | * @value: The value to set |
| 5441 | 186 | */ |
| 15884 | 187 | void purple_prefs_set_bool(const char *name, gboolean value); |
| 5441 | 188 | |
| 189 | /** | |
| 190 | * Set integer pref value | |
| 191 | * | |
|
37034
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
192 | * @name: The name of the pref |
|
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
193 | * @value: The value to set |
| 5441 | 194 | */ |
| 15884 | 195 | void purple_prefs_set_int(const char *name, int value); |
| 5441 | 196 | |
| 197 | /** | |
| 198 | * Set string pref value | |
| 199 | * | |
|
37034
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
200 | * @name: The name of the pref |
|
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
201 | * @value: The value to set |
| 5441 | 202 | */ |
| 15884 | 203 | void purple_prefs_set_string(const char *name, const char *value); |
| 5441 | 204 | |
| 205 | /** | |
| 15370 | 206 | * Set string list pref value |
| 5561 | 207 | * |
|
37034
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
208 | * @name: The name of the pref |
|
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
209 | * @value: The value to set |
| 5561 | 210 | */ |
| 15884 | 211 | void purple_prefs_set_string_list(const char *name, GList *value); |
| 5561 | 212 | |
| 213 | /** | |
| 15370 | 214 | * Set path pref value |
| 215 | * | |
|
37034
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
216 | * @name: The name of the pref |
|
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
217 | * @value: The value to set |
| 15370 | 218 | */ |
| 15884 | 219 | void purple_prefs_set_path(const char *name, const char *value); |
| 15370 | 220 | |
| 221 | /** | |
| 222 | * Set path list pref value | |
| 223 | * | |
|
37034
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
224 | * @name: The name of the pref |
|
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
225 | * @value: The value to set |
| 15370 | 226 | */ |
| 15884 | 227 | void purple_prefs_set_path_list(const char *name, GList *value); |
| 15370 | 228 | |
| 229 | ||
| 230 | /** | |
| 9611 | 231 | * Check if a pref exists |
| 232 | * | |
|
37034
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
233 | * @name: The name of the pref |
|
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
234 | * Returns: TRUE if the pref exists. Otherwise FALSE. |
| 9611 | 235 | */ |
| 15884 | 236 | gboolean purple_prefs_exists(const char *name); |
| 9611 | 237 | |
| 238 | /** | |
| 6538 | 239 | * Get pref type |
| 240 | * | |
|
37034
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
241 | * @name: The name of the pref |
|
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
242 | * Returns: The type of the pref |
| 6538 | 243 | */ |
| 15884 | 244 | PurplePrefType purple_prefs_get_type(const char *name); |
| 6538 | 245 | |
| 246 | /** | |
| 5441 | 247 | * Get boolean pref value |
| 248 | * | |
|
37034
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
249 | * @name: The name of the pref |
|
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
250 | * Returns: The value of the pref |
| 5441 | 251 | */ |
| 15884 | 252 | gboolean purple_prefs_get_bool(const char *name); |
| 5441 | 253 | |
| 254 | /** | |
| 255 | * Get integer pref value | |
| 256 | * | |
|
37034
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
257 | * @name: The name of the pref |
|
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
258 | * Returns: The value of the pref |
| 5441 | 259 | */ |
| 15884 | 260 | int purple_prefs_get_int(const char *name); |
| 5441 | 261 | |
| 262 | /** | |
| 263 | * Get string pref value | |
| 264 | * | |
|
37034
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
265 | * @name: The name of the pref |
|
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
266 | * Returns: The value of the pref |
| 5441 | 267 | */ |
| 15884 | 268 | const char *purple_prefs_get_string(const char *name); |
| 5441 | 269 | |
| 270 | /** | |
|
10071
d2ba11541693
[gaim-migrate @ 11047]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
10066
diff
changeset
|
271 | * Get string list pref value |
| 5561 | 272 | * |
|
37034
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
273 | * @name: The name of the pref |
|
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
274 | * Returns: The value of the pref |
| 5561 | 275 | */ |
| 15884 | 276 | GList *purple_prefs_get_string_list(const char *name); |
| 5561 | 277 | |
| 278 | /** | |
| 15370 | 279 | * Get path pref value |
| 280 | * | |
|
37034
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
281 | * @name: The name of the pref |
|
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
282 | * Returns: The value of the pref |
| 15370 | 283 | */ |
| 15884 | 284 | const char *purple_prefs_get_path(const char *name); |
| 15370 | 285 | |
| 286 | /** | |
| 287 | * Get path list pref value | |
| 288 | * | |
|
37034
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
289 | * @name: The name of the pref |
|
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
290 | * Returns: The value of the pref |
| 15370 | 291 | */ |
| 15884 | 292 | GList *purple_prefs_get_path_list(const char *name); |
| 15370 | 293 | |
|
23129
f2be0f621ef6
Make this a doxygen comment.
Etan Reisner <deryni@pidgin.im>
parents:
21427
diff
changeset
|
294 | /** |
|
18714
65048af91a2c
Add purple_prefs_get_children_names in purple. And update Changelog.API
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15884
diff
changeset
|
295 | * Returns a list of children for a pref |
|
65048af91a2c
Add purple_prefs_get_children_names in purple. And update Changelog.API
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15884
diff
changeset
|
296 | * |
|
37034
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
297 | * @name: The parent pref |
|
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
298 | * Returns: A list of newly allocated strings denoting the names of the children. |
|
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
299 | * Returns %NULL if there are no children or if pref doesn't exist. |
|
18714
65048af91a2c
Add purple_prefs_get_children_names in purple. And update Changelog.API
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15884
diff
changeset
|
300 | * The caller must free all the strings and the list. |
|
65048af91a2c
Add purple_prefs_get_children_names in purple. And update Changelog.API
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15884
diff
changeset
|
301 | */ |
|
65048af91a2c
Add purple_prefs_get_children_names in purple. And update Changelog.API
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15884
diff
changeset
|
302 | GList *purple_prefs_get_children_names(const char *name); |
| 15370 | 303 | |
| 304 | /** | |
| 5441 | 305 | * Add a callback to a pref (and its children) |
|
27805
91e9fff01764
documents purple_prefs_connect_callback
Ka-Hing Cheung <khc@pidgin.im>
parents:
25911
diff
changeset
|
306 | * |
|
37034
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
307 | * @handle: The handle of the receiver. |
|
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
308 | * @name: The name of the preference |
|
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
309 | * @cb: The callback function |
|
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
310 | * @data: The data to pass to the callback function. |
|
27805
91e9fff01764
documents purple_prefs_connect_callback
Ka-Hing Cheung <khc@pidgin.im>
parents:
25911
diff
changeset
|
311 | * |
|
37034
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
312 | * Returns: An id to disconnect the callback |
|
27805
91e9fff01764
documents purple_prefs_connect_callback
Ka-Hing Cheung <khc@pidgin.im>
parents:
25911
diff
changeset
|
313 | * |
|
91e9fff01764
documents purple_prefs_connect_callback
Ka-Hing Cheung <khc@pidgin.im>
parents:
25911
diff
changeset
|
314 | * @see purple_prefs_disconnect_callback |
| 5441 | 315 | */ |
| 15884 | 316 | guint purple_prefs_connect_callback(void *handle, const char *name, PurplePrefCallback cb, |
| 5441 | 317 | gpointer data); |
| 318 | ||
| 319 | /** | |
| 320 | * Remove a callback to a pref | |
| 321 | */ | |
| 15884 | 322 | void purple_prefs_disconnect_callback(guint callback_id); |
| 5441 | 323 | |
| 324 | /** | |
|
10087
e5b80a38939d
[gaim-migrate @ 11098]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10071
diff
changeset
|
325 | * Remove all pref callbacks by handle |
|
e5b80a38939d
[gaim-migrate @ 11098]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10071
diff
changeset
|
326 | */ |
| 15884 | 327 | void purple_prefs_disconnect_by_handle(void *handle); |
|
10087
e5b80a38939d
[gaim-migrate @ 11098]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10071
diff
changeset
|
328 | |
|
e5b80a38939d
[gaim-migrate @ 11098]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10071
diff
changeset
|
329 | /** |
| 5684 | 330 | * Trigger callbacks as if the pref changed |
| 331 | */ | |
| 15884 | 332 | void purple_prefs_trigger_callback(const char *name); |
| 5684 | 333 | |
| 334 | /** | |
| 5441 | 335 | * Read preferences |
| 336 | */ | |
| 15884 | 337 | gboolean purple_prefs_load(void); |
| 5441 | 338 | |
| 339 | /*@}*/ | |
| 340 | ||
|
32787
7072f190d6ad
Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32438
diff
changeset
|
341 | G_END_DECLS |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
342 | |
| 15884 | 343 | #endif /* _PURPLE_PREFS_H_ */ |