]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/TextSecure.java
Send Signal "MessageReceived" on dbus when receiving messages
[signal-cli] / src / main / java / org / asamk / TextSecure.java
index d046c0a1e9ad47b249ba98d47ba01cbc3a0c002e..3aa514c18f938bff9a260bcca00e73a1144021c4 100644 (file)
@@ -3,6 +3,8 @@ package org.asamk;
 import org.asamk.textsecure.AttachmentInvalidException;
 import org.asamk.textsecure.GroupNotFoundException;
 import org.freedesktop.dbus.DBusInterface;
+import org.freedesktop.dbus.DBusSignal;
+import org.freedesktop.dbus.exceptions.DBusException;
 import org.whispersystems.textsecure.api.push.exceptions.EncapsulatedExceptions;
 
 import java.io.IOException;
@@ -16,4 +18,10 @@ public interface TextSecure extends DBusInterface {
     void sendEndSessionMessage(List<String> recipients) throws IOException, EncapsulatedExceptions;
 
     void sendGroupMessage(String message, List<String> attachments, byte[] groupId) throws EncapsulatedExceptions, GroupNotFoundException, AttachmentInvalidException, IOException;
+
+    class MessageReceived extends DBusSignal {
+        public MessageReceived(String objectpath, String sender, byte[] groupId, String message, List<String> attachments) throws DBusException {
+            super(objectpath, sender, groupId, message, attachments);
+        }
+    }
 }