diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-09-08 20:09:44 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-09-08 20:09:44 +0200 |
commit | b23f8bd472f5c6bc809dddd26dd69791c9ed7dd8 (patch) | |
tree | 70a97b915395bc95f7e65f19bfdc033291d5d91f /src/eu/siacs/conversations/entities | |
parent | a6f0f0cb6e7d8853ba0f30d3aee5c2842304f451 (diff) |
introduced downloadable interface. reverted some of the changes made to OTR
Diffstat (limited to '')
-rw-r--r-- | src/eu/siacs/conversations/entities/Downloadable.java | 5 | ||||
-rw-r--r-- | src/eu/siacs/conversations/entities/Message.java | 13 |
2 files changed, 10 insertions, 8 deletions
diff --git a/src/eu/siacs/conversations/entities/Downloadable.java b/src/eu/siacs/conversations/entities/Downloadable.java new file mode 100644 index 00000000..8fb4977e --- /dev/null +++ b/src/eu/siacs/conversations/entities/Downloadable.java @@ -0,0 +1,5 @@ +package eu.siacs.conversations.entities; + +public interface Downloadable { + public void start(); +} diff --git a/src/eu/siacs/conversations/entities/Message.java b/src/eu/siacs/conversations/entities/Message.java index d70374a9..5cbd68dd 100644 --- a/src/eu/siacs/conversations/entities/Message.java +++ b/src/eu/siacs/conversations/entities/Message.java @@ -2,7 +2,6 @@ package eu.siacs.conversations.entities; import eu.siacs.conversations.Config; import eu.siacs.conversations.R; -import eu.siacs.conversations.xmpp.jingle.JingleConnection; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; @@ -60,7 +59,7 @@ public class Message extends AbstractEntity { protected transient Conversation conversation = null; - protected transient JingleConnection jingleConnection = null; + protected transient Downloadable downloadable = null; private Message() { @@ -151,8 +150,6 @@ public class Message extends AbstractEntity { public String getReadableBody(Context context) { if ((encryption == ENCRYPTION_PGP) && (type == TYPE_TEXT)) { return context.getText(R.string.encrypted_message_received).toString(); - } else if (encryption == ENCRYPTION_OTR && type == TYPE_TEXT && status == STATUS_RECEPTION_FAILED) { - return context.getText(R.string.unable_to_decrypt_otr_message).toString(); } else if ((encryption == ENCRYPTION_OTR) && (type == TYPE_IMAGE)) { return context.getText(R.string.encrypted_image_received).toString(); } else if (encryption == ENCRYPTION_DECRYPTION_FAILED) { @@ -270,12 +267,12 @@ public class Message extends AbstractEntity { } } - public void setJingleConnection(JingleConnection connection) { - this.jingleConnection = connection; + public void setDownloadable(Downloadable downloadable) { + this.downloadable = downloadable; } - public JingleConnection getJingleConnection() { - return this.jingleConnection; + public Downloadable getDownloadable() { + return this.downloadable; } public static Message createStatusMessage(Conversation conversation) { |