mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 02:39:05 +01:00
Add an IntroductionManager and Validator
This Introduction BSP Client uses its own group to communicate with existing contacts. It uses four types of messages to facilitate introductions: the introduction, the response, the ack and the abort. The protocol logic is encapsulated in two protocol engines, one for the introducer and one for the introducee. The introduction client keeps the local state for each engine, hands messages over to the engines and processes the result and state changes they return.
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
package org.briarproject.api.introduction;
|
||||
|
||||
import org.briarproject.api.identity.AuthorId;
|
||||
import org.briarproject.api.sync.MessageId;
|
||||
|
||||
public class IntroductionRequest extends IntroductionResponse {
|
||||
|
||||
private final String message;
|
||||
private final boolean answered, exists;
|
||||
|
||||
public IntroductionRequest(SessionId sessionId, MessageId messageId,
|
||||
long time, boolean local, boolean sent, boolean seen, boolean read,
|
||||
AuthorId authorId, String name, boolean accepted, String message,
|
||||
boolean answered, boolean exists) {
|
||||
|
||||
super(sessionId, messageId, time, local, sent, seen, read, authorId,
|
||||
name, accepted);
|
||||
|
||||
this.message = message;
|
||||
this.answered = answered;
|
||||
this.exists = exists;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public boolean wasAnswered() {
|
||||
return answered;
|
||||
}
|
||||
|
||||
public boolean doesExist() {
|
||||
return exists;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user