comparison src/accountopt.h @ 8570:1a62ab7225f3

[gaim-migrate @ 9318] This is what you've been waiting for, the infamous status rewrite! It's amazing, all the stuff it can do, and... oh wait, no, this is just basic core support for the list account option, which doesn't even have UI support yet. Sorry everyone. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sat, 03 Apr 2004 03:30:57 +0000
parents fa6395637e2c
children db62420a53a2
comparison
equal deleted inserted replaced
8569:ee13d1befabe 8570:1a62ab7225f3
43 union 43 union
44 { 44 {
45 gboolean boolean; /**< The default boolean value. */ 45 gboolean boolean; /**< The default boolean value. */
46 int integer; /**< The default integer value. */ 46 int integer; /**< The default integer value. */
47 char *string; /**< The default string value. */ 47 char *string; /**< The default string value. */
48 GList *list; /**< The default list value. */
48 49
49 } default_value; 50 } default_value;
50 51
51 } GaimAccountOption; 52 } GaimAccountOption;
52 53
123 GaimAccountOption *gaim_account_option_string_new(const char *text, 124 GaimAccountOption *gaim_account_option_string_new(const char *text,
124 const char *pref_name, 125 const char *pref_name,
125 const char *default_value); 126 const char *default_value);
126 127
127 /** 128 /**
129 * Creates a new list account option.
130 *
131 * The list passed will be owned by the account option, and the
132 * strings inside will be freed automatically.
133 *
134 * The list is in key, value pairs. The key is the ID stored and used
135 * internally, and the value is the label displayed.
136 *
137 * @param text The text of the option.
138 * @param pref_name The account preference name for the option.
139 * @param list The key, value list.
140 *
141 * @return The account option.
142 */
143 GaimAccountOption *gaim_account_option_list_new(const char *text,
144 const char *pref_name,
145 GList *list);
146
147 /**
128 * Destroys an account option. 148 * Destroys an account option.
129 * 149 *
130 * @param option The option to destroy. 150 * @param option The option to destroy.
131 */ 151 */
132 void gaim_account_option_destroy(GaimAccountOption *option); 152 void gaim_account_option_destroy(GaimAccountOption *option);
157 */ 177 */
158 void gaim_account_option_set_default_string(GaimAccountOption *option, 178 void gaim_account_option_set_default_string(GaimAccountOption *option,
159 const char *value); 179 const char *value);
160 180
161 /** 181 /**
182 * Sets the list values for an account option.
183 *
184 * The list passed will be owned by the account option, and the
185 * strings inside will be freed automatically.
186 *
187 * The list is in key, value pairs. The key is the ID stored and used
188 * internally, and the value is the label displayed.
189 *
190 * @param option The account option.
191 * @param values The default list value.
192 */
193 void gaim_account_option_set_list(GaimAccountOption *option, GList *values);
194
195 /**
196 * Adds an item to a list account option.
197 *
198 * @param option The account option.
199 * @param key The key.
200 * @param value The value.
201 */
202 void gaim_account_option_add_list_item(GaimAccountOption *option,
203 const char *key, const char *value);
204
205 /**
162 * Returns the specified account option's type. 206 * Returns the specified account option's type.
163 * 207 *
164 * @param option The account option. 208 * @param option The account option.
165 * 209 *
166 * @return The account option's type. 210 * @return The account option's type.
209 * @param option The account option. 253 * @param option The account option.
210 * 254 *
211 * @return The default string value. 255 * @return The default string value.
212 */ 256 */
213 const char *gaim_account_option_get_default_string( 257 const char *gaim_account_option_get_default_string(
214 const GaimAccountOption *option); 258 const GaimAccountOption *option);
259
260 /**
261 * Returns the list values for an account option.
262 *
263 * @param option The account option.
264 *
265 * @return The list values.
266 */
267 const GList *gaim_account_option_get_list(const GaimAccountOption *option);
215 268
216 /*@}*/ 269 /*@}*/
217 270
218 271
219 /**************************************************************************/ 272 /**************************************************************************/