Exemple #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;
}
Exemple #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));
}
Exemple #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;
}