package org.asamk;
+import org.asamk.Signal.Error;
import org.freedesktop.dbus.exceptions.DBusException;
import org.freedesktop.dbus.exceptions.DBusExecutionException;
import org.freedesktop.dbus.interfaces.DBusInterface;
import org.freedesktop.dbus.messages.DBusSignal;
+import org.whispersystems.libsignal.util.guava.Optional;
+import java.io.IOException;
import java.util.List;
/**
String message, List<String> attachments, List<String> recipients
) throws Error.AttachmentInvalid, Error.Failure, Error.InvalidNumber, Error.UntrustedIdentity;
+ void sendTyping(
+ String recipient, boolean stop
+ ) throws Error.Failure, Error.GroupNotFound, Error.UntrustedIdentity;
+
+ void sendReadReceipt(
+ String recipient, List<Long> targetSentTimestamp
+ ) throws Error.Failure, Error.UntrustedIdentity;
+
+ long sendRemoteDeleteMessage(
+ long targetSentTimestamp, String recipient
+ ) throws Error.Failure, Error.InvalidNumber;
+
+ long sendRemoteDeleteMessage(
+ long targetSentTimestamp, List<String> recipients
+ ) throws Error.Failure, Error.InvalidNumber;
+
+ long sendGroupRemoteDeleteMessage(
+ long targetSentTimestamp, byte[] groupId
+ ) throws Error.Failure, Error.GroupNotFound, Error.InvalidGroupId;
+
long sendMessageReaction(
String emoji, boolean remove, String targetAuthor, long targetSentTimestamp, String recipient
) throws Error.InvalidNumber, Error.Failure;
long sendGroupMessage(
String message, List<String> attachments, byte[] groupId
- ) throws Error.GroupNotFound, Error.Failure, Error.AttachmentInvalid;
+ ) throws Error.GroupNotFound, Error.Failure, Error.AttachmentInvalid, Error.InvalidGroupId;
long sendGroupMessageReaction(
String emoji, boolean remove, String targetAuthor, long targetSentTimestamp, byte[] groupId
- ) throws Error.GroupNotFound, Error.Failure, Error.InvalidNumber;
+ ) throws Error.GroupNotFound, Error.Failure, Error.InvalidNumber, Error.InvalidGroupId;
String getContactName(String number) throws Error.InvalidNumber;
void setContactBlocked(String number, boolean blocked) throws Error.InvalidNumber;
- void setGroupBlocked(byte[] groupId, boolean blocked) throws Error.GroupNotFound;
+ void setGroupBlocked(byte[] groupId, boolean blocked) throws Error.GroupNotFound, Error.InvalidGroupId;
List<byte[]> getGroupIds();
- String getGroupName(byte[] groupId);
+ String getGroupName(byte[] groupId) throws Error.InvalidGroupId;
- List<String> getGroupMembers(byte[] groupId);
+ List<String> getGroupMembers(byte[] groupId) throws Error.InvalidGroupId;
byte[] updateGroup(
byte[] groupId, String name, List<String> members, String avatar
- ) throws Error.AttachmentInvalid, Error.Failure, Error.InvalidNumber, Error.GroupNotFound;
+ ) throws Error.AttachmentInvalid, Error.Failure, Error.InvalidNumber, Error.GroupNotFound, Error.InvalidGroupId;
boolean isRegistered();
String name, String about, String aboutEmoji, String avatarPath, boolean removeAvatar
) throws Error.Failure;
- public String version();
+ void removePin();
+
+ void setPin(String registrationLockPin);
- public List<String> listNumbers();
+ String version();
- public List<String> getContactNumber(final String name) throws Error.Failure;
+ List<String> listNumbers();
- public void quitGroup(final byte[] groupId) throws Error.GroupNotFound, Error.Failure;
+ List<String> getContactNumber(final String name) throws Error.Failure;
- public boolean isContactBlocked(final String number);
+ void quitGroup(final byte[] groupId) throws Error.GroupNotFound, Error.Failure, Error.InvalidGroupId;
- public boolean isGroupBlocked(final byte[] groupId);
+ boolean isContactBlocked(final String number) throws Error.InvalidNumber;
- public boolean isMember(final byte[] groupId);
+ boolean isGroupBlocked(final byte[] groupId) throws Error.InvalidGroupId;
- public void joinGroup(final String groupLink) throws Error.Failure;
+ boolean isMember(final byte[] groupId) throws Error.InvalidGroupId;
+
+ byte[] joinGroup(final String groupLink) throws Error.Failure;
class MessageReceived extends DBusSignal {
}
}
+ class InvalidGroupId extends DBusExecutionException {
+
+ public InvalidGroupId(final String message) {
+ super(message);
+ }
+ }
+
class InvalidNumber extends DBusExecutionException {
public InvalidNumber(final String message) {