예제 #1
0
int OtrMessageService::wrapperOtrMaxMessageSize(void *data, ConnContext *context)
{
	Q_UNUSED(context);

	OtrOpData *opData = static_cast<OtrOpData *>(data);
	if (opData->messageService())
		return opData->messageService()->maxMessageSize(opData->contact().contactAccount());
	else
		return 0;
}
예제 #2
0
void OtrMessageService::wrapperOtrInjectMessage(void *data, const char *accountName, const char *protocol, const char *recipient, const char *message)
{
	Q_UNUSED(accountName);
	Q_UNUSED(protocol);
	Q_UNUSED(recipient);

	OtrOpData *opData = static_cast<OtrOpData *>(data);
	if (opData->messageService())
		return opData->messageService()->injectMessage(opData->contact(), QByteArray(message));
}
예제 #3
0
const char * OtrMessageService::wrapperOtrResentMessagePrefix(void *data, ConnContext *context)
{
	Q_UNUSED(data);
	Q_UNUSED(context);

	OtrOpData *opData = static_cast<OtrOpData *>(data);
	if (opData->messageService())
		return strdup(qPrintable(opData->messageService()->resentMessagePrefix()));
	else
		return 0;
}