Mercurial > pidgin
annotate libpurple/plugins/perl/common/Purple.xs @ 22217:ad357ca94de9
We will probably eventually use purple_object_[get|set]_ui_data. Until then, this will do.
| author | Sadrul Habib Chowdhury <imadil@gmail.com> |
|---|---|
| date | Sat, 26 Jan 2008 22:33:08 +0000 |
| parents | 39c7bb133a9f |
| children | 870a580e8fde |
| 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); |
|
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(Cipher); |
|
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(Cmd); |
|
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(Connection); |
|
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(Conversation); |
|
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(Core); |
|
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(Debug); |
|
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(Xfer); |
|
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(ImgStore); |
|
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(Log); |
|
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(Network); |
|
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(Notify); |
|
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(Plugin); |
|
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(PluginPref); |
|
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(Pounce); |
|
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(Prefs); |
|
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(Privacy); |
|
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(Proxy); |
|
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(Prpl); |
|
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(Request); |
|
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(Roomlist); |
|
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(SSL); |
|
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(SavedStatus); |
|
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(Serv); |
|
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(Signal); |
|
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(Sound); |
|
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(Status); |
|
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(Stringref); |
|
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(Util); |
|
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(XMLNode); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
38 |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
39 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
|
40 PROTOTYPES: ENABLE |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
41 |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
42 BOOT: |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
43 PURPLE_PERL_BOOT(Account); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
44 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
|
45 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
|
46 PURPLE_PERL_BOOT(BuddyList); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
47 PURPLE_PERL_BOOT(Cipher); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
48 PURPLE_PERL_BOOT(Cmd); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
49 PURPLE_PERL_BOOT(Connection); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
50 PURPLE_PERL_BOOT(Conversation); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
51 PURPLE_PERL_BOOT(Core); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
52 PURPLE_PERL_BOOT(Debug); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
53 PURPLE_PERL_BOOT(Xfer); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
54 PURPLE_PERL_BOOT(ImgStore); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
55 PURPLE_PERL_BOOT(Log); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
56 PURPLE_PERL_BOOT(Network); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
57 PURPLE_PERL_BOOT(Notify); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
58 PURPLE_PERL_BOOT(Plugin); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
59 PURPLE_PERL_BOOT(PluginPref); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
60 PURPLE_PERL_BOOT(Pounce); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
61 PURPLE_PERL_BOOT(Prefs); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
62 PURPLE_PERL_BOOT(Privacy); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
63 PURPLE_PERL_BOOT(Proxy); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
64 PURPLE_PERL_BOOT(Prpl); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
65 PURPLE_PERL_BOOT(Request); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
66 PURPLE_PERL_BOOT(Roomlist); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
67 PURPLE_PERL_BOOT(SSL); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
68 PURPLE_PERL_BOOT(SavedStatus); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
69 PURPLE_PERL_BOOT(Serv); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
70 PURPLE_PERL_BOOT(Signal); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
71 PURPLE_PERL_BOOT(Sound); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
72 PURPLE_PERL_BOOT(Status); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
73 PURPLE_PERL_BOOT(Stringref); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
74 PURPLE_PERL_BOOT(Util); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
75 PURPLE_PERL_BOOT(XMLNode); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
76 |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
77 void |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
78 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
|
79 Purple::Plugin plugin |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
80 int seconds |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
81 SV *callback |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
82 SV *data |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
83 CODE: |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
84 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
|
85 |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
86 void |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
87 deinit() |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
88 CODE: |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
89 purple_perl_timeout_clear(); |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
90 |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
91 |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
92 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
|
93 PROTOTYPES: ENABLE |
|
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 Purple::Core |
|
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
96 purple_get_core() |
