Mercurial > pidgin
annotate libpurple/plugins/perl/common/Smiley.xs @ 31819:70ff869a74d1
Open an explorer.exe window at the location of the file when clicking
on a file link instead of executing the file, because executing a file
can be potentially dangerous. Problem discovered by James Burton of
Insomnia Security. Fixed by Eion Robb.
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 18 Aug 2011 08:38:23 +0000 |
parents | 50b33c18815e |
children |
rev | line source |
---|---|
23145
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
1 #include "module.h" |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
2 |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
3 MODULE = Purple::Smiley PACKAGE = Purple::Smiley PREFIX = purple_smiley_ |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
4 PROTOTYPES: ENABLE |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
5 |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
6 Purple::Smiley |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
7 purple_smiley_new(img, shortcut) |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
8 Purple::StoredImage img |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
9 const char * shortcut |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
10 |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
11 Purple::Smiley |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
12 purple_smiley_new_from_file(shortcut, filepath) |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
13 const char * shortcut |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
14 const char * filepath |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
15 |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
16 void |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
17 purple_smiley_delete(smiley) |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
18 Purple::Smiley smiley |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
19 |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
20 gboolean |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
21 purple_smiley_set_shortcut(smiley, shortcut) |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
22 Purple::Smiley smiley |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
23 const char * shortcut |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
24 |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
25 void |
23186
50b33c18815e
Update the perl bindings for the changed smiley API.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
23145
diff
changeset
|
26 purple_smiley_set_data(smiley, data, data_len) |
23145
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
27 Purple::Smiley smiley |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
28 guchar * data |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
29 size_t data_len |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
30 |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
31 const char * |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
32 purple_smiley_get_shortcut(smiley) |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
33 Purple::Smiley smiley |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
34 |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
35 const char * |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
36 purple_smiley_get_checksum(smiley) |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
37 Purple::Smiley smiley |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
38 |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
39 Purple::StoredImage |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
40 purple_smiley_get_stored_image(smiley) |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
41 Purple::Smiley smiley |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
42 |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
43 gconstpointer |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
44 purple_smiley_get_data(smiley, len) |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
45 Purple::Smiley smiley |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
46 size_t * len |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
47 |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
48 const char * |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
49 purple_smiley_get_extension(smiley) |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
50 Purple::Smiley smiley |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
51 |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
52 |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
53 gchar_own * |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
54 purple_smiley_get_full_path(smiley) |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
55 Purple::Smiley smiley |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
56 |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
57 |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
58 MODULE = Purple::Smiley PACKAGE = Purple::Smileys PREFIX = purple_smileys_ |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
59 PROTOTYPES: ENABLE |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
60 |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
61 void |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
62 purple_smileys_get_all() |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
63 PREINIT: |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
64 GList *l; |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
65 PPCODE: |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
66 for (l = purple_smileys_get_all(); l != NULL; l = g_list_delete_link(l, l)) { |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
67 XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::Smiley"))); |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
68 } |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
69 |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
70 Purple::Smiley |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
71 purple_smileys_find_by_shortcut(shortcut) |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
72 const char * shortcut |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
73 |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
74 Purple::Smiley |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
75 purple_smileys_find_by_checksum(checksum) |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
76 const char * checksum |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
77 |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
78 const char * |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
79 purple_smileys_get_storing_dir() |
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
80 |