view plugins/perl/common/BuddyList_Group.xs @ 8999:8f838ae3e710

[gaim-migrate @ 9774] " This patch renames the existing received-*-msg signals to receiving-*msg to fit the naming of other signals where a pointer to the message is passed (writing, sending, displaying) It adds new received-*-msg signals which are emitted after the receiving signals, in line with the other conversation signals (wrote, sent, displayed) This is necessary to allow plugins which depend on the final received message to work alongside plugins which may modify the message. One known example of this is festival-gaim alongside gaim-encryption - festival-gaim would try to "speak" the encrypted text: http://sf.net/tracker/?func=detail&aid=943216&group_id=89763&atid=591320 I've tested this with gaim-encryption and festival-gaim (locally modified so gaim-encryption uses the receiving signal and festival uses the received signal) All in-tree users of received-*-msg are updated to use receiving-*-msg if they do modify the message, the conversation-signals documentation is updated, the signals-test.c & signal-test.tcl plugins are also updated." --Stu Tomlinson committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Fri, 21 May 2004 14:33:32 +0000
parents 1d994e9b81f9
children 7a8aa87164ae
line wrap: on
line source

#include "module.h"

MODULE = Gaim::BuddyList::Group  PACKAGE = Gaim::BuddyList::Group  PREFIX = gaim_group_
PROTOTYPES: ENABLE

Gaim::BuddyList::Group
new(name)
	const char *name
CODE:
	RETVAL = gaim_group_new(name);
OUTPUT:
	RETVAL

void
rename(group, new_name)
	Gaim::BuddyList::Group group
	const char *new_name
CODE:
	gaim_blist_rename_group(group, new_name);

void
get_accounts(group)
	Gaim::BuddyList::Group group
PREINIT:
	GSList *l;
PPCODE:
	for (l = gaim_group_get_accounts(group); l != NULL; l = l->next)
		XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::Account")));

int
get_size(group, offline)
	Gaim::BuddyList::Group group
	gboolean offline
CODE:
	RETVAL = gaim_blist_get_group_size(group, offline);
OUTPUT:
	RETVAL

const char *
get_name(group)
	Gaim::BuddyList::Group group
CODE:
	RETVAL = group->name;
OUTPUT:
	RETVAL

int
get_online_count(group)
	Gaim::BuddyList::Group group
CODE:
	RETVAL = gaim_blist_get_group_online_count(group);
OUTPUT:
	RETVAL

void
gaim_group_set_setting(group, key, value)
	Gaim::BuddyList::Group group
	const char *key
	const char *value

const char *
gaim_group_get_setting(group, key)
	Gaim::BuddyList::Group group
	const char *key

void
buddies(group)
	Gaim::BuddyList::Group group
PREINIT:
	GaimBlistNode *node;
	GaimBlistNode *contact;
	GaimBlistNode *_group = (GaimBlistNode *)group;
PPCODE:
	for (contact = _group->child; contact != NULL; contact = contact->next)
	{
		for (node = contact->child; node != NULL; node = node->next)
		{
			XPUSHs(sv_2mortal(gaim_perl_bless_object(node,
				"Gaim::BuddyList::Buddy")));
		}
	}