X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/de2bfc7f7942908222ebcbac17e6072055acc062..15630356e18f59e8f4d29a5c9f215003ad07402e:/lib/src/main/java/org/asamk/signal/manager/Manager.java diff --git a/lib/src/main/java/org/asamk/signal/manager/Manager.java b/lib/src/main/java/org/asamk/signal/manager/Manager.java index ec168a4c..d4f8b76f 100644 --- a/lib/src/main/java/org/asamk/signal/manager/Manager.java +++ b/lib/src/main/java/org/asamk/signal/manager/Manager.java @@ -1,5 +1,6 @@ package org.asamk.signal.manager; +import org.asamk.signal.manager.api.AlreadyReceivingException; import org.asamk.signal.manager.api.AttachmentInvalidException; import org.asamk.signal.manager.api.Configuration; import org.asamk.signal.manager.api.Device; @@ -38,6 +39,7 @@ import org.whispersystems.signalservice.api.util.PhoneNumberFormatter; import java.io.Closeable; import java.io.File; import java.io.IOException; +import java.io.InputStream; import java.net.URI; import java.time.Duration; import java.util.Collection; @@ -100,7 +102,7 @@ public interface Manager extends Closeable { void deleteGroup(GroupId groupId) throws IOException; Pair createGroup( - String name, Set members, File avatarFile + String name, Set members, String avatarFile ) throws IOException, AttachmentInvalidException, UnregisteredRecipientException; SendGroupMessageResults updateGroup( @@ -204,7 +206,7 @@ public interface Manager extends Closeable { */ public void receiveMessages( Optional timeout, Optional maxMessages, ReceiveMessageHandler handler - ) throws IOException; + ) throws IOException, AlreadyReceivingException; void setReceiveConfig(ReceiveConfig receiveConfig); @@ -270,6 +272,8 @@ public interface Manager extends Closeable { void addClosedListener(Runnable listener); + InputStream retrieveAttachment(final String id) throws IOException; + @Override void close() throws IOException;