Mercurial > pidgin
diff plugins/perl/common/Cmds.xs @ 12882:e1603fd610fa
[gaim-migrate @ 15234]
I give you perl /cmd support. I only tested this a little bit but it seemed to
work for me, let me know if anything breaks.
committer: Tailor Script <tailor@pidgin.im>
author | Etan Reisner <pidgin@unreliablesource.net> |
---|---|
date | Sun, 15 Jan 2006 07:56:58 +0000 |
parents | b284c703d398 |
children | 3ab3e68df807 |
line wrap: on
line diff
--- a/plugins/perl/common/Cmds.xs Sun Jan 15 07:43:09 2006 +0000 +++ b/plugins/perl/common/Cmds.xs Sun Jan 15 07:56:58 2006 +0000 @@ -1,30 +1,49 @@ #include "module.h" +#include "../perl-handlers.h" -MODULE = Gaim::Cmds PACKAGE = Gaim::Cmds PREFIX = gaim_cmd_ +MODULE = Gaim::Cmd PACKAGE = Gaim::Cmd PREFIX = gaim_cmd_ PROTOTYPES: ENABLE void -gaim_cmd_help(conv, cmd) +gaim_cmd_help(conv, command) Gaim::Conversation conv - const gchar *cmd + const gchar *command PREINIT: - GList *l; + GList *l; PPCODE: - for (l = gaim_cmd_help(conv, cmd); l != NULL; l = l->next) { - XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListEntry"))); - } + for (l = gaim_cmd_help(conv, command); l != NULL; l = l->next) { + XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListEntry"))); + } void gaim_cmd_list(conv) Gaim::Conversation conv PREINIT: - GList *l; + GList *l; PPCODE: - for (l = gaim_cmd_list(conv); l != NULL; l = l->next) { - XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListEntry"))); - } + for (l = gaim_cmd_list(conv); l != NULL; l = l->next) { + XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListEntry"))); + } -void +Gaim::Cmd::Id +gaim_cmd_register(plugin, command, args, priority, flag, prpl_id, func, helpstr, data = 0) + Gaim::Plugin plugin + const gchar *command + const gchar *args + Gaim::Cmd::Priority priority + Gaim::Cmd::Flag flag + const gchar *prpl_id + SV *func + const gchar *helpstr + SV *data +CODE: + RETVAL = gaim_perl_cmd_register(plugin, command, args, priority, flag, + prpl_id, func, helpstr, data); +OUTPUT: + RETVAL + +void gaim_cmd_unregister(id) - Gaim::CmdId id - + Gaim::Cmd::Id id +CODE: + gaim_perl_cmd_unregister(id);