plugins/perl/common/Cmds.xs

branch
cpw.khc.msnp14
changeset 20472
6a6d2ef151e6
parent 13912
463b4fa9f067
parent 20469
b2836a24d81e
child 20473
91e1b3a49d10
equal deleted inserted replaced
13912:463b4fa9f067 20472:6a6d2ef151e6
1 #include "module.h"
2 #include "../perl-handlers.h"
3
4 MODULE = Gaim::Cmd PACKAGE = Gaim::Cmd PREFIX = gaim_cmd_
5 PROTOTYPES: ENABLE
6
7 void
8 gaim_cmd_help(conv, command)
9 Gaim::Conversation conv
10 const gchar *command
11 PREINIT:
12 GList *l;
13 PPCODE:
14 for (l = gaim_cmd_help(conv, command); l != NULL; l = l->next) {
15 XPUSHs(sv_2mortal(newSVpv(l->data, 0)));
16 }
17
18 void
19 gaim_cmd_list(conv)
20 Gaim::Conversation conv
21 PREINIT:
22 GList *l;
23 PPCODE:
24 for (l = gaim_cmd_list(conv); l != NULL; l = l->next) {
25 XPUSHs(sv_2mortal(newSVpv(l->data, 0)));
26 }
27
28 Gaim::Cmd::Id
29 gaim_cmd_register(plugin, command, args, priority, flag, prpl_id, func, helpstr, data = 0)
30 Gaim::Plugin plugin
31 const gchar *command
32 const gchar *args
33 Gaim::Cmd::Priority priority
34 Gaim::Cmd::Flag flag
35 const gchar *prpl_id
36 SV *func
37 const gchar *helpstr
38 SV *data
39 CODE:
40 RETVAL = gaim_perl_cmd_register(plugin, command, args, priority, flag,
41 prpl_id, func, helpstr, data);
42 OUTPUT:
43 RETVAL
44
45 void
46 gaim_cmd_unregister(id)
47 Gaim::Cmd::Id id
48 CODE:
49 gaim_perl_cmd_unregister(id);

mercurial