Perl protocol plugins?

tinytown.au at gmail.com tinytown.au at gmail.com
Thu Aug 28 23:59:43 EDT 2008



> > Hi,
> > I'm wondering if its possible to create a libpurple
> > 'PURPLE_PLUGIN_PROTOCOL' with perl?
>
> It is not currently, but it should be possible to update the perl
> loader to support this.

I was looking at the file /home/tdelov/develop/pidgin-2.4.3/libpurple/
plugins/perl/common/Plugin.xs.
The top  20 lines include this the snippet below  pasted below.
Is there a way to call this up with something like
"Purple::Plugin::Type("PROTOCOL" )  ;"?


<snip>
BOOT:
{
	HV *stash = gv_stashpv("Purple::Plugin::Type", 1);

	static const constiv *civ, const_iv[] = {
#define const_iv(name) {#name, (IV)PURPLE_PLUGIN_##name}
		const_iv(UNKNOWN),
		const_iv(STANDARD),
		const_iv(LOADER),
		const_iv(PROTOCOL),
	};

	for (civ = const_iv + sizeof(const_iv) / sizeof(const_iv[0]); civ-- >
const_iv; )
		newCONSTSUB(stash, (char *)civ->name, newSViv(civ->iv));
}
</snip>




More information about the Devel mailing list