From b23f8bd472f5c6bc809dddd26dd69791c9ed7dd8 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Mon, 8 Sep 2014 20:09:44 +0200 Subject: introduced downloadable interface. reverted some of the changes made to OTR --- src/eu/siacs/conversations/xmpp/jingle/JingleConnection.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/eu/siacs/conversations/xmpp/jingle/JingleConnection.java') diff --git a/src/eu/siacs/conversations/xmpp/jingle/JingleConnection.java b/src/eu/siacs/conversations/xmpp/jingle/JingleConnection.java index a5cc2c49..e26fcad9 100644 --- a/src/eu/siacs/conversations/xmpp/jingle/JingleConnection.java +++ b/src/eu/siacs/conversations/xmpp/jingle/JingleConnection.java @@ -15,6 +15,7 @@ import android.util.Log; import eu.siacs.conversations.Config; import eu.siacs.conversations.entities.Account; import eu.siacs.conversations.entities.Conversation; +import eu.siacs.conversations.entities.Downloadable; import eu.siacs.conversations.entities.Message; import eu.siacs.conversations.services.XmppConnectionService; import eu.siacs.conversations.xml.Element; @@ -24,7 +25,7 @@ import eu.siacs.conversations.xmpp.jingle.stanzas.JinglePacket; import eu.siacs.conversations.xmpp.jingle.stanzas.Reason; import eu.siacs.conversations.xmpp.stanzas.IqPacket; -public class JingleConnection { +public class JingleConnection implements Downloadable { private final String[] extensions = { "webp", "jpeg", "jpg", "png" }; private final String[] cryptoExtensions = { "pgp", "gpg", "otr" }; @@ -259,7 +260,7 @@ public class JingleConnection { this.message = new Message(conversation, "", Message.ENCRYPTION_NONE); this.message.setType(Message.TYPE_IMAGE); this.message.setStatus(Message.STATUS_RECEIVED_OFFER); - this.message.setJingleConnection(this); + this.message.setDownloadable(this); String[] fromParts = packet.getFrom().split("/"); this.message.setPresence(fromParts[1]); this.account = account; @@ -866,7 +867,7 @@ public class JingleConnection { return this.transport; } - public void accept() { + public void start() { if (status == STATUS_INITIATED) { new Thread(new Runnable() { -- cgit v1.2.3