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