X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/997b4f0c3fe371efe08e92ed4678835bc62538bf..5c389c875d91bacba127d0e9cbdc1746b022e5aa:/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 f529b408..ac0cc02f 100644 --- a/lib/src/main/java/org/asamk/signal/manager/Manager.java +++ b/lib/src/main/java/org/asamk/signal/manager/Manager.java @@ -22,7 +22,6 @@ import org.asamk.signal.manager.storage.identities.TrustNewIdentity; import org.asamk.signal.manager.storage.recipients.Contact; import org.asamk.signal.manager.storage.recipients.Profile; import org.asamk.signal.manager.storage.recipients.RecipientAddress; -import org.whispersystems.libsignal.IdentityKey; import org.whispersystems.libsignal.InvalidKeyException; import org.whispersystems.libsignal.util.Pair; import org.whispersystems.libsignal.util.guava.Optional; @@ -184,7 +183,7 @@ public interface Manager extends Closeable { void setGroupBlocked( GroupId groupId, boolean blocked - ) throws GroupNotFoundException, IOException; + ) throws GroupNotFoundException, IOException, NotMasterDeviceException; void setExpirationTimer( RecipientIdentifier.Single recipient, int messageExpirationTimer @@ -194,13 +193,17 @@ public interface Manager extends Closeable { void requestAllSyncData() throws IOException; - void receiveMessages( - long timeout, - TimeUnit unit, - boolean returnOnTimeout, - boolean ignoreAttachments, - ReceiveMessageHandler handler - ) throws IOException; + /** + * Receive new messages from server, returns if no new message arrive in a timespan of timeout. + */ + void receiveMessages(long timeout, TimeUnit unit, ReceiveMessageHandler handler) throws IOException; + + /** + * Receive new messages from server, returns only if the thread is interrupted. + */ + void receiveMessages(ReceiveMessageHandler handler) throws IOException; + + void setIgnoreAttachments(boolean ignoreAttachments); boolean hasCaughtUpWithOldMessages(); @@ -228,8 +231,6 @@ public interface Manager extends Closeable { boolean trustIdentityAllKeys(RecipientIdentifier.Single recipient); - String computeSafetyNumber(SignalServiceAddress theirAddress, IdentityKey theirIdentityKey); - SignalServiceAddress resolveSignalServiceAddress(SignalServiceAddress address); @Override