annotate libpurple/plugins/perl/common/Purple.xs @ 32790:3e7a7e14af62

Our API really shouldn't have a 'gc' in it anymore.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Mon, 24 Oct 2011 05:37:19 +0000
parents 9d7ebd28d339
children
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
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
4 /* 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
5 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
6 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
7 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
8 PURPLE_PERL_BOOT_PROTO(BuddyList);
23715
9d7ebd28d339 Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 23147
diff changeset
9 PURPLE_PERL_BOOT_PROTO(Certificate);
16079
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);
23715
9d7ebd28d339 Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 23147
diff changeset
17 PURPLE_PERL_BOOT_PROTO(Idle);
16079
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(ImgStore);
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(Log);
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(Network);
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(Notify);
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(Plugin);
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(PluginPref);
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(Pounce);
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(Prefs);
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(Privacy);
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(Proxy);
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(Prpl);
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(Request);
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(Roomlist);
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(SSL);
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(SavedStatus);
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(Serv);
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(Signal);
23147
66057702ae5d Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 22685
diff changeset
35 PURPLE_PERL_BOOT_PROTO(Smiley);
16079
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(Sound);
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(Status);
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(Stringref);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
39 PURPLE_PERL_BOOT_PROTO(Util);
23715
9d7ebd28d339 Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 23147
diff changeset
40 PURPLE_PERL_BOOT_PROTO(Whiteboard);
16079
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
41 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
42
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
43 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
44 PROTOTYPES: ENABLE
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
45
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
46 BOOT:
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);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
48 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
49 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
50 PURPLE_PERL_BOOT(BuddyList);
23715
9d7ebd28d339 Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 23147
diff changeset
51 PURPLE_PERL_BOOT(Certificate);
16079
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
52 PURPLE_PERL_BOOT(Cipher);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
53 PURPLE_PERL_BOOT(Cmd);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
54 PURPLE_PERL_BOOT(Connection);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
55 PURPLE_PERL_BOOT(Conversation);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
56 PURPLE_PERL_BOOT(Core);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
57 PURPLE_PERL_BOOT(Debug);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
58 PURPLE_PERL_BOOT(Xfer);
23715
9d7ebd28d339 Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 23147
diff changeset
59 PURPLE_PERL_BOOT(Idle);
16079
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
60 PURPLE_PERL_BOOT(ImgStore);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
61 PURPLE_PERL_BOOT(Log);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
62 PURPLE_PERL_BOOT(Network);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
63 PURPLE_PERL_BOOT(Notify);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
64 PURPLE_PERL_BOOT(Plugin);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
65 PURPLE_PERL_BOOT(PluginPref);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
66 PURPLE_PERL_BOOT(Pounce);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
67 PURPLE_PERL_BOOT(Prefs);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
68 PURPLE_PERL_BOOT(Privacy);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
69 PURPLE_PERL_BOOT(Proxy);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
70 PURPLE_PERL_BOOT(Prpl);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
71 PURPLE_PERL_BOOT(Request);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
72 PURPLE_PERL_BOOT(Roomlist);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
73 PURPLE_PERL_BOOT(SSL);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
74 PURPLE_PERL_BOOT(SavedStatus);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
75 PURPLE_PERL_BOOT(Serv);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
76 PURPLE_PERL_BOOT(Signal);
23147
66057702ae5d Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 22685
diff changeset
77 PURPLE_PERL_BOOT(Smiley);
16079
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
78 PURPLE_PERL_BOOT(Sound);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
79 PURPLE_PERL_BOOT(Status);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
80 PURPLE_PERL_BOOT(Stringref);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
81 PURPLE_PERL_BOOT(Util);
23715
9d7ebd28d339 Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 23147
diff changeset
82 PURPLE_PERL_BOOT(Whiteboard);
16079
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
83 PURPLE_PERL_BOOT(XMLNode);
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
84
22685
870a580e8fde Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <pidgin@unreliablesource.net>
parents: 16750
diff changeset
85 guint
16079
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
86 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
87 Purple::Plugin plugin
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
88 int seconds
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
89 SV *callback
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
90 SV *data
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
91 CODE:
22685
870a580e8fde Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <pidgin@unreliablesource.net>
parents: 16750
diff changeset
92 RETVAL = purple_perl_timeout_add(plugin, seconds, callback, data);
870a580e8fde Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <pidgin@unreliablesource.net>
parents: 16750
diff changeset
93 OUTPUT:
870a580e8fde Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <pidgin@unreliablesource.net>
parents: 16750
diff changeset
94 RETVAL
870a580e8fde Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <pidgin@unreliablesource.net>
parents: 16750
diff changeset
95
870a580e8fde Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <pidgin@unreliablesource.net>
parents: 16750
diff changeset
96 gboolean
870a580e8fde Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <pidgin@unreliablesource.net>
parents: 16750
diff changeset
97 timeout_remove(handle)
870a580e8fde Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <pidgin@unreliablesource.net>
parents: 16750
diff changeset
98 guint handle
870a580e8fde Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <pidgin@unreliablesource.net>
parents: 16750
diff changeset
99 CODE:
870a580e8fde Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <pidgin@unreliablesource.net>
parents: 16750
diff changeset
100 RETVAL = purple_perl_timeout_remove(handle);
870a580e8fde Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <pidgin@unreliablesource.net>
parents: 16750
diff changeset
101 OUTPUT:
870a580e8fde Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <pidgin@unreliablesource.net>
parents: 16750
diff changeset
102 RETVAL
16079
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
103
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
104 void
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
105 deinit()
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
106 CODE:
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
107 purple_perl_timeout_clear();
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
108
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
109
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
110 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
111 PROTOTYPES: ENABLE
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
112
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
113 Purple::Core
6dedf7542b44 This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
114 purple_get_core()