X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/8b9640ba149c6ddc4dd9e7300c788a55303bc7b5..d49d536c32f5d44eaf50f3ac20dfd8e72e94c985:/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 8c9c525f..f8b353c7 100644 --- a/src/main/java/org/asamk/Signal.java +++ b/src/main/java/org/asamk/Signal.java @@ -13,11 +13,11 @@ 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, String recipient) throws EncapsulatedExceptions, AttachmentInvalidException, IOException, InvalidNumberException; - void sendMessage(String message, List attachments, List recipients) throws EncapsulatedExceptions, AttachmentInvalidException, IOException; + void sendMessage(String message, List attachments, List recipients) throws EncapsulatedExceptions, AttachmentInvalidException, IOException, InvalidNumberException; - void sendEndSessionMessage(List recipients) throws IOException, EncapsulatedExceptions; + void sendEndSessionMessage(List recipients) throws IOException, EncapsulatedExceptions, InvalidNumberException; void sendGroupMessage(String message, List attachments, byte[] groupId) throws EncapsulatedExceptions, GroupNotFoundException, AttachmentInvalidException, IOException; @@ -35,7 +35,7 @@ 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(); @@ -96,4 +96,47 @@ public interface Signal extends DBusInterface { return sender; } } + + class SyncMessageReceived extends DBusSignal { + private long timestamp; + private String source; + private String destination; + private byte[] groupId; + private String message; + private List attachments; + + public SyncMessageReceived(String objectpath, long timestamp, String source, String destination, byte[] groupId, String message, List attachments) throws DBusException { + super(objectpath, timestamp, source, destination, groupId, message, attachments); + this.timestamp = timestamp; + this.source = source; + this.destination = destination; + this.groupId = groupId; + this.message = message; + this.attachments = attachments; + } + + public long getTimestamp() { + return timestamp; + } + + public String getSource() { + return source; + } + + public String getDestination() { + return destination; + } + + public byte[] getGroupId() { + return groupId; + } + + public String getMessage() { + return message; + } + + public List getAttachments() { + return attachments; + } + } }