X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/bdffcffd7aa791449bf7fe4af0084882dfd1425d..1b56485fc8ce1d82d1e5e8aaeca82bcd39bc7c26:/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 88b15926..528116b1 100644 --- a/src/main/java/org/asamk/Signal.java +++ b/src/main/java/org/asamk/Signal.java @@ -6,22 +6,28 @@ import org.freedesktop.dbus.DBusInterface; import org.freedesktop.dbus.DBusSignal; import org.freedesktop.dbus.exceptions.DBusException; import org.whispersystems.signalservice.api.push.exceptions.EncapsulatedExceptions; +import org.whispersystems.signalservice.api.util.InvalidNumberException; 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; - void sendMessage(String message, List attachments, List recipients) throws EncapsulatedExceptions, AttachmentInvalidException, IOException; + void sendMessage(String message, List attachments, String recipient) throws EncapsulatedExceptions, AttachmentInvalidException, IOException, InvalidNumberException; - void sendEndSessionMessage(List recipients) throws IOException, EncapsulatedExceptions; + void sendMessage(String message, List attachments, List recipients) throws EncapsulatedExceptions, AttachmentInvalidException, IOException, InvalidNumberException; + + void sendEndSessionMessage(List recipients) throws IOException, EncapsulatedExceptions, InvalidNumberException; void sendGroupMessage(String message, List attachments, byte[] groupId) throws EncapsulatedExceptions, GroupNotFoundException, AttachmentInvalidException, IOException; - String getContactName(String number); + String getContactName(String number) throws InvalidNumberException; + + void setContactName(String number, String name) throws InvalidNumberException; + + void setContactBlocked(String number, boolean blocked) throws InvalidNumberException; - void setContactName(String number, String name); + void setGroupBlocked(byte[] groupId, boolean blocked) throws GroupNotFoundException; List getGroupIds(); @@ -29,9 +35,12 @@ public interface Signal extends DBusInterface { List getGroupMembers(byte[] groupId); - byte[] updateGroup(byte[] groupId, String name, List members, String avatar) throws IOException, EncapsulatedExceptions, GroupNotFoundException, AttachmentInvalidException; + byte[] updateGroup(byte[] groupId, String name, List members, String avatar) throws IOException, EncapsulatedExceptions, GroupNotFoundException, AttachmentInvalidException, InvalidNumberException; + + boolean isRegistered(); class MessageReceived extends DBusSignal { + private long timestamp; private String sender; private byte[] groupId; @@ -69,6 +78,7 @@ public interface Signal extends DBusInterface { } class ReceiptReceived extends DBusSignal { + private long timestamp; private String sender;