import org.asamk.signal.manager.api.RecipientIdentifier;
import org.asamk.signal.manager.api.SendGroupMessageResults;
import org.asamk.signal.manager.api.SendMessageResults;
+import org.asamk.signal.manager.api.StickerPack;
+import org.asamk.signal.manager.api.StickerPackUrl;
import org.asamk.signal.manager.api.TypingAction;
import org.asamk.signal.manager.api.UpdateGroup;
import org.asamk.signal.manager.groups.GroupId;
}
@Override
- public URI uploadStickerPack(final File path) throws IOException, StickerPackInvalidException {
+ public StickerPackUrl uploadStickerPack(final File path) throws IOException, StickerPackInvalidException {
try {
- return new URI(signal.uploadStickerPack(path.getPath()));
- } catch (URISyntaxException e) {
+ return StickerPackUrl.fromUri(new URI(signal.uploadStickerPack(path.getPath())));
+ } catch (URISyntaxException | StickerPackUrl.InvalidStickerPackLinkException e) {
throw new AssertionError(e);
}
}
+ @Override
+ public List<StickerPack> getStickerPacks() {
+ throw new UnsupportedOperationException();
+ }
+
@Override
public void requestAllSyncData() throws IOException {
signal.sendSyncRequest();
}
@Override
- public void close() throws IOException {
+ public void close() {
synchronized (this) {
this.notify();
}
return string == null ? "" : string;
}
- private <T extends DBusInterface> T getRemoteObject(final DBusPath devicePath, final Class<T> type) {
+ private <T extends DBusInterface> T getRemoteObject(final DBusPath path, final Class<T> type) {
try {
- return connection.getRemoteObject(DbusConfig.getBusname(), devicePath.getPath(), type);
+ return connection.getRemoteObject(DbusConfig.getBusname(), path.getPath(), type);
} catch (DBusException e) {
throw new AssertionError(e);
}