]> nmode's Git Repositories - signal-cli/blobdiff - lib/src/main/java/org/asamk/signal/manager/Manager.java
Add removeContact command
[signal-cli] / lib / src / main / java / org / asamk / signal / manager / Manager.java
index 49331b1f4a7913c22ed24dc38ab6d888fa1b3463..c9f2bad185a9ac9015ba24f8c8506ea38842a6d7 100644 (file)
@@ -76,7 +76,7 @@ public interface Manager extends Closeable {
         return PhoneNumberFormatter.isValidNumber(e164Number, countryCode);
     }
 
-    static List<String> getAllLocalNumbers(File settingsPath) {
+    static List<String> getAllLocalAccountNumbers(File settingsPath) {
         var pathConfig = PathConfig.createDefault(settingsPath);
         final var dataPath = pathConfig.dataPath();
         final var files = dataPath.listFiles();
@@ -144,17 +144,17 @@ public interface Manager extends Closeable {
             GroupInviteLinkUrl inviteLinkUrl
     ) throws IOException, InactiveGroupLinkException;
 
-    void sendTypingMessage(
+    SendMessageResults sendTypingMessage(
             TypingAction action, Set<RecipientIdentifier> recipients
-    ) throws IOException, UntrustedIdentityException, NotAGroupMemberException, GroupNotFoundException, GroupSendingNotAllowedException;
+    ) throws IOException, NotAGroupMemberException, GroupNotFoundException, GroupSendingNotAllowedException;
 
-    void sendReadReceipt(
+    SendMessageResults sendReadReceipt(
             RecipientIdentifier.Single sender, List<Long> messageIds
-    ) throws IOException, UntrustedIdentityException;
+    ) throws IOException;
 
-    void sendViewedReceipt(
+    SendMessageResults sendViewedReceipt(
             RecipientIdentifier.Single sender, List<Long> messageIds
-    ) throws IOException, UntrustedIdentityException;
+    ) throws IOException;
 
     SendMessageResults sendMessage(
             Message message, Set<RecipientIdentifier> recipients
@@ -174,6 +174,10 @@ public interface Manager extends Closeable {
 
     SendMessageResults sendEndSessionMessage(Set<RecipientIdentifier.Single> recipients) throws IOException;
 
+    void deleteRecipient(RecipientIdentifier.Single recipient) throws IOException;
+
+    void deleteContact(RecipientIdentifier.Single recipient) throws IOException;
+
     void setContactName(
             RecipientIdentifier.Single recipient, String name
     ) throws NotMasterDeviceException, IOException;
@@ -248,6 +252,8 @@ public interface Manager extends Closeable {
 
     boolean trustIdentityAllKeys(RecipientIdentifier.Single recipient);
 
+    void addClosedListener(Runnable listener);
+
     @Override
     void close() throws IOException;