view plugins/perl/common/Conversation.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 083d1e4a9c78
children a66cf83552dc
line wrap: on
line source

#include "module.h"

MODULE = Gaim::Conversation  PACKAGE = Gaim::Conversation  PREFIX = gaim_conversation_
PROTOTYPES: ENABLE

void
gaim_conversation_set_account(conv, account)
	Gaim::Conversation conv
	Gaim::Account account

Gaim::Account
gaim_conversation_get_account(conv)
	Gaim::Conversation conv

Gaim::Connection
gaim_conversation_get_gc(conv)
	Gaim::Conversation conv

void
gaim_conversation_set_title(conv, title)
	Gaim::Conversation conv
	const char *title

void
gaim_conversation_autoset_title(conv)
	Gaim::Conversation conv

int
gaim_conversation_get_index(conv)
	Gaim::Conversation conv

const char *
gaim_conversation_get_name(conv)
	Gaim::Conversation conv

void
gaim_conversation_set_logging(conv, log)
	Gaim::Conversation conv
	gboolean log

gboolean
gaim_conversation_is_logging(conv)
	Gaim::Conversation conv

Gaim::ConvWindow
gaim_conversation_get_window(conv)
	Gaim::Conversation conv

gboolean
is_chat(conv)
	Gaim::Conversation conv
CODE:
	RETVAL = (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT);
OUTPUT:
	RETVAL

gboolean
is_im(conv)
	Gaim::Conversation conv
CODE:
	RETVAL = (gaim_conversation_get_type(conv) == GAIM_CONV_IM);
OUTPUT:
	RETVAL

void
gaim_conversation_set_data(conv, key, data)
	Gaim::Conversation conv
	const char *key
	void *data

void *
gaim_conversation_get_data(conv, key)
	Gaim::Conversation conv
	const char *key

void
gaim_conversation_write(conv, who, message, flags)
	Gaim::Conversation conv
	const char *who
	const char *message
	int flags
CODE:
	gaim_conversation_write(conv, who, message, flags, time(NULL));

Gaim::Conversation::IM
gaim_conversation_get_im_data(conv)
	Gaim::Conversation conv

Gaim::Conversation::Chat
gaim_conversation_get_chat_data(conv)
	Gaim::Conversation conv


MODULE = Gaim::Conversation  PACKAGE = Gaim::Conversations  PREFIX = gaim_conversations_
PROTOTYPES: ENABLE

Gaim::Conversation
find_with_account(name, account)
	const char *name
	Gaim::Account account
CODE:
	RETVAL = gaim_find_conversation_with_account(name, account);
OUTPUT:
	RETVAL

void *
handle()
CODE:
	RETVAL = gaim_conversations_get_handle();
OUTPUT:
	RETVAL


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

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