Fri, 31 Jan 2014 18:44:42 +0530
Use 'transfer none' for TODO const
| 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 | ||
|
32438
dc8991868906
A boring and large patch so I can merge heads.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
24111
diff
changeset
|
31 | /**************************************************************************/ |
|
dc8991868906
A boring and large patch so I can merge heads.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
24111
diff
changeset
|
32 | /** Data Structures */ |
|
dc8991868906
A boring and large patch so I can merge heads.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
24111
diff
changeset
|
33 | /**************************************************************************/ |
| 5639 | 34 | |
|
32438
dc8991868906
A boring and large patch so I can merge heads.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
24111
diff
changeset
|
35 | /** @copydoc _PurpleAccountOption */ |
|
dc8991868906
A boring and large patch so I can merge heads.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
24111
diff
changeset
|
36 | typedef struct _PurpleAccountOption PurpleAccountOption; |
|
dc8991868906
A boring and large patch so I can merge heads.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
24111
diff
changeset
|
37 | /** @copydoc _PurpleAccountUserSplit */ |
|
dc8991868906
A boring and large patch so I can merge heads.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
24111
diff
changeset
|
38 | typedef struct _PurpleAccountUserSplit PurpleAccountUserSplit; |
| 5639 | 39 | |
|
32787
7072f190d6ad
Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32438
diff
changeset
|
40 | G_BEGIN_DECLS |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5660
diff
changeset
|
41 | |
| 5639 | 42 | /**************************************************************************/ |
| 43 | /** @name Account Option API */ | |
| 44 | /**************************************************************************/ | |
| 45 | /*@{*/ | |
| 46 | ||
| 47 | /** | |
|
22256
267223b42a73
Improve some PurpleAcountOption documentation, and sanify some whitespace.
Will Thompson <resiak@pidgin.im>
parents:
20147
diff
changeset
|
48 | * 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
|
49 | * 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
|
50 | * 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
|
51 | * purple_account_option_list_new() (as appropriate) instead. |
| 5639 | 52 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
53 | * @type: The type of option. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
54 | * @text: The text of the option. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
55 | * @pref_name: The account preference name for the option. |
| 5639 | 56 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
57 | * Returns: The account option. |
| 5639 | 58 | */ |
|
22256
267223b42a73
Improve some PurpleAcountOption documentation, and sanify some whitespace.
Will Thompson <resiak@pidgin.im>
parents:
20147
diff
changeset
|
59 | 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
|
60 | const char *text, const char *pref_name); |
| 5639 | 61 | |
| 62 | /** | |
| 63 | * Creates a new boolean account option. | |
| 64 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
65 | * @text: The text of the option. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
66 | * @pref_name: The account preference name for the option. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
67 | * @default_value: The default value. |
| 5639 | 68 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
69 | * Returns: The account option. |
| 5639 | 70 | */ |
| 15884 | 71 | 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
|
72 | const char *pref_name, gboolean default_value); |
| 5639 | 73 | |
| 74 | /** | |
| 75 | * Creates a new integer account option. | |
| 76 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
77 | * @text: The text of the option. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
78 | * @pref_name: The account preference name for the option. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
79 | * @default_value: The default value. |
| 5639 | 80 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
81 | * Returns: The account option. |
| 5639 | 82 | */ |
| 15884 | 83 | 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
|
84 | const char *pref_name, int default_value); |
| 5639 | 85 | |
| 86 | /** | |
| 87 | * Creates a new string account option. | |
| 88 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
89 | * @text: The text of the option. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
90 | * @pref_name: The account preference name for the option. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
91 | * @default_value: The default value. |
| 5639 | 92 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
93 | * Returns: The account option. |
| 5639 | 94 | */ |
| 15884 | 95 | 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
|
96 | const char *pref_name, const char *default_value); |
| 5639 | 97 | |
| 98 | /** | |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
99 | * Creates a new list account option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
100 | * |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
101 | * 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
|
102 | * strings inside will be freed automatically. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
103 | * |
|
24111
40399e39280d
Correct documentation about list account options to reflect what the key and
Will Thompson <resiak@pidgin.im>
parents:
22256
diff
changeset
|
104 | * 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
|
105 | * 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
|
106 | * 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
|
107 | * choose that value. |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
108 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
109 | * @text: The text of the option. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
110 | * @pref_name: The account preference name for the option. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
111 | * @list: The key, value list. |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
112 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
113 | * Returns: The account option. |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
114 | */ |
| 15884 | 115 | 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
|
116 | const char *pref_name, GList *list); |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
117 | |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
118 | /** |
| 5639 | 119 | * Destroys an account option. |
| 120 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
121 | * @option: The option to destroy. |
| 5639 | 122 | */ |
| 15884 | 123 | void purple_account_option_destroy(PurpleAccountOption *option); |
| 5639 | 124 | |
| 125 | /** | |
| 126 | * Sets the default boolean value for an account option. | |
| 127 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
128 | * @option: The account option. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
129 | * @value: The default boolean value. |
| 5639 | 130 | */ |
| 15884 | 131 | void purple_account_option_set_default_bool(PurpleAccountOption *option, |
| 5639 | 132 | gboolean value); |
| 133 | ||
| 134 | /** | |
| 135 | * Sets the default integer value for an account option. | |
| 136 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
137 | * @option: The account option. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
138 | * @value: The default integer value. |
| 5639 | 139 | */ |
| 15884 | 140 | void purple_account_option_set_default_int(PurpleAccountOption *option, |
| 5639 | 141 | int value); |
| 142 | ||
| 143 | /** | |
| 144 | * Sets the default string value for an account option. | |
| 145 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
146 | * @option: The account option. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
147 | * @value: The default string value. |
| 5639 | 148 | */ |
| 15884 | 149 | void purple_account_option_set_default_string(PurpleAccountOption *option, |
| 5639 | 150 | const char *value); |
| 151 | ||
| 152 | /** | |
|
20040
57572bb85e07
Explain what PurpleAccountOption.masked and its setters and getters
Will Thompson <resiak@pidgin.im>
parents:
19859
diff
changeset
|
153 | * 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
|
154 | * 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
|
155 | * view, like a password. |
| 10658 | 156 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
157 | * @option: The account option. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
158 | * @masked: The masking. |
| 10658 | 159 | */ |
| 160 | void | |
|
33267
c3ee96290bfd
Account Options: hinted string options; fix perl plugins compilation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32787
diff
changeset
|
161 | purple_account_option_string_set_masked(PurpleAccountOption *option, gboolean masked); |
|
c3ee96290bfd
Account Options: hinted string options; fix perl plugins compilation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32787
diff
changeset
|
162 | |
|
c3ee96290bfd
Account Options: hinted string options; fix perl plugins compilation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32787
diff
changeset
|
163 | /** |
|
c3ee96290bfd
Account Options: hinted string options; fix perl plugins compilation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32787
diff
changeset
|
164 | * Sets the hint list for an account option. |
|
c3ee96290bfd
Account Options: hinted string options; fix perl plugins compilation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32787
diff
changeset
|
165 | * |
|
c3ee96290bfd
Account Options: hinted string options; fix perl plugins compilation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32787
diff
changeset
|
166 | * The list passed will be owned by the account option, and the |
|
c3ee96290bfd
Account Options: hinted string options; fix perl plugins compilation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32787
diff
changeset
|
167 | * strings inside will be freed automatically. |
|
c3ee96290bfd
Account Options: hinted string options; fix perl plugins compilation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32787
diff
changeset
|
168 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
169 | * @option: The account option. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
170 | * @hints: The list of hints, stored as strings. |
|
33267
c3ee96290bfd
Account Options: hinted string options; fix perl plugins compilation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32787
diff
changeset
|
171 | */ |
|
c3ee96290bfd
Account Options: hinted string options; fix perl plugins compilation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32787
diff
changeset
|
172 | void purple_account_option_string_set_hints(PurpleAccountOption *option, |
|
c3ee96290bfd
Account Options: hinted string options; fix perl plugins compilation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32787
diff
changeset
|
173 | GSList *hints); |
| 10658 | 174 | |
| 175 | /** | |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
176 | * Sets the list values for an account option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
177 | * |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
178 | * 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
|
179 | * strings inside will be freed automatically. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
180 | * |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
181 | * 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
|
182 | * internally, and the value is the label displayed. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
183 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
184 | * @option: The account option. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
185 | * @values: The default list value. |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
186 | */ |
| 15884 | 187 | void purple_account_option_set_list(PurpleAccountOption *option, GList *values); |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
188 | |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
189 | /** |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
190 | * Adds an item to a list account option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
191 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
192 | * @option: The account option. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
193 | * @key: The key. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
194 | * @value: The value. |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
195 | */ |
| 15884 | 196 | void purple_account_option_add_list_item(PurpleAccountOption *option, |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
197 | const char *key, const char *value); |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
198 | |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
199 | /** |
| 5639 | 200 | * Returns the specified account option's type. |
| 201 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
202 | * @option: The account option. |
| 5639 | 203 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
204 | * Returns: The account option's type. |
| 5639 | 205 | */ |
| 15884 | 206 | PurplePrefType purple_account_option_get_type(const PurpleAccountOption *option); |
| 5639 | 207 | |
| 208 | /** | |
| 209 | * Returns the text for an account option. | |
| 210 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
211 | * @option: The account option. |
| 5639 | 212 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
213 | * Returns: The account option's text. |
| 5639 | 214 | */ |
| 15884 | 215 | const char *purple_account_option_get_text(const PurpleAccountOption *option); |
| 5639 | 216 | |
| 217 | /** | |
|
22256
267223b42a73
Improve some PurpleAcountOption documentation, and sanify some whitespace.
Will Thompson <resiak@pidgin.im>
parents:
20147
diff
changeset
|
218 | * 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
|
219 | * 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
|
220 | * type-specific constructors. |
|
5660
90787278c739
[gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents:
5654
diff
changeset
|
221 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
222 | * @option: The account option. |
|
5660
90787278c739
[gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents:
5654
diff
changeset
|
223 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
224 | * Returns: The option's name. |
|
5660
90787278c739
[gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents:
5654
diff
changeset
|
225 | */ |
| 15884 | 226 | const char *purple_account_option_get_setting(const PurpleAccountOption *option); |
|
5660
90787278c739
[gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents:
5654
diff
changeset
|
227 | |
|
90787278c739
[gaim-migrate @ 6074]
Christian Hammond <chipx86@chipx86.com>
parents:
5654
diff
changeset
|
228 | /** |
| 5639 | 229 | * Returns the default boolean value for an account option. |
| 230 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
231 | * @option: The account option. |
|
6902
bf0a4376750f
[gaim-migrate @ 7449]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
232 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
233 | * Returns: The default boolean value. |
| 5639 | 234 | */ |
| 15884 | 235 | gboolean purple_account_option_get_default_bool(const PurpleAccountOption *option); |
| 5639 | 236 | |
| 237 | /** | |
| 238 | * Returns the default integer value for an account option. | |
| 239 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
240 | * @option: The account option. |
|
6902
bf0a4376750f
[gaim-migrate @ 7449]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
241 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
242 | * Returns: The default integer value. |
| 5639 | 243 | */ |
| 15884 | 244 | int purple_account_option_get_default_int(const PurpleAccountOption *option); |
| 5639 | 245 | |
| 246 | /** | |
| 247 | * Returns the default string value for an account option. | |
| 248 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
249 | * @option: The account option. |
|
6902
bf0a4376750f
[gaim-migrate @ 7449]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
250 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
251 | * Returns: The default string value. |
| 5639 | 252 | */ |
| 15884 | 253 | const char *purple_account_option_get_default_string( |
| 254 | const PurpleAccountOption *option); | |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
255 | |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
256 | /** |
|
12172
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
257 | * Returns the default string value for a list account option. |
|
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
258 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
259 | * @option: The account option. |
|
12172
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
260 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
261 | * Returns: The default list string value. |
|
12172
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
262 | */ |
| 15884 | 263 | const char *purple_account_option_get_default_list_value( |
| 264 | const PurpleAccountOption *option); | |
|
12172
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
265 | |
|
717fa0ec02c4
[gaim-migrate @ 14474]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12106
diff
changeset
|
266 | /** |
|
20040
57572bb85e07
Explain what PurpleAccountOption.masked and its setters and getters
Will Thompson <resiak@pidgin.im>
parents:
19859
diff
changeset
|
267 | * 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
|
268 | * 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
|
269 | * as a '*' (for example). |
| 10658 | 270 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
271 | * @option: The account option. |
| 10658 | 272 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
273 | * Returns: %TRUE if the option's value should be obscured. |
| 10658 | 274 | */ |
| 275 | gboolean | |
|
33267
c3ee96290bfd
Account Options: hinted string options; fix perl plugins compilation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32787
diff
changeset
|
276 | purple_account_option_string_get_masked(const PurpleAccountOption *option); |
|
c3ee96290bfd
Account Options: hinted string options; fix perl plugins compilation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32787
diff
changeset
|
277 | |
|
c3ee96290bfd
Account Options: hinted string options; fix perl plugins compilation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32787
diff
changeset
|
278 | /** |
|
c3ee96290bfd
Account Options: hinted string options; fix perl plugins compilation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32787
diff
changeset
|
279 | * Returns the list of hints for an account option. |
|
c3ee96290bfd
Account Options: hinted string options; fix perl plugins compilation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32787
diff
changeset
|
280 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
281 | * @option: The account option. |
|
33267
c3ee96290bfd
Account Options: hinted string options; fix perl plugins compilation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32787
diff
changeset
|
282 | * |
|
35394
38facb8226d4
Use 'transfer none' for TODO const
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
283 | * Returns: (transfer none): A list of hints, stored as strings. |
|
33267
c3ee96290bfd
Account Options: hinted string options; fix perl plugins compilation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32787
diff
changeset
|
284 | */ |
|
c3ee96290bfd
Account Options: hinted string options; fix perl plugins compilation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32787
diff
changeset
|
285 | const GSList * purple_account_option_string_get_hints(const PurpleAccountOption *option); |
| 10658 | 286 | |
| 287 | /** | |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
288 | * Returns the list values for an account option. |
|
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
289 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
290 | * @option: The account option. |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
291 | * |
|
35394
38facb8226d4
Use 'transfer none' for TODO const
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
292 | * Returns: (transfer none): A list of #PurpleKeyValuePair, mapping the human-readable |
|
24111
40399e39280d
Correct documentation about list account options to reflect what the key and
Will Thompson <resiak@pidgin.im>
parents:
22256
diff
changeset
|
293 | * 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
|
294 | * 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
|
295 | * option. |
|
8570
bce05cb55dbc
[gaim-migrate @ 9318]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
296 | */ |
|
18190
bcf28ef7e8ff
Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@pidgin.im>
parents:
18099
diff
changeset
|
297 | GList *purple_account_option_get_list(const PurpleAccountOption *option); |
| 5639 | 298 | |
| 299 | /*@}*/ | |
| 300 | ||
| 301 | ||
| 302 | /**************************************************************************/ | |
| 303 | /** @name Account User Split API */ | |
| 304 | /**************************************************************************/ | |
| 305 | /*@{*/ | |
| 306 | ||
| 307 | /** | |
| 308 | * Creates a new account username split. | |
| 309 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
310 | * @text: The text of the option. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
311 | * @default_value: The default value. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
312 | * @sep: The field separator. |
| 5639 | 313 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
314 | * Returns: The new user split. |
| 5639 | 315 | */ |
| 15884 | 316 | PurpleAccountUserSplit *purple_account_user_split_new(const char *text, |
| 5639 | 317 | const char *default_value, |
| 318 | char sep); | |
| 319 | ||
| 320 | /** | |
| 321 | * Destroys an account username split. | |
| 322 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
323 | * @split: The split to destroy. |
| 5639 | 324 | */ |
| 15884 | 325 | void purple_account_user_split_destroy(PurpleAccountUserSplit *split); |
| 5639 | 326 | |
| 327 | /** | |
|
5654
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
328 | * Returns the text for an account username split. |
|
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
329 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
330 | * @split: The account username split. |
|
5654
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
331 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
332 | * Returns: The account username split's text. |
|
5654
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
333 | */ |
| 15884 | 334 | 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
|
335 | |
|
3a0e6dba1c2f
[gaim-migrate @ 6068]
Christian Hammond <chipx86@chipx86.com>
parents:
5639
diff
changeset
|
336 | /** |
| 5639 | 337 | * Returns the default string value for an account split. |
| 338 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
339 | * @split: The account username split. |
| 5639 | 340 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
341 | * Returns: The default string. |
| 5639 | 342 | */ |
| 15884 | 343 | const char *purple_account_user_split_get_default_value( |
| 344 | const PurpleAccountUserSplit *split); | |
| 5639 | 345 | |
| 346 | /** | |
| 347 | * Returns the field separator for an account split. | |
| 348 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
349 | * @split: The account username split. |
| 5639 | 350 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
351 | * Returns: The field separator. |
| 5639 | 352 | */ |
| 15884 | 353 | char purple_account_user_split_get_separator(const PurpleAccountUserSplit *split); |
| 5639 | 354 | |
|
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
|
355 | /** |
|
f38988d232f7
jabber can contain @ symbols and / in the resource, so we have to look for
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
356 | * 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
|
357 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
358 | * @split: The account username split. |
|
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
|
359 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
360 | * Returns: The 'reverse' value. |
|
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
|
361 | */ |
|
f38988d232f7
jabber can contain @ symbols and / in the resource, so we have to look for
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
362 | 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
|
363 | |
|
f38988d232f7
jabber can contain @ symbols and / in the resource, so we have to look for
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
364 | /** |
|
f38988d232f7
jabber can contain @ symbols and / in the resource, so we have to look for
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
365 | * 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
|
366 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
367 | * @split: The account username split. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33267
diff
changeset
|
368 | * @reverse: The 'reverse' value |
|
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
|
369 | */ |
|
f38988d232f7
jabber can contain @ symbols and / in the resource, so we have to look for
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
370 | 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
|
371 | |
| 5639 | 372 | /*@}*/ |
| 373 | ||
|
32787
7072f190d6ad
Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32438
diff
changeset
|
374 | G_END_DECLS |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5660
diff
changeset
|
375 | |
| 15884 | 376 | #endif /* _PURPLE_ACCOUNTOPT_H_ */ |