1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184
|
#include "module.h"
MODULE = Purple::Prefs PACKAGE = Purple::Prefs PREFIX = purple_prefs_
PROTOTYPES: ENABLE
BOOT:
{
HV *stash = gv_stashpv("Purple::Pref::Type", 1);
static const constiv *civ, const_iv[] = {
#define const_iv(name) {#name, (IV)PURPLE_PREF_##name}
const_iv(NONE),
const_iv(BOOLEAN),
const_iv(INT),
const_iv(STRING),
const_iv(STRING_LIST),
const_iv(PATH),
const_iv(PATH_LIST),
};
for (civ = const_iv + sizeof(const_iv) / sizeof(const_iv[0]); civ-- > const_iv; )
newCONSTSUB(stash, (char *)civ->name, newSViv(civ->iv));
}
void
purple_prefs_add_bool(name, value)
const char *name
gboolean value
void
purple_prefs_add_int(name, value)
const char *name
int value
void
purple_prefs_add_none(name)
const char *name
void
purple_prefs_add_string(name, value)
const char *name
const char *value
void
purple_prefs_add_string_list(name, value)
const char *name
SV *value
PREINIT:
GList *t_GL;
int i, t_len;
PPCODE:
t_GL = NULL;
t_len = av_len((AV *)SvRV(value));
for (i = 0; i < t_len; i++) {
STRLEN t_sl;
t_GL = g_list_append(t_GL, SvPV(*av_fetch((AV *)SvRV(value), i, 0), t_sl));
}
purple_prefs_add_string_list(name, t_GL);
g_list_free(t_GL);
void
purple_prefs_destroy()
void
purple_prefs_disconnect_by_handle(handle)
void * handle
void
purple_prefs_disconnect_callback(callback_id)
guint callback_id
gboolean
purple_prefs_exists(name)
const char *name
gboolean
purple_prefs_get_bool(name)
const char *name
Purple::Handle
purple_prefs_get_handle()
int
purple_prefs_get_int(name)
const char *name
const char *
purple_prefs_get_string(name)
const char *name
void
purple_prefs_get_string_list(name)
const char *name
PREINIT:
GList *l;
PPCODE:
for (l = purple_prefs_get_string_list(name); l != NULL; l = g_list_delete_link(l, l)) {
XPUSHs(sv_2mortal(newSVpv(l->data, 0)));
g_free(l->data);
}
Purple::PrefType
purple_prefs_get_type(name)
const char *name
void
purple_prefs_init()
gboolean
purple_prefs_load()
void
purple_prefs_remove(name)
const char *name
void
purple_prefs_rename(oldname, newname)
const char *oldname
const char *newname
void
purple_prefs_rename_boolean_toggle(oldname, newname)
const char *oldname
const char *newname
void
purple_prefs_set_bool(name, value)
const char *name
gboolean value
void
purple_prefs_set_generic(name, value)
const char *name
gpointer value
void
purple_prefs_set_int(name, value)
const char *name
int value
void
purple_prefs_set_string(name, value)
const char *name
const char *value
void
purple_prefs_set_string_list(name, value)
const char *name
SV *value
PREINIT:
GList *t_GL;
int i, t_len;
PPCODE:
t_GL = NULL;
t_len = av_len((AV *)SvRV(value));
for (i = 0; i < t_len; i++) {
STRLEN t_sl;
t_GL = g_list_append(t_GL, SvPV(*av_fetch((AV *)SvRV(value), i, 0), t_sl));
}
purple_prefs_set_string_list(name, t_GL);
g_list_free(t_GL);
void
purple_prefs_trigger_callback(name)
const char *name
void
purple_prefs_get_children_names(name)
const char *name
PREINIT:
GList *l;
PPCODE:
for (l = purple_prefs_get_children_names(name); l != NULL; l = g_list_delete_link(l, l)) {
XPUSHs(sv_2mortal(newSVpv(l->data, 0)));
g_free(l->data);
}
void
purple_prefs_uninit()
void
purple_prefs_update_old()
|