Mercurial > pidgin
annotate libpurple/plugins/perl/common/Purple.xs @ 23481:4cb1efafa410
Remove some checks for MSN protocol_ver < 15. Those versions are
different enough that they won't be supported at all on this branch.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sun, 15 Jun 2008 18:48:14 +0000 |
parents | 66057702ae5d |
children | 9d7ebd28d339 |
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); |
23145
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22702
diff
changeset
|
33 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
|
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 BOOT: |
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); |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
45 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
|
46 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
|
47 PURPLE_PERL_BOOT(BuddyList); |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
48 PURPLE_PERL_BOOT(Cipher); |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
49 PURPLE_PERL_BOOT(Cmd); |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
50 PURPLE_PERL_BOOT(Connection); |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
51 PURPLE_PERL_BOOT(Conversation); |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
52 PURPLE_PERL_BOOT(Core); |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
53 PURPLE_PERL_BOOT(Debug); |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
54 PURPLE_PERL_BOOT(Xfer); |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
55 PURPLE_PERL_BOOT(ImgStore); |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
56 PURPLE_PERL_BOOT(Log); |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
57 PURPLE_PERL_BOOT(Network); |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
58 PURPLE_PERL_BOOT(Notify); |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
59 PURPLE_PERL_BOOT(Plugin); |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
60 PURPLE_PERL_BOOT(PluginPref); |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
61 PURPLE_PERL_BOOT(Pounce); |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
62 PURPLE_PERL_BOOT(Prefs); |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
63 PURPLE_PERL_BOOT(Privacy); |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
64 PURPLE_PERL_BOOT(Proxy); |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
65 PURPLE_PERL_BOOT(Prpl); |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
66 PURPLE_PERL_BOOT(Request); |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
67 PURPLE_PERL_BOOT(Roomlist); |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
68 PURPLE_PERL_BOOT(SSL); |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
69 PURPLE_PERL_BOOT(SavedStatus); |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
70 PURPLE_PERL_BOOT(Serv); |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
71 PURPLE_PERL_BOOT(Signal); |
23145
66057702ae5d
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22702
diff
changeset
|
72 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
|
73 PURPLE_PERL_BOOT(Sound); |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
74 PURPLE_PERL_BOOT(Status); |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
75 PURPLE_PERL_BOOT(Stringref); |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
76 PURPLE_PERL_BOOT(Util); |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
77 PURPLE_PERL_BOOT(XMLNode); |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
78 |
22702
870a580e8fde
Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <pidgin@unreliablesource.net>
parents:
16739
diff
changeset
|
79 guint |
16079
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
80 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
|
81 Purple::Plugin plugin |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
82 int seconds |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
83 SV *callback |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
84 SV *data |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
85 CODE: |
22702
870a580e8fde
Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <pidgin@unreliablesource.net>
parents:
16739
diff
changeset
|
86 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:
16739
diff
changeset
|
87 OUTPUT: |
870a580e8fde
Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <pidgin@unreliablesource.net>
parents:
16739
diff
changeset
|
88 RETVAL |
870a580e8fde
Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <pidgin@unreliablesource.net>
parents:
16739
diff
changeset
|
89 |
870a580e8fde
Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <pidgin@unreliablesource.net>
parents:
16739
diff
changeset
|
90 gboolean |
870a580e8fde
Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <pidgin@unreliablesource.net>
parents:
16739
diff
changeset
|
91 timeout_remove(handle) |
870a580e8fde
Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <pidgin@unreliablesource.net>
parents:
16739
diff
changeset
|
92 guint handle |
870a580e8fde
Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <pidgin@unreliablesource.net>
parents:
16739
diff
changeset
|
93 CODE: |
870a580e8fde
Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <pidgin@unreliablesource.net>
parents:
16739
diff
changeset
|
94 RETVAL = purple_perl_timeout_remove(handle); |
870a580e8fde
Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <pidgin@unreliablesource.net>
parents:
16739
diff
changeset
|
95 OUTPUT: |
870a580e8fde
Add the recent perl callback changes to ChangeLog.API.
Etan Reisner <pidgin@unreliablesource.net>
parents:
16739
diff
changeset
|
96 RETVAL |
16079
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 void |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
99 deinit() |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
100 CODE: |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
101 purple_perl_timeout_clear(); |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
102 |
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 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
|
105 PROTOTYPES: ENABLE |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
106 |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
107 Purple::Core |
6dedf7542b44
This should be called Purple.xs instead of Pidgin.xs
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
108 purple_get_core() |