view plugins/perl/common/Cmds.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 3ab3e68df807
children
line wrap: on
line source

#include "module.h"
#include "../perl-handlers.h"

MODULE = Gaim::Cmd  PACKAGE = Gaim::Cmd  PREFIX = gaim_cmd_
PROTOTYPES: ENABLE

void
gaim_cmd_help(conv, command)
	Gaim::Conversation conv
	const gchar *command
PREINIT:
	GList *l;
PPCODE:
	for (l = gaim_cmd_help(conv, command); l != NULL; l = l->next) {
		XPUSHs(sv_2mortal(newSVpv(l->data, 0)));
	}

void
gaim_cmd_list(conv)
	Gaim::Conversation conv
PREINIT:
	GList *l;
PPCODE:
	for (l = gaim_cmd_list(conv); l != NULL; l = l->next) {
		XPUSHs(sv_2mortal(newSVpv(l->data, 0)));
	}

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::Cmd::Id id
CODE:
	gaim_perl_cmd_unregister(id);