libpurple/plugins/perl/common/Util.xs

Thu, 07 Aug 2008 04:10:22 +0000

author
Daniel Atallah <datallah@pidgin.im>
date
Thu, 07 Aug 2008 04:10:22 +0000
changeset 23986
f4a1046d35ec
parent 23983
586866581434
child 25384
8e504b1712a6
permissions
-rw-r--r--

Fix purple_str_strip_char and purple_util_chrreplace to be able to work.

11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
1 #include "module.h"
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
2
22830
ff90a889788e Fix Purple::Util::fetch_url to correctly accept a callback in any of the
Etan Reisner <deryni@pidgin.im>
parents: 16774
diff changeset
3 static void
ff90a889788e Fix Purple::Util::fetch_url to correctly accept a callback in any of the
Etan Reisner <deryni@pidgin.im>
parents: 16774
diff changeset
4 purple_perl_util_url_cb(PurpleUtilFetchUrlData *url_data, void *user_data,
ff90a889788e Fix Purple::Util::fetch_url to correctly accept a callback in any of the
Etan Reisner <deryni@pidgin.im>
parents: 16774
diff changeset
5 const gchar *url_text, size_t size,
ff90a889788e Fix Purple::Util::fetch_url to correctly accept a callback in any of the
Etan Reisner <deryni@pidgin.im>
parents: 16774
diff changeset
6 const gchar *error_message)
ff90a889788e Fix Purple::Util::fetch_url to correctly accept a callback in any of the
Etan Reisner <deryni@pidgin.im>
parents: 16774
diff changeset
7 {
ff90a889788e Fix Purple::Util::fetch_url to correctly accept a callback in any of the
Etan Reisner <deryni@pidgin.im>
parents: 16774
diff changeset
8 SV *sv = (SV *)user_data;
12783
b88a822b278b [gaim-migrate @ 15130]
Etan Reisner <deryni@pidgin.im>
parents: 12412
diff changeset
9 dSP;
b88a822b278b [gaim-migrate @ 15130]
Etan Reisner <deryni@pidgin.im>
parents: 12412
diff changeset
10 ENTER;
b88a822b278b [gaim-migrate @ 15130]
Etan Reisner <deryni@pidgin.im>
parents: 12412
diff changeset
11 SAVETMPS;
14426
8d4f164c4979 [gaim-migrate @ 17070]
Daniel Atallah <datallah@pidgin.im>
parents: 14417
diff changeset
12 PUSHMARK(SP);
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
13
14426
8d4f164c4979 [gaim-migrate @ 17070]
Daniel Atallah <datallah@pidgin.im>
parents: 14417
diff changeset
14 XPUSHs(sv_2mortal(newSVpvn(url_text, size)));
12783
b88a822b278b [gaim-migrate @ 15130]
Etan Reisner <deryni@pidgin.im>
parents: 12412
diff changeset
15 PUTBACK;
11290
136722ebf145 [gaim-migrate @ 13490]
John H. Kelm <johnkelm@gmail.com>
parents: 11118
diff changeset
16
22830
ff90a889788e Fix Purple::Util::fetch_url to correctly accept a callback in any of the
Etan Reisner <deryni@pidgin.im>
parents: 16774
diff changeset
17 call_sv(sv, G_EVAL | G_SCALAR);
12783
b88a822b278b [gaim-migrate @ 15130]
Etan Reisner <deryni@pidgin.im>
parents: 12412
diff changeset
18 SPAGAIN;
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
19
22830
ff90a889788e Fix Purple::Util::fetch_url to correctly accept a callback in any of the
Etan Reisner <deryni@pidgin.im>
parents: 16774
diff changeset
20 /* XXX Make sure this destroys it correctly and that we don't want
ff90a889788e Fix Purple::Util::fetch_url to correctly accept a callback in any of the
Etan Reisner <deryni@pidgin.im>
parents: 16774
diff changeset
21 * something like sv_2mortal(sv) or something else here instead. */
ff90a889788e Fix Purple::Util::fetch_url to correctly accept a callback in any of the
Etan Reisner <deryni@pidgin.im>
parents: 16774
diff changeset
22 SvREFCNT_dec(sv);
14426
8d4f164c4979 [gaim-migrate @ 17070]
Daniel Atallah <datallah@pidgin.im>
parents: 14417
diff changeset
23
12783
b88a822b278b [gaim-migrate @ 15130]
Etan Reisner <deryni@pidgin.im>
parents: 12412
diff changeset
24 PUTBACK;
b88a822b278b [gaim-migrate @ 15130]
Etan Reisner <deryni@pidgin.im>
parents: 12412
diff changeset
25 FREETMPS;
b88a822b278b [gaim-migrate @ 15130]
Etan Reisner <deryni@pidgin.im>
parents: 12412
diff changeset
26 LEAVE;
11290
136722ebf145 [gaim-migrate @ 13490]
John H. Kelm <johnkelm@gmail.com>
parents: 11118
diff changeset
27 }
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
28
23982
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
29 static void markup_find_tag_foreach(GQuark key_id, char *data, HV *hv) {
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
30 const char *key = NULL;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
31 key = g_quark_to_string(key_id);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
32 hv_store(hv, key, strlen(key), newSVpv(data, 0), 0);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
33 }
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
34
15894
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
35 MODULE = Purple::Util PACKAGE = Purple::Util PREFIX = purple_
12783
b88a822b278b [gaim-migrate @ 15130]
Etan Reisner <deryni@pidgin.im>
parents: 12412
diff changeset
36 PROTOTYPES: ENABLE
11290
136722ebf145 [gaim-migrate @ 13490]
John H. Kelm <johnkelm@gmail.com>
parents: 11118
diff changeset
37
23982
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
38 gboolean
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
39 purple_running_gnome()
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
40
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
41 gboolean
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
42 purple_running_kde()
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
43
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
44 gboolean
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
45 purple_running_osx()
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
46
12783
b88a822b278b [gaim-migrate @ 15130]
Etan Reisner <deryni@pidgin.im>
parents: 12412
diff changeset
47 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
48 purple_build_dir(path, mode)
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
49 const char *path
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
50 int mode
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
51
12783
b88a822b278b [gaim-migrate @ 15130]
Etan Reisner <deryni@pidgin.im>
parents: 12412
diff changeset
52 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
53 purple_email_is_valid(address)
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
54 const char *address
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
55
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
56 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
57 purple_escape_filename(str)
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
58 const char *str
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
59
15165
0ff631dfbbca [gaim-migrate @ 17889]
Daniel Atallah <datallah@pidgin.im>
parents: 14426
diff changeset
60 gchar_own *
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_fd_get_ip(fd)
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
62 int fd
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
63
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
64 const gchar *
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_home_dir()
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
66
23982
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
67 gchar_own*
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
68 purple_message_meify(SV *msg)
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
69 PREINIT:
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
70 char *message = NULL;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
71 gboolean ret;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
72 gssize len;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
73 CODE:
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
74 message = SvPV(msg, len);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
75 message = g_strndup(message, len);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
76 ret = purple_message_meify(message, len);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
77 if(ret) {
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
78 /* message will get g_free()'d later on, since RETVAL is gchar_own* */
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
79 RETVAL = message;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
80 } else {
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
81 RETVAL = NULL;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
82 g_free(message);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
83 }
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
84 OUTPUT:
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
85 RETVAL
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
86
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
87 FILE *
23982
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
88 purple_mkstemp(OUTLIST gchar_own *path, binary)
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
89 gboolean binary
23982
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
90 PROTOTYPE: $
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
91
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
92 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
93 purple_normalize(account, str)
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
94 Purple::Account account
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
95 const char *str
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
96
12783
b88a822b278b [gaim-migrate @ 15130]
Etan Reisner <deryni@pidgin.im>
parents: 12412
diff changeset
97 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
98 purple_program_is_valid(program)
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
99 const char *program
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
100
15165
0ff631dfbbca [gaim-migrate @ 17889]
Daniel Atallah <datallah@pidgin.im>
parents: 14426
diff changeset
101 gchar_own *
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_strcasereplace(string, delimiter, replacement)
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
103 const char *string
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
104 const char *delimiter
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
105 const char *replacement
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
106
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
107 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
108 purple_strcasestr(haystack, needle)
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
109 const char *haystack
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
110 const char *needle
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
111
15165
0ff631dfbbca [gaim-migrate @ 17889]
Daniel Atallah <datallah@pidgin.im>
parents: 14426
diff changeset
112 gchar_own *
15894
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
113 purple_strdup_withhtml(src)
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
114 const gchar *src
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
115
15165
0ff631dfbbca [gaim-migrate @ 17889]
Daniel Atallah <datallah@pidgin.im>
parents: 14426
diff changeset
116 gchar_own *
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_strreplace(string, delimiter, replacement)
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
118 const char *string
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
119 const char *delimiter
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
120 const char *replacement
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
121
15165
0ff631dfbbca [gaim-migrate @ 17889]
Daniel Atallah <datallah@pidgin.im>
parents: 14426
diff changeset
122 gchar_own *
15894
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
123 purple_text_strip_mnemonic(in)
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
124 const char *in
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
125
12783
b88a822b278b [gaim-migrate @ 15130]
Etan Reisner <deryni@pidgin.im>
parents: 12412
diff changeset
126 time_t
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_time_build(year, month, day, hour, min, sec)
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
128 int year
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
129 int month
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
130 int day
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
131 int hour
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
132 int min
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
133 int sec
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
134
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
135 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
136 purple_time_format(tm)
13105
8f9c66e4af87 [gaim-migrate @ 15466]
Richard Laager <rlaager@pidgin.im>
parents: 13033
diff changeset
137 const struct tm *tm
8f9c66e4af87 [gaim-migrate @ 15466]
Richard Laager <rlaager@pidgin.im>
parents: 13033
diff changeset
138
8f9c66e4af87 [gaim-migrate @ 15466]
Richard Laager <rlaager@pidgin.im>
parents: 13033
diff changeset
139 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
140 purple_unescape_filename(str)
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
141 const char *str
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
142
15165
0ff631dfbbca [gaim-migrate @ 17889]
Daniel Atallah <datallah@pidgin.im>
parents: 14426
diff changeset
143 gchar_own *
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_unescape_html(html)
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
145 const char *html
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
146
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
147 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
148 purple_url_decode(str)
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
149 const char *str
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
150
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
151 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
152 purple_url_encode(str)
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
153 const char *str
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
154
23982
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
155 # XXX: this made perl assert()...
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
156 #
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
157 #gboolean
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
158 #purple_url_parse(url, OUTLIST gchar_own *ret_host, OUTLIST int ret_port, OUTLIST gchar_own *ret_path, OUTLIST gchar_own *ret_user, OUTLIST gchar_own *ret_passwd)
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
159 # const char *url
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
160 # PROTOTYPE: $
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
161
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
162 void
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
163 purple_url_parse(url)
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
164 const char *url
23982
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
165 PREINIT:
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
166 char *ret_host;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
167 int ret_port;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
168 char *ret_path;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
169 char *ret_user;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
170 char *ret_passwd;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
171 gboolean ret;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
172 PPCODE:
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
173 ret = purple_url_parse(url, &ret_host, &ret_port, &ret_path, &ret_user, &ret_passwd);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
174 XPUSHs(sv_2mortal(newSViv(ret)));
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
175 XPUSHs(ret_host ? sv_2mortal(newSVpv(ret_host, 0)) : sv_2mortal(newSV(0)));
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
176 XPUSHs(sv_2mortal(newSViv(ret_port)));
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
177 XPUSHs(ret_path ? sv_2mortal(newSVpv(ret_path, 0)) : sv_2mortal(newSV(0)));
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
178 XPUSHs(ret_user ? sv_2mortal(newSVpv(ret_user, 0)) : sv_2mortal(newSV(0)));
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
179 XPUSHs(ret_passwd ? sv_2mortal(newSVpv(ret_passwd, 0)) : sv_2mortal(newSV(0)));
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
180 g_free(ret_host);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
181 g_free(ret_path);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
182 g_free(ret_user);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
183 g_free(ret_passwd);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
184
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
185
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
186 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
187 purple_user_dir()
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
188
13105
8f9c66e4af87 [gaim-migrate @ 15466]
Richard Laager <rlaager@pidgin.im>
parents: 13033
diff changeset
189 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
190 purple_utf8_strftime(const char *format, const struct tm *tm);
13105
8f9c66e4af87 [gaim-migrate @ 15466]
Richard Laager <rlaager@pidgin.im>
parents: 13033
diff changeset
191
23982
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
192 gboolean
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
193 purple_utf8_has_word(haystack, needle)
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
194 const char* haystack
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
195 const char* needle
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
196
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
197 gchar_own*
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
198 purple_utf8_ncr_decode(in)
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
199 const char* in
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
200
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
201 gchar_own*
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
202 purple_utf8_ncr_encode(in)
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
203 const char* in
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
204
23983
586866581434 Remove a bunch of *_init() and *_uninit() functions that don't make sense for
Daniel Atallah <datallah@pidgin.im>
parents: 23982
diff changeset
205 gchar_own*
23982
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
206 purple_utf8_salvage(str)
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
207 const char* str
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
208
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
209 int
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
210 purple_utf8_strcasecmp(a, b)
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
211 const char* a
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
212 const char* b
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
213
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
214 gchar_own*
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
215 purple_utf8_try_convert(str)
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
216 const char* str
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
217
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
218 gboolean
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
219 purple_ip_address_is_valid(ip)
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
220 const char* ip
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
221
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
222 const char*
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
223 purple_normalize_nocase(account, str)
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
224 Purple::Account account
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
225 const char* str
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
226
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
227 const gchar*
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
228 purple_gai_strerror(errnum)
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
229 gint errnum
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
230
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
231 void
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
232 purple_got_protocol_handler_uri(uri)
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
233 const char* uri
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
234
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
235 gchar_own*
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
236 purple_base16_encode(const guchar *data, gsize length(data))
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
237 PROTOTYPE: $
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
238
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
239 gchar_own*
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
240 purple_base16_encode_chunked(const guchar *data, gsize length(data))
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
241 PROTOTYPE: $
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
242
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
243 gchar_own*
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
244 purple_base64_encode(const guchar *data, gsize length(data))
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
245 PROTOTYPE: $
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
246
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
247 void
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
248 purple_restore_default_signal_handlers()
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
249
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
250 SV *
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
251 purple_base16_decode(str)
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
252 const char* str
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
253 PREINIT:
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
254 gsize len;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
255 guchar *ret;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
256 CODE:
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
257 ret = purple_base16_decode(str, &len);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
258 if(len) {
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
259 RETVAL = newSVpv(ret, len);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
260 } else {
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
261 g_free(ret);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
262 XSRETURN_UNDEF;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
263 }
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
264 g_free(ret);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
265 OUTPUT:
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
266 RETVAL
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
267
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
268 SV*
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
269 purple_base64_decode(str)
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
270 const char* str
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
271 PREINIT:
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
272 gsize len;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
273 guchar *ret;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
274 CODE:
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
275 ret = purple_base64_decode(str, &len);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
276 if(len) {
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
277 RETVAL = newSVpv(ret, len);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
278 } else {
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
279 g_free(ret);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
280 XSRETURN_UNDEF;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
281 }
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
282 g_free(ret);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
283 OUTPUT:
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
284 RETVAL
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
285
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
286 SV*
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
287 purple_quotedp_decode(str)
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
288 const char* str
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
289 PREINIT:
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
290 gsize len;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
291 guchar *ret;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
292 CODE:
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
293 ret = purple_quotedp_decode(str, &len);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
294 if(len) {
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
295 RETVAL = newSVpv(ret, len);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
296 } else {
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
297 g_free(ret);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
298 XSRETURN_UNDEF;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
299 }
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
300 g_free(ret);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
301 OUTPUT:
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
302 RETVAL
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
303
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
304 void
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
305 purple_uri_list_extract_uris(uri_list)
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
306 const gchar* uri_list
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
307 PREINIT:
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
308 GList *l = NULL, *gl = NULL;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
309 PPCODE:
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
310 gl = purple_uri_list_extract_uris(uri_list);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
311 for(l = gl; l; l = l->next) {
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
312 XPUSHs(sv_2mortal(newSVpv(l->data, 0)));
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
313 g_free(l->data);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
314 }
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
315 g_list_free(gl);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
316
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
317 void
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
318 purple_uri_list_extract_filenames(uri_list)
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
319 const gchar* uri_list
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
320 PREINIT:
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
321 GList *l = NULL, *gl = NULL;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
322 PPCODE:
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
323 gl = purple_uri_list_extract_filenames(uri_list);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
324 for(l = gl; l; l = l->next) {
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
325 XPUSHs(sv_2mortal(newSVpv(l->data, 0)));
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
326 g_free(l->data);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
327 }
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
328 g_list_free(gl);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
329
16774
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
330 MODULE = Purple::Util PACKAGE = Purple::Util::Str PREFIX = purple_str_
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
331 PROTOTYPES: ENABLE
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
332
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
333 gchar_own *
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
334 purple_str_add_cr(str)
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
335 const char *str
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
336
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
337 gchar_own *
23982
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
338 purple_str_binary_to_ascii(const unsigned char *binary, guint length(binary))
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
339 PROTOTYPE: $
16774
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
340
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
341 gboolean
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
342 purple_str_has_prefix(s, p)
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
343 const char *s
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
344 const char *p
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
345
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
346 gboolean
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
347 purple_str_has_suffix(s, x)
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
348 const char *s
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
349 const char *x
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
350
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
351 gchar_own *
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
352 purple_str_seconds_to_string(sec)
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
353 guint sec
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
354
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
355 gchar_own *
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
356 purple_str_size_to_units(size)
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
357 size_t size
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
358
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
359 void
23986
f4a1046d35ec Fix purple_str_strip_char and purple_util_chrreplace to be able to work.
Daniel Atallah <datallah@pidgin.im>
parents: 23983
diff changeset
360 purple_str_strip_char(IN_OUT char str, thechar)
16774
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
361 char thechar
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
362
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
363 time_t
23982
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
364 purple_str_to_time(timestamp, utc = FALSE, tm = NULL, OUTLIST long tz_off, OUTLIST const char *rest)
16774
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
365 const char *timestamp
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
366 gboolean utc
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
367 struct tm *tm
23982
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
368 PROTOTYPE: $;$$
16774
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
369
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
370 MODULE = Purple::Util PACKAGE = Purple::Util::Date PREFIX = purple_date_
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
371 PROTOTYPES: ENABLE
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
372
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
373 const char *
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
374 purple_date_format_full(tm)
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
375 const struct tm *tm
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
376
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
377 const char *
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
378 purple_date_format_long(tm)
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
379 const struct tm *tm
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
380
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
381 const char *
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
382 purple_date_format_short(tm)
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
383 const struct tm *tm
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
384
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
385 MODULE = Purple::Util PACKAGE = Purple::Util::Markup PREFIX = purple_markup_
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
386 PROTOTYPES: ENABLE
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
387
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
388 gboolean
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
389 purple_markup_extract_info_field(str, len, user_info, start_token, skip, end_token, check_value, no_value_token, display_name, is_link, link_prefix, format_cb)
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
390 const char *str
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
391 int len
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
392 Purple::NotifyUserInfo user_info
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
393 const char *start_token
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
394 int skip
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
395 const char *end_token
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
396 char check_value
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
397 const char *no_value_token
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
398 const char *display_name
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
399 gboolean is_link
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
400 const char *link_prefix
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
401 Purple::Util::InfoFieldFormatCallback format_cb
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
402
23982
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
403 # XXX: returning start/end to perl doesn't make a lot of sense...
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
404 # XXX: the actual tag data can be gotten with $start =~ s/$end//g;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
405 void
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
406 purple_markup_find_tag(needle, haystack)
16774
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
407 const char *needle
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
408 const char *haystack
23982
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
409 PREINIT:
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
410 const char *start = NULL;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
411 const char *end = NULL;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
412 GData *attributes;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
413 gboolean ret;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
414 HV *hv = NULL;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
415 PPCODE:
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
416 ret = purple_markup_find_tag(needle, haystack, &start, &end, &attributes);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
417 if(!ret) XSRETURN_UNDEF;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
418
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
419 hv = newHV();
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
420 g_datalist_foreach(&attributes, (GDataForeachFunc) markup_find_tag_foreach, hv);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
421 g_datalist_clear(&attributes);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
422
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
423 XPUSHs(sv_2mortal(newSVpv(start, 0)));
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
424 XPUSHs(sv_2mortal(newSVpv(end, 0)));
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
425 XPUSHs(sv_2mortal(newRV_noinc((SV *) hv)));
16774
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
426
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
427 gchar_own *
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
428 purple_markup_get_tag_name(tag)
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
429 const char *tag
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
430
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
431 void
23982
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
432 purple_markup_html_to_xhtml(html, OUTLIST gchar_own *dest_xhtml, OUTLIST gchar_own *dest_plain)
16774
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
433 const char *html
23982
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
434 PROTOTYPE: $
16774
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
435
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
436 gchar_own *
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
437 purple_markup_linkify(str)
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
438 const char *str
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
439
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
440 gchar_own *
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
441 purple_markup_slice(str, x, y)
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
442 const char *str
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
443 guint x
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
444 guint y
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
445
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
446 gchar_own *
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
447 purple_markup_strip_html(str)
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
448 const char *str
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
449
23982
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
450 gchar_own *
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
451 purple_markup_get_css_property(style, opt)
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
452 const gchar* style
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
453 const gchar* opt
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
454
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
455 SV*
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
456 purple_markup_unescape_entity(text)
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
457 const char* text
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
458 PREINIT:
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
459 int length;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
460 CODE:
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
461 {
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
462 const char *str = purple_markup_unescape_entity(text, &length);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
463 if(length) {
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
464 RETVAL = newSVpv(str, length);
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
465 } else {
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
466 XSRETURN_UNDEF;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
467 }
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
468 }
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
469 OUTPUT:
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
470 RETVAL
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
471
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
472
16774
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
473 MODULE = Purple::Util PACKAGE = Purple::Util PREFIX = purple_util_
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
474 PROTOTYPES: ENABLE
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
475
23982
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
476 #XXX: expand...
16774
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
477 void
22830
ff90a889788e Fix Purple::Util::fetch_url to correctly accept a callback in any of the
Etan Reisner <deryni@pidgin.im>
parents: 16774
diff changeset
478 purple_util_fetch_url(plugin, url, full, user_agent, http11, cb)
ff90a889788e Fix Purple::Util::fetch_url to correctly accept a callback in any of the
Etan Reisner <deryni@pidgin.im>
parents: 16774
diff changeset
479 Purple::Plugin plugin
16774
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
480 const char *url
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
481 gboolean full
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
482 const char *user_agent
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
483 gboolean http11
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
484 SV * cb
23982
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
485 PREINIT:
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
486 PurpleUtilFetchUrlData *data;
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
487 PPCODE:
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
488 /* XXX: i don't like this... only plugins can use it... */
22839
3ee4247ebbbd Use the same fix for Purple::Util::fetch_url (from 4b6378d5e) for
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22830
diff changeset
489 SV *sv = purple_perl_sv_from_fun(plugin, cb);
22830
ff90a889788e Fix Purple::Util::fetch_url to correctly accept a callback in any of the
Etan Reisner <deryni@pidgin.im>
parents: 16774
diff changeset
490
ff90a889788e Fix Purple::Util::fetch_url to correctly accept a callback in any of the
Etan Reisner <deryni@pidgin.im>
parents: 16774
diff changeset
491 if (sv != NULL) {
23982
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
492 data = purple_util_fetch_url(url, full, user_agent, http11,
22830
ff90a889788e Fix Purple::Util::fetch_url to correctly accept a callback in any of the
Etan Reisner <deryni@pidgin.im>
parents: 16774
diff changeset
493 purple_perl_util_url_cb, sv);
23982
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
494 XPUSHs(sv_2mortal(purple_perl_bless_object(data, "Purple::Util::FetchUrlData")));
22839
3ee4247ebbbd Use the same fix for Purple::Util::fetch_url (from 4b6378d5e) for
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22830
diff changeset
495 } else {
3ee4247ebbbd Use the same fix for Purple::Util::fetch_url (from 4b6378d5e) for
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22830
diff changeset
496 purple_debug_warning("perl", "Callback not a valid type, only strings and coderefs allowed in purple_util_fetch_url.\n");
23982
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
497 XSRETURN_UNDEF;
22830
ff90a889788e Fix Purple::Util::fetch_url to correctly accept a callback in any of the
Etan Reisner <deryni@pidgin.im>
parents: 16774
diff changeset
498 }
16774
064f0b6c87a5 Clean up a bunch of the perl api stuff. Eventually I'll dump the entire list
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
499
12783
b88a822b278b [gaim-migrate @ 15130]
Etan Reisner <deryni@pidgin.im>
parents: 12412
diff changeset
500 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
501 purple_util_set_user_dir(dir)
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
502 const char *dir
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
503
12783
b88a822b278b [gaim-migrate @ 15130]
Etan Reisner <deryni@pidgin.im>
parents: 12412
diff changeset
504 gboolean
23982
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
505 purple_util_write_data_to_file(filename, const char *data, size_t length(data))
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
506 const char *filename
23982
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
507 PROTOTYPE: $$
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
508
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
509 void
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
510 purple_util_set_current_song(title, artist, album)
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
511 const char *title
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
512 const char *artist
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
513 const char *album
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
514
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
515 void
23986
f4a1046d35ec Fix purple_str_strip_char and purple_util_chrreplace to be able to work.
Daniel Atallah <datallah@pidgin.im>
parents: 23983
diff changeset
516 purple_util_chrreplace(IN_OUT char string, delimiter, replacement)
23982
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
517 char delimiter
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
518 char replacement
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
519
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
520 gchar_own*
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
521 purple_util_format_song_info(title, artist, album, unused)
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
522 const char* title
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
523 const char* artist
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
524 const char* album
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
525 gpointer unused
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
526
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
527 const char*
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
528 purple_util_get_image_extension(gconstpointer data, size_t length(data))
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
529 PROTOTYPE: $
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
530
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
531 gchar_own*
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
532 purple_util_get_image_filename(gconstpointer image_data, size_t length(image_data))
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
533 PROTOTYPE: $
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
534
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
535 Purple::XMLNode
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
536 purple_util_read_xml_from_file(filename, description)
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
537 const char* filename
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
538 const char* description
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
539
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
540 gboolean
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
541 purple_util_write_data_to_file_absolute(filename_full, char *data, gssize length(data))
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
542 const char* filename_full
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
543 PROTOTYPE: $$
204b6e71f403 Some Perl bindings fixes and additions from Zsombor Welker.
Daniel Atallah <datallah@pidgin.im>
parents: 22839
diff changeset
544

mercurial