comparison libpurple/accountopt.c @ 32827:4a34689eeb33 default tip

merged from im.pidgin.pidgin
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sat, 19 Nov 2011 14:42:54 +0900
parents 6e27091869eb
children
comparison
equal deleted inserted replaced
32692:0f94ec89f0bc 32827:4a34689eeb33
25 */ 25 */
26 #include "internal.h" 26 #include "internal.h"
27 27
28 #include "accountopt.h" 28 #include "accountopt.h"
29 #include "util.h" 29 #include "util.h"
30
31 /**
32 * An option for an account.
33 *
34 * This is set by protocol plugins, and appears in the account settings
35 * dialogs.
36 */
37 struct _PurpleAccountOption
38 {
39 PurplePrefType type; /**< The type of value. */
40
41 char *text; /**< The text that will appear to the user. */
42 char *pref_name; /**< The name of the associated preference. */
43
44 union
45 {
46 gboolean boolean; /**< The default boolean value. */
47 int integer; /**< The default integer value. */
48 char *string; /**< The default string value. */
49 GList *list; /**< The default list value. */
50
51 } default_value;
52
53 gboolean masked; /**< Whether the value entered should be
54 * obscured from view (for passwords and
55 * similar options)
56 */
57 };
58
59 /**
60 * A username split.
61 *
62 * This is used by some protocols to separate the fields of the username
63 * into more human-readable components.
64 */
65 struct _PurpleAccountUserSplit
66 {
67 char *text; /**< The text that will appear to the user. */
68 char *default_value; /**< The default value. */
69 char field_sep; /**< The field separator. */
70 gboolean reverse; /**< TRUE if the separator should be found
71 starting a the end of the string, FALSE
72 otherwise */
73 };
74
30 75
31 PurpleAccountOption * 76 PurpleAccountOption *
32 purple_account_option_new(PurplePrefType type, const char *text, 77 purple_account_option_new(PurplePrefType type, const char *text,
33 const char *pref_name) 78 const char *pref_name)
34 { 79 {