annotate src/accountopt.h @ 5754:48aac80b5d83

[gaim-migrate @ 6179] this msg isNO detil of whthapnd. thx ivan! gd ida committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Thu, 05 Jun 2003 00:36:42 +0000
parents 1709a545a7bd
children 158196b2db19
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5639
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1 /**
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
2 * @file accountopt.h Account Options API
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
3 * @ingroup core
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
4 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
5 * gaim
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
6 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
7 * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org>
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
8 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or modify
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
12 * (at your option) any later version.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
13 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 * GNU General Public License for more details.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20 * along with this program; if not, write to the Free Software
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
22 */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
23 #ifndef _GAIM_ACCOUNT_OPT_H_
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
24 #define _GAIM_ACCOUNT_OPT_H_
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
25
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
26 #include "prefs.h"
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
27
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
28 /**
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
29 * An option for an account.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
30 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
31 * This is set by protocol plugins, and appears in the account settings
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
32 * dialogs.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
33 */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
34 typedef struct
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
35 {
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
36 GaimPrefType type; /**< The type of value. */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
37
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
38 char *text; /**< The text that will appear to the user. */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
39 char *pref_name; /**< The name of the associated preference. */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
40
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
41 union
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
42 {
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
43 gboolean boolean; /**< The default boolean value. */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
44 int integer; /**< The default integer value. */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
45 char *string; /**< The default string value. */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
46
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
47 } default_value;
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
48
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
49 } GaimAccountOption;
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
50
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
51 /**
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
52 * A username split.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
53 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
54 * This is used by some protocols to separate the fields of the username
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
55 * into more human-readable components.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
56 */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
57 typedef struct
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
58 {
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
59 char *text; /**< The text that will appear to the user. */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
60 char *default_value; /**< The default value. */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
61 char field_sep; /**< The field separator. */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
62
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
63 } GaimAccountUserSplit;
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
64
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
65 /**************************************************************************/
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
66 /** @name Account Option API */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
67 /**************************************************************************/
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
68 /*@{*/
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
69
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
70 /**
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
71 * Creates a new account option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
72 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
73 * @param type The type of option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
74 * @param text The text of the option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
75 * @param pref_name The account preference name for the option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
76 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
77 * @return The account option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
78 */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
79 GaimAccountOption *gaim_account_option_new(GaimPrefType type, const char *text,
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
80 const char *pref_name);
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
81
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
82 /**
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
83 * Creates a new boolean account option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
84 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
85 * @param text The text of the option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
86 * @param pref_name The account preference name for the option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
87 * @param default_value The default value.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
88 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
89 * @return The account option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
90 */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
91 GaimAccountOption *gaim_account_option_bool_new(const char *text,
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
92 const char *pref_name,
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
93 gboolean default_value);
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
94
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
95 /**
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
96 * Creates a new integer account option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
97 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
98 * @param text The text of the option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
99 * @param pref_name The account preference name for the option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
100 * @param default_value The default value.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
101 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
102 * @return The account option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
103 */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
104 GaimAccountOption *gaim_account_option_int_new(const char *text,
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
105 const char *pref_name,
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
106 int default_value);
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
107
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
108 /**
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
109 * Creates a new string account option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
110 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
111 * @param text The text of the option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
112 * @param pref_name The account preference name for the option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
113 * @param default_value The default value.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
114 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
115 * @return The account option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
116 */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
117 GaimAccountOption *gaim_account_option_string_new(const char *text,
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
118 const char *pref_name,
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
119 const char *default_value);
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
120
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
121 /**
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
122 * Destroys an account option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
123 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
124 * @param option The option to destroy.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
125 */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
126 void gaim_account_option_destroy(GaimAccountOption *option);
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
127
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
128 /**
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
129 * Sets the default boolean value for an account option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
130 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
131 * @param option The account option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
132 * @param value The default boolean value.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
133 */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
134 void gaim_account_option_set_default_bool(GaimAccountOption *option,
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
135 gboolean value);
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
136
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
137 /**
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
138 * Sets the default integer value for an account option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
139 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
140 * @param option The account option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
141 * @param value The default integer value.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
142 */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
143 void gaim_account_option_set_default_int(GaimAccountOption *option,
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
144 int value);
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
145
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
146 /**
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
147 * Sets the default string value for an account option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
148 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
149 * @param option The account option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
150 * @param value The default string value.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
151 */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
152 void gaim_account_option_set_default_string(GaimAccountOption *option,
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
153 const char *value);
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
154
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
155 /**
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
156 * Returns the specified account option's type.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
157 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
158 * @param option The account option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
159 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
160 * @return The account option's type.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
161 */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
162 GaimPrefType gaim_account_option_get_type(const GaimAccountOption *option);
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
163
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
164 /**
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
165 * Returns the text for an account option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
166 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
167 * @param option The accont option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
168 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
169 * @return The account option's text.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
170 */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
171 const char *gaim_account_option_get_text(const GaimAccountOption *option);
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
172
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
173 /**
5660
1709a545a7bd [gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents: 5654
diff changeset
174 * Returns the account setting for an account option.
1709a545a7bd [gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents: 5654
diff changeset
175 *
1709a545a7bd [gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents: 5654
diff changeset
176 * @param option The accont option.
1709a545a7bd [gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents: 5654
diff changeset
177 *
1709a545a7bd [gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents: 5654
diff changeset
178 * @return The account setting.
1709a545a7bd [gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents: 5654
diff changeset
179 */
1709a545a7bd [gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents: 5654
diff changeset
180 const char *gaim_account_option_get_setting(const GaimAccountOption *option);
1709a545a7bd [gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents: 5654
diff changeset
181
1709a545a7bd [gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents: 5654
diff changeset
182 /**
5639
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
183 * Returns the default boolean value for an account option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
184 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
185 * @param option The account option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
186 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
187 * @return The default boolean value.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
188 */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
189 gboolean gaim_account_option_get_default_bool(const GaimAccountOption *option);
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
190
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
191 /**
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
192 * Returns the default integer value for an account option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
193 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
194 * @param option The account option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
195 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
196 * @return The default integer value.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
197 */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
198 int gaim_account_option_get_default_int(const GaimAccountOption *option);
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
199
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
200 /**
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
201 * Returns the default string value for an account option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
202 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
203 * @param option The account option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
204 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
205 * @return The default string value.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
206 */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
207 const char *gaim_account_option_get_default_string(
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
208 const GaimAccountOption *option);
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
209
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
210 /*@}*/
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
211
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
212
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
213 /**************************************************************************/
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
214 /** @name Account User Split API */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
215 /**************************************************************************/
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
216 /*@{*/
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
217
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
218 /**
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
219 * Creates a new account username split.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
220 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
221 * @param text The text of the option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
222 * @param default_value The default value.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
223 * @param sep The field separator.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
224 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
225 * @return The new user split.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
226 */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
227 GaimAccountUserSplit *gaim_account_user_split_new(const char *text,
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
228 const char *default_value,
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
229 char sep);
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
230
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
231 /**
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
232 * Destroys an account username split.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
233 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
234 * @param split The split to destroy.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
235 */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
236 void gaim_account_user_split_destroy(GaimAccountUserSplit *split);
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
237
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
238 /**
5654
c52a97f3739e [gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents: 5639
diff changeset
239 * Returns the text for an account username split.
c52a97f3739e [gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents: 5639
diff changeset
240 *
c52a97f3739e [gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents: 5639
diff changeset
241 * @param split The account username split.
c52a97f3739e [gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents: 5639
diff changeset
242 *
c52a97f3739e [gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents: 5639
diff changeset
243 * @return The account username split's text.
c52a97f3739e [gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents: 5639
diff changeset
244 */
c52a97f3739e [gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents: 5639
diff changeset
245 const char *gaim_account_user_split_get_text(const GaimAccountUserSplit *split);
c52a97f3739e [gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents: 5639
diff changeset
246
c52a97f3739e [gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents: 5639
diff changeset
247 /**
5639
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
248 * Returns the default string value for an account split.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
249 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
250 * @param split The account username split.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
251 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
252 * @return The default string.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
253 */
5654
c52a97f3739e [gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents: 5639
diff changeset
254 const char *gaim_account_user_split_get_default_value(
5639
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
255 const GaimAccountUserSplit *split);
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
256
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
257 /**
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
258 * Returns the field separator for an account split.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
259 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
260 * @param split The account username split.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
261 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
262 * @return The field separator.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
263 */
5654
c52a97f3739e [gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents: 5639
diff changeset
264 char gaim_account_user_split_get_separator(const GaimAccountUserSplit *split);
5639
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
265
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
266 /*@}*/
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
267
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
268 #endif /* _GAIM_ACCOUNT_OPT_H_ */