]> nmode's Git Repositories - signal-cli/blobdiff - lib/src/main/java/org/asamk/signal/manager/Manager.java
Implement sendPayment notification command
[signal-cli] / lib / src / main / java / org / asamk / signal / manager / Manager.java
index d14b0f44752b4df8b8f9e994ec8c7a0f4b54772f..e568816fd89ebc43793cd43ce43966fe474f5b75 100644 (file)
@@ -28,9 +28,8 @@ import org.asamk.signal.manager.groups.GroupNotFoundException;
 import org.asamk.signal.manager.groups.GroupSendingNotAllowedException;
 import org.asamk.signal.manager.groups.LastGroupAdminException;
 import org.asamk.signal.manager.groups.NotAGroupMemberException;
-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.asamk.signal.manager.storage.recipients.Recipient;
 import org.whispersystems.signalservice.api.util.PhoneNumberFormatter;
 
 import java.io.Closeable;
@@ -38,6 +37,7 @@ import java.io.File;
 import java.io.IOException;
 import java.net.URI;
 import java.time.Duration;
+import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 import java.util.Optional;
@@ -141,6 +141,10 @@ public interface Manager extends Closeable {
             Set<RecipientIdentifier> recipients
     ) throws IOException, NotAGroupMemberException, GroupNotFoundException, GroupSendingNotAllowedException, UnregisteredRecipientException;
 
+    SendMessageResults sendPaymentNotificationMessage(
+            byte[] receipt, String note, RecipientIdentifier.Single recipient
+    ) throws IOException;
+
     SendMessageResults sendEndSessionMessage(Set<RecipientIdentifier.Single> recipients) throws IOException;
 
     void deleteRecipient(RecipientIdentifier.Single recipient);
@@ -151,12 +155,12 @@ public interface Manager extends Closeable {
             RecipientIdentifier.Single recipient, String name
     ) throws NotMasterDeviceException, IOException, UnregisteredRecipientException;
 
-    void setContactBlocked(
-            RecipientIdentifier.Single recipient, boolean blocked
+    void setContactsBlocked(
+            Collection<RecipientIdentifier.Single> recipient, boolean blocked
     ) throws NotMasterDeviceException, IOException, UnregisteredRecipientException;
 
-    void setGroupBlocked(
-            GroupId groupId, boolean blocked
+    void setGroupsBlocked(
+            Collection<GroupId> groupId, boolean blocked
     ) throws GroupNotFoundException, IOException, NotMasterDeviceException;
 
     /**
@@ -214,7 +218,12 @@ public interface Manager extends Closeable {
 
     void sendContacts() throws IOException;
 
-    List<Pair<RecipientAddress, Contact>> getContacts();
+    List<Recipient> getRecipients(
+            boolean onlyContacts,
+            Optional<Boolean> blocked,
+            Collection<RecipientIdentifier.Single> address,
+            Optional<String> name
+    );
 
     String getContactOrProfileName(RecipientIdentifier.Single recipient);