Sat, 18 Aug 2007 05:54:49 +0000
- Add purple_certificate_display_x509
| 5639 | 1 | /** |
| 2 | * @file accountopt.h Account Options API | |
| 3 | * @ingroup core | |
| 4 | * | |
| 15884 | 5 | * purple |
| 5639 | 6 | * |
| 15884 | 7 | * Purple is the legal property of its developers, whose names are too numerous |
| 8046 | 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 | */ | |
| 15884 | 25 | #ifndef _PURPLE_ACCOUNTOPT_H_ |
| 26 | #define _PURPLE_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 | { | |
| 15884 | 38 | PurplePrefType type; /**< The type of value. */ |
| 5639 | 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 | ||
| 15884 | 54 | } PurpleAccountOption; |
| 5639 | 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. */ | |
|
18099
f38988d232f7
jabber can contain @ symbols and / in the resource, so we have to look for
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
67 | gboolean reverse; /**< TRUE if the separator should be found |
|
f38988d232f7
jabber can contain @ symbols and / in the resource, so we have to look for
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
68 | starting a the end of the string, FALSE |
|
f38988d232f7
jabber can contain @ symbols and / in the resource, so we have to look for
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
69 | otherwise */ |
| 5639 | 70 | |
| 15884 | 71 | } PurpleAccountUserSplit; |
| 5639 | 72 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5660
diff
changeset
|
73 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5660
diff
changeset
|
74 | extern "C" { |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5660
diff
changeset
|
75 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5660
diff
changeset
|
76 | |
| 5639 | 77 | /**************************************************************************/ |
| 78 | /** @name Account Option API */ | |
| 79 | /**************************************************************************/ | |
| 80 | /*@{*/ | |
| 81 | ||
| 82 | /** | |
| 83 | * Creates a new account option. | |
| 84 | * | |
| 85 | * @param type The type of option. | |
| 86 | * @param text The text of the option. | |
| 87 | * @param pref_name The account preference name for the option. | |
| 88 | * | |
| 89 | * @return The account option. | |
| 90 | */ | |
| 15884 | 91 | PurpleAccountOption *purple_account_option_new(PurplePrefType type, const char *text, |
| 5639 | 92 | const char *pref_name); |
| 93 | ||
| 94 | /** | |
| 95 | * Creates a new boolean account option. | |
| 96 | * | |
| 97 | * @param text The text of the option. | |
| 98 | * @param pref_name The account preference name for the option. | |
| 99 | * @param default_value The default value. | |
| 100 | * | |
| 101 | * @return The account option. | |
| 102 | */ | |
| 15884 | 103 | PurpleAccountOption *purple_account_option_bool_new(const char *text, |
| 5639 | 104 | const char *pref_name, |
| 105 | gboolean default_value); | |
| 106 | ||
| 107 | /** | |
| 108 | * Creates a new integer account option. | |
| 109 | * | |
| 110 | * @param text The text of the option. | |
| 111 | * @param pref_name The account preference name for the option. | |
| 112 | * @param default_value The default value. | |
| 113 | * | |
| 114 | * @return The account option. | |
| 115 | */ | |
| 15884 | 116 | PurpleAccountOption *purple_account_option_int_new(const char *text, |
| 5639 | 117 | const char *pref_name, |
| 118 | int default_value); | |
| 119 | ||
| 120 | /** | |
| 121 | * Creates a new string account option. | |
| 122 | * | |
| 123 | * @param text The text of the option. | |
| 124 | * @param pref_name The account preference name for the option. | |
| 125 | * @param default_value The default value. | |
| 126 | * | |
| 127 | * @return The account option. | |
| 128 | */ | |
| 15884 | 129 | PurpleAccountOption *purple_account_option_string_new(const char *text, |
| 5639 | 130 | const char *pref_name, |
| 131 | const char *default_value); | |
| 132 | ||
| 133 | /** | |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
134 | * Creates a new list account option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
135 | * |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
136 | * 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
|
137 | * strings inside will be freed automatically. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
138 | * |
| 15884 | 139 | * The list is a list of PurpleKeyValuePair items. The key is the ID stored and |
| 12106 | 140 | * used internally, and the value is the label displayed. |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
141 | * |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
142 | * @param text The text of the option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
143 | * @param pref_name The account preference name for the option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
144 | * @param list The key, value list. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
145 | * |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
146 | * @return The account option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
147 | */ |
| 15884 | 148 | PurpleAccountOption *purple_account_option_list_new(const char *text, |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
149 | const char *pref_name, |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
150 | GList *list); |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
151 | |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
152 | /** |
| 5639 | 153 | * Destroys an account option. |
| 154 | * | |
| 155 | * @param option The option to destroy. | |
| 156 | */ | |
| 15884 | 157 | void purple_account_option_destroy(PurpleAccountOption *option); |
| 5639 | 158 | |
| 159 | /** | |
| 160 | * Sets the default boolean value for an account option. | |
| 161 | * | |
| 162 | * @param option The account option. | |
| 163 | * @param value The default boolean value. | |
| 164 | */ | |
| 15884 | 165 | void purple_account_option_set_default_bool(PurpleAccountOption *option, |
| 5639 | 166 | gboolean value); |
| 167 | ||
| 168 | /** | |
| 169 | * Sets the default integer value for an account option. | |
| 170 | * | |
| 171 | * @param option The account option. | |
| 172 | * @param value The default integer value. | |
| 173 | */ | |
| 15884 | 174 | void purple_account_option_set_default_int(PurpleAccountOption *option, |
| 5639 | 175 | int value); |
| 176 | ||
| 177 | /** | |
| 178 | * Sets the default string value for an account option. | |
| 179 | * | |
| 180 | * @param option The account option. | |
| 181 | * @param value The default string value. | |
| 182 | */ | |
| 15884 | 183 | void purple_account_option_set_default_string(PurpleAccountOption *option, |
| 5639 | 184 | const char *value); |
| 185 | ||
| 186 | /** | |
| 10658 | 187 | * Sets the masking for an account option. |
| 188 | * | |
| 189 | * @param option The account option. | |
| 190 | * @param masked The masking. | |
| 191 | */ | |
| 192 | void | |
| 15884 | 193 | purple_account_option_set_masked(PurpleAccountOption *option, gboolean masked); |
| 10658 | 194 | |
| 195 | /** | |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
196 | * Sets the list values for an account option. |
|
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 passed will be owned by the account option, and the |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
199 | * strings inside will be freed automatically. |
|
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 | * 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
|
202 | * internally, and the value is the label displayed. |
|
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 | * @param option The account option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
205 | * @param values The default list value. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
206 | */ |
| 15884 | 207 | void purple_account_option_set_list(PurpleAccountOption *option, GList *values); |
|
8570
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 | /** |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
210 | * Adds an item to a list account option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
211 | * |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
212 | * @param option The account option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
213 | * @param key The key. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
214 | * @param value The value. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
215 | */ |
| 15884 | 216 | void purple_account_option_add_list_item(PurpleAccountOption *option, |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
217 | const char *key, const char *value); |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
218 | |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
219 | /** |
| 5639 | 220 | * Returns the specified account option's type. |
| 221 | * | |
| 222 | * @param option The account option. | |
| 223 | * | |
| 224 | * @return The account option's type. | |
| 225 | */ | |
| 15884 | 226 | PurplePrefType purple_account_option_get_type(const PurpleAccountOption *option); |
| 5639 | 227 | |
| 228 | /** | |
| 229 | * Returns the text for an account option. | |
| 230 | * | |
|
13310
dff5b1615a1a
[gaim-migrate @ 15675]
Richard Laager <rlaager@pidgin.im>
parents:
12172
diff
changeset
|
231 | * @param option The account option. |
| 5639 | 232 | * |
| 233 | * @return The account option's text. | |
| 234 | */ | |
| 15884 | 235 | const char *purple_account_option_get_text(const PurpleAccountOption *option); |
| 5639 | 236 | |
| 237 | /** | |
|
5660
90787278c739
[gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents:
5654
diff
changeset
|
238 | * Returns the account setting for an account option. |
|
90787278c739
[gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents:
5654
diff
changeset
|
239 | * |
|
13310
dff5b1615a1a
[gaim-migrate @ 15675]
Richard Laager <rlaager@pidgin.im>
parents:
12172
diff
changeset
|
240 | * @param option The account option. |
|
5660
90787278c739
[gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents:
5654
diff
changeset
|
241 | * |
|
90787278c739
[gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents:
5654
diff
changeset
|
242 | * @return The account setting. |
|
90787278c739
[gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents:
5654
diff
changeset
|
243 | */ |
| 15884 | 244 | const char *purple_account_option_get_setting(const PurpleAccountOption *option); |
|
5660
90787278c739
[gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents:
5654
diff
changeset
|
245 | |
|
90787278c739
[gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents:
5654
diff
changeset
|
246 | /** |
| 5639 | 247 | * Returns the default boolean value for an account option. |
| 248 | * | |
| 249 | * @param option The account option. | |
|
6902
bf0a4376750f
[gaim-migrate @ 7449]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
250 | * |
| 5639 | 251 | * @return The default boolean value. |
| 252 | */ | |
| 15884 | 253 | gboolean purple_account_option_get_default_bool(const PurpleAccountOption *option); |
| 5639 | 254 | |
| 255 | /** | |
| 256 | * Returns the default integer value for an account option. | |
| 257 | * | |
| 258 | * @param option The account option. | |
|
6902
bf0a4376750f
[gaim-migrate @ 7449]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
259 | * |
| 5639 | 260 | * @return The default integer value. |
| 261 | */ | |
| 15884 | 262 | int purple_account_option_get_default_int(const PurpleAccountOption *option); |
| 5639 | 263 | |
| 264 | /** | |
| 265 | * Returns the default string value for an account option. | |
| 266 | * | |
| 267 | * @param option The account option. | |
|
6902
bf0a4376750f
[gaim-migrate @ 7449]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
268 | * |
| 5639 | 269 | * @return The default string value. |
| 270 | */ | |
| 15884 | 271 | const char *purple_account_option_get_default_string( |
| 272 | const PurpleAccountOption *option); | |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
273 | |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
274 | /** |
|
12172
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
275 | * Returns the default string value for a list account option. |
|
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
276 | * |
|
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
277 | * @param option The account option. |
|
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
278 | * |
|
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
279 | * @return The default list string value. |
|
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
280 | */ |
| 15884 | 281 | const char *purple_account_option_get_default_list_value( |
| 282 | const PurpleAccountOption *option); | |
|
12172
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
283 | |
|
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
284 | /** |
| 10658 | 285 | * Returns the masking for an account option. |
| 286 | * | |
| 287 | * @param option The account option. | |
| 288 | * | |
| 289 | * @return The masking. | |
| 290 | */ | |
| 291 | gboolean | |
| 15884 | 292 | purple_account_option_get_masked(const PurpleAccountOption *option); |
| 10658 | 293 | |
| 294 | /** | |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
295 | * Returns the list values for an account option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
296 | * |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
297 | * @param option The account option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
298 | * |
|
18190
bcf28ef7e8ff
Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@pidgin.im>
parents:
18099
diff
changeset
|
299 | * @constreturn The list values. |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
300 | */ |
|
18190
bcf28ef7e8ff
Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@pidgin.im>
parents:
18099
diff
changeset
|
301 | GList *purple_account_option_get_list(const PurpleAccountOption *option); |
| 5639 | 302 | |
| 303 | /*@}*/ | |
| 304 | ||
| 305 | ||
| 306 | /**************************************************************************/ | |
| 307 | /** @name Account User Split API */ | |
| 308 | /**************************************************************************/ | |
| 309 | /*@{*/ | |
| 310 | ||
| 311 | /** | |
| 312 | * Creates a new account username split. | |
| 313 | * | |
| 314 | * @param text The text of the option. | |
| 315 | * @param default_value The default value. | |
| 316 | * @param sep The field separator. | |
| 317 | * | |
| 318 | * @return The new user split. | |
| 319 | */ | |
| 15884 | 320 | PurpleAccountUserSplit *purple_account_user_split_new(const char *text, |
| 5639 | 321 | const char *default_value, |
| 322 | char sep); | |
| 323 | ||
| 324 | /** | |
| 325 | * Destroys an account username split. | |
| 326 | * | |
| 327 | * @param split The split to destroy. | |
| 328 | */ | |
| 15884 | 329 | void purple_account_user_split_destroy(PurpleAccountUserSplit *split); |
| 5639 | 330 | |
| 331 | /** | |
|
5654
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
332 | * Returns the text for an account username split. |
|
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
333 | * |
|
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
334 | * @param split The account username split. |
|
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
335 | * |
|
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
336 | * @return The account username split's text. |
|
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
337 | */ |
| 15884 | 338 | const char *purple_account_user_split_get_text(const PurpleAccountUserSplit *split); |
|
5654
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
339 | |
|
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
340 | /** |
| 5639 | 341 | * Returns the default string value for an account split. |
| 342 | * | |
| 343 | * @param split The account username split. | |
| 344 | * | |
| 345 | * @return The default string. | |
| 346 | */ | |
| 15884 | 347 | const char *purple_account_user_split_get_default_value( |
| 348 | const PurpleAccountUserSplit *split); | |
| 5639 | 349 | |
| 350 | /** | |
| 351 | * Returns the field separator for an account split. | |
| 352 | * | |
| 353 | * @param split The account username split. | |
| 354 | * | |
| 355 | * @return The field separator. | |
| 356 | */ | |
| 15884 | 357 | char purple_account_user_split_get_separator(const PurpleAccountUserSplit *split); |
| 5639 | 358 | |
|
18099
f38988d232f7
jabber can contain @ symbols and / in the resource, so we have to look for
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
359 | /** |
|
f38988d232f7
jabber can contain @ symbols and / in the resource, so we have to look for
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
360 | * Returns the 'reverse' value for an account split. |
|
f38988d232f7
jabber can contain @ symbols and / in the resource, so we have to look for
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
361 | * |
|
f38988d232f7
jabber can contain @ symbols and / in the resource, so we have to look for
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
362 | * @param split The account username split. |
|
f38988d232f7
jabber can contain @ symbols and / in the resource, so we have to look for
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
363 | * |
|
f38988d232f7
jabber can contain @ symbols and / in the resource, so we have to look for
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
364 | * @return The 'reverse' value. |
|
f38988d232f7
jabber can contain @ symbols and / in the resource, so we have to look for
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
365 | */ |
|
f38988d232f7
jabber can contain @ symbols and / in the resource, so we have to look for
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
366 | gboolean purple_account_user_split_get_reverse(const PurpleAccountUserSplit *split); |
|
f38988d232f7
jabber can contain @ symbols and / in the resource, so we have to look for
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
367 | |
|
f38988d232f7
jabber can contain @ symbols and / in the resource, so we have to look for
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
368 | /** |
|
f38988d232f7
jabber can contain @ symbols and / in the resource, so we have to look for
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
369 | * Sets the 'reverse' value for an account split. |
|
f38988d232f7
jabber can contain @ symbols and / in the resource, so we have to look for
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
370 | * |
|
f38988d232f7
jabber can contain @ symbols and / in the resource, so we have to look for
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
371 | * @param split The account username split. |
|
f38988d232f7
jabber can contain @ symbols and / in the resource, so we have to look for
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
372 | * @param reverse The 'reverse' value |
|
f38988d232f7
jabber can contain @ symbols and / in the resource, so we have to look for
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
373 | */ |
|
f38988d232f7
jabber can contain @ symbols and / in the resource, so we have to look for
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
374 | void purple_account_user_split_set_reverse(PurpleAccountUserSplit *split, gboolean reverse); |
|
f38988d232f7
jabber can contain @ symbols and / in the resource, so we have to look for
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
375 | |
| 5639 | 376 | /*@}*/ |
| 377 | ||
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5660
diff
changeset
|
378 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5660
diff
changeset
|
379 | } |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5660
diff
changeset
|
380 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5660
diff
changeset
|
381 | |
| 15884 | 382 | #endif /* _PURPLE_ACCOUNTOPT_H_ */ |