Tue, 01 May 2007 02:34:22 +0000
Remove the const-c and const-xs stuff and replace it with real constants
exposed to perl.
| 11118 | 1 | #include "module.h" |
| 2 | ||
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
3 | MODULE = Purple::Account::Option PACKAGE = Purple::Account::Option PREFIX = purple_account_option_ |
| 11118 | 4 | PROTOTYPES: ENABLE |
| 5 | ||
| 12785 | 6 | void |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
7 | purple_account_option_destroy(option) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
8 | Purple::Account::Option option |
| 11118 | 9 | |
| 12785 | 10 | const char * |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
11 | purple_account_option_get_default_string(option) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
12 | Purple::Account::Option option |
| 11118 | 13 | |
| 14 | void | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
15 | purple_account_option_add_list_item(option, key, value) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
16 | Purple::Account::Option option |
| 11118 | 17 | const char * key |
| 12785 | 18 | const char * value |
| 11118 | 19 | |
| 20 | void | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
21 | purple_account_option_set_default_string(option, value); |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
22 | Purple::Account::Option option |
| 11118 | 23 | const char * value |
| 24 | ||
| 25 | void | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
26 | purple_account_option_set_default_int(option, value); |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
27 | Purple::Account::Option option |
| 11118 | 28 | int value |
| 29 | ||
| 30 | void | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
31 | purple_account_option_set_default_bool(option, value); |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
32 | Purple::Account::Option option |
| 12785 | 33 | gboolean value |
| 11118 | 34 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
35 | Purple::Account::Option |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
36 | purple_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 | } | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
51 | RETVAL = purple_account_option_list_new(text, pref_name, t_GL); |
| 11131 | 52 | OUTPUT: |
| 53 | RETVAL | |
| 11118 | 54 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
55 | Purple::Account::Option |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
56 | purple_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 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
63 | Purple::Account::Option |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
64 | purple_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 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
71 | Purple::Account::Option |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
72 | purple_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 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
79 | Purple::Account::Option |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
80 | purple_account_option_new(class, type, text, pref_name) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
81 | Purple::PrefType type |
| 11118 | 82 | const char * text |
| 83 | const char * pref_name | |
| 12364 | 84 | C_ARGS: |
| 85 | type, text, pref_name | |
| 11118 | 86 | |
| 87 | void | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
88 | purple_account_option_get_list(option) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
89 | Purple::Account::Option option |
| 11118 | 90 | PREINIT: |
| 11130 | 91 | const GList *l; |
| 11118 | 92 | PPCODE: |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
93 | for (l = purple_account_option_get_list(option); l != NULL; l = l->next) { |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
94 | /* XXX These are actually PurpleKeyValuePairs but we don't have a |
| 12785 | 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 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
97 | * leave this as a Purple::ListEntry for now. */ |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
98 | XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::ListEntry"))); |
| 11118 | 99 | } |
| 100 | ||
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
101 | Purple::PrefType |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
102 | purple_account_option_get_type(option) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
103 | Purple::Account::Option option |
| 11118 | 104 | |
| 12785 | 105 | gboolean |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
106 | purple_account_option_get_masked(option) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
107 | Purple::Account::Option option |
| 11118 | 108 | |
| 12785 | 109 | int |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
110 | purple_account_option_get_default_int(option) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
111 | Purple::Account::Option option; |
| 12785 | 112 | |
| 113 | gboolean | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
114 | purple_account_option_get_default_bool(option) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
115 | Purple::Account::Option option; |
| 11118 | 116 | |
| 117 | const char * | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
118 | purple_account_option_get_setting(option) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
119 | Purple::Account::Option option |
| 11118 | 120 | |
| 121 | const char * | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
122 | purple_account_option_get_text(option) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
123 | Purple::Account::Option option |
| 11118 | 124 | |
| 12785 | 125 | void |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
126 | purple_account_option_set_list(option, values) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
127 | Purple::Account::Option option |
| 11118 | 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 | } | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
140 | purple_account_option_set_list(option, t_GL); |
| 11118 | 141 | |
| 142 | void | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
143 | purple_account_option_set_masked(option, masked) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
144 | Purple::Account::Option option |
| 11118 | 145 | gboolean masked |
| 146 | ||
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
147 | MODULE = Purple::Account::Option PACKAGE = Purple::Account::UserSplit PREFIX = purple_account_user_split_ |
| 11118 | 148 | PROTOTYPES: ENABLE |
| 149 | ||
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
150 | Purple::Account::UserSplit |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
151 | purple_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 | 158 | char |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
159 | purple_account_user_split_get_separator(split) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
160 | Purple::Account::UserSplit split |
| 11118 | 161 | |
| 162 | const char * | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
163 | purple_account_user_split_get_text(split) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
164 | Purple::Account::UserSplit split |
| 11118 | 165 | |
| 12785 | 166 | void |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
167 | purple_account_user_split_destroy(split) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
168 | Purple::Account::UserSplit split |