mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 11:49:04 +01:00
Extract ForumFactory from ForumManager
The code for creating forums in ForumManager was used by ForumSharingManager and also needed by InviteeEngine. This extracts it into its own class. Closes #375
This commit is contained in:
11
briar-api/src/org/briarproject/api/forum/ForumFactory.java
Normal file
11
briar-api/src/org/briarproject/api/forum/ForumFactory.java
Normal file
@@ -0,0 +1,11 @@
|
||||
package org.briarproject.api.forum;
|
||||
|
||||
public interface ForumFactory {
|
||||
|
||||
/** Creates a forum with the given name. */
|
||||
Forum createForum(String name);
|
||||
|
||||
/** Creates a forum with the given name and salt. */
|
||||
Forum createForum(String name, byte[] salt);
|
||||
|
||||
}
|
||||
@@ -13,14 +13,8 @@ public interface ForumManager {
|
||||
/** Returns the unique ID of the forum client. */
|
||||
ClientId getClientId();
|
||||
|
||||
/** Creates a forum with the given name. */
|
||||
Forum createForum(String name);
|
||||
|
||||
/** Creates a forum with the given name and salt. */
|
||||
Forum createForum(String name, byte[] salt);
|
||||
|
||||
/** Subscribes to a forum. */
|
||||
void addForum(Forum f) throws DbException;
|
||||
Forum addForum(String name) throws DbException;
|
||||
|
||||
/** Unsubscribes from a forum. */
|
||||
void removeForum(Forum f) throws DbException;
|
||||
|
||||
Reference in New Issue
Block a user