mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Javadocs and unit tests.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package net.sf.briar.api.db;
|
||||
|
||||
/** Uniquely identifies a contact. */
|
||||
/** Type-safe wrapper for an integer that uniquely identifies a contact. */
|
||||
public class ContactId {
|
||||
|
||||
private final int id;
|
||||
|
||||
@@ -35,7 +35,10 @@ public interface DatabaseComponent {
|
||||
/** Adds a locally generated message to the database. */
|
||||
void addLocallyGeneratedMessage(Message m) throws DbException;
|
||||
|
||||
/** Generates a bundle of messages for the given contact. */
|
||||
/**
|
||||
* Generates a bundle of acknowledgements, subscriptions, and batches of
|
||||
* messages for the given contact.
|
||||
*/
|
||||
void generateBundle(ContactId c, Bundle b) throws DbException;
|
||||
|
||||
/** Returns the user's rating for the given author. */
|
||||
@@ -45,8 +48,9 @@ public interface DatabaseComponent {
|
||||
Set<GroupId> getSubscriptions() throws DbException;
|
||||
|
||||
/**
|
||||
* Processes a bundle of messages received from the given contact. Some
|
||||
* or all of the messages in the bundle may be stored.
|
||||
* Processes a bundle of acknowledgements, subscriptions, and batches of
|
||||
* messages received from the given contact. Some or all of the messages
|
||||
* in the bundle may be stored.
|
||||
*/
|
||||
void receiveBundle(ContactId c, Bundle b) throws DbException;
|
||||
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
package net.sf.briar.api.i18n;
|
||||
|
||||
import java.awt.Font;
|
||||
import java.io.IOException;
|
||||
import java.util.Locale;
|
||||
|
||||
public interface FontManager {
|
||||
|
||||
/** Initializes the FontManager for the given locale. */
|
||||
void initialize(Locale locale) throws IOException;
|
||||
void initialize(Locale locale);
|
||||
|
||||
/** Returns the appropriate font for the given language. */
|
||||
Font getFontForLanguage(String language);
|
||||
|
||||
@@ -2,7 +2,7 @@ package net.sf.briar.api.protocol;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/** Uniquely identifies a pseudonymous author. */
|
||||
/** Type-safe wrapper for a byte array that uniquely identifies an author. */
|
||||
public class AuthorId {
|
||||
|
||||
public static final int LENGTH = 32;
|
||||
|
||||
@@ -2,7 +2,10 @@ package net.sf.briar.api.protocol;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/** Uniquely identifies a batch of messages. */
|
||||
/**
|
||||
* Type-safe wrapper for a byte array that uniquely identifies a batch of
|
||||
* messages.
|
||||
*/
|
||||
public class BatchId {
|
||||
|
||||
public static final int LENGTH = 32;
|
||||
|
||||
@@ -2,6 +2,10 @@ package net.sf.briar.api.protocol;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* Type-safe wrapper for a byte array that uniquely identifies a bundle of
|
||||
* acknowledgements, subscriptions, and batches of messages.
|
||||
*/
|
||||
public class BundleId {
|
||||
|
||||
public static final BundleId NONE = new BundleId(new byte[] {
|
||||
|
||||
@@ -2,7 +2,10 @@ package net.sf.briar.api.protocol;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/** Uniquely identifies a group to which a user may subscribe. */
|
||||
/**
|
||||
* Type-safe wrapper for a byte array that uniquely identifies a group to which
|
||||
* users may subscribe.
|
||||
*/
|
||||
public class GroupId {
|
||||
|
||||
public static final int LENGTH = 32;
|
||||
|
||||
@@ -2,7 +2,7 @@ package net.sf.briar.api.protocol;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/** Uniquely identifies a message. */
|
||||
/** Type-safe wrapper for a byte array that uniquely identifies a message. */
|
||||
public class MessageId {
|
||||
|
||||
/** Used to indicate that the first message in a thread has no parent. */
|
||||
|
||||
Reference in New Issue
Block a user