X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/591c0fe8a3744608575a6dcb1f6f4f9f818948d2..8f4d89e2f7e2658e4b6d28970fa447dff32a0a26:/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 317c70f2..6e76f4a7 100644 --- a/src/main/java/org/asamk/Signal.java +++ b/src/main/java/org/asamk/Signal.java @@ -15,17 +15,33 @@ public interface Signal extends DBusInterface { long sendMessage( String message, List attachments, String recipient - ) throws Error.AttachmentInvalid, Error.Failure, Error.InvalidNumber; + ) throws Error.AttachmentInvalid, Error.Failure, Error.InvalidNumber, Error.UntrustedIdentity; long sendMessage( String message, List attachments, List recipients - ) throws Error.AttachmentInvalid, Error.Failure, Error.InvalidNumber, Error.UnregisteredUser, Error.UntrustedIdentity; + ) throws Error.AttachmentInvalid, Error.Failure, Error.InvalidNumber, Error.UntrustedIdentity; - void sendEndSessionMessage(List recipients) throws Error.Failure, Error.InvalidNumber, Error.UnregisteredUser, Error.UntrustedIdentity; + long sendMessageReaction( + String emoji, boolean remove, String targetAuthor, long targetSentTimestamp, String recipient + ) throws Error.InvalidNumber, Error.Failure; + + long sendMessageReaction( + String emoji, boolean remove, String targetAuthor, long targetSentTimestamp, List recipients + ) throws Error.InvalidNumber, Error.Failure; + + long sendNoteToSelfMessage( + String message, List attachments + ) throws Error.AttachmentInvalid, Error.Failure; + + void sendEndSessionMessage(List recipients) throws Error.Failure, Error.InvalidNumber, Error.UntrustedIdentity; long sendGroupMessage( String message, List attachments, byte[] groupId - ) throws Error.GroupNotFound, Error.Failure, Error.AttachmentInvalid, Error.UnregisteredUser, Error.UntrustedIdentity; + ) throws Error.GroupNotFound, Error.Failure, Error.AttachmentInvalid; + + long sendGroupMessageReaction( + String emoji, boolean remove, String targetAuthor, long targetSentTimestamp, byte[] groupId + ) throws Error.GroupNotFound, Error.Failure, Error.InvalidNumber; String getContactName(String number) throws Error.InvalidNumber; @@ -43,10 +59,30 @@ public interface Signal extends DBusInterface { byte[] updateGroup( byte[] groupId, String name, List members, String avatar - ) throws Error.AttachmentInvalid, Error.Failure, Error.InvalidNumber, Error.GroupNotFound, Error.UnregisteredUser, Error.UntrustedIdentity; + ) throws Error.AttachmentInvalid, Error.Failure, Error.InvalidNumber, Error.GroupNotFound; boolean isRegistered(); + void updateProfile( + String name, String about, String aboutEmoji, String avatarPath, boolean removeAvatar + ) throws Error.Failure; + + public String version(); + + public List listNumbers(); + + public List getContactNumber(final String name) throws Error.Failure; + + public void quitGroup(final byte[] groupId) throws Error.GroupNotFound, Error.Failure; + + public boolean isContactBlocked(final String number); + + public boolean isGroupBlocked(final byte[] groupId); + + public boolean isMember(final byte[] groupId); + + public void joinGroup(final String groupLink) throws Error.Failure; + class MessageReceived extends DBusSignal { private final long timestamp; @@ -194,13 +230,6 @@ public interface Signal extends DBusInterface { } } - class UnregisteredUser extends DBusExecutionException { - - public UnregisteredUser(final String message) { - super(message); - } - } - class UntrustedIdentity extends DBusExecutionException { public UntrustedIdentity(final String message) {