X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/5c117bd863c6b01e21b2865ebffd04c5cb23003c..a44034a79e6a98e7d77bbde0af1483d8c30a22c6:/src/main/java/org/asamk/Signal.java diff --git a/src/main/java/org/asamk/Signal.java b/src/main/java/org/asamk/Signal.java index e115bb7c..88b15926 100644 --- a/src/main/java/org/asamk/Signal.java +++ b/src/main/java/org/asamk/Signal.java @@ -5,20 +5,31 @@ import org.asamk.signal.GroupNotFoundException; import org.freedesktop.dbus.DBusInterface; import org.freedesktop.dbus.DBusSignal; import org.freedesktop.dbus.exceptions.DBusException; -import org.whispersystems.signalservice.api.crypto.UntrustedIdentityException; import org.whispersystems.signalservice.api.push.exceptions.EncapsulatedExceptions; import java.io.IOException; import java.util.List; public interface Signal extends DBusInterface { - void sendMessage(String message, List attachments, String recipient) throws EncapsulatedExceptions, AttachmentInvalidException, IOException, UntrustedIdentityException; + void sendMessage(String message, List attachments, String recipient) throws EncapsulatedExceptions, AttachmentInvalidException, IOException; - void sendMessage(String message, List attachments, List recipients) throws EncapsulatedExceptions, AttachmentInvalidException, IOException, UntrustedIdentityException; + void sendMessage(String message, List attachments, List recipients) throws EncapsulatedExceptions, AttachmentInvalidException, IOException; - void sendEndSessionMessage(List recipients) throws IOException, EncapsulatedExceptions, UntrustedIdentityException; + void sendEndSessionMessage(List recipients) throws IOException, EncapsulatedExceptions; - void sendGroupMessage(String message, List attachments, byte[] groupId) throws EncapsulatedExceptions, GroupNotFoundException, AttachmentInvalidException, IOException, UntrustedIdentityException; + void sendGroupMessage(String message, List attachments, byte[] groupId) throws EncapsulatedExceptions, GroupNotFoundException, AttachmentInvalidException, IOException; + + String getContactName(String number); + + void setContactName(String number, String name); + + List getGroupIds(); + + String getGroupName(byte[] groupId); + + List getGroupMembers(byte[] groupId); + + byte[] updateGroup(byte[] groupId, String name, List members, String avatar) throws IOException, EncapsulatedExceptions, GroupNotFoundException, AttachmentInvalidException; class MessageReceived extends DBusSignal { private long timestamp; @@ -56,4 +67,23 @@ public interface Signal extends DBusInterface { return attachments; } } + + class ReceiptReceived extends DBusSignal { + private long timestamp; + private String sender; + + public ReceiptReceived(String objectpath, long timestamp, String sender) throws DBusException { + super(objectpath, timestamp, sender); + this.timestamp = timestamp; + this.sender = sender; + } + + public long getTimestamp() { + return timestamp; + } + + public String getSender() { + return sender; + } + } }