| |
1 #include "module.h" |
| |
2 |
| |
3 MODULE = Gaim::Account::Option PACKAGE = Gaim::Account::Option PREFIX = gaim_account_option_ |
| |
4 PROTOTYPES: ENABLE |
| |
5 |
| |
6 void |
| |
7 gaim_account_option_destroy(option) |
| |
8 Gaim::Account::Option option |
| |
9 |
| |
10 const char * |
| |
11 gaim_account_option_get_default_string(option) |
| |
12 Gaim::Account::Option option |
| |
13 |
| |
14 void |
| |
15 gaim_account_option_add_list_item(option, key, value) |
| |
16 Gaim::Account::Option option |
| |
17 const char * key |
| |
18 const char * value |
| |
19 |
| |
20 void |
| |
21 gaim_account_option_set_default_string(option, value); |
| |
22 Gaim::Account::Option option |
| |
23 const char * value |
| |
24 |
| |
25 void |
| |
26 gaim_account_option_set_default_int(option, value); |
| |
27 Gaim::Account::Option option |
| |
28 int value |
| |
29 |
| |
30 void |
| |
31 gaim_account_option_set_default_bool(option, value); |
| |
32 Gaim::Account::Option option |
| |
33 gboolean value |
| |
34 |
| |
35 Gaim::Account::Option |
| |
36 gaim_account_option_list_new(class, text, pref_name, values) |
| |
37 const char * text |
| |
38 const char * pref_name |
| |
39 SV * values |
| |
40 PREINIT: |
| |
41 GList *t_GL; |
| |
42 int i, t_len; |
| |
43 CODE: |
| |
44 t_GL = NULL; |
| |
45 t_len = av_len((AV *)SvRV(values)); |
| |
46 |
| |
47 for (i = 0; i < t_len; i++) { |
| |
48 STRLEN t_sl; |
| |
49 t_GL = g_list_append(t_GL, SvPV(*av_fetch((AV *)SvRV(values), i, 0), t_sl)); |
| |
50 } |
| |
51 RETVAL = gaim_account_option_list_new(text, pref_name, t_GL); |
| |
52 OUTPUT: |
| |
53 RETVAL |
| |
54 |
| |
55 Gaim::Account::Option |
| |
56 gaim_account_option_string_new(class, text, pref_name, default_value) |
| |
57 const char * text |
| |
58 const char * pref_name |
| |
59 const char * default_value |
| |
60 C_ARGS: |
| |
61 text, pref_name, default_value |
| |
62 |
| |
63 Gaim::Account::Option |
| |
64 gaim_account_option_int_new(class, text, pref_name, default_value) |
| |
65 const char * text |
| |
66 const char * pref_name |
| |
67 gboolean default_value |
| |
68 C_ARGS: |
| |
69 text, pref_name, default_value |
| |
70 |
| |
71 Gaim::Account::Option |
| |
72 gaim_account_option_bool_new(class, text, pref_name, default_value) |
| |
73 const char * text |
| |
74 const char * pref_name |
| |
75 gboolean default_value |
| |
76 C_ARGS: |
| |
77 text, pref_name, default_value |
| |
78 |
| |
79 Gaim::Account::Option |
| |
80 gaim_account_option_new(class, type, text, pref_name) |
| |
81 Gaim::PrefType type |
| |
82 const char * text |
| |
83 const char * pref_name |
| |
84 C_ARGS: |
| |
85 type, text, pref_name |
| |
86 |
| |
87 void |
| |
88 gaim_account_option_get_list(option) |
| |
89 Gaim::Account::Option option |
| |
90 PREINIT: |
| |
91 const GList *l; |
| |
92 PPCODE: |
| |
93 for (l = gaim_account_option_get_list(option); l != NULL; l = l->next) { |
| |
94 /* XXX These are actually GaimKeyValuePairs but we don't have a |
| |
95 * type for that and even if we did I don't think there's |
| |
96 * anything perl could do with them, so I'm just going to |
| |
97 * leave this as a Gaim::ListEntry for now. */ |
| |
98 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListEntry"))); |
| |
99 } |
| |
100 |
| |
101 Gaim::PrefType |
| |
102 gaim_account_option_get_type(option) |
| |
103 Gaim::Account::Option option |
| |
104 |
| |
105 gboolean |
| |
106 gaim_account_option_get_masked(option) |
| |
107 Gaim::Account::Option option |
| |
108 |
| |
109 int |
| |
110 gaim_account_option_get_default_int(option) |
| |
111 Gaim::Account::Option option; |
| |
112 |
| |
113 gboolean |
| |
114 gaim_account_option_get_default_bool(option) |
| |
115 Gaim::Account::Option option; |
| |
116 |
| |
117 const char * |
| |
118 gaim_account_option_get_setting(option) |
| |
119 Gaim::Account::Option option |
| |
120 |
| |
121 const char * |
| |
122 gaim_account_option_get_text(option) |
| |
123 Gaim::Account::Option option |
| |
124 |
| |
125 void |
| |
126 gaim_account_option_set_list(option, values) |
| |
127 Gaim::Account::Option option |
| |
128 SV * values |
| |
129 PREINIT: |
| |
130 GList *t_GL; |
| |
131 int i, t_len; |
| |
132 PPCODE: |
| |
133 t_GL = NULL; |
| |
134 t_len = av_len((AV *)SvRV(values)); |
| |
135 |
| |
136 for (i = 0; i < t_len; i++) { |
| |
137 STRLEN t_sl; |
| |
138 t_GL = g_list_append(t_GL, SvPV(*av_fetch((AV *)SvRV(values), i, 0), t_sl)); |
| |
139 } |
| |
140 gaim_account_option_set_list(option, t_GL); |
| |
141 |
| |
142 void |
| |
143 gaim_account_option_set_masked(option, masked) |
| |
144 Gaim::Account::Option option |
| |
145 gboolean masked |
| |
146 |
| |
147 MODULE = Gaim::Account::Option PACKAGE = Gaim::Account::UserSplit PREFIX = gaim_account_user_split_ |
| |
148 PROTOTYPES: ENABLE |
| |
149 |
| |
150 Gaim::Account::UserSplit |
| |
151 gaim_account_user_split_new(class, text, default_value, sep) |
| |
152 const char * text |
| |
153 const char * default_value |
| |
154 char sep |
| |
155 C_ARGS: |
| |
156 text, default_value, sep |
| |
157 |
| |
158 char |
| |
159 gaim_account_user_split_get_separator(split) |
| |
160 Gaim::Account::UserSplit split |
| |
161 |
| |
162 const char * |
| |
163 gaim_account_user_split_get_text(split) |
| |
164 Gaim::Account::UserSplit split |
| |
165 |
| |
166 void |
| |
167 gaim_account_user_split_destroy(split) |
| |
168 Gaim::Account::UserSplit split |