Mercurial > pidgin.yaz
annotate plugins/perl/common/AccountOpts.xs @ 13097:f1bf8989bbf2
[gaim-migrate @ 15459]
Cleanup the way we mark things for translation in gaim_str_seconds_to_string().
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Thu, 02 Feb 2006 18:48:32 +0000 |
parents | beda858e88fa |
children |
rev | line source |
---|---|
11118 | 1 #include "module.h" |
2 | |
3 MODULE = Gaim::Account::Option PACKAGE = Gaim::Account::Option PREFIX = gaim_account_option_ | |
4 PROTOTYPES: ENABLE | |
5 | |
12785
beda858e88fa
[gaim-migrate @ 15132]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
6 void |
11118 | 7 gaim_account_option_destroy(option) |
8 Gaim::Account::Option option | |
9 | |
12785
beda858e88fa
[gaim-migrate @ 15132]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
10 const char * |
11118 | 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 | |
12785
beda858e88fa
[gaim-migrate @ 15132]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
18 const char * value |
11118 | 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 | |
12785
beda858e88fa
[gaim-migrate @ 15132]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
33 gboolean value |
11118 | 34 |
35 Gaim::Account::Option | |
12364 | 36 gaim_account_option_list_new(class, text, pref_name, values) |
11118 | 37 const char * text |
38 const char * pref_name | |
39 SV * values | |
40 PREINIT: | |
41 GList *t_GL; | |
42 int i, t_len; | |
11131 | 43 CODE: |
11118 | 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 } | |
11131 | 51 RETVAL = gaim_account_option_list_new(text, pref_name, t_GL); |
52 OUTPUT: | |
53 RETVAL | |
11118 | 54 |
55 Gaim::Account::Option | |
12364 | 56 gaim_account_option_string_new(class, text, pref_name, default_value) |
11118 | 57 const char * text |
58 const char * pref_name | |
59 const char * default_value | |
12364 | 60 C_ARGS: |
61 text, pref_name, default_value | |
11118 | 62 |
63 Gaim::Account::Option | |
12364 | 64 gaim_account_option_int_new(class, text, pref_name, default_value) |
11118 | 65 const char * text |
66 const char * pref_name | |
67 gboolean default_value | |
12364 | 68 C_ARGS: |
69 text, pref_name, default_value | |
11118 | 70 |
71 Gaim::Account::Option | |
12364 | 72 gaim_account_option_bool_new(class, text, pref_name, default_value) |
11118 | 73 const char * text |
74 const char * pref_name | |
75 gboolean default_value | |
12364 | 76 C_ARGS: |
77 text, pref_name, default_value | |
11118 | 78 |
79 Gaim::Account::Option | |
12364 | 80 gaim_account_option_new(class, type, text, pref_name) |
11118 | 81 Gaim::PrefType type |
82 const char * text | |
83 const char * pref_name | |
12364 | 84 C_ARGS: |
85 type, text, pref_name | |
11118 | 86 |
87 void | |
88 gaim_account_option_get_list(option) | |
89 Gaim::Account::Option option | |
90 PREINIT: | |
11130 | 91 const GList *l; |
11118 | 92 PPCODE: |
93 for (l = gaim_account_option_get_list(option); l != NULL; l = l->next) { | |
12785
beda858e88fa
[gaim-migrate @ 15132]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
94 /* XXX These are actually GaimKeyValuePairs but we don't have a |
beda858e88fa
[gaim-migrate @ 15132]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
95 * type for that and even if we did I don't think there's |
beda858e88fa
[gaim-migrate @ 15132]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
96 * anything perl could do with them, so I'm just going to |
beda858e88fa
[gaim-migrate @ 15132]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
97 * leave this as a Gaim::ListEntry for now. */ |
11118 | 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 | |
12785
beda858e88fa
[gaim-migrate @ 15132]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
105 gboolean |
11118 | 106 gaim_account_option_get_masked(option) |
107 Gaim::Account::Option option | |
108 | |
12785
beda858e88fa
[gaim-migrate @ 15132]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
109 int |
11118 | 110 gaim_account_option_get_default_int(option) |
111 Gaim::Account::Option option; | |
12785
beda858e88fa
[gaim-migrate @ 15132]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
112 |
beda858e88fa
[gaim-migrate @ 15132]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
113 gboolean |
11118 | 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 | |
12785
beda858e88fa
[gaim-migrate @ 15132]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
125 void |
11118 | 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 | |
12364 | 151 gaim_account_user_split_new(class, text, default_value, sep) |
11118 | 152 const char * text |
153 const char * default_value | |
154 char sep | |
12364 | 155 C_ARGS: |
156 text, default_value, sep | |
11118 | 157 |
12785
beda858e88fa
[gaim-migrate @ 15132]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
158 char |
11118 | 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 | |
12785
beda858e88fa
[gaim-migrate @ 15132]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
166 void |
11118 | 167 gaim_account_user_split_destroy(split) |
168 Gaim::Account::UserSplit split |