libpurple/plugins/perl/common/Prefs.xs

Tue, 21 Jan 2014 03:38:03 +0530

author
Ankit Vani <a@nevitus.org>
date
Tue, 21 Jan 2014 03:38:03 +0530
changeset 35177
cd95ae1faea1
parent 35148
8dcd0006002f
child 35378
5d9e2581005b
permissions
-rw-r--r--

Make purple_prefs_update_old private

11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
5 PROTOTYPES: ENABLE
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
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
09514852c086 [gaim-migrate @ 15127]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
28 const char *name
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
29 gboolean value
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
30
12780
09514852c086 [gaim-migrate @ 15127]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
33 const char *name
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
34 int value
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
35
12780
09514852c086 [gaim-migrate @ 15127]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
38 const char *name
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
39
12780
09514852c086 [gaim-migrate @ 15127]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
42 const char *name
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
43 const char *value
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
44
12780
09514852c086 [gaim-migrate @ 15127]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
47 const char *name
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
48 SV *value
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
49 PREINIT:
12780
09514852c086 [gaim-migrate @ 15127]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
50 GList *t_GL;
09514852c086 [gaim-migrate @ 15127]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
51 int i, t_len;
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
52 PPCODE:
12780
09514852c086 [gaim-migrate @ 15127]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
53 t_GL = NULL;
25112
4e9dba9e28e6 disapproval of revision '2d9389f32256ca757b17d7cabe9d9beebce0d311'
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 25106
diff changeset
54 t_len = av_len((AV *)SvRV(value));
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
55
25107
bd102c539600 Tweak a few for loop conditions in the Perl bindings per Etan's suggestion.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 25106
diff changeset
56 for (i = 0; i <= t_len; i++)
23980
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
61
12780
09514852c086 [gaim-migrate @ 15127]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
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;
25112
4e9dba9e28e6 disapproval of revision '2d9389f32256ca757b17d7cabe9d9beebce0d311'
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 25106
diff changeset
76 t_len = av_len((AV *)SvRV(value));
23984
14b9a01eaaaf Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents: 23983
diff changeset
77
25107
bd102c539600 Tweak a few for loop conditions in the Perl bindings per Etan's suggestion.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 25106
diff changeset
78 for (i = 0; i <= t_len; i++)
23984
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
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
09514852c086 [gaim-migrate @ 15127]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
103
12780
09514852c086 [gaim-migrate @ 15127]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
109
12780
09514852c086 [gaim-migrate @ 15127]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
112 const char *name
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
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
09514852c086 [gaim-migrate @ 15127]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
131 const char *name
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
135
12780
09514852c086 [gaim-migrate @ 15127]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
138 const char *name
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
139
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
142 const char *name
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
143
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
146 const char *name
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
147 PREINIT:
12780
09514852c086 [gaim-migrate @ 15127]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
148 GList *l;
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
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
09514852c086 [gaim-migrate @ 15127]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
153 }
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
157 const char *name
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
158
12780
09514852c086 [gaim-migrate @ 15127]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
161
12780
09514852c086 [gaim-migrate @ 15127]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
164 const char *name
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
165
12780
09514852c086 [gaim-migrate @ 15127]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
168 const char *oldname
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
169 const char *newname
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
170
12780
09514852c086 [gaim-migrate @ 15127]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
173 const char *oldname
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
174 const char *newname
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
175
12780
09514852c086 [gaim-migrate @ 15127]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
178 const char *name
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
179 gboolean value
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
180
12780
09514852c086 [gaim-migrate @ 15127]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
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_int(name, value)
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
183 const char *name
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
184 int value
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
185
12780
09514852c086 [gaim-migrate @ 15127]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
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_string(name, value)
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
188 const char *name
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
189 const char *value
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
190
12780
09514852c086 [gaim-migrate @ 15127]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
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_list(name, value)
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
193 const char *name
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
194 SV *value
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
195 PREINIT:
12780
09514852c086 [gaim-migrate @ 15127]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
196 GList *t_GL;
09514852c086 [gaim-migrate @ 15127]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
197 int i, t_len;
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
198 PPCODE:
12780
09514852c086 [gaim-migrate @ 15127]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
199 t_GL = NULL;
25112
4e9dba9e28e6 disapproval of revision '2d9389f32256ca757b17d7cabe9d9beebce0d311'
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 25106
diff changeset
200 t_len = av_len((AV *)SvRV(value));
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
201
25107
bd102c539600 Tweak a few for loop conditions in the Perl bindings per Etan's suggestion.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 25106
diff changeset
202 for (i = 0; i <= t_len; i++)
23980
a38cbb35eecf Some cleanup and a couple leak fixes.
Daniel Atallah <datallah@pidgin.im>
parents: 23930
diff changeset
203 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
204
15894
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
205 purple_prefs_set_string_list(name, t_GL);
21737
fa92350ed598 applied changes from 8d953d5714cb202c5fa66fda1b0f31f01a969622
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 17283
diff changeset
206 g_list_free(t_GL);
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
207
12780
09514852c086 [gaim-migrate @ 15127]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
208 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
209 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
210 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
211 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
212
14b9a01eaaaf Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents: 23983
diff changeset
213 void
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_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
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 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
217 PREINIT:
14b9a01eaaaf Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents: 23983
diff changeset
218 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
219 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
220 PPCODE:
14b9a01eaaaf Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents: 23983
diff changeset
221 t_GL = NULL;
25112
4e9dba9e28e6 disapproval of revision '2d9389f32256ca757b17d7cabe9d9beebce0d311'
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 25106
diff changeset
222 t_len = av_len((AV *)SvRV(value));
23984
14b9a01eaaaf Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents: 23983
diff changeset
223
25107
bd102c539600 Tweak a few for loop conditions in the Perl bindings per Etan's suggestion.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 25106
diff changeset
224 for (i = 0; i <= t_len; i++)
23984
14b9a01eaaaf Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents: 23983
diff changeset
225 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
226
14b9a01eaaaf Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents: 23983
diff changeset
227 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
228 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
229
14b9a01eaaaf Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents: 23983
diff changeset
230
14b9a01eaaaf Another Perl loader patch from Zsombor Welker, this one adds some missing pref
Daniel Atallah <datallah@pidgin.im>
parents: 23983
diff changeset
231 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
232 purple_prefs_trigger_callback(name)
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
233 const char *name
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
234
12780
09514852c086 [gaim-migrate @ 15127]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
235 void
22835
1c120805ad06 Expose Purple::Prefs::get_children_names to perl plugins.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 21737
diff changeset
236 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
237 const char *name
1c120805ad06 Expose Purple::Prefs::get_children_names to perl plugins.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 21737
diff changeset
238 PREINIT:
1c120805ad06 Expose Purple::Prefs::get_children_names to perl plugins.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 21737
diff changeset
239 GList *l;
1c120805ad06 Expose Purple::Prefs::get_children_names to perl plugins.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 21737
diff changeset
240 PPCODE:
1c120805ad06 Expose Purple::Prefs::get_children_names to perl plugins.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 21737
diff changeset
241 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
242 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
243 g_free(l->data);
1c120805ad06 Expose Purple::Prefs::get_children_names to perl plugins.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 21737
diff changeset
244 }

mercurial