Thu, 11 Aug 2005 07:56:29 +0000
[gaim-migrate @ 13372]
committing crazychat again. hopefully here to stay.
| 11118 | 1 | #include "module.h" |
| 2 | ||
| 3 | /* TODO | |
| 4 | ||
| 5 | */ | |
| 6 | ||
| 7 | /**********************XS Code for Account.xs*********************************/ | |
| 8 | MODULE = Gaim::Account::Option PACKAGE = Gaim::Account::Option PREFIX = gaim_account_option_ | |
| 9 | PROTOTYPES: ENABLE | |
| 10 | ||
| 11 | void | |
| 12 | gaim_account_option_destroy(option) | |
| 13 | Gaim::Account::Option option | |
| 14 | ||
| 15 | const char * | |
| 16 | gaim_account_option_get_default_string(option) | |
| 17 | Gaim::Account::Option option | |
| 18 | ||
| 19 | void | |
| 20 | gaim_account_option_add_list_item(option, key, value) | |
| 21 | Gaim::Account::Option option | |
| 22 | const char * key | |
| 23 | const char * value | |
| 24 | ||
| 25 | void | |
| 26 | gaim_account_option_set_default_string(option, value); | |
| 27 | Gaim::Account::Option option | |
| 28 | const char * value | |
| 29 | ||
| 30 | void | |
| 31 | gaim_account_option_set_default_int(option, value); | |
| 32 | Gaim::Account::Option option | |
| 33 | int value | |
| 34 | ||
| 35 | void | |
| 36 | gaim_account_option_set_default_bool(option, value); | |
| 37 | Gaim::Account::Option option | |
| 38 | gboolean value | |
| 39 | ||
| 40 | Gaim::Account::Option | |
| 41 | gaim_account_option_list_new(text, pref_name, values) | |
| 42 | const char * text | |
| 43 | const char * pref_name | |
| 44 | SV * values | |
| 45 | PREINIT: | |
| 46 | GList *t_GL; | |
| 47 | int i, t_len; | |
| 11131 | 48 | CODE: |
| 11118 | 49 | t_GL = NULL; |
| 50 | t_len = av_len((AV *)SvRV(values)); | |
| 51 | ||
| 52 | for (i = 0; i < t_len; i++) { | |
| 53 | STRLEN t_sl; | |
| 54 | t_GL = g_list_append(t_GL, SvPV(*av_fetch((AV *)SvRV(values), i, 0), t_sl)); | |
| 55 | } | |
| 11131 | 56 | RETVAL = gaim_account_option_list_new(text, pref_name, t_GL); |
| 57 | OUTPUT: | |
| 58 | RETVAL | |
| 11118 | 59 | |
| 60 | Gaim::Account::Option | |
| 61 | gaim_account_option_string_new(text, pref_name, default_value) | |
| 62 | const char * text | |
| 63 | const char * pref_name | |
| 64 | const char * default_value | |
| 65 | ||
| 66 | Gaim::Account::Option | |
| 67 | gaim_account_option_int_new(text, pref_name, default_value) | |
| 68 | const char * text | |
| 69 | const char * pref_name | |
| 70 | gboolean default_value | |
| 71 | ||
| 72 | Gaim::Account::Option | |
| 73 | gaim_account_option_bool_new(text, pref_name, default_value) | |
| 74 | const char * text | |
| 75 | const char * pref_name | |
| 76 | gboolean default_value | |
| 77 | ||
| 78 | Gaim::Account::Option | |
| 79 | gaim_account_option_new(type, text, pref_name) | |
| 80 | Gaim::PrefType type | |
| 81 | const char * text | |
| 82 | const char * pref_name | |
| 83 | ||
| 84 | void | |
| 85 | gaim_account_option_get_list(option) | |
| 86 | Gaim::Account::Option option | |
| 87 | PREINIT: | |
| 11130 | 88 | const GList *l; |
| 11118 | 89 | PPCODE: |
| 90 | for (l = gaim_account_option_get_list(option); l != NULL; l = l->next) { | |
| 91 | XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListEntry"))); | |
| 92 | } | |
| 93 | ||
| 94 | Gaim::PrefType | |
| 95 | gaim_account_option_get_type(option) | |
| 96 | Gaim::Account::Option option | |
| 97 | ||
| 98 | gboolean | |
| 99 | gaim_account_option_get_masked(option) | |
| 100 | Gaim::Account::Option option | |
| 101 | ||
| 102 | int | |
| 103 | gaim_account_option_get_default_int(option) | |
| 104 | Gaim::Account::Option option; | |
| 105 | INIT: | |
| 106 | ||
| 107 | gboolean | |
| 108 | gaim_account_option_get_default_bool(option) | |
| 109 | Gaim::Account::Option option; | |
| 110 | ||
| 111 | const char * | |
| 112 | gaim_account_option_get_setting(option) | |
| 113 | Gaim::Account::Option option | |
| 114 | ||
| 115 | const char * | |
| 116 | gaim_account_option_get_text(option) | |
| 117 | Gaim::Account::Option option | |
| 118 | ||
| 119 | void | |
| 120 | gaim_account_option_set_list(option, values) | |
| 121 | Gaim::Account::Option option | |
| 122 | SV * values | |
| 123 | PREINIT: | |
| 124 | GList *t_GL; | |
| 125 | int i, t_len; | |
| 126 | PPCODE: | |
| 127 | t_GL = NULL; | |
| 128 | t_len = av_len((AV *)SvRV(values)); | |
| 129 | ||
| 130 | for (i = 0; i < t_len; i++) { | |
| 131 | STRLEN t_sl; | |
| 132 | t_GL = g_list_append(t_GL, SvPV(*av_fetch((AV *)SvRV(values), i, 0), t_sl)); | |
| 133 | } | |
| 134 | gaim_account_option_set_list(option, t_GL); | |
| 135 | ||
| 136 | void | |
| 137 | gaim_account_option_set_masked(option, masked) | |
| 138 | Gaim::Account::Option option | |
| 139 | gboolean masked | |
| 140 | ||
| 141 | MODULE = Gaim::Account::Option PACKAGE = Gaim::Account::UserSplit PREFIX = gaim_account_user_split_ | |
| 142 | PROTOTYPES: ENABLE | |
| 143 | ||
| 144 | Gaim::Account::UserSplit | |
| 145 | gaim_account_user_split_new(text, default_value, sep) | |
| 146 | const char * text | |
| 147 | const char * default_value | |
| 148 | char sep | |
| 149 | ||
| 150 | char | |
| 151 | gaim_account_user_split_get_separator(split) | |
| 152 | Gaim::Account::UserSplit split | |
| 153 | ||
| 154 | const char * | |
| 155 | gaim_account_user_split_get_text(split) | |
| 156 | Gaim::Account::UserSplit split | |
| 157 | ||
| 158 | void | |
| 159 | gaim_account_user_split_destroy(split) | |
| 160 | Gaim::Account::UserSplit split |