annotate libpurple/plugins/perl/common/Purple.xs @ 16200:470caa5fe675

Fix Ticket #162 "On AIM, the default smiley theme does not display the image for :-), only :) This is confirmed in default/theme, but almost all other AIM smileys have both ?? and ?-?."
author Richard Laager <rlaager@wiktel.com>
date Mon, 16 Apr 2007 03:37:48 +0000
parents 6dedf7542b44
children 39c7bb133a9f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16079
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
1 #include "module.h"
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
2 #include "../perl-handlers.h"
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
3 #include "const-c.inc"
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
4
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
5 /* Prototypes for the BOOT section below. */
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
6 PURPLE_PERL_BOOT_PROTO(Account);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
7 PURPLE_PERL_BOOT_PROTO(Account__Option);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
8 PURPLE_PERL_BOOT_PROTO(Buddy__Icon);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
9 PURPLE_PERL_BOOT_PROTO(BuddyList);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
10 PURPLE_PERL_BOOT_PROTO(Cipher);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
11 PURPLE_PERL_BOOT_PROTO(Cmd);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
12 PURPLE_PERL_BOOT_PROTO(Connection);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
13 PURPLE_PERL_BOOT_PROTO(Conversation);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
14 PURPLE_PERL_BOOT_PROTO(Core);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
15 PURPLE_PERL_BOOT_PROTO(Debug);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
16 PURPLE_PERL_BOOT_PROTO(Xfer);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
17 PURPLE_PERL_BOOT_PROTO(ImgStore);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
18 PURPLE_PERL_BOOT_PROTO(Log);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
19 PURPLE_PERL_BOOT_PROTO(Network);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
20 PURPLE_PERL_BOOT_PROTO(Notify);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
21 PURPLE_PERL_BOOT_PROTO(Plugin);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
22 PURPLE_PERL_BOOT_PROTO(PluginPref);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
23 PURPLE_PERL_BOOT_PROTO(Pounce);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
24 PURPLE_PERL_BOOT_PROTO(Prefs);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
25 PURPLE_PERL_BOOT_PROTO(Privacy);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
26 PURPLE_PERL_BOOT_PROTO(Proxy);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
27 PURPLE_PERL_BOOT_PROTO(Prpl);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
28 PURPLE_PERL_BOOT_PROTO(Request);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
29 PURPLE_PERL_BOOT_PROTO(Roomlist);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
30 PURPLE_PERL_BOOT_PROTO(SSL);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
31 PURPLE_PERL_BOOT_PROTO(SavedStatus);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
32 PURPLE_PERL_BOOT_PROTO(Serv);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
33 PURPLE_PERL_BOOT_PROTO(Signal);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
34 PURPLE_PERL_BOOT_PROTO(Sound);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
35 PURPLE_PERL_BOOT_PROTO(Status);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
36 PURPLE_PERL_BOOT_PROTO(Stringref);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
37 PURPLE_PERL_BOOT_PROTO(Util);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
38 PURPLE_PERL_BOOT_PROTO(XMLNode);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
39
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
40 MODULE = Purple PACKAGE = Purple PREFIX = purple_
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
41 PROTOTYPES: ENABLE
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
42
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
43 INCLUDE: const-xs.inc
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
44
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
45 BOOT:
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
46 PURPLE_PERL_BOOT(Account);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
47 PURPLE_PERL_BOOT(Account__Option);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
48 PURPLE_PERL_BOOT(Buddy__Icon);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
49 PURPLE_PERL_BOOT(BuddyList);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
50 PURPLE_PERL_BOOT(Cipher);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
51 PURPLE_PERL_BOOT(Cmd);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
52 PURPLE_PERL_BOOT(Connection);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
53 PURPLE_PERL_BOOT(Conversation);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
54 PURPLE_PERL_BOOT(Core);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
55 PURPLE_PERL_BOOT(Debug);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
56 PURPLE_PERL_BOOT(Xfer);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
57 PURPLE_PERL_BOOT(ImgStore);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
58 PURPLE_PERL_BOOT(Log);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
59 PURPLE_PERL_BOOT(Network);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
60 PURPLE_PERL_BOOT(Notify);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
61 PURPLE_PERL_BOOT(Plugin);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
62 PURPLE_PERL_BOOT(PluginPref);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
63 PURPLE_PERL_BOOT(Pounce);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
64 PURPLE_PERL_BOOT(Prefs);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
65 PURPLE_PERL_BOOT(Privacy);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
66 PURPLE_PERL_BOOT(Proxy);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
67 PURPLE_PERL_BOOT(Prpl);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
68 PURPLE_PERL_BOOT(Request);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
69 PURPLE_PERL_BOOT(Roomlist);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
70 PURPLE_PERL_BOOT(SSL);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
71 PURPLE_PERL_BOOT(SavedStatus);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
72 PURPLE_PERL_BOOT(Serv);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
73 PURPLE_PERL_BOOT(Signal);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
74 PURPLE_PERL_BOOT(Sound);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
75 PURPLE_PERL_BOOT(Status);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
76 PURPLE_PERL_BOOT(Stringref);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
77 PURPLE_PERL_BOOT(Util);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
78 PURPLE_PERL_BOOT(XMLNode);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
79
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
80 void
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
81 timeout_add(plugin, seconds, callback, data = 0)
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
82 Purple::Plugin plugin
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
83 int seconds
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
84 SV *callback
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
85 SV *data
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
86 CODE:
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
87 purple_perl_timeout_add(plugin, seconds, callback, data);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
88
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
89 void
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
90 deinit()
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
91 CODE:
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
92 purple_perl_timeout_clear();
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
93
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
94
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
95 MODULE = Purple PACKAGE = Purple PREFIX = purple_
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
96 PROTOTYPES: ENABLE
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
97
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
98 Purple::Core
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
99 purple_get_core()