X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/593cd7d8ca6e8e0ab654accfd7e3c9d2ee01b001..d4838bd646c736a5fe1d40b45aa12be239b01ed3:/src/main/java/org/asamk/Signal.java diff --git a/src/main/java/org/asamk/Signal.java b/src/main/java/org/asamk/Signal.java index cc521f6d..a7832714 100644 --- a/src/main/java/org/asamk/Signal.java +++ b/src/main/java/org/asamk/Signal.java @@ -1,8 +1,13 @@ package org.asamk; +import org.asamk.signal.commands.exceptions.IOErrorException; + +import org.freedesktop.dbus.DBusPath; +import org.freedesktop.dbus.annotations.DBusProperty; import org.freedesktop.dbus.exceptions.DBusException; import org.freedesktop.dbus.exceptions.DBusExecutionException; import org.freedesktop.dbus.interfaces.DBusInterface; +import org.freedesktop.dbus.interfaces.Properties; import org.freedesktop.dbus.messages.DBusSignal; import java.util.List; @@ -97,11 +102,11 @@ public interface Signal extends DBusInterface { void addDevice(String uri) throws Error.InvalidUri; - void removeDevice(int deviceId) throws Error.Failure; + DBusPath getDevice(long deviceId); - List listDevices() throws Error.Failure; + List listDevices() throws Error.Failure; - void updateDeviceName(String deviceName) throws Error.Failure; + DBusPath getThisDevice(); void updateProfile( String givenName, @@ -138,6 +143,8 @@ public interface Signal extends DBusInterface { String uploadStickerPack(String stickerPackPath) throws Error.Failure; + void submitRateLimitChallenge(String challenge, String captchaString) throws IOErrorException; + class MessageReceived extends DBusSignal { private final long timestamp; @@ -255,6 +262,15 @@ public interface Signal extends DBusInterface { } } + @DBusProperty(name = "Id", type = Integer.class, access = DBusProperty.Access.READ) + @DBusProperty(name = "Name", type = String.class) + @DBusProperty(name = "Created", type = String.class, access = DBusProperty.Access.READ) + @DBusProperty(name = "LastSeen", type = String.class, access = DBusProperty.Access.READ) + interface Device extends DBusInterface, Properties { + + void removeDevice() throws Error.Failure; + } + interface Error { class AttachmentInvalid extends DBusExecutionException {