mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
Address review comments
This commit is contained in:
@@ -84,6 +84,6 @@ public interface ClientHelper {
|
||||
throws FormatException, GeneralSecurityException;
|
||||
|
||||
void verifySignature(byte[] sig, byte[] publicKey, BdfList signed)
|
||||
throws InvalidMessageException;
|
||||
throws FormatException, GeneralSecurityException;
|
||||
|
||||
}
|
||||
|
||||
@@ -12,19 +12,11 @@ public enum MessageType {
|
||||
}
|
||||
|
||||
public static MessageType valueOf(int value) {
|
||||
switch (value) {
|
||||
case 0:
|
||||
return NEW_MEMBER;
|
||||
case 1:
|
||||
return JOIN;
|
||||
case 2:
|
||||
return POST;
|
||||
default:
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
for (MessageType m : values()) if (m.value == value) return m;
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
|
||||
public int getInt() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,9 @@ public interface PrivateGroupManager extends MessageTracker {
|
||||
* Adds a new private group and joins it.
|
||||
*
|
||||
* @param group The private group to add
|
||||
* @param newMemberMsg The creator's message announcing the first new member
|
||||
* @param joinMsg The first new member's join message
|
||||
* @param newMemberMsg The creator's message announcing herself as
|
||||
* first new member
|
||||
* @param joinMsg The creator's own join message
|
||||
*/
|
||||
void addPrivateGroup(PrivateGroup group, GroupMessage newMemberMsg,
|
||||
GroupMessage joinMsg) throws DbException;
|
||||
@@ -27,10 +28,11 @@ public interface PrivateGroupManager extends MessageTracker {
|
||||
/** Removes a dissolved private group. */
|
||||
void removePrivateGroup(GroupId g) throws DbException;
|
||||
|
||||
/** Gets the MessageId of the */
|
||||
/** Gets the MessageId of your previous message sent to the group */
|
||||
MessageId getPreviousMsgId(GroupId g) throws DbException;
|
||||
|
||||
/** Returns the timestamp of the message with the given ID */
|
||||
// TODO change to getPreviousMessageHeader()
|
||||
long getMessageTimestamp(MessageId id) throws DbException;
|
||||
|
||||
/** Stores (and sends) a local group message. */
|
||||
|
||||
Reference in New Issue
Block a user