annotate plugins/perl/common/Gaim.xs @ 6552:65dc4d34f280

[gaim-migrate @ 7074] We like it when data can be passed through callbacks. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Thu, 21 Aug 2003 08:52:55 +0000
parents f1736493aebb
children 28b38803d0bb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6508
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1 #include "module.h"
6520
2e2593d95121 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
2 #include "../perl-handlers.h"
6508
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
3
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
4 MODULE = Gaim PACKAGE = Gaim
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
5 PROTOTYPES: ENABLE
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
6
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
7 void
6552
65dc4d34f280 [gaim-migrate @ 7074]
Christian Hammond <chipx86@chipx86.com>
parents: 6550
diff changeset
8 timeout_add(plugin, seconds, func, data)
6520
2e2593d95121 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
9 Gaim::Plugin plugin
2e2593d95121 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
10 int seconds
2e2593d95121 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
11 const char *func
6552
65dc4d34f280 [gaim-migrate @ 7074]
Christian Hammond <chipx86@chipx86.com>
parents: 6550
diff changeset
12 SV *data
6520
2e2593d95121 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
13 CODE:
6552
65dc4d34f280 [gaim-migrate @ 7074]
Christian Hammond <chipx86@chipx86.com>
parents: 6550
diff changeset
14 gaim_perl_timeout_add(plugin, seconds, func, data);
6520
2e2593d95121 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
15
2e2593d95121 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
16 void
6539
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
17 debug(level, category, string)
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
18 const char *level
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
19 const char *category
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
20 const char *string
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
21 CODE:
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
22 if (!strcmp(level, "misc"))
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
23 gaim_debug(GAIM_DEBUG_MISC, category, string);
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
24 else if (!strcmp(level, "info"))
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
25 gaim_debug(GAIM_DEBUG_INFO, category, string);
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
26 else if (!strcmp(level, "warning"))
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
27 gaim_debug(GAIM_DEBUG_WARNING, category, string);
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
28 else if (!strcmp(level, "error"))
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
29 gaim_debug(GAIM_DEBUG_ERROR, category, string);
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
30 else if (!strcmp(level, "fatal"))
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
31 gaim_debug(GAIM_DEBUG_FATAL, category, string);
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
32 else
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
33 croak("Unknown debug level type '%s'", level);
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
34
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
35 void
6550
f1736493aebb [gaim-migrate @ 7072]
Christian Hammond <chipx86@chipx86.com>
parents: 6542
diff changeset
36 signal_connect(instance, signal, plugin, func, data)
f1736493aebb [gaim-migrate @ 7072]
Christian Hammond <chipx86@chipx86.com>
parents: 6542
diff changeset
37 void *instance
f1736493aebb [gaim-migrate @ 7072]
Christian Hammond <chipx86@chipx86.com>
parents: 6542
diff changeset
38 const char *signal
f1736493aebb [gaim-migrate @ 7072]
Christian Hammond <chipx86@chipx86.com>
parents: 6542
diff changeset
39 Gaim::Plugin plugin
f1736493aebb [gaim-migrate @ 7072]
Christian Hammond <chipx86@chipx86.com>
parents: 6542
diff changeset
40 const char *func
6552
65dc4d34f280 [gaim-migrate @ 7074]
Christian Hammond <chipx86@chipx86.com>
parents: 6550
diff changeset
41 SV *data
6550
f1736493aebb [gaim-migrate @ 7072]
Christian Hammond <chipx86@chipx86.com>
parents: 6542
diff changeset
42 CODE:
f1736493aebb [gaim-migrate @ 7072]
Christian Hammond <chipx86@chipx86.com>
parents: 6542
diff changeset
43 gaim_perl_signal_connect(plugin, instance, signal, func, data);
f1736493aebb [gaim-migrate @ 7072]
Christian Hammond <chipx86@chipx86.com>
parents: 6542
diff changeset
44
f1736493aebb [gaim-migrate @ 7072]
Christian Hammond <chipx86@chipx86.com>
parents: 6542
diff changeset
45 void
f1736493aebb [gaim-migrate @ 7072]
Christian Hammond <chipx86@chipx86.com>
parents: 6542
diff changeset
46 signal_disconnect(instance, signal, plugin, func)
f1736493aebb [gaim-migrate @ 7072]
Christian Hammond <chipx86@chipx86.com>
parents: 6542
diff changeset
47 void *instance
f1736493aebb [gaim-migrate @ 7072]
Christian Hammond <chipx86@chipx86.com>
parents: 6542
diff changeset
48 const char *signal
f1736493aebb [gaim-migrate @ 7072]
Christian Hammond <chipx86@chipx86.com>
parents: 6542
diff changeset
49 Gaim::Plugin plugin
f1736493aebb [gaim-migrate @ 7072]
Christian Hammond <chipx86@chipx86.com>
parents: 6542
diff changeset
50 const char *func
f1736493aebb [gaim-migrate @ 7072]
Christian Hammond <chipx86@chipx86.com>
parents: 6542
diff changeset
51 CODE:
f1736493aebb [gaim-migrate @ 7072]
Christian Hammond <chipx86@chipx86.com>
parents: 6542
diff changeset
52 gaim_perl_signal_disconnect(plugin, instance, signal, func);
f1736493aebb [gaim-migrate @ 7072]
Christian Hammond <chipx86@chipx86.com>
parents: 6542
diff changeset
53
f1736493aebb [gaim-migrate @ 7072]
Christian Hammond <chipx86@chipx86.com>
parents: 6542
diff changeset
54 void
6539
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
55 debug_misc(category, string)
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
56 const char *category
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
57 const char *string
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
58 CODE:
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
59 gaim_debug(GAIM_DEBUG_MISC, category, string);
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
60
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
61 void
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
62 debug_info(category, string)
6520
2e2593d95121 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
63 const char *category
6508
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
64 const char *string
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
65 CODE:
6520
2e2593d95121 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
66 gaim_debug(GAIM_DEBUG_INFO, category, string);
2e2593d95121 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
67
2e2593d95121 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
68 void
6539
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
69 debug_warning(category, string)
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
70 const char *category
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
71 const char *string
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
72 CODE:
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
73 gaim_debug(GAIM_DEBUG_WARNING, category, string);
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
74
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
75 void
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
76 debug_error(category, string)
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
77 const char *category
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
78 const char *string
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
79 CODE:
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
80 gaim_debug(GAIM_DEBUG_ERROR, category, string);
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
81
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
82 void
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
83 debug_fatal(category, string)
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
84 const char *category
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
85 const char *string
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
86 CODE:
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
87 gaim_debug(GAIM_DEBUG_FATAL, category, string);
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
88
1690791f0c70 [gaim-migrate @ 7057]
Christian Hammond <chipx86@chipx86.com>
parents: 6528
diff changeset
89 void
6520
2e2593d95121 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
90 deinit()
2e2593d95121 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
91 PREINIT:
2e2593d95121 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
92 GList *l;
2e2593d95121 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
93 CODE:
2e2593d95121 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
94 gaim_perl_timeout_clear();
2e2593d95121 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
95
6508
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
96
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
97 BOOT:
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
98 GAIM_PERL_BOOT(Account);
6542
fe0294504602 [gaim-migrate @ 7064]
Christian Hammond <chipx86@chipx86.com>
parents: 6539
diff changeset
99 GAIM_PERL_BOOT(BuddyList);
fe0294504602 [gaim-migrate @ 7064]
Christian Hammond <chipx86@chipx86.com>
parents: 6539
diff changeset
100 GAIM_PERL_BOOT(BuddyList__Group);
fe0294504602 [gaim-migrate @ 7064]
Christian Hammond <chipx86@chipx86.com>
parents: 6539
diff changeset
101 GAIM_PERL_BOOT(BuddyList__Buddy);
fe0294504602 [gaim-migrate @ 7064]
Christian Hammond <chipx86@chipx86.com>
parents: 6539
diff changeset
102 GAIM_PERL_BOOT(BuddyList__Chat);
6520
2e2593d95121 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
103