Sun, 20 Nov 2005 17:29:09 +0000
[gaim-migrate @ 14474]
Fix the bugs with the account option string lists that Pekka Riikonen
mentioned on gaim-devel
| 5639 | 1 | /** |
| 2 | * @file accountopt.h Account Options API | |
| 3 | * @ingroup core | |
| 4 | * | |
| 5 | * gaim | |
| 6 | * | |
| 8046 | 7 | * Gaim is the legal property of its developers, whose names are too numerous |
| 8 | * to list here. Please refer to the COPYRIGHT file distributed with this | |
| 9 | * source distribution. | |
|
6902
bf0a4376750f
[gaim-migrate @ 7449]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
10 | * |
| 5639 | 11 | * This program is free software; you can redistribute it and/or modify |
| 12 | * it under the terms of the GNU General Public License as published by | |
| 13 | * the Free Software Foundation; either version 2 of the License, or | |
| 14 | * (at your option) any later version. | |
| 15 | * | |
| 16 | * This program is distributed in the hope that it will be useful, | |
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 19 | * GNU General Public License for more details. | |
| 20 | * | |
| 21 | * You should have received a copy of the GNU General Public License | |
| 22 | * along with this program; if not, write to the Free Software | |
| 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 24 | */ | |
|
9713
bb37562302a1
[gaim-migrate @ 10574]
Mark Doliner <markdoliner@pidgin.im>
parents:
8570
diff
changeset
|
25 | #ifndef _GAIM_ACCOUNTOPT_H_ |
|
bb37562302a1
[gaim-migrate @ 10574]
Mark Doliner <markdoliner@pidgin.im>
parents:
8570
diff
changeset
|
26 | #define _GAIM_ACCOUNTOPT_H_ |
| 5639 | 27 | |
| 28 | #include "prefs.h" | |
| 29 | ||
| 30 | /** | |
| 31 | * An option for an account. | |
|
6902
bf0a4376750f
[gaim-migrate @ 7449]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
32 | * |
| 5639 | 33 | * This is set by protocol plugins, and appears in the account settings |
| 34 | * dialogs. | |
| 35 | */ | |
| 36 | typedef struct | |
| 37 | { | |
| 38 | GaimPrefType type; /**< The type of value. */ | |
| 39 | ||
| 40 | char *text; /**< The text that will appear to the user. */ | |
| 41 | char *pref_name; /**< The name of the associated preference. */ | |
| 42 | ||
| 43 | union | |
| 44 | { | |
| 45 | gboolean boolean; /**< The default boolean value. */ | |
| 46 | int integer; /**< The default integer value. */ | |
| 47 | char *string; /**< The default string value. */ | |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
48 | GList *list; /**< The default list value. */ |
| 5639 | 49 | |
| 50 | } default_value; | |
| 51 | ||
| 10658 | 52 | gboolean masked; |
| 53 | ||
| 5639 | 54 | } GaimAccountOption; |
| 55 | ||
| 56 | /** | |
| 57 | * A username split. | |
| 58 | * | |
| 59 | * This is used by some protocols to separate the fields of the username | |
| 60 | * into more human-readable components. | |
| 61 | */ | |
| 62 | typedef struct | |
| 63 | { | |
| 64 | char *text; /**< The text that will appear to the user. */ | |
| 65 | char *default_value; /**< The default value. */ | |
| 66 | char field_sep; /**< The field separator. */ | |
| 67 | ||
| 68 | } GaimAccountUserSplit; | |
| 69 | ||
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5660
diff
changeset
|
70 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5660
diff
changeset
|
71 | extern "C" { |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5660
diff
changeset
|
72 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5660
diff
changeset
|
73 | |
| 5639 | 74 | /**************************************************************************/ |
| 75 | /** @name Account Option API */ | |
| 76 | /**************************************************************************/ | |
| 77 | /*@{*/ | |
| 78 | ||
| 79 | /** | |
| 80 | * Creates a new account option. | |
| 81 | * | |
| 82 | * @param type The type of option. | |
| 83 | * @param text The text of the option. | |
| 84 | * @param pref_name The account preference name for the option. | |
| 85 | * | |
| 86 | * @return The account option. | |
| 87 | */ | |
| 88 | GaimAccountOption *gaim_account_option_new(GaimPrefType type, const char *text, | |
| 89 | const char *pref_name); | |
| 90 | ||
| 91 | /** | |
| 92 | * Creates a new boolean account option. | |
| 93 | * | |
| 94 | * @param text The text of the option. | |
| 95 | * @param pref_name The account preference name for the option. | |
| 96 | * @param default_value The default value. | |
| 97 | * | |
| 98 | * @return The account option. | |
| 99 | */ | |
| 100 | GaimAccountOption *gaim_account_option_bool_new(const char *text, | |
| 101 | const char *pref_name, | |
| 102 | gboolean default_value); | |
| 103 | ||
| 104 | /** | |
| 105 | * Creates a new integer account option. | |
| 106 | * | |
| 107 | * @param text The text of the option. | |
| 108 | * @param pref_name The account preference name for the option. | |
| 109 | * @param default_value The default value. | |
| 110 | * | |
| 111 | * @return The account option. | |
| 112 | */ | |
| 113 | GaimAccountOption *gaim_account_option_int_new(const char *text, | |
| 114 | const char *pref_name, | |
| 115 | int default_value); | |
| 116 | ||
| 117 | /** | |
| 118 | * Creates a new string account option. | |
| 119 | * | |
| 120 | * @param text The text of the option. | |
| 121 | * @param pref_name The account preference name for the option. | |
| 122 | * @param default_value The default value. | |
| 123 | * | |
| 124 | * @return The account option. | |
| 125 | */ | |
| 126 | GaimAccountOption *gaim_account_option_string_new(const char *text, | |
| 127 | const char *pref_name, | |
| 128 | const char *default_value); | |
| 129 | ||
| 130 | /** | |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
131 | * Creates a new list account option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
132 | * |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
133 | * The list passed will be owned by the account option, and the |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
134 | * strings inside will be freed automatically. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
135 | * |
| 12106 | 136 | * The list is a list of GaimKeyValuePair items. The key is the ID stored and |
| 137 | * used internally, and the value is the label displayed. | |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
138 | * |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
139 | * @param text The text of the option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
140 | * @param pref_name The account preference name for the option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
141 | * @param list The key, value list. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
142 | * |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
143 | * @return The account option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
144 | */ |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
145 | GaimAccountOption *gaim_account_option_list_new(const char *text, |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
146 | const char *pref_name, |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
147 | GList *list); |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
148 | |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
149 | /** |
| 5639 | 150 | * Destroys an account option. |
| 151 | * | |
| 152 | * @param option The option to destroy. | |
| 153 | */ | |
| 154 | void gaim_account_option_destroy(GaimAccountOption *option); | |
| 155 | ||
| 156 | /** | |
| 157 | * Sets the default boolean value for an account option. | |
| 158 | * | |
| 159 | * @param option The account option. | |
| 160 | * @param value The default boolean value. | |
| 161 | */ | |
| 162 | void gaim_account_option_set_default_bool(GaimAccountOption *option, | |
| 163 | gboolean value); | |
| 164 | ||
| 165 | /** | |
| 166 | * Sets the default integer value for an account option. | |
| 167 | * | |
| 168 | * @param option The account option. | |
| 169 | * @param value The default integer value. | |
| 170 | */ | |
| 171 | void gaim_account_option_set_default_int(GaimAccountOption *option, | |
| 172 | int value); | |
| 173 | ||
| 174 | /** | |
| 175 | * Sets the default string value for an account option. | |
| 176 | * | |
| 177 | * @param option The account option. | |
| 178 | * @param value The default string value. | |
| 179 | */ | |
| 180 | void gaim_account_option_set_default_string(GaimAccountOption *option, | |
| 181 | const char *value); | |
| 182 | ||
| 183 | /** | |
| 10658 | 184 | * Sets the masking for an account option. |
| 185 | * | |
| 186 | * @param option The account option. | |
| 187 | * @param masked The masking. | |
| 188 | */ | |
| 189 | void | |
| 190 | gaim_account_option_set_masked(GaimAccountOption *option, gboolean masked); | |
| 191 | ||
| 192 | /** | |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
193 | * Sets the list values for an account option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
194 | * |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
195 | * The list passed will be owned by the account option, and the |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
196 | * strings inside will be freed automatically. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
197 | * |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
198 | * The list is in key, value pairs. The key is the ID stored and used |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
199 | * internally, and the value is the label displayed. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
200 | * |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
201 | * @param option The account option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
202 | * @param values The default list value. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
203 | */ |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
204 | void gaim_account_option_set_list(GaimAccountOption *option, GList *values); |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
205 | |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
206 | /** |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
207 | * Adds an item to a list account option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
208 | * |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
209 | * @param option The account option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
210 | * @param key The key. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
211 | * @param value The value. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
212 | */ |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
213 | void gaim_account_option_add_list_item(GaimAccountOption *option, |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
214 | const char *key, const char *value); |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
215 | |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
216 | /** |
| 5639 | 217 | * Returns the specified account option's type. |
| 218 | * | |
| 219 | * @param option The account option. | |
| 220 | * | |
| 221 | * @return The account option's type. | |
| 222 | */ | |
| 223 | GaimPrefType gaim_account_option_get_type(const GaimAccountOption *option); | |
| 224 | ||
| 225 | /** | |
| 226 | * Returns the text for an account option. | |
| 227 | * | |
| 228 | * @param option The accont option. | |
| 229 | * | |
| 230 | * @return The account option's text. | |
| 231 | */ | |
| 232 | const char *gaim_account_option_get_text(const GaimAccountOption *option); | |
| 233 | ||
| 234 | /** | |
|
5660
90787278c739
[gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents:
5654
diff
changeset
|
235 | * Returns the account setting for an account option. |
|
90787278c739
[gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents:
5654
diff
changeset
|
236 | * |
|
90787278c739
[gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents:
5654
diff
changeset
|
237 | * @param option The accont option. |
|
90787278c739
[gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents:
5654
diff
changeset
|
238 | * |
|
90787278c739
[gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents:
5654
diff
changeset
|
239 | * @return The account setting. |
|
90787278c739
[gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents:
5654
diff
changeset
|
240 | */ |
|
90787278c739
[gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents:
5654
diff
changeset
|
241 | const char *gaim_account_option_get_setting(const GaimAccountOption *option); |
|
90787278c739
[gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents:
5654
diff
changeset
|
242 | |
|
90787278c739
[gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents:
5654
diff
changeset
|
243 | /** |
| 5639 | 244 | * Returns the default boolean value for an account option. |
| 245 | * | |
| 246 | * @param option The account option. | |
|
6902
bf0a4376750f
[gaim-migrate @ 7449]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
247 | * |
| 5639 | 248 | * @return The default boolean value. |
| 249 | */ | |
| 250 | gboolean gaim_account_option_get_default_bool(const GaimAccountOption *option); | |
| 251 | ||
| 252 | /** | |
| 253 | * Returns the default integer value for an account option. | |
| 254 | * | |
| 255 | * @param option The account option. | |
|
6902
bf0a4376750f
[gaim-migrate @ 7449]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
256 | * |
| 5639 | 257 | * @return The default integer value. |
| 258 | */ | |
| 259 | int gaim_account_option_get_default_int(const GaimAccountOption *option); | |
| 260 | ||
| 261 | /** | |
| 262 | * Returns the default string value for an account option. | |
| 263 | * | |
| 264 | * @param option The account option. | |
|
6902
bf0a4376750f
[gaim-migrate @ 7449]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
265 | * |
| 5639 | 266 | * @return The default string value. |
| 267 | */ | |
| 268 | const char *gaim_account_option_get_default_string( | |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
269 | const GaimAccountOption *option); |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
270 | |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
271 | /** |
|
12172
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
272 | * Returns the default string value for a list account option. |
|
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
273 | * |
|
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
274 | * @param option The account option. |
|
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
275 | * |
|
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
276 | * @return The default list string value. |
|
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
277 | */ |
|
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
278 | const char *gaim_account_option_get_default_list_value( |
|
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
279 | const GaimAccountOption *option); |
|
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
280 | |
|
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
281 | /** |
| 10658 | 282 | * Returns the masking for an account option. |
| 283 | * | |
| 284 | * @param option The account option. | |
| 285 | * | |
| 286 | * @return The masking. | |
| 287 | */ | |
| 288 | gboolean | |
| 289 | gaim_account_option_get_masked(const GaimAccountOption *option); | |
| 290 | ||
| 291 | /** | |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
292 | * Returns the list values for an account option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
293 | * |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
294 | * @param option The account option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
295 | * |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
296 | * @return The list values. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
297 | */ |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
298 | const GList *gaim_account_option_get_list(const GaimAccountOption *option); |
| 5639 | 299 | |
| 300 | /*@}*/ | |
| 301 | ||
| 302 | ||
| 303 | /**************************************************************************/ | |
| 304 | /** @name Account User Split API */ | |
| 305 | /**************************************************************************/ | |
| 306 | /*@{*/ | |
| 307 | ||
| 308 | /** | |
| 309 | * Creates a new account username split. | |
| 310 | * | |
| 311 | * @param text The text of the option. | |
| 312 | * @param default_value The default value. | |
| 313 | * @param sep The field separator. | |
| 314 | * | |
| 315 | * @return The new user split. | |
| 316 | */ | |
| 317 | GaimAccountUserSplit *gaim_account_user_split_new(const char *text, | |
| 318 | const char *default_value, | |
| 319 | char sep); | |
| 320 | ||
| 321 | /** | |
| 322 | * Destroys an account username split. | |
| 323 | * | |
| 324 | * @param split The split to destroy. | |
| 325 | */ | |
| 326 | void gaim_account_user_split_destroy(GaimAccountUserSplit *split); | |
| 327 | ||
| 328 | /** | |
|
5654
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
329 | * Returns the text for an account username split. |
|
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
330 | * |
|
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
331 | * @param split The account username split. |
|
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
332 | * |
|
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
333 | * @return The account username split's text. |
|
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
334 | */ |
|
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
335 | const char *gaim_account_user_split_get_text(const GaimAccountUserSplit *split); |
|
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
336 | |
|
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
337 | /** |
| 5639 | 338 | * Returns the default string value for an account split. |
| 339 | * | |
| 340 | * @param split The account username split. | |
| 341 | * | |
| 342 | * @return The default string. | |
| 343 | */ | |
|
5654
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
344 | const char *gaim_account_user_split_get_default_value( |
| 5639 | 345 | const GaimAccountUserSplit *split); |
| 346 | ||
| 347 | /** | |
| 348 | * Returns the field separator for an account split. | |
| 349 | * | |
| 350 | * @param split The account username split. | |
| 351 | * | |
| 352 | * @return The field separator. | |
| 353 | */ | |
|
5654
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
354 | char gaim_account_user_split_get_separator(const GaimAccountUserSplit *split); |
| 5639 | 355 | |
| 356 | /*@}*/ | |
| 357 | ||
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5660
diff
changeset
|
358 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5660
diff
changeset
|
359 | } |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5660
diff
changeset
|
360 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5660
diff
changeset
|
361 | |
|
9713
bb37562302a1
[gaim-migrate @ 10574]
Mark Doliner <markdoliner@pidgin.im>
parents:
8570
diff
changeset
|
362 | #endif /* _GAIM_ACCOUNTOPT_H_ */ |