libpurple/plugins/perl/common/Purple.xs

Tue, 13 May 2008 02:24:17 +0000

author
Sadrul Habib Chowdhury <sadrul@pidgin.im>
date
Tue, 13 May 2008 02:24:17 +0000
branch
custom_smiley
changeset 23023
6aeeb2037709
parent 22845
7ccb529edf3f
child 23985
a8c308734700
permissions
-rw-r--r--

Expose smiley API to perl plugins.

6508
57d1df1ca3a0 [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1 #include "module.h"
6520
5386692555c9 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
2 #include "../perl-handlers.h"
6588
187c6026c574 [gaim-migrate @ 7110]
Christian Hammond <chipx86@chipx86.com>
parents: 6584
diff changeset
3
12419
745d9e5460ea [gaim-migrate @ 14726]
Richard Laager <rlaager@pidgin.im>
parents: 12364
diff changeset
4 /* Prototypes for the BOOT section below. */
15894
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
5 PURPLE_PERL_BOOT_PROTO(Account);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
6 PURPLE_PERL_BOOT_PROTO(Account__Option);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
7 PURPLE_PERL_BOOT_PROTO(Buddy__Icon);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
8 PURPLE_PERL_BOOT_PROTO(BuddyList);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
9 PURPLE_PERL_BOOT_PROTO(Cipher);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
10 PURPLE_PERL_BOOT_PROTO(Cmd);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
11 PURPLE_PERL_BOOT_PROTO(Connection);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
12 PURPLE_PERL_BOOT_PROTO(Conversation);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
13 PURPLE_PERL_BOOT_PROTO(Core);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
14 PURPLE_PERL_BOOT_PROTO(Debug);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
15 PURPLE_PERL_BOOT_PROTO(Xfer);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
16 PURPLE_PERL_BOOT_PROTO(ImgStore);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
17 PURPLE_PERL_BOOT_PROTO(Log);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
18 PURPLE_PERL_BOOT_PROTO(Network);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
19 PURPLE_PERL_BOOT_PROTO(Notify);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
20 PURPLE_PERL_BOOT_PROTO(Plugin);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
21 PURPLE_PERL_BOOT_PROTO(PluginPref);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
22 PURPLE_PERL_BOOT_PROTO(Pounce);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
23 PURPLE_PERL_BOOT_PROTO(Prefs);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
24 PURPLE_PERL_BOOT_PROTO(Privacy);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
25 PURPLE_PERL_BOOT_PROTO(Proxy);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
26 PURPLE_PERL_BOOT_PROTO(Prpl);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
27 PURPLE_PERL_BOOT_PROTO(Request);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
28 PURPLE_PERL_BOOT_PROTO(Roomlist);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
29 PURPLE_PERL_BOOT_PROTO(SSL);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
30 PURPLE_PERL_BOOT_PROTO(SavedStatus);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
31 PURPLE_PERL_BOOT_PROTO(Serv);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
32 PURPLE_PERL_BOOT_PROTO(Signal);
23023
6aeeb2037709 Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22845
diff changeset
33 PURPLE_PERL_BOOT_PROTO(Smiley);
15894
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
34 PURPLE_PERL_BOOT_PROTO(Sound);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
35 PURPLE_PERL_BOOT_PROTO(Status);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
36 PURPLE_PERL_BOOT_PROTO(Stringref);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
37 PURPLE_PERL_BOOT_PROTO(Util);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
38 PURPLE_PERL_BOOT_PROTO(XMLNode);
12419
745d9e5460ea [gaim-migrate @ 14726]
Richard Laager <rlaager@pidgin.im>
parents: 12364
diff changeset
39
15894
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
40 MODULE = Purple PACKAGE = Purple PREFIX = purple_
6508
57d1df1ca3a0 [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
41 PROTOTYPES: ENABLE
57d1df1ca3a0 [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
42
12419
745d9e5460ea [gaim-migrate @ 14726]
Richard Laager <rlaager@pidgin.im>
parents: 12364
diff changeset
43 BOOT:
15894
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
44 PURPLE_PERL_BOOT(Account);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
45 PURPLE_PERL_BOOT(Account__Option);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
46 PURPLE_PERL_BOOT(Buddy__Icon);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
47 PURPLE_PERL_BOOT(BuddyList);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
48 PURPLE_PERL_BOOT(Cipher);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
49 PURPLE_PERL_BOOT(Cmd);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
50 PURPLE_PERL_BOOT(Connection);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
51 PURPLE_PERL_BOOT(Conversation);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
52 PURPLE_PERL_BOOT(Core);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
53 PURPLE_PERL_BOOT(Debug);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
54 PURPLE_PERL_BOOT(Xfer);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
55 PURPLE_PERL_BOOT(ImgStore);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
56 PURPLE_PERL_BOOT(Log);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
57 PURPLE_PERL_BOOT(Network);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
58 PURPLE_PERL_BOOT(Notify);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
59 PURPLE_PERL_BOOT(Plugin);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
60 PURPLE_PERL_BOOT(PluginPref);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
61 PURPLE_PERL_BOOT(Pounce);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
62 PURPLE_PERL_BOOT(Prefs);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
63 PURPLE_PERL_BOOT(Privacy);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
64 PURPLE_PERL_BOOT(Proxy);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
65 PURPLE_PERL_BOOT(Prpl);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
66 PURPLE_PERL_BOOT(Request);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
67 PURPLE_PERL_BOOT(Roomlist);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
68 PURPLE_PERL_BOOT(SSL);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
69 PURPLE_PERL_BOOT(SavedStatus);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
70 PURPLE_PERL_BOOT(Serv);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
71 PURPLE_PERL_BOOT(Signal);
23023
6aeeb2037709 Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22845
diff changeset
72 PURPLE_PERL_BOOT(Smiley);
15894
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
73 PURPLE_PERL_BOOT(Sound);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
74 PURPLE_PERL_BOOT(Status);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
75 PURPLE_PERL_BOOT(Stringref);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
76 PURPLE_PERL_BOOT(Util);
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
77 PURPLE_PERL_BOOT(XMLNode);
12419
745d9e5460ea [gaim-migrate @ 14726]
Richard Laager <rlaager@pidgin.im>
parents: 12364
diff changeset
78
22845
7ccb529edf3f Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <deryni@pidgin.im>
parents: 16773
diff changeset
79 guint
6918
46c9836b0072 [gaim-migrate @ 7465]
Christian Hammond <chipx86@chipx86.com>
parents: 6735
diff changeset
80 timeout_add(plugin, seconds, callback, data = 0)
15894
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
81 Purple::Plugin plugin
6520
5386692555c9 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
82 int seconds
6568
5c8c70b63dc3 [gaim-migrate @ 7090]
Christian Hammond <chipx86@chipx86.com>
parents: 6567
diff changeset
83 SV *callback
6552
e3fa6a85614b [gaim-migrate @ 7074]
Christian Hammond <chipx86@chipx86.com>
parents: 6550
diff changeset
84 SV *data
6520
5386692555c9 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
85 CODE:
22845
7ccb529edf3f Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <deryni@pidgin.im>
parents: 16773
diff changeset
86 RETVAL = purple_perl_timeout_add(plugin, seconds, callback, data);
7ccb529edf3f Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <deryni@pidgin.im>
parents: 16773
diff changeset
87 OUTPUT:
7ccb529edf3f Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <deryni@pidgin.im>
parents: 16773
diff changeset
88 RETVAL
7ccb529edf3f Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <deryni@pidgin.im>
parents: 16773
diff changeset
89
7ccb529edf3f Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <deryni@pidgin.im>
parents: 16773
diff changeset
90 gboolean
7ccb529edf3f Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <deryni@pidgin.im>
parents: 16773
diff changeset
91 timeout_remove(handle)
7ccb529edf3f Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <deryni@pidgin.im>
parents: 16773
diff changeset
92 guint handle
7ccb529edf3f Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <deryni@pidgin.im>
parents: 16773
diff changeset
93 CODE:
7ccb529edf3f Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <deryni@pidgin.im>
parents: 16773
diff changeset
94 RETVAL = purple_perl_timeout_remove(handle);
7ccb529edf3f Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <deryni@pidgin.im>
parents: 16773
diff changeset
95 OUTPUT:
7ccb529edf3f Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <deryni@pidgin.im>
parents: 16773
diff changeset
96 RETVAL
6520
5386692555c9 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
97
5386692555c9 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
98 void
5386692555c9 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
99 deinit()
5386692555c9 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
100 CODE:
15894
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
101 purple_perl_timeout_clear();
15066
57ab37fe1190 [gaim-migrate @ 17784]
Richard Laager <rlaager@pidgin.im>
parents: 14254
diff changeset
102
57ab37fe1190 [gaim-migrate @ 17784]
Richard Laager <rlaager@pidgin.im>
parents: 14254
diff changeset
103
15894
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
104 MODULE = Purple PACKAGE = Purple PREFIX = purple_
15066
57ab37fe1190 [gaim-migrate @ 17784]
Richard Laager <rlaager@pidgin.im>
parents: 14254
diff changeset
105 PROTOTYPES: ENABLE
57ab37fe1190 [gaim-migrate @ 17784]
Richard Laager <rlaager@pidgin.im>
parents: 14254
diff changeset
106
15894
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
107 Purple::Core
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
108 purple_get_core()

mercurial