Sun, 17 Aug 2008 11:10:39 +0000
Correct documentation about list account options to reflect what the key and
value of the PurpleKeyValuePair actually represent (based on what Pidgin does
with them). (Since the only protocol to use them, silc, uses the same string
for the key and the value, no harm came of me having written incorrect
documentation last time.)
| 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 | * |
|
24111
40399e39280d
Correct documentation about list account options to reflect what the key and
Will Thompson <resiak@pidgin.im>
parents:
22256
diff
changeset
|
142 | * The list is a list of #PurpleKeyValuePair items. The key is the label that |
|
40399e39280d
Correct documentation about list account options to reflect what the key and
Will Thompson <resiak@pidgin.im>
parents:
22256
diff
changeset
|
143 | * should be displayed to the user, and the <tt>(const char *)</tt> value is |
|
40399e39280d
Correct documentation about list account options to reflect what the key and
Will Thompson <resiak@pidgin.im>
parents:
22256
diff
changeset
|
144 | * the internal ID that should be passed to purple_account_set_string() to |
|
40399e39280d
Correct documentation about list account options to reflect what the key and
Will Thompson <resiak@pidgin.im>
parents:
22256
diff
changeset
|
145 | * choose that value. |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
146 | * |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
147 | * @param text The text of the option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
148 | * @param pref_name The account preference name for the option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
149 | * @param list The key, value list. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
150 | * |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
151 | * @return The account option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
152 | */ |
| 15884 | 153 | 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
|
154 | const char *pref_name, GList *list); |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
155 | |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
156 | /** |
| 5639 | 157 | * Destroys an account option. |
| 158 | * | |
| 159 | * @param option The option to destroy. | |
| 160 | */ | |
| 15884 | 161 | void purple_account_option_destroy(PurpleAccountOption *option); |
| 5639 | 162 | |
| 163 | /** | |
| 164 | * Sets the default boolean value for an account option. | |
| 165 | * | |
| 166 | * @param option The account option. | |
| 167 | * @param value The default boolean value. | |
| 168 | */ | |
| 15884 | 169 | void purple_account_option_set_default_bool(PurpleAccountOption *option, |
| 5639 | 170 | gboolean value); |
| 171 | ||
| 172 | /** | |
| 173 | * Sets the default integer value for an account option. | |
| 174 | * | |
| 175 | * @param option The account option. | |
| 176 | * @param value The default integer value. | |
| 177 | */ | |
| 15884 | 178 | void purple_account_option_set_default_int(PurpleAccountOption *option, |
| 5639 | 179 | int value); |
| 180 | ||
| 181 | /** | |
| 182 | * Sets the default string value for an account option. | |
| 183 | * | |
| 184 | * @param option The account option. | |
| 185 | * @param value The default string value. | |
| 186 | */ | |
| 15884 | 187 | void purple_account_option_set_default_string(PurpleAccountOption *option, |
| 5639 | 188 | const char *value); |
| 189 | ||
| 190 | /** | |
|
20040
57572bb85e07
Explain what PurpleAccountOption.masked and its setters and getters
Will Thompson <resiak@pidgin.im>
parents:
19859
diff
changeset
|
191 | * 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
|
192 | * 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
|
193 | * view, like a password. |
| 10658 | 194 | * |
| 195 | * @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
|
196 | * @param masked The masking. |
| 10658 | 197 | */ |
| 198 | void | |
| 15884 | 199 | purple_account_option_set_masked(PurpleAccountOption *option, gboolean masked); |
| 10658 | 200 | |
| 201 | /** | |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
202 | * Sets the list values for an account option. |
|
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 | * 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
|
205 | * strings inside will be freed automatically. |
|
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 | * 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
|
208 | * internally, and the value is the label displayed. |
|
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 | * @param option The account option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
211 | * @param values The default list value. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
212 | */ |
| 15884 | 213 | void purple_account_option_set_list(PurpleAccountOption *option, GList *values); |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
214 | |
|
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 | * Adds an item to a list account option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
217 | * |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
218 | * @param option The account option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
219 | * @param key The key. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
220 | * @param value The value. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
221 | */ |
| 15884 | 222 | void purple_account_option_add_list_item(PurpleAccountOption *option, |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
223 | const char *key, const char *value); |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
224 | |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
225 | /** |
| 5639 | 226 | * Returns the specified account option's type. |
| 227 | * | |
| 228 | * @param option The account option. | |
| 229 | * | |
| 230 | * @return The account option's type. | |
| 231 | */ | |
| 15884 | 232 | PurplePrefType purple_account_option_get_type(const PurpleAccountOption *option); |
| 5639 | 233 | |
| 234 | /** | |
| 235 | * Returns the text for an account option. | |
| 236 | * | |
|
13310
dff5b1615a1a
[gaim-migrate @ 15675]
Richard Laager <rlaager@pidgin.im>
parents:
12172
diff
changeset
|
237 | * @param option The account option. |
| 5639 | 238 | * |
| 239 | * @return The account option's text. | |
| 240 | */ | |
| 15884 | 241 | const char *purple_account_option_get_text(const PurpleAccountOption *option); |
| 5639 | 242 | |
| 243 | /** | |
|
22256
267223b42a73
Improve some PurpleAcountOption documentation, and sanify some whitespace.
Will Thompson <resiak@pidgin.im>
parents:
20147
diff
changeset
|
244 | * 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
|
245 | * 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
|
246 | * type-specific constructors. |
|
5660
90787278c739
[gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents:
5654
diff
changeset
|
247 | * |
|
13310
dff5b1615a1a
[gaim-migrate @ 15675]
Richard Laager <rlaager@pidgin.im>
parents:
12172
diff
changeset
|
248 | * @param option The account option. |
|
5660
90787278c739
[gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents:
5654
diff
changeset
|
249 | * |
|
22256
267223b42a73
Improve some PurpleAcountOption documentation, and sanify some whitespace.
Will Thompson <resiak@pidgin.im>
parents:
20147
diff
changeset
|
250 | * @return The option's name. |
|
5660
90787278c739
[gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents:
5654
diff
changeset
|
251 | */ |
| 15884 | 252 | const char *purple_account_option_get_setting(const PurpleAccountOption *option); |
|
5660
90787278c739
[gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents:
5654
diff
changeset
|
253 | |
|
90787278c739
[gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents:
5654
diff
changeset
|
254 | /** |
| 5639 | 255 | * Returns the default boolean value for an account option. |
| 256 | * | |
| 257 | * @param option The account option. | |
|
6902
bf0a4376750f
[gaim-migrate @ 7449]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
258 | * |
| 5639 | 259 | * @return The default boolean value. |
| 260 | */ | |
| 15884 | 261 | gboolean purple_account_option_get_default_bool(const PurpleAccountOption *option); |
| 5639 | 262 | |
| 263 | /** | |
| 264 | * Returns the default integer value for an account option. | |
| 265 | * | |
| 266 | * @param option The account option. | |
|
6902
bf0a4376750f
[gaim-migrate @ 7449]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
267 | * |
| 5639 | 268 | * @return The default integer value. |
| 269 | */ | |
| 15884 | 270 | int purple_account_option_get_default_int(const PurpleAccountOption *option); |
| 5639 | 271 | |
| 272 | /** | |
| 273 | * Returns the default string value for an account option. | |
| 274 | * | |
| 275 | * @param option The account option. | |
|
6902
bf0a4376750f
[gaim-migrate @ 7449]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
276 | * |
| 5639 | 277 | * @return The default string value. |
| 278 | */ | |
| 15884 | 279 | const char *purple_account_option_get_default_string( |
| 280 | const PurpleAccountOption *option); | |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
281 | |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
282 | /** |
|
12172
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
283 | * Returns the default string value for a list 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 | * @param option The account option. |
|
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
286 | * |
|
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
287 | * @return The default list string value. |
|
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
288 | */ |
| 15884 | 289 | const char *purple_account_option_get_default_list_value( |
| 290 | const PurpleAccountOption *option); | |
|
12172
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
291 | |
|
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
292 | /** |
|
20040
57572bb85e07
Explain what PurpleAccountOption.masked and its setters and getters
Will Thompson <resiak@pidgin.im>
parents:
19859
diff
changeset
|
293 | * 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
|
294 | * 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
|
295 | * as a '*' (for example). |
| 10658 | 296 | * |
| 297 | * @param option The account option. | |
| 298 | * | |
|
20040
57572bb85e07
Explain what PurpleAccountOption.masked and its setters and getters
Will Thompson <resiak@pidgin.im>
parents:
19859
diff
changeset
|
299 | * @return %TRUE if the option's value should be obscured. |
| 10658 | 300 | */ |
| 301 | gboolean | |
| 15884 | 302 | purple_account_option_get_masked(const PurpleAccountOption *option); |
| 10658 | 303 | |
| 304 | /** | |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
305 | * Returns the list values for an account option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
306 | * |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
307 | * @param option The account option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
308 | * |
|
24111
40399e39280d
Correct documentation about list account options to reflect what the key and
Will Thompson <resiak@pidgin.im>
parents:
22256
diff
changeset
|
309 | * @constreturn A list of #PurpleKeyValuePair, mapping the human-readable |
|
40399e39280d
Correct documentation about list account options to reflect what the key and
Will Thompson <resiak@pidgin.im>
parents:
22256
diff
changeset
|
310 | * description of the value to the <tt>(const char *)</tt> that |
|
40399e39280d
Correct documentation about list account options to reflect what the key and
Will Thompson <resiak@pidgin.im>
parents:
22256
diff
changeset
|
311 | * should be passed to purple_account_set_string() to set the |
|
40399e39280d
Correct documentation about list account options to reflect what the key and
Will Thompson <resiak@pidgin.im>
parents:
22256
diff
changeset
|
312 | * option. |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
313 | */ |
|
18190
bcf28ef7e8ff
Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@pidgin.im>
parents:
18099
diff
changeset
|
314 | GList *purple_account_option_get_list(const PurpleAccountOption *option); |
| 5639 | 315 | |
| 316 | /*@}*/ | |
| 317 | ||
| 318 | ||
| 319 | /**************************************************************************/ | |
| 320 | /** @name Account User Split API */ | |
| 321 | /**************************************************************************/ | |
| 322 | /*@{*/ | |
| 323 | ||
| 324 | /** | |
| 325 | * Creates a new account username split. | |
| 326 | * | |
| 327 | * @param text The text of the option. | |
| 328 | * @param default_value The default value. | |
| 329 | * @param sep The field separator. | |
| 330 | * | |
| 331 | * @return The new user split. | |
| 332 | */ | |
| 15884 | 333 | PurpleAccountUserSplit *purple_account_user_split_new(const char *text, |
| 5639 | 334 | const char *default_value, |
| 335 | char sep); | |
| 336 | ||
| 337 | /** | |
| 338 | * Destroys an account username split. | |
| 339 | * | |
| 340 | * @param split The split to destroy. | |
| 341 | */ | |
| 15884 | 342 | void purple_account_user_split_destroy(PurpleAccountUserSplit *split); |
| 5639 | 343 | |
| 344 | /** | |
|
5654
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
345 | * Returns the text for an account username split. |
|
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
346 | * |
|
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
347 | * @param split The account username split. |
|
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
348 | * |
|
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
349 | * @return The account username split's text. |
|
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
350 | */ |
| 15884 | 351 | 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
|
352 | |
|
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
353 | /** |
| 5639 | 354 | * Returns the default string value for an account split. |
| 355 | * | |
| 356 | * @param split The account username split. | |
| 357 | * | |
| 358 | * @return The default string. | |
| 359 | */ | |
| 15884 | 360 | const char *purple_account_user_split_get_default_value( |
| 361 | const PurpleAccountUserSplit *split); | |
| 5639 | 362 | |
| 363 | /** | |
| 364 | * Returns the field separator for an account split. | |
| 365 | * | |
| 366 | * @param split The account username split. | |
| 367 | * | |
| 368 | * @return The field separator. | |
| 369 | */ | |
| 15884 | 370 | char purple_account_user_split_get_separator(const PurpleAccountUserSplit *split); |
| 5639 | 371 | |
|
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
|
372 | /** |
|
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 | * 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
|
374 | * |
|
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 | * @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
|
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 | * @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
|
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 | 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
|
380 | |
|
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 | * 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
|
383 | * |
|
f38988d232f7
jabber can contain @ symbols and / in the resource, so we have to look for
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
384 | * @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
|
385 | * @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
|
386 | */ |
|
f38988d232f7
jabber can contain @ symbols and / in the resource, so we have to look for
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
387 | 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
|
388 | |
| 5639 | 389 | /*@}*/ |
| 390 | ||
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5660
diff
changeset
|
391 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5660
diff
changeset
|
392 | } |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5660
diff
changeset
|
393 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5660
diff
changeset
|
394 | |
| 15884 | 395 | #endif /* _PURPLE_ACCOUNTOPT_H_ */ |