Sun, 20 Jan 2008 13:31:19 +0000
Improve some PurpleAcountOption documentation, and sanify some whitespace.
(purple_account_option_get_setting has a silly name, given that it returns the
pref's name, not its value.)
| 5639 | 1 | /** |
| 2 | * @file accountopt.h Account Options API | |
| 3 | * @ingroup core | |
|
20147
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
20040
diff
changeset
|
4 | */ |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
20040
diff
changeset
|
5 | |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
20040
diff
changeset
|
6 | /* purple |
| 5639 | 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. | |
|
6902
bf0a4376750f
[gaim-migrate @ 7449]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
11 | * |
| 5639 | 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:
18190
diff
changeset
|
24 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 5639 | 25 | */ |
| 15884 | 26 | #ifndef _PURPLE_ACCOUNTOPT_H_ |
| 27 | #define _PURPLE_ACCOUNTOPT_H_ | |
| 5639 | 28 | |
| 29 | #include "prefs.h" | |
| 30 | ||
| 31 | /** | |
| 32 | * An option for an account. | |
|
6902
bf0a4376750f
[gaim-migrate @ 7449]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
33 | * |
| 5639 | 34 | * This is set by protocol plugins, and appears in the account settings |
| 35 | * dialogs. | |
| 36 | */ | |
| 37 | typedef struct | |
| 38 | { | |
| 15884 | 39 | PurplePrefType type; /**< The type of value. */ |
| 5639 | 40 | |
| 41 | char *text; /**< The text that will appear to the user. */ | |
| 42 | char *pref_name; /**< The name of the associated preference. */ | |
| 43 | ||
| 44 | union | |
| 45 | { | |
| 46 | gboolean boolean; /**< The default boolean value. */ | |
| 47 | int integer; /**< The default integer value. */ | |
| 48 | char *string; /**< The default string value. */ | |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
49 | GList *list; /**< The default list value. */ |
| 5639 | 50 | |
| 51 | } default_value; | |
| 52 | ||
|
20040
57572bb85e07
Explain what PurpleAccountOption.masked and its setters and getters
Will Thompson <resiak@pidgin.im>
parents:
19859
diff
changeset
|
53 | gboolean masked; /**< Whether the value entered should be |
|
57572bb85e07
Explain what PurpleAccountOption.masked and its setters and getters
Will Thompson <resiak@pidgin.im>
parents:
19859
diff
changeset
|
54 | * obscured from view (for passwords and |
|
57572bb85e07
Explain what PurpleAccountOption.masked and its setters and getters
Will Thompson <resiak@pidgin.im>
parents:
19859
diff
changeset
|
55 | * similar options) |
|
57572bb85e07
Explain what PurpleAccountOption.masked and its setters and getters
Will Thompson <resiak@pidgin.im>
parents:
19859
diff
changeset
|
56 | */ |
| 15884 | 57 | } PurpleAccountOption; |
| 5639 | 58 | |
| 59 | /** | |
| 60 | * A username split. | |
| 61 | * | |
| 62 | * This is used by some protocols to separate the fields of the username | |
| 63 | * into more human-readable components. | |
| 64 | */ | |
| 65 | typedef struct | |
| 66 | { | |
| 67 | char *text; /**< The text that will appear to the user. */ | |
| 68 | char *default_value; /**< The default value. */ | |
| 69 | 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
|
70 | 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
|
71 | 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
|
72 | otherwise */ |
| 5639 | 73 | |
| 15884 | 74 | } PurpleAccountUserSplit; |
| 5639 | 75 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5660
diff
changeset
|
76 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5660
diff
changeset
|
77 | extern "C" { |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5660
diff
changeset
|
78 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5660
diff
changeset
|
79 | |
| 5639 | 80 | /**************************************************************************/ |
| 81 | /** @name Account Option API */ | |
| 82 | /**************************************************************************/ | |
| 83 | /*@{*/ | |
| 84 | ||
| 85 | /** | |
|
22256
267223b42a73
Improve some PurpleAcountOption documentation, and sanify some whitespace.
Will Thompson <resiak@pidgin.im>
parents:
20147
diff
changeset
|
86 | * Creates a new account option. If you know what @a type will be in advance, |
|
267223b42a73
Improve some PurpleAcountOption documentation, and sanify some whitespace.
Will Thompson <resiak@pidgin.im>
parents:
20147
diff
changeset
|
87 | * consider using purple_account_option_bool_new(), |
|
267223b42a73
Improve some PurpleAcountOption documentation, and sanify some whitespace.
Will Thompson <resiak@pidgin.im>
parents:
20147
diff
changeset
|
88 | * purple_account_option_int_new(), purple_account_option_string_new() or |
|
267223b42a73
Improve some PurpleAcountOption documentation, and sanify some whitespace.
Will Thompson <resiak@pidgin.im>
parents:
20147
diff
changeset
|
89 | * purple_account_option_list_new() (as appropriate) instead. |
| 5639 | 90 | * |
| 91 | * @param type The type of option. | |
| 92 | * @param text The text of the option. | |
| 93 | * @param pref_name The account preference name for the option. | |
| 94 | * | |
| 95 | * @return The account option. | |
| 96 | */ | |
|
22256
267223b42a73
Improve some PurpleAcountOption documentation, and sanify some whitespace.
Will Thompson <resiak@pidgin.im>
parents:
20147
diff
changeset
|
97 | PurpleAccountOption *purple_account_option_new(PurplePrefType type, |
|
267223b42a73
Improve some PurpleAcountOption documentation, and sanify some whitespace.
Will Thompson <resiak@pidgin.im>
parents:
20147
diff
changeset
|
98 | const char *text, const char *pref_name); |
| 5639 | 99 | |
| 100 | /** | |
| 101 | * Creates a new boolean account option. | |
| 102 | * | |
| 103 | * @param text The text of the option. | |
| 104 | * @param pref_name The account preference name for the option. | |
| 105 | * @param default_value The default value. | |
| 106 | * | |
| 107 | * @return The account option. | |
| 108 | */ | |
| 15884 | 109 | PurpleAccountOption *purple_account_option_bool_new(const char *text, |
|
22256
267223b42a73
Improve some PurpleAcountOption documentation, and sanify some whitespace.
Will Thompson <resiak@pidgin.im>
parents:
20147
diff
changeset
|
110 | const char *pref_name, gboolean default_value); |
| 5639 | 111 | |
| 112 | /** | |
| 113 | * Creates a new integer account option. | |
| 114 | * | |
| 115 | * @param text The text of the option. | |
| 116 | * @param pref_name The account preference name for the option. | |
| 117 | * @param default_value The default value. | |
| 118 | * | |
| 119 | * @return The account option. | |
| 120 | */ | |
| 15884 | 121 | PurpleAccountOption *purple_account_option_int_new(const char *text, |
|
22256
267223b42a73
Improve some PurpleAcountOption documentation, and sanify some whitespace.
Will Thompson <resiak@pidgin.im>
parents:
20147
diff
changeset
|
122 | const char *pref_name, int default_value); |
| 5639 | 123 | |
| 124 | /** | |
| 125 | * Creates a new string account option. | |
| 126 | * | |
| 127 | * @param text The text of the option. | |
| 128 | * @param pref_name The account preference name for the option. | |
| 129 | * @param default_value The default value. | |
| 130 | * | |
| 131 | * @return The account option. | |
| 132 | */ | |
| 15884 | 133 | PurpleAccountOption *purple_account_option_string_new(const char *text, |
|
22256
267223b42a73
Improve some PurpleAcountOption documentation, and sanify some whitespace.
Will Thompson <resiak@pidgin.im>
parents:
20147
diff
changeset
|
134 | const char *pref_name, const char *default_value); |
| 5639 | 135 | |
| 136 | /** | |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
137 | * Creates a new list account option. |
|
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 | * 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
|
140 | * strings inside will be freed automatically. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
141 | * |
| 15884 | 142 | * The list is a list of PurpleKeyValuePair items. The key is the ID stored and |
|
22256
267223b42a73
Improve some PurpleAcountOption documentation, and sanify some whitespace.
Will Thompson <resiak@pidgin.im>
parents:
20147
diff
changeset
|
143 | * used internally, and the <tt>(const char *)</tt> value is the label displayed. |
|
8570
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 | * @param text The text of the option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
146 | * @param pref_name The account preference name for the option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
147 | * @param list The key, value 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 | * @return The account option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
150 | */ |
| 15884 | 151 | PurpleAccountOption *purple_account_option_list_new(const char *text, |
|
22256
267223b42a73
Improve some PurpleAcountOption documentation, and sanify some whitespace.
Will Thompson <resiak@pidgin.im>
parents:
20147
diff
changeset
|
152 | const char *pref_name, GList *list); |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
153 | |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
154 | /** |
| 5639 | 155 | * Destroys an account option. |
| 156 | * | |
| 157 | * @param option The option to destroy. | |
| 158 | */ | |
| 15884 | 159 | void purple_account_option_destroy(PurpleAccountOption *option); |
| 5639 | 160 | |
| 161 | /** | |
| 162 | * Sets the default boolean value for an account option. | |
| 163 | * | |
| 164 | * @param option The account option. | |
| 165 | * @param value The default boolean value. | |
| 166 | */ | |
| 15884 | 167 | void purple_account_option_set_default_bool(PurpleAccountOption *option, |
| 5639 | 168 | gboolean value); |
| 169 | ||
| 170 | /** | |
| 171 | * Sets the default integer value for an account option. | |
| 172 | * | |
| 173 | * @param option The account option. | |
| 174 | * @param value The default integer value. | |
| 175 | */ | |
| 15884 | 176 | void purple_account_option_set_default_int(PurpleAccountOption *option, |
| 5639 | 177 | int value); |
| 178 | ||
| 179 | /** | |
| 180 | * Sets the default string value for an account option. | |
| 181 | * | |
| 182 | * @param option The account option. | |
| 183 | * @param value The default string value. | |
| 184 | */ | |
| 15884 | 185 | void purple_account_option_set_default_string(PurpleAccountOption *option, |
| 5639 | 186 | const char *value); |
| 187 | ||
| 188 | /** | |
|
20040
57572bb85e07
Explain what PurpleAccountOption.masked and its setters and getters
Will Thompson <resiak@pidgin.im>
parents:
19859
diff
changeset
|
189 | * Sets the masking for an account option. Setting this to %TRUE acts |
|
57572bb85e07
Explain what PurpleAccountOption.masked and its setters and getters
Will Thompson <resiak@pidgin.im>
parents:
19859
diff
changeset
|
190 | * as a hint to the UI that the option's value should be obscured from |
|
57572bb85e07
Explain what PurpleAccountOption.masked and its setters and getters
Will Thompson <resiak@pidgin.im>
parents:
19859
diff
changeset
|
191 | * view, like a password. |
| 10658 | 192 | * |
| 193 | * @param option The account option. | |
|
20040
57572bb85e07
Explain what PurpleAccountOption.masked and its setters and getters
Will Thompson <resiak@pidgin.im>
parents:
19859
diff
changeset
|
194 | * @param masked The masking. |
| 10658 | 195 | */ |
| 196 | void | |
| 15884 | 197 | purple_account_option_set_masked(PurpleAccountOption *option, gboolean masked); |
| 10658 | 198 | |
| 199 | /** | |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
200 | * Sets the list values for an account option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
201 | * |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
202 | * 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
|
203 | * strings inside will be freed automatically. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
204 | * |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
205 | * 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
|
206 | * internally, and the value is the label displayed. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
207 | * |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
208 | * @param option The account option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
209 | * @param values The default list value. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
210 | */ |
| 15884 | 211 | void purple_account_option_set_list(PurpleAccountOption *option, GList *values); |
|
8570
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 | /** |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
214 | * Adds an item to a list account option. |
|
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 | * @param option The account option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
217 | * @param key The key. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
218 | * @param value The value. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
219 | */ |
| 15884 | 220 | void purple_account_option_add_list_item(PurpleAccountOption *option, |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
221 | const char *key, const char *value); |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
222 | |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
223 | /** |
| 5639 | 224 | * Returns the specified account option's type. |
| 225 | * | |
| 226 | * @param option The account option. | |
| 227 | * | |
| 228 | * @return The account option's type. | |
| 229 | */ | |
| 15884 | 230 | PurplePrefType purple_account_option_get_type(const PurpleAccountOption *option); |
| 5639 | 231 | |
| 232 | /** | |
| 233 | * Returns the text for an account option. | |
| 234 | * | |
|
13310
dff5b1615a1a
[gaim-migrate @ 15675]
Richard Laager <rlaager@pidgin.im>
parents:
12172
diff
changeset
|
235 | * @param option The account option. |
| 5639 | 236 | * |
| 237 | * @return The account option's text. | |
| 238 | */ | |
| 15884 | 239 | const char *purple_account_option_get_text(const PurpleAccountOption *option); |
| 5639 | 240 | |
| 241 | /** | |
|
22256
267223b42a73
Improve some PurpleAcountOption documentation, and sanify some whitespace.
Will Thompson <resiak@pidgin.im>
parents:
20147
diff
changeset
|
242 | * Returns the name of an account option. This corresponds to the @c pref_name |
|
267223b42a73
Improve some PurpleAcountOption documentation, and sanify some whitespace.
Will Thompson <resiak@pidgin.im>
parents:
20147
diff
changeset
|
243 | * parameter supplied to purple_account_option_new() or one of the |
|
267223b42a73
Improve some PurpleAcountOption documentation, and sanify some whitespace.
Will Thompson <resiak@pidgin.im>
parents:
20147
diff
changeset
|
244 | * type-specific constructors. |
|
5660
90787278c739
[gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents:
5654
diff
changeset
|
245 | * |
|
13310
dff5b1615a1a
[gaim-migrate @ 15675]
Richard Laager <rlaager@pidgin.im>
parents:
12172
diff
changeset
|
246 | * @param option The account option. |
|
5660
90787278c739
[gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents:
5654
diff
changeset
|
247 | * |
|
22256
267223b42a73
Improve some PurpleAcountOption documentation, and sanify some whitespace.
Will Thompson <resiak@pidgin.im>
parents:
20147
diff
changeset
|
248 | * @return The option's name. |
|
5660
90787278c739
[gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents:
5654
diff
changeset
|
249 | */ |
| 15884 | 250 | const char *purple_account_option_get_setting(const PurpleAccountOption *option); |
|
5660
90787278c739
[gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents:
5654
diff
changeset
|
251 | |
|
90787278c739
[gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents:
5654
diff
changeset
|
252 | /** |
| 5639 | 253 | * Returns the default boolean 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 boolean value. |
| 258 | */ | |
| 15884 | 259 | gboolean purple_account_option_get_default_bool(const PurpleAccountOption *option); |
| 5639 | 260 | |
| 261 | /** | |
| 262 | * Returns the default integer 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 integer value. |
| 267 | */ | |
| 15884 | 268 | int purple_account_option_get_default_int(const PurpleAccountOption *option); |
| 5639 | 269 | |
| 270 | /** | |
| 271 | * Returns the default string value for an account option. | |
| 272 | * | |
| 273 | * @param option The account option. | |
|
6902
bf0a4376750f
[gaim-migrate @ 7449]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
274 | * |
| 5639 | 275 | * @return The default string value. |
| 276 | */ | |
| 15884 | 277 | const char *purple_account_option_get_default_string( |
| 278 | const PurpleAccountOption *option); | |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
279 | |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
280 | /** |
|
12172
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
281 | * Returns the default string value for a list account option. |
|
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
282 | * |
|
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
283 | * @param option The account option. |
|
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
284 | * |
|
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
285 | * @return The default list string value. |
|
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
286 | */ |
| 15884 | 287 | const char *purple_account_option_get_default_list_value( |
| 288 | const PurpleAccountOption *option); | |
|
12172
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
289 | |
|
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
290 | /** |
|
20040
57572bb85e07
Explain what PurpleAccountOption.masked and its setters and getters
Will Thompson <resiak@pidgin.im>
parents:
19859
diff
changeset
|
291 | * Returns whether an option's value should be masked from view, like a |
|
57572bb85e07
Explain what PurpleAccountOption.masked and its setters and getters
Will Thompson <resiak@pidgin.im>
parents:
19859
diff
changeset
|
292 | * password. If so, the UI might display each character of the option |
|
57572bb85e07
Explain what PurpleAccountOption.masked and its setters and getters
Will Thompson <resiak@pidgin.im>
parents:
19859
diff
changeset
|
293 | * as a '*' (for example). |
| 10658 | 294 | * |
| 295 | * @param option The account option. | |
| 296 | * | |
|
20040
57572bb85e07
Explain what PurpleAccountOption.masked and its setters and getters
Will Thompson <resiak@pidgin.im>
parents:
19859
diff
changeset
|
297 | * @return %TRUE if the option's value should be obscured. |
| 10658 | 298 | */ |
| 299 | gboolean | |
| 15884 | 300 | purple_account_option_get_masked(const PurpleAccountOption *option); |
| 10658 | 301 | |
| 302 | /** | |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
303 | * Returns the list values for an account option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
304 | * |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
305 | * @param option The account option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
306 | * |
|
18190
bcf28ef7e8ff
Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@pidgin.im>
parents:
18099
diff
changeset
|
307 | * @constreturn The list values. |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
308 | */ |
|
18190
bcf28ef7e8ff
Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@pidgin.im>
parents:
18099
diff
changeset
|
309 | GList *purple_account_option_get_list(const PurpleAccountOption *option); |
| 5639 | 310 | |
| 311 | /*@}*/ | |
| 312 | ||
| 313 | ||
| 314 | /**************************************************************************/ | |
| 315 | /** @name Account User Split API */ | |
| 316 | /**************************************************************************/ | |
| 317 | /*@{*/ | |
| 318 | ||
| 319 | /** | |
| 320 | * Creates a new account username split. | |
| 321 | * | |
| 322 | * @param text The text of the option. | |
| 323 | * @param default_value The default value. | |
| 324 | * @param sep The field separator. | |
| 325 | * | |
| 326 | * @return The new user split. | |
| 327 | */ | |
| 15884 | 328 | PurpleAccountUserSplit *purple_account_user_split_new(const char *text, |
| 5639 | 329 | const char *default_value, |
| 330 | char sep); | |
| 331 | ||
| 332 | /** | |
| 333 | * Destroys an account username split. | |
| 334 | * | |
| 335 | * @param split The split to destroy. | |
| 336 | */ | |
| 15884 | 337 | void purple_account_user_split_destroy(PurpleAccountUserSplit *split); |
| 5639 | 338 | |
| 339 | /** | |
|
5654
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
340 | * Returns the text for an account username split. |
|
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
341 | * |
|
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
342 | * @param split The account username split. |
|
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
343 | * |
|
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
344 | * @return The account username split's text. |
|
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
345 | */ |
| 15884 | 346 | 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
|
347 | |
|
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
348 | /** |
| 5639 | 349 | * Returns the default string value for an account split. |
| 350 | * | |
| 351 | * @param split The account username split. | |
| 352 | * | |
| 353 | * @return The default string. | |
| 354 | */ | |
| 15884 | 355 | const char *purple_account_user_split_get_default_value( |
| 356 | const PurpleAccountUserSplit *split); | |
| 5639 | 357 | |
| 358 | /** | |
| 359 | * Returns the field separator for an account split. | |
| 360 | * | |
| 361 | * @param split The account username split. | |
| 362 | * | |
| 363 | * @return The field separator. | |
| 364 | */ | |
| 15884 | 365 | char purple_account_user_split_get_separator(const PurpleAccountUserSplit *split); |
| 5639 | 366 | |
|
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
|
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 | * 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
|
369 | * |
|
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 | * @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
|
371 | * |
|
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 | * @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
|
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 | 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
|
375 | |
|
f38988d232f7
jabber can contain @ symbols and / in the resource, so we have to look for
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
376 | /** |
|
f38988d232f7
jabber can contain @ symbols and / in the resource, so we have to look for
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
377 | * 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
|
378 | * |
|
f38988d232f7
jabber can contain @ symbols and / in the resource, so we have to look for
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
379 | * @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
|
380 | * @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
|
381 | */ |
|
f38988d232f7
jabber can contain @ symbols and / in the resource, so we have to look for
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
382 | 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
|
383 | |
| 5639 | 384 | /*@}*/ |
| 385 | ||
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5660
diff
changeset
|
386 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5660
diff
changeset
|
387 | } |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5660
diff
changeset
|
388 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5660
diff
changeset
|
389 | |
| 15884 | 390 | #endif /* _PURPLE_ACCOUNTOPT_H_ */ |