Thu, 30 Oct 2008 22:40:49 +0000
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
to detect when we're still using deprecated functions internally (and by
extension, when we've deprecated something we shouldn't have). In the
course of developing this changeset, I fixed a few such cases.
Given that the plan is to switch from PURPLE_HIDE_STRUCTS to
PURPLE_DISABLE_DEPRECATED as each struct is fully dealt with, this will
also ensure we have no regressions on the struct hiding work.
Deprecated functions are still available to the respective .c file, to
avoid missing prototype errors. Also, Perl and DBus undef the
*_DISABLE_DEPRECATED defines as appropriate so that deprecated functions
will still be exported to Perl plugins and via DBus. (Otherwise, we'd
be breaking backwards compatibility.)
| 11118 | 1 | #include "module.h" |
|
23930
c1c3d7cab338
Add support to the Perl plugin loader for listing for pref changes.
Daniel Atallah <datallah@pidgin.im>
parents:
22835
diff
changeset
|
2 | #include "../perl-handlers.h" |
| 11118 | 3 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
4 | MODULE = Purple::Prefs PACKAGE = Purple::Prefs PREFIX = purple_prefs_ |
| 11118 | 5 | PROTOTYPES: ENABLE |
| 6 | ||
|
16773
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
7 | BOOT: |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
8 | { |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
9 | HV *stash = gv_stashpv("Purple::Pref::Type", 1); |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
10 | |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
11 | static const constiv *civ, const_iv[] = { |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
12 | #define const_iv(name) {#name, (IV)PURPLE_PREF_##name} |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
13 | const_iv(NONE), |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
14 | const_iv(BOOLEAN), |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
15 | const_iv(INT), |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
16 | const_iv(STRING), |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
17 | const_iv(STRING_LIST), |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
18 | const_iv(PATH), |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
19 | const_iv(PATH_LIST), |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
20 | }; |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
21 | |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
22 | for (civ = const_iv + sizeof(const_iv) / sizeof(const_iv[0]); civ-- > const_iv; ) |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
23 | newCONSTSUB(stash, (char *)civ->name, newSViv(civ->iv)); |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
24 | } |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
25 | |
| 12780 | 26 | 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
|
27 | purple_prefs_add_bool(name, value) |
| 11118 | 28 | const char *name |
| 29 | gboolean value | |
| 30 | ||
| 12780 | 31 | 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
|
32 | purple_prefs_add_int(name, value) |
| 11118 | 33 | const char *name |
| 34 | int value | |
| 35 | ||
| 12780 | 36 | 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
|
37 | purple_prefs_add_none(name) |
| 11118 | 38 | const char *name |
| 39 | ||
| 12780 | 40 | 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
|
41 | purple_prefs_add_string(name, value) |
| 11118 | 42 | const char *name |
| 43 | const char *value | |
| 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_add_string_list(name, value) |
| 11118 | 47 | const char *name |
| 48 | SV *value | |
| 49 | PREINIT: | |
| 12780 | 50 | GList *t_GL; |
| 51 | int i, t_len; | |
| 11118 | 52 | PPCODE: |
| 12780 | 53 | t_GL = NULL; |
| 54 | t_len = av_len((AV *)SvRV(value)); | |
| 11118 | 55 | |
|
23980
a38cbb35eecf
Some cleanup and a couple leak fixes.
Daniel Atallah <datallah@pidgin.im>
parents:
23930
diff
changeset
|
56 | for (i = 0; i < t_len; i++) |
|
a38cbb35eecf
Some cleanup and a couple leak fixes.
Daniel Atallah <datallah@pidgin.im>
parents:
23930
diff
changeset
|
57 | t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(value), i, 0))); |
|
a38cbb35eecf
Some cleanup and a couple leak fixes.
Daniel Atallah <datallah@pidgin.im>
parents:
23930
diff
changeset
|
58 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
59 | purple_prefs_add_string_list(name, t_GL); |
|
21737
fa92350ed598
applied changes from 8d953d5714cb202c5fa66fda1b0f31f01a969622
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
17283
diff
changeset
|
60 | g_list_free(t_GL); |
| 11118 | 61 | |
| 12780 | 62 | void |
|
23984
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
63 | purple_prefs_add_path(name, value) |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
64 | const char *name |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
65 | const char *value |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
66 | |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
67 | void |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
68 | purple_prefs_add_path_list(name, value) |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
69 | const char *name |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
70 | SV *value |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
71 | PREINIT: |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
72 | GList *t_GL; |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
73 | int i, t_len; |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
74 | PPCODE: |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
75 | t_GL = NULL; |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
76 | t_len = av_len((AV *)SvRV(value)); |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
77 | |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
78 | for (i = 0; i < t_len; i++) |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
79 | t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(value), i, 0))); |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
80 | |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
81 | purple_prefs_add_path_list(name, t_GL); |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
82 | g_list_free(t_GL); |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
83 | |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
84 | 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
|
85 | purple_prefs_destroy() |
| 11118 | 86 | |
|
23930
c1c3d7cab338
Add support to the Perl plugin loader for listing for pref changes.
Daniel Atallah <datallah@pidgin.im>
parents:
22835
diff
changeset
|
87 | guint |
|
c1c3d7cab338
Add support to the Perl plugin loader for listing for pref changes.
Daniel Atallah <datallah@pidgin.im>
parents:
22835
diff
changeset
|
88 | purple_prefs_connect_callback(plugin, name, callback, data = 0); |
|
c1c3d7cab338
Add support to the Perl plugin loader for listing for pref changes.
Daniel Atallah <datallah@pidgin.im>
parents:
22835
diff
changeset
|
89 | Purple::Plugin plugin |
|
c1c3d7cab338
Add support to the Perl plugin loader for listing for pref changes.
Daniel Atallah <datallah@pidgin.im>
parents:
22835
diff
changeset
|
90 | const char *name |
|
c1c3d7cab338
Add support to the Perl plugin loader for listing for pref changes.
Daniel Atallah <datallah@pidgin.im>
parents:
22835
diff
changeset
|
91 | SV *callback |
|
c1c3d7cab338
Add support to the Perl plugin loader for listing for pref changes.
Daniel Atallah <datallah@pidgin.im>
parents:
22835
diff
changeset
|
92 | SV *data |
|
c1c3d7cab338
Add support to the Perl plugin loader for listing for pref changes.
Daniel Atallah <datallah@pidgin.im>
parents:
22835
diff
changeset
|
93 | CODE: |
|
c1c3d7cab338
Add support to the Perl plugin loader for listing for pref changes.
Daniel Atallah <datallah@pidgin.im>
parents:
22835
diff
changeset
|
94 | RETVAL = purple_perl_prefs_connect_callback(plugin, name, callback, data); |
|
c1c3d7cab338
Add support to the Perl plugin loader for listing for pref changes.
Daniel Atallah <datallah@pidgin.im>
parents:
22835
diff
changeset
|
95 | OUTPUT: |
|
c1c3d7cab338
Add support to the Perl plugin loader for listing for pref changes.
Daniel Atallah <datallah@pidgin.im>
parents:
22835
diff
changeset
|
96 | RETVAL |
|
c1c3d7cab338
Add support to the Perl plugin loader for listing for pref changes.
Daniel Atallah <datallah@pidgin.im>
parents:
22835
diff
changeset
|
97 | |
| 12780 | 98 | void |
|
23930
c1c3d7cab338
Add support to the Perl plugin loader for listing for pref changes.
Daniel Atallah <datallah@pidgin.im>
parents:
22835
diff
changeset
|
99 | purple_prefs_disconnect_by_handle(plugin) |
|
c1c3d7cab338
Add support to the Perl plugin loader for listing for pref changes.
Daniel Atallah <datallah@pidgin.im>
parents:
22835
diff
changeset
|
100 | Purple::Plugin plugin |
|
c1c3d7cab338
Add support to the Perl plugin loader for listing for pref changes.
Daniel Atallah <datallah@pidgin.im>
parents:
22835
diff
changeset
|
101 | CODE: |
|
c1c3d7cab338
Add support to the Perl plugin loader for listing for pref changes.
Daniel Atallah <datallah@pidgin.im>
parents:
22835
diff
changeset
|
102 | purple_perl_pref_cb_clear_for_plugin(plugin); |
| 11118 | 103 | |
| 12780 | 104 | 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
|
105 | purple_prefs_disconnect_callback(callback_id) |
| 11118 | 106 | guint callback_id |
|
23930
c1c3d7cab338
Add support to the Perl plugin loader for listing for pref changes.
Daniel Atallah <datallah@pidgin.im>
parents:
22835
diff
changeset
|
107 | CODE: |
|
c1c3d7cab338
Add support to the Perl plugin loader for listing for pref changes.
Daniel Atallah <datallah@pidgin.im>
parents:
22835
diff
changeset
|
108 | purple_perl_prefs_disconnect_callback(callback_id); |
| 11118 | 109 | |
| 12780 | 110 | 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
|
111 | purple_prefs_exists(name) |
| 11118 | 112 | const char *name |
| 113 | ||
|
23984
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
114 | const char * |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
115 | purple_prefs_get_path(name) |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
116 | const char *name |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
117 | |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
118 | void |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
119 | purple_prefs_get_path_list(name) |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
120 | const char *name |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
121 | PREINIT: |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
122 | GList *l; |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
123 | PPCODE: |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
124 | for (l = purple_prefs_get_path_list(name); l != NULL; l = g_list_delete_link(l, l)) { |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
125 | XPUSHs(sv_2mortal(newSVpv(l->data, 0))); |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
126 | g_free(l->data); |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
127 | } |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
128 | |
| 12780 | 129 | 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
|
130 | purple_prefs_get_bool(name) |
| 11118 | 131 | const char *name |
| 132 | ||
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
133 | 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
|
134 | purple_prefs_get_handle() |
| 11118 | 135 | |
| 12780 | 136 | 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
|
137 | purple_prefs_get_int(name) |
| 11118 | 138 | const char *name |
| 139 | ||
| 140 | 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
|
141 | purple_prefs_get_string(name) |
| 11118 | 142 | const char *name |
| 143 | ||
| 144 | 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
|
145 | purple_prefs_get_string_list(name) |
| 11118 | 146 | const char *name |
| 147 | PREINIT: | |
| 12780 | 148 | GList *l; |
| 11118 | 149 | PPCODE: |
|
17283
ceb0e3374ddf
Plug a few more memory leaks for some perl plugins.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17282
diff
changeset
|
150 | for (l = purple_prefs_get_string_list(name); l != NULL; l = g_list_delete_link(l, l)) { |
|
17282
7d015f747d02
Fix _prefs_get_string_list for perl.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16773
diff
changeset
|
151 | XPUSHs(sv_2mortal(newSVpv(l->data, 0))); |
|
17283
ceb0e3374ddf
Plug a few more memory leaks for some perl plugins.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17282
diff
changeset
|
152 | g_free(l->data); |
| 12780 | 153 | } |
| 11118 | 154 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
155 | 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
|
156 | purple_prefs_get_type(name) |
| 11118 | 157 | const char *name |
| 158 | ||
| 12780 | 159 | 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
|
160 | purple_prefs_load() |
| 11118 | 161 | |
| 12780 | 162 | 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
|
163 | purple_prefs_remove(name) |
| 11118 | 164 | const char *name |
| 165 | ||
| 12780 | 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_prefs_rename(oldname, newname) |
| 11118 | 168 | const char *oldname |
| 169 | const char *newname | |
| 170 | ||
| 12780 | 171 | 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
|
172 | purple_prefs_rename_boolean_toggle(oldname, newname) |
| 11118 | 173 | const char *oldname |
| 174 | const char *newname | |
| 175 | ||
| 12780 | 176 | 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
|
177 | purple_prefs_set_bool(name, value) |
| 11118 | 178 | const char *name |
| 179 | gboolean value | |
| 180 | ||
| 12780 | 181 | 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
|
182 | purple_prefs_set_generic(name, value) |
| 11118 | 183 | const char *name |
| 184 | gpointer value | |
| 185 | ||
| 12780 | 186 | 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
|
187 | purple_prefs_set_int(name, value) |
| 11118 | 188 | const char *name |
| 189 | int value | |
| 190 | ||
| 12780 | 191 | 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
|
192 | purple_prefs_set_string(name, value) |
| 11118 | 193 | const char *name |
| 194 | const char *value | |
| 195 | ||
| 12780 | 196 | 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
|
197 | purple_prefs_set_string_list(name, value) |
| 11118 | 198 | const char *name |
| 199 | SV *value | |
| 200 | PREINIT: | |
| 12780 | 201 | GList *t_GL; |
| 202 | int i, t_len; | |
| 11118 | 203 | PPCODE: |
| 12780 | 204 | t_GL = NULL; |
| 205 | t_len = av_len((AV *)SvRV(value)); | |
| 11118 | 206 | |
|
23980
a38cbb35eecf
Some cleanup and a couple leak fixes.
Daniel Atallah <datallah@pidgin.im>
parents:
23930
diff
changeset
|
207 | for (i = 0; i < t_len; i++) |
|
a38cbb35eecf
Some cleanup and a couple leak fixes.
Daniel Atallah <datallah@pidgin.im>
parents:
23930
diff
changeset
|
208 | t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(value), i, 0))); |
|
a38cbb35eecf
Some cleanup and a couple leak fixes.
Daniel Atallah <datallah@pidgin.im>
parents:
23930
diff
changeset
|
209 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
210 | purple_prefs_set_string_list(name, t_GL); |
|
21737
fa92350ed598
applied changes from 8d953d5714cb202c5fa66fda1b0f31f01a969622
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
17283
diff
changeset
|
211 | g_list_free(t_GL); |
| 11118 | 212 | |
| 12780 | 213 | void |
|
23984
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
214 | purple_prefs_set_path(name, value) |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
215 | const char *name |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
216 | const char *value |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
217 | |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
218 | void |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
219 | purple_prefs_set_path_list(name, value) |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
220 | const char *name |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
221 | SV *value |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
222 | PREINIT: |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
223 | GList *t_GL; |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
224 | int i, t_len; |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
225 | PPCODE: |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
226 | t_GL = NULL; |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
227 | t_len = av_len((AV *)SvRV(value)); |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
228 | |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
229 | for (i = 0; i < t_len; i++) |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
230 | t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(value), i, 0))); |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
231 | |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
232 | purple_prefs_set_path_list(name, t_GL); |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
233 | g_list_free(t_GL); |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
234 | |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
235 | |
|
14b9a01eaaaf
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents:
23983
diff
changeset
|
236 | 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
|
237 | purple_prefs_trigger_callback(name) |
| 11118 | 238 | const char *name |
| 239 | ||
| 12780 | 240 | void |
|
22835
1c120805ad06
Expose Purple::Prefs::get_children_names to perl plugins.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21737
diff
changeset
|
241 | purple_prefs_get_children_names(name) |
|
1c120805ad06
Expose Purple::Prefs::get_children_names to perl plugins.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21737
diff
changeset
|
242 | const char *name |
|
1c120805ad06
Expose Purple::Prefs::get_children_names to perl plugins.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21737
diff
changeset
|
243 | PREINIT: |
|
1c120805ad06
Expose Purple::Prefs::get_children_names to perl plugins.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21737
diff
changeset
|
244 | GList *l; |
|
1c120805ad06
Expose Purple::Prefs::get_children_names to perl plugins.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21737
diff
changeset
|
245 | PPCODE: |
|
1c120805ad06
Expose Purple::Prefs::get_children_names to perl plugins.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21737
diff
changeset
|
246 | for (l = purple_prefs_get_children_names(name); l != NULL; l = g_list_delete_link(l, l)) { |
|
1c120805ad06
Expose Purple::Prefs::get_children_names to perl plugins.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21737
diff
changeset
|
247 | XPUSHs(sv_2mortal(newSVpv(l->data, 0))); |
|
1c120805ad06
Expose Purple::Prefs::get_children_names to perl plugins.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21737
diff
changeset
|
248 | g_free(l->data); |
|
1c120805ad06
Expose Purple::Prefs::get_children_names to perl plugins.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21737
diff
changeset
|
249 | } |
|
1c120805ad06
Expose Purple::Prefs::get_children_names to perl plugins.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21737
diff
changeset
|
250 | |
|
1c120805ad06
Expose Purple::Prefs::get_children_names to perl plugins.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21737
diff
changeset
|
251 | 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
|
252 | purple_prefs_update_old() |