view plugins/perl/common/Conversation_IM.xs @ 7014:67c4e9d39242

[gaim-migrate @ 7577] Here it is, the bulk of the new Jabber prpl. Left to do: - Implement registration - Implement password changing - Keep track of conversation threads (since I apparently have to) - Fix the bugs that always magically appear in code after I commit committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Mon, 29 Sep 2003 15:23:19 +0000
parents 083d1e4a9c78
children b14a7bc189b8
line wrap: on
line source

#include "module.h"

MODULE = Gaim::Conversation::IM  PACKAGE = Gaim::Conversation::IM  PREFIX = gaim_im_
PROTOTYPES: ENABLE

Gaim::Conversation::IM
new(account, name)
	Gaim::Account account
	const char *name
CODE:
	RETVAL = GAIM_IM(gaim_conversation_new(GAIM_CONV_IM, account, name));
OUTPUT:
	RETVAL

void
DESTROY(im)
	Gaim::Conversation::IM im
CODE:
	gaim_conversation_destroy(gaim_im_get_conversation(im));


Gaim::Conversation
gaim_im_get_conversation(im)
	Gaim::Conversation::IM im

void
gaim_im_write(im, who, message, flags)
	Gaim::Conversation::IM im
	const char *who
	const char *message
	int flags
CODE:
	gaim_im_write(im, who, message, flags, time(NULL));

void
gaim_im_send(im, message)
	Gaim::Conversation::IM im
	const char *message


MODULE = Gaim::Conversation::IM  PACKAGE = Gaim  PREFIX = gaim_
PROTOTYPES: ENABLE

void
ims()
PREINIT:
	GList *l;
PPCODE:
	for (l = gaim_get_ims(); l != NULL; l = l->next)
	{
		XPUSHs(sv_2mortal(gaim_perl_bless_object(GAIM_IM(l->data),
			"Gaim::Conversation")));
	}