libpurple/plugins/perl/common/Sound.xs

Thu, 07 Aug 2008 01:41:44 +0000

author
Daniel Atallah <datallah@pidgin.im>
date
Thu, 07 Aug 2008 01:41:44 +0000
changeset 23980
a38cbb35eecf
parent 16773
e1171eb45f07
child 18068
b6554e3c8224
child 23983
586866581434
permissions
-rw-r--r--

Some cleanup and a couple leak fixes.

#include "module.h"

MODULE = Purple::Sound  PACKAGE = Purple::Sound  PREFIX = purple_sound_
PROTOTYPES: ENABLE

BOOT:
{
	HV *stash = gv_stashpv("Purple::SoundEventID", 1);

	static const constiv *civ, const_iv[] = {
#define const_iv(name) {#name, (IV)PURPLE_SOUND_##name}
		const_iv(BUDDY_ARRIVE),
		const_iv(BUDDY_LEAVE),
		const_iv(RECEIVE),
		const_iv(FIRST_RECEIVE),
		const_iv(SEND),
		const_iv(CHAT_JOIN),
		const_iv(CHAT_LEAVE),
		const_iv(CHAT_YOU_SAY),
		const_iv(CHAT_SAY),
		const_iv(POUNCE_DEFAULT),
		const_iv(CHAT_NICK),
	};

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

Purple::Sound::UiOps
purple_sound_get_ui_ops()

void
purple_sound_init()

void
purple_sound_play_event(event, account)
	Purple::SoundEventID event
	Purple::Account account

void
purple_sound_play_file(filename, account)
	const char *filename
	Purple::Account account

void
purple_sound_set_ui_ops(ops)
	Purple::Sound::UiOps ops

void
purple_sound_uninit()

mercurial