mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +01:00
Use author encoding and parsing helpers everywhere.
This commit is contained in:
@@ -24,10 +24,6 @@ public interface BlogConstants {
|
||||
String KEY_TYPE = "type";
|
||||
String KEY_TIMESTAMP = "timestamp";
|
||||
String KEY_TIME_RECEIVED = "timeReceived";
|
||||
String KEY_AUTHOR_ID = "id";
|
||||
String KEY_FORMAT_VERSION = "formatVersion";
|
||||
String KEY_AUTHOR_NAME = "name";
|
||||
String KEY_PUBLIC_KEY = "publicKey";
|
||||
String KEY_AUTHOR = "author";
|
||||
String KEY_RSS_FEED = "rssFeed";
|
||||
String KEY_READ = "read";
|
||||
|
||||
@@ -16,26 +16,26 @@ public class Feed {
|
||||
private final Blog blog;
|
||||
private final LocalAuthor localAuthor;
|
||||
@Nullable
|
||||
private final String description, author;
|
||||
private final String description, rssAuthor;
|
||||
private final long added, updated, lastEntryTime;
|
||||
|
||||
public Feed(String url, Blog blog, LocalAuthor localAuthor,
|
||||
@Nullable String description, @Nullable String author, long added,
|
||||
long updated, long lastEntryTime) {
|
||||
|
||||
@Nullable String description, @Nullable String rssAuthor,
|
||||
long added, long updated, long lastEntryTime) {
|
||||
this.url = url;
|
||||
this.blog = blog;
|
||||
this.localAuthor = localAuthor;
|
||||
this.description = description;
|
||||
this.author = author;
|
||||
this.rssAuthor = rssAuthor;
|
||||
this.added = added;
|
||||
this.updated = updated;
|
||||
this.lastEntryTime = lastEntryTime;
|
||||
}
|
||||
|
||||
public Feed(String url, Blog blog, LocalAuthor localAuthor,
|
||||
@Nullable String description, @Nullable String author, long added) {
|
||||
this(url, blog, localAuthor, description, author, added, 0L, 0L);
|
||||
@Nullable String description, @Nullable String rssAuthor,
|
||||
long added) {
|
||||
this(url, blog, localAuthor, description, rssAuthor, added, 0L, 0L);
|
||||
}
|
||||
|
||||
public Feed(String url, Blog blog, LocalAuthor localAuthor, long added) {
|
||||
@@ -68,8 +68,8 @@ public class Feed {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public String getAuthor() {
|
||||
return author;
|
||||
public String getRssAuthor() {
|
||||
return rssAuthor;
|
||||
}
|
||||
|
||||
public long getAdded() {
|
||||
|
||||
@@ -18,12 +18,10 @@ public interface FeedConstants {
|
||||
// group metadata keys
|
||||
String KEY_FEEDS = "feeds";
|
||||
String KEY_FEED_URL = "feedURL";
|
||||
String KEY_FORMAT_VERSION = "formatVersion";
|
||||
String KEY_BLOG_TITLE = "blogTitle";
|
||||
String KEY_PUBLIC_KEY = "publicKey";
|
||||
String KEY_PRIVATE_KEY = "privateKey";
|
||||
String KEY_FEED_DESC = "feedDesc";
|
||||
String KEY_FEED_AUTHOR = "feedAuthor";
|
||||
String KEY_FEED_PRIVATE_KEY = "feedPrivateKey";
|
||||
String KEY_FEED_DESC = "feedDesc";
|
||||
String KEY_FEED_RSS_AUTHOR = "feedRssAuthor";
|
||||
String KEY_FEED_ADDED = "feedAdded";
|
||||
String KEY_FEED_UPDATED = "feedUpdated";
|
||||
String KEY_FEED_LAST_ENTRY = "feedLastEntryTime";
|
||||
|
||||
@@ -23,10 +23,6 @@ public interface ForumConstants {
|
||||
String KEY_TIMESTAMP = "timestamp";
|
||||
String KEY_PARENT = "parent";
|
||||
String KEY_AUTHOR = "author";
|
||||
String KEY_ID = "id";
|
||||
String KEY_FORMAT_VERSION = "formatVersion";
|
||||
String KEY_NAME = "name";
|
||||
String KEY_PUBLIC_KEY = "publicKey";
|
||||
String KEY_LOCAL = "local";
|
||||
String KEY_READ = "read";
|
||||
|
||||
|
||||
@@ -11,12 +11,12 @@ public interface PrivateGroupFactory {
|
||||
/**
|
||||
* Creates a private group with the given name and author.
|
||||
*/
|
||||
PrivateGroup createPrivateGroup(String name, Author author);
|
||||
PrivateGroup createPrivateGroup(String name, Author creator);
|
||||
|
||||
/**
|
||||
* Creates a private group with the given name, author and salt.
|
||||
*/
|
||||
PrivateGroup createPrivateGroup(String name, Author author, byte[] salt);
|
||||
PrivateGroup createPrivateGroup(String name, Author creator, byte[] salt);
|
||||
|
||||
/**
|
||||
* Parses a group and returns the corresponding PrivateGroup.
|
||||
|
||||
Reference in New Issue
Block a user