Mon, 19 Mar 2007 19:06:57 +0000
merge of e171f61e7083d597d600624755c8543cac7012c1
and 90dc3adee5d20876eb1622470eb5c19406b6f0f1
| 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::Prefs PACKAGE = Purple::Prefs PREFIX = purple_prefs_ |
| 11118 | 4 | PROTOTYPES: ENABLE |
| 5 | ||
| 12780 | 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_prefs_add_bool(name, value) |
| 11118 | 8 | const char *name |
| 9 | gboolean value | |
| 10 | ||
| 12780 | 11 | 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
|
12 | purple_prefs_add_int(name, value) |
| 11118 | 13 | const char *name |
| 14 | int value | |
| 15 | ||
| 12780 | 16 | 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
|
17 | purple_prefs_add_none(name) |
| 11118 | 18 | const char *name |
| 19 | ||
| 12780 | 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_prefs_add_string(name, value) |
| 11118 | 22 | const char *name |
| 23 | const char *value | |
| 24 | ||
| 12780 | 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_prefs_add_string_list(name, value) |
| 11118 | 27 | const char *name |
| 28 | SV *value | |
| 29 | PREINIT: | |
| 12780 | 30 | GList *t_GL; |
| 31 | int i, t_len; | |
| 11118 | 32 | PPCODE: |
| 12780 | 33 | t_GL = NULL; |
| 34 | t_len = av_len((AV *)SvRV(value)); | |
| 11118 | 35 | |
| 12780 | 36 | for (i = 0; i < t_len; i++) { |
| 37 | STRLEN t_sl; | |
| 38 | t_GL = g_list_append(t_GL, SvPV(*av_fetch((AV *)SvRV(value), i, 0), t_sl)); | |
| 39 | } | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
40 | purple_prefs_add_string_list(name, t_GL); |
| 11118 | 41 | |
| 12780 | 42 | 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
|
43 | purple_prefs_destroy() |
| 11118 | 44 | |
| 12780 | 45 | 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
|
46 | purple_prefs_disconnect_by_handle(handle) |
| 12780 | 47 | void * handle |
| 11118 | 48 | |
| 12780 | 49 | 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
|
50 | purple_prefs_disconnect_callback(callback_id) |
| 11118 | 51 | guint callback_id |
| 52 | ||
| 12780 | 53 | 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
|
54 | purple_prefs_exists(name) |
| 11118 | 55 | const char *name |
| 56 | ||
| 12780 | 57 | 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
|
58 | purple_prefs_get_bool(name) |
| 11118 | 59 | const char *name |
| 60 | ||
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
61 | Purple::Handle |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
62 | purple_prefs_get_handle() |
| 11118 | 63 | |
| 12780 | 64 | 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
|
65 | purple_prefs_get_int(name) |
| 11118 | 66 | const char *name |
| 67 | ||
| 68 | 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
|
69 | purple_prefs_get_string(name) |
| 11118 | 70 | const char *name |
| 71 | ||
| 72 | 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
|
73 | purple_prefs_get_string_list(name) |
| 11118 | 74 | const char *name |
| 75 | PREINIT: | |
| 12780 | 76 | GList *l; |
| 11118 | 77 | 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
|
78 | for (l = purple_prefs_get_string_list(name); 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
|
79 | XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::PrefValue"))); |
| 12780 | 80 | } |
| 11118 | 81 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
82 | 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
|
83 | purple_prefs_get_type(name) |
| 11118 | 84 | const char *name |
| 85 | ||
| 12780 | 86 | 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
|
87 | purple_prefs_init() |
| 11118 | 88 | |
| 12780 | 89 | 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
|
90 | purple_prefs_load() |
| 11118 | 91 | |
| 12780 | 92 | 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
|
93 | purple_prefs_remove(name) |
| 11118 | 94 | const char *name |
| 95 | ||
| 12780 | 96 | 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
|
97 | purple_prefs_rename(oldname, newname) |
| 11118 | 98 | const char *oldname |
| 99 | const char *newname | |
| 100 | ||
| 12780 | 101 | 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
|
102 | purple_prefs_rename_boolean_toggle(oldname, newname) |
| 11118 | 103 | const char *oldname |
| 104 | const char *newname | |
| 105 | ||
| 12780 | 106 | 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
|
107 | purple_prefs_set_bool(name, value) |
| 11118 | 108 | const char *name |
| 109 | gboolean value | |
| 110 | ||
| 12780 | 111 | 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
|
112 | purple_prefs_set_generic(name, value) |
| 11118 | 113 | const char *name |
| 114 | gpointer value | |
| 115 | ||
| 12780 | 116 | 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
|
117 | purple_prefs_set_int(name, value) |
| 11118 | 118 | const char *name |
| 119 | int value | |
| 120 | ||
| 12780 | 121 | 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
|
122 | purple_prefs_set_string(name, value) |
| 11118 | 123 | const char *name |
| 124 | const char *value | |
| 125 | ||
| 12780 | 126 | 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
|
127 | purple_prefs_set_string_list(name, value) |
| 11118 | 128 | const char *name |
| 129 | SV *value | |
| 130 | PREINIT: | |
| 12780 | 131 | GList *t_GL; |
| 132 | int i, t_len; | |
| 11118 | 133 | PPCODE: |
| 12780 | 134 | t_GL = NULL; |
| 135 | t_len = av_len((AV *)SvRV(value)); | |
| 11118 | 136 | |
| 12780 | 137 | for (i = 0; i < t_len; i++) { |
| 138 | STRLEN t_sl; | |
| 139 | t_GL = g_list_append(t_GL, SvPV(*av_fetch((AV *)SvRV(value), i, 0), t_sl)); | |
| 140 | } | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
141 | purple_prefs_set_string_list(name, t_GL); |
| 11118 | 142 | |
| 12780 | 143 | 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
|
144 | purple_prefs_trigger_callback(name) |
| 11118 | 145 | const char *name |
| 146 | ||
| 12780 | 147 | 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
|
148 | purple_prefs_uninit() |
| 11118 | 149 | |
| 12780 | 150 | 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
|
151 | purple_prefs_update_old() |