1
0
mirror of https://github.com/etesync/android synced 2025-04-05 01:06:03 +00:00

Journal manager: Add a way to update a journal.

This commit is contained in:
Tom Hacohen 2017-03-08 15:17:52 +00:00
parent 1b3a4bf318
commit e7138842c8

View File

@ -74,6 +74,18 @@ public class JournalManager extends BaseManager {
newCall(request);
}
public void updateJournal(Journal journal) throws Exceptions.HttpException {
HttpUrl remote = this.remote.resolve(journal.getUuid() + "/");
RequestBody body = RequestBody.create(JSON, journal.toJson());
Request request = new Request.Builder()
.put(body)
.url(remote)
.build();
newCall(request);
}
public static class Journal extends Base {
final private transient int hmacSize = 256 / 8; // hmac256 in bytes
private transient byte[] hmac = null;