Mercurial > pidgin
annotate plugins/perl/common/Gaim.xs @ 13219:d0f7f698b6de
[gaim-migrate @ 15583]
SF Patch #1428591 from Sadrul
"This is a new signal, emitted when request for a
file-transfer comes in. I have written a trivial plugin
(which I plan on adding under plugin_pack in a couple
of days) that uses this signal to auto-accept
file-transfers. I have tested the plugin to auto-accept
or auto-reject file-transfer requests."
I also noticed that the file transfer signals weren't using a subtype for
GaimXfer pointers, so I added one.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sat, 11 Feb 2006 05:24:30 +0000 |
parents | 60b863ecd89b |
children | 8b28c8bfb3c0 |
rev | line source |
---|---|
6508 | 1 #include "module.h" |
6520
2e2593d95121
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
2 #include "../perl-handlers.h" |
6588
7f5f57dd5cac
[gaim-migrate @ 7110]
Christian Hammond <chipx86@chipx86.com>
parents:
6584
diff
changeset
|
3 #include "const-c.inc" |
7f5f57dd5cac
[gaim-migrate @ 7110]
Christian Hammond <chipx86@chipx86.com>
parents:
6584
diff
changeset
|
4 |
12419
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
5 /* Prototypes for the BOOT section below. */ |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
6 GAIM_PERL_BOOT_PROTO(Account); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
7 GAIM_PERL_BOOT_PROTO(Account__Option); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
8 GAIM_PERL_BOOT_PROTO(Buddy__Icon); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
9 GAIM_PERL_BOOT_PROTO(BuddyList); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
10 GAIM_PERL_BOOT_PROTO(Cipher); |
12882
e1603fd610fa
[gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12419
diff
changeset
|
11 GAIM_PERL_BOOT_PROTO(Cmd); |
12419
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
12 GAIM_PERL_BOOT_PROTO(Connection); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
13 GAIM_PERL_BOOT_PROTO(Conversation); |
13190
60b863ecd89b
[gaim-migrate @ 15553]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12882
diff
changeset
|
14 GAIM_PERL_BOOT_PROTO(Debug); |
12419
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
15 GAIM_PERL_BOOT_PROTO(Xfer); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
16 GAIM_PERL_BOOT_PROTO(ImgStore); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
17 GAIM_PERL_BOOT_PROTO(Log); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
18 GAIM_PERL_BOOT_PROTO(Network); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
19 GAIM_PERL_BOOT_PROTO(Notify); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
20 GAIM_PERL_BOOT_PROTO(Plugin); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
21 GAIM_PERL_BOOT_PROTO(PluginPref); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
22 GAIM_PERL_BOOT_PROTO(Pounce); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
23 GAIM_PERL_BOOT_PROTO(Prefs); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
24 GAIM_PERL_BOOT_PROTO(Privacy); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
25 GAIM_PERL_BOOT_PROTO(Proxy); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
26 GAIM_PERL_BOOT_PROTO(Prpl); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
27 GAIM_PERL_BOOT_PROTO(Request); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
28 GAIM_PERL_BOOT_PROTO(Roomlist); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
29 GAIM_PERL_BOOT_PROTO(SSL); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
30 GAIM_PERL_BOOT_PROTO(SavedStatus); |
13190
60b863ecd89b
[gaim-migrate @ 15553]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12882
diff
changeset
|
31 GAIM_PERL_BOOT_PROTO(Signal); |
12419
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
32 GAIM_PERL_BOOT_PROTO(Sound); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
33 GAIM_PERL_BOOT_PROTO(Status); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
34 GAIM_PERL_BOOT_PROTO(Stringref); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
35 GAIM_PERL_BOOT_PROTO(Util); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
36 GAIM_PERL_BOOT_PROTO(XMLNode); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
37 |
6588
7f5f57dd5cac
[gaim-migrate @ 7110]
Christian Hammond <chipx86@chipx86.com>
parents:
6584
diff
changeset
|
38 MODULE = Gaim PACKAGE = Gaim PREFIX = gaim_ |
6508 | 39 PROTOTYPES: ENABLE |
40 | |
6588
7f5f57dd5cac
[gaim-migrate @ 7110]
Christian Hammond <chipx86@chipx86.com>
parents:
6584
diff
changeset
|
41 INCLUDE: const-xs.inc |
7f5f57dd5cac
[gaim-migrate @ 7110]
Christian Hammond <chipx86@chipx86.com>
parents:
6584
diff
changeset
|
42 |
12419
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
43 BOOT: |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
44 GAIM_PERL_BOOT(Account); |
12882
e1603fd610fa
[gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12419
diff
changeset
|
45 GAIM_PERL_BOOT(Account__Option); |
12419
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
46 GAIM_PERL_BOOT(Buddy__Icon); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
47 GAIM_PERL_BOOT(BuddyList); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
48 GAIM_PERL_BOOT(Cipher); |
12882
e1603fd610fa
[gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12419
diff
changeset
|
49 GAIM_PERL_BOOT(Cmd); |
12419
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
50 GAIM_PERL_BOOT(Connection); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
51 GAIM_PERL_BOOT(Conversation); |
13190
60b863ecd89b
[gaim-migrate @ 15553]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12882
diff
changeset
|
52 GAIM_PERL_BOOT(Debug); |
12419
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
53 GAIM_PERL_BOOT(Xfer); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
54 GAIM_PERL_BOOT(ImgStore); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
55 GAIM_PERL_BOOT(Log); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
56 GAIM_PERL_BOOT(Network); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
57 GAIM_PERL_BOOT(Notify); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
58 GAIM_PERL_BOOT(Plugin); |
12882
e1603fd610fa
[gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12419
diff
changeset
|
59 GAIM_PERL_BOOT(PluginPref); |
12419
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
60 GAIM_PERL_BOOT(Pounce); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
61 GAIM_PERL_BOOT(Prefs); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
62 GAIM_PERL_BOOT(Privacy); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
63 GAIM_PERL_BOOT(Proxy); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
64 GAIM_PERL_BOOT(Prpl); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
65 GAIM_PERL_BOOT(Request); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
66 GAIM_PERL_BOOT(Roomlist); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
67 GAIM_PERL_BOOT(SSL); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
68 GAIM_PERL_BOOT(SavedStatus); |
13190
60b863ecd89b
[gaim-migrate @ 15553]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12882
diff
changeset
|
69 GAIM_PERL_BOOT(Signal); |
12419
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
70 GAIM_PERL_BOOT(Sound); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
71 GAIM_PERL_BOOT(Status); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
72 GAIM_PERL_BOOT(Stringref); |
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
73 GAIM_PERL_BOOT(Util); |
12882
e1603fd610fa
[gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12419
diff
changeset
|
74 GAIM_PERL_BOOT(XMLNode); |
12419
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
12364
diff
changeset
|
75 |
6508 | 76 void |
6918
d4b53b3d20eb
[gaim-migrate @ 7465]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
77 timeout_add(plugin, seconds, callback, data = 0) |
6520
2e2593d95121
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
78 Gaim::Plugin plugin |
2e2593d95121
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
79 int seconds |
6568
33486b749aa9
[gaim-migrate @ 7090]
Christian Hammond <chipx86@chipx86.com>
parents:
6567
diff
changeset
|
80 SV *callback |
6552
65dc4d34f280
[gaim-migrate @ 7074]
Christian Hammond <chipx86@chipx86.com>
parents:
6550
diff
changeset
|
81 SV *data |
6520
2e2593d95121
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
82 CODE: |
6568
33486b749aa9
[gaim-migrate @ 7090]
Christian Hammond <chipx86@chipx86.com>
parents:
6567
diff
changeset
|
83 gaim_perl_timeout_add(plugin, seconds, callback, data); |
6520
2e2593d95121
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
84 |
2e2593d95121
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
85 void |
2e2593d95121
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
86 deinit() |
2e2593d95121
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
87 CODE: |
2e2593d95121
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
88 gaim_perl_timeout_clear(); |