annotate src/accountopt.h @ 7772:85abf91f2387

[gaim-migrate @ 8417] I suppose this is reasonable... committer: Tailor Script <tailor@pidgin.im>
author Ethan Blanton <elb@pidgin.im>
date Fri, 05 Dec 2003 21:42:00 +0000
parents e30bedfb99db
children fa6395637e2c
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>
6902
e30bedfb99db [gaim-migrate @ 7449]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
8 *
5639
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.
6902
e30bedfb99db [gaim-migrate @ 7449]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
30 *
5639
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
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5660
diff changeset
65 #ifdef __cplusplus
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5660
diff changeset
66 extern "C" {
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5660
diff changeset
67 #endif
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5660
diff changeset
68
5639
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 /** @name Account Option API */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
71 /**************************************************************************/
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
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
74 /**
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
75 * Creates a new account 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 * @param type The type of option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
78 * @param text The text of the option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
79 * @param pref_name The account preference name for the option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
80 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
81 * @return The account option.
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 GaimAccountOption *gaim_account_option_new(GaimPrefType type, const char *text,
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
84 const char *pref_name);
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
85
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
86 /**
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
87 * Creates a new boolean account option.
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 * @param text The text of the option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
90 * @param pref_name The account preference name for the option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
91 * @param default_value The default value.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
92 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
93 * @return The account option.
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 GaimAccountOption *gaim_account_option_bool_new(const char *text,
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
96 const char *pref_name,
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
97 gboolean default_value);
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
98
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
99 /**
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
100 * Creates a new integer account option.
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 * @param text The text of the option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
103 * @param pref_name The account preference name for the option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
104 * @param default_value The default value.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
105 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
106 * @return The account option.
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 GaimAccountOption *gaim_account_option_int_new(const char *text,
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
109 const char *pref_name,
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
110 int default_value);
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
111
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
112 /**
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
113 * Creates a new string account option.
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 * @param text The text of the option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
116 * @param pref_name The account preference name for the option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
117 * @param default_value The default value.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
118 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
119 * @return The account option.
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 GaimAccountOption *gaim_account_option_string_new(const char *text,
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
122 const char *pref_name,
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
123 const char *default_value);
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
124
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 * Destroys an account 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 * @param option The option to destroy.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
129 */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
130 void gaim_account_option_destroy(GaimAccountOption *option);
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
131
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
132 /**
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
133 * Sets the default boolean value for an account option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
134 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
135 * @param option The account option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
136 * @param value The default boolean value.
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 void gaim_account_option_set_default_bool(GaimAccountOption *option,
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
139 gboolean value);
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
140
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
141 /**
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
142 * Sets the default integer value for an account option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
143 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
144 * @param option The account option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
145 * @param value The default integer value.
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 void gaim_account_option_set_default_int(GaimAccountOption *option,
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
148 int value);
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
149
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
150 /**
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
151 * Sets the default string value for an account option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
152 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
153 * @param option The account option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
154 * @param value The default string value.
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 void gaim_account_option_set_default_string(GaimAccountOption *option,
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
157 const char *value);
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
158
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 * Returns the specified 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 * @param option The account 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 * @return The account option's type.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
165 */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
166 GaimPrefType gaim_account_option_get_type(const GaimAccountOption *option);
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
167
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 * Returns the text for an account option.
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 * @param option The accont 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 * @return The account option's text.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
174 */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
175 const char *gaim_account_option_get_text(const GaimAccountOption *option);
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
176
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
177 /**
5660
1709a545a7bd [gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents: 5654
diff changeset
178 * Returns the account setting for an account option.
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 * @param option The accont 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 * @return The account setting.
1709a545a7bd [gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents: 5654
diff changeset
183 */
1709a545a7bd [gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents: 5654
diff changeset
184 const char *gaim_account_option_get_setting(const GaimAccountOption *option);
1709a545a7bd [gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents: 5654
diff changeset
185
1709a545a7bd [gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents: 5654
diff changeset
186 /**
5639
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
187 * Returns the default boolean value for an account option.
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 * @param option The account option.
6902
e30bedfb99db [gaim-migrate @ 7449]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
190 *
5639
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
191 * @return The default boolean value.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
192 */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
193 gboolean gaim_account_option_get_default_bool(const GaimAccountOption *option);
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
194
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 * Returns the default integer value for an account option.
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 * @param option The account option.
6902
e30bedfb99db [gaim-migrate @ 7449]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
199 *
5639
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
200 * @return The default integer value.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
201 */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
202 int gaim_account_option_get_default_int(const GaimAccountOption *option);
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
203
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 * Returns the default string value for an account option.
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 * @param option The account option.
6902
e30bedfb99db [gaim-migrate @ 7449]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
208 *
5639
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
209 * @return The default string value.
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 const char *gaim_account_option_get_default_string(
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
212 const GaimAccountOption *option);
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 /*@}*/
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 /** @name Account User Split API */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
219 /**************************************************************************/
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
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
222 /**
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
223 * Creates a new account username split.
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 * @param text The text of the option.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
226 * @param default_value The default value.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
227 * @param sep The field separator.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
228 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
229 * @return The new user split.
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 GaimAccountUserSplit *gaim_account_user_split_new(const char *text,
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
232 const char *default_value,
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
233 char sep);
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
234
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 * Destroys an account username 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 * @param split The split to destroy.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
239 */
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
240 void gaim_account_user_split_destroy(GaimAccountUserSplit *split);
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
241
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
242 /**
5654
c52a97f3739e [gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents: 5639
diff changeset
243 * Returns the text for an account username split.
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 * @param split The account username 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 * @return The account username split's text.
c52a97f3739e [gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents: 5639
diff changeset
248 */
c52a97f3739e [gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents: 5639
diff changeset
249 const char *gaim_account_user_split_get_text(const GaimAccountUserSplit *split);
c52a97f3739e [gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents: 5639
diff changeset
250
c52a97f3739e [gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents: 5639
diff changeset
251 /**
5639
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
252 * Returns the default string value for an account split.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
253 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
254 * @param split The account username split.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
255 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
256 * @return The default string.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
257 */
5654
c52a97f3739e [gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents: 5639
diff changeset
258 const char *gaim_account_user_split_get_default_value(
5639
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
259 const GaimAccountUserSplit *split);
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
260
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 * Returns the field separator for an account split.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
263 *
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
264 * @param split The account username split.
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 * @return The field separator.
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
267 */
5654
c52a97f3739e [gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents: 5639
diff changeset
268 char gaim_account_user_split_get_separator(const GaimAccountUserSplit *split);
5639
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
269
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
270 /*@}*/
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
271
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5660
diff changeset
272 #ifdef __cplusplus
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5660
diff changeset
273 }
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5660
diff changeset
274 #endif
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5660
diff changeset
275
5639
408fef845144 [gaim-migrate @ 6051]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
276 #endif /* _GAIM_ACCOUNT_OPT_H_ */