package org.asamk;
+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;
void addDevice(String uri) throws Error.InvalidUri;
- void removeDevice(int deviceId) throws Error.Failure;
+ DBusPath getDevice(long deviceId);
- List<String> listDevices() throws Error.Failure;
+ List<DBusPath> listDevices() throws Error.Failure;
- void updateDeviceName(String deviceName) throws Error.Failure;
+ DBusPath getThisDevice();
void updateProfile(
String givenName,
String uploadStickerPack(String stickerPackPath) throws Error.Failure;
+ void setConfiguration(boolean readReceipts, boolean unidentifiedDeliveryIndicators, boolean typingIndicators, boolean linkPreviews) throws Error.IOError, Error.UserError;
+
+ List<Boolean> getConfiguration();
+
class MessageReceived extends DBusSignal {
private final long timestamp;
}
}
+ @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 {
super(message);
}
}
+
+ class IOError extends DBusExecutionException {
+
+ public IOError(final String message) {
+ super(message);
+ }
+ }
+
+ class UserError extends DBusExecutionException {
+
+ public UserError(final String message) {
+ super(message);
+ }
+ }
}
}