X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/a7ecb9e10fd45fde4a4707bae99ef0b9aad33283..c88c92086efcf5c0ad417589db997ef1a034e775:/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 8b373e38..137e32ad 100644 --- a/lib/src/main/java/org/asamk/signal/manager/Manager.java +++ b/lib/src/main/java/org/asamk/signal/manager/Manager.java @@ -13,6 +13,7 @@ import org.asamk.signal.manager.api.RecipientIdentifier; import org.asamk.signal.manager.api.SendGroupMessageResults; import org.asamk.signal.manager.api.SendMessageResults; import org.asamk.signal.manager.api.TypingAction; +import org.asamk.signal.manager.api.UnregisteredRecipientException; import org.asamk.signal.manager.api.UpdateGroup; import org.asamk.signal.manager.config.ServiceConfig; import org.asamk.signal.manager.config.ServiceEnvironment; @@ -40,7 +41,6 @@ import java.util.Map; import java.util.Optional; import java.util.Set; import java.util.UUID; -import java.util.concurrent.TimeUnit; public interface Manager extends Closeable { @@ -123,23 +123,23 @@ public interface Manager extends Closeable { void setRegistrationLockPin(Optional pin) throws IOException; - Profile getRecipientProfile(RecipientIdentifier.Single recipient) throws IOException; + Profile getRecipientProfile(RecipientIdentifier.Single recipient) throws IOException, UnregisteredRecipientException; List getGroups(); SendGroupMessageResults quitGroup( GroupId groupId, Set groupAdmins - ) throws GroupNotFoundException, IOException, NotAGroupMemberException, LastGroupAdminException; + ) throws GroupNotFoundException, IOException, NotAGroupMemberException, LastGroupAdminException, UnregisteredRecipientException; void deleteGroup(GroupId groupId) throws IOException; Pair createGroup( String name, Set members, File avatarFile - ) throws IOException, AttachmentInvalidException; + ) throws IOException, AttachmentInvalidException, UnregisteredRecipientException; SendGroupMessageResults updateGroup( final GroupId groupId, final UpdateGroup updateGroup - ) throws IOException, GroupNotFoundException, AttachmentInvalidException, NotAGroupMemberException, GroupSendingNotAllowedException; + ) throws IOException, GroupNotFoundException, AttachmentInvalidException, NotAGroupMemberException, GroupSendingNotAllowedException, UnregisteredRecipientException; Pair joinGroup( GroupInviteLinkUrl inviteLinkUrl @@ -159,7 +159,7 @@ public interface Manager extends Closeable { SendMessageResults sendMessage( Message message, Set recipients - ) throws IOException, AttachmentInvalidException, NotAGroupMemberException, GroupNotFoundException, GroupSendingNotAllowedException; + ) throws IOException, AttachmentInvalidException, NotAGroupMemberException, GroupNotFoundException, GroupSendingNotAllowedException, UnregisteredRecipientException; SendMessageResults sendRemoteDeleteMessage( long targetSentTimestamp, Set recipients @@ -171,21 +171,21 @@ public interface Manager extends Closeable { RecipientIdentifier.Single targetAuthor, long targetSentTimestamp, Set recipients - ) throws IOException, NotAGroupMemberException, GroupNotFoundException, GroupSendingNotAllowedException; + ) throws IOException, NotAGroupMemberException, GroupNotFoundException, GroupSendingNotAllowedException, UnregisteredRecipientException; SendMessageResults sendEndSessionMessage(Set recipients) throws IOException; - void deleteRecipient(RecipientIdentifier.Single recipient) throws IOException; + void deleteRecipient(RecipientIdentifier.Single recipient); - void deleteContact(RecipientIdentifier.Single recipient) throws IOException; + void deleteContact(RecipientIdentifier.Single recipient); void setContactName( RecipientIdentifier.Single recipient, String name - ) throws NotMasterDeviceException, IOException; + ) throws NotMasterDeviceException, IOException, UnregisteredRecipientException; void setContactBlocked( RecipientIdentifier.Single recipient, boolean blocked - ) throws NotMasterDeviceException, IOException; + ) throws NotMasterDeviceException, IOException, UnregisteredRecipientException; void setGroupBlocked( GroupId groupId, boolean blocked @@ -193,7 +193,7 @@ public interface Manager extends Closeable { void setExpirationTimer( RecipientIdentifier.Single recipient, int messageExpirationTimer - ) throws IOException; + ) throws IOException, UnregisteredRecipientException; URI uploadStickerPack(File path) throws IOException, StickerPackInvalidException; @@ -245,13 +245,19 @@ public interface Manager extends Closeable { List getIdentities(RecipientIdentifier.Single recipient); - boolean trustIdentityVerified(RecipientIdentifier.Single recipient, byte[] fingerprint); + boolean trustIdentityVerified( + RecipientIdentifier.Single recipient, byte[] fingerprint + ) throws UnregisteredRecipientException; - boolean trustIdentityVerifiedSafetyNumber(RecipientIdentifier.Single recipient, String safetyNumber); + boolean trustIdentityVerifiedSafetyNumber( + RecipientIdentifier.Single recipient, String safetyNumber + ) throws UnregisteredRecipientException; - boolean trustIdentityVerifiedSafetyNumber(RecipientIdentifier.Single recipient, byte[] safetyNumber); + boolean trustIdentityVerifiedSafetyNumber( + RecipientIdentifier.Single recipient, byte[] safetyNumber + ) throws UnregisteredRecipientException; - boolean trustIdentityAllKeys(RecipientIdentifier.Single recipient); + boolean trustIdentityAllKeys(RecipientIdentifier.Single recipient) throws UnregisteredRecipientException; void addClosedListener(Runnable listener);