mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
@@ -8,13 +8,14 @@ public class Contact {
|
||||
private final ContactId id;
|
||||
private final Author author;
|
||||
private final AuthorId localAuthorId;
|
||||
private final boolean active;
|
||||
private final boolean verified, active;
|
||||
|
||||
public Contact(ContactId id, Author author, AuthorId localAuthorId,
|
||||
boolean active) {
|
||||
boolean verified, boolean active) {
|
||||
this.id = id;
|
||||
this.author = author;
|
||||
this.localAuthorId = localAuthorId;
|
||||
this.verified = verified;
|
||||
this.active = active;
|
||||
}
|
||||
|
||||
@@ -30,6 +31,10 @@ public class Contact {
|
||||
return localAuthorId;
|
||||
}
|
||||
|
||||
public boolean isVerified() {
|
||||
return verified;
|
||||
}
|
||||
|
||||
public boolean isActive() {
|
||||
return active;
|
||||
}
|
||||
|
||||
@@ -21,16 +21,16 @@ public interface ContactManager {
|
||||
* local and remote pseudonyms, and returns an ID for the contact.
|
||||
*/
|
||||
ContactId addContact(Transaction txn, Author remote, AuthorId local,
|
||||
SecretKey master, long timestamp, boolean alice, boolean active)
|
||||
throws DbException;
|
||||
SecretKey master, long timestamp, boolean alice, boolean verified,
|
||||
boolean active) throws DbException;
|
||||
|
||||
/**
|
||||
* Stores a contact associated with the given local and remote pseudonyms,
|
||||
* and returns an ID for the contact.
|
||||
*/
|
||||
ContactId addContact(Author remote, AuthorId local,
|
||||
SecretKey master, long timestamp, boolean alice, boolean active)
|
||||
throws DbException;
|
||||
SecretKey master, long timestamp, boolean alice, boolean verified,
|
||||
boolean active) throws DbException;
|
||||
|
||||
/** Returns the contact with the given ID. */
|
||||
Contact getContact(ContactId c) throws DbException;
|
||||
|
||||
@@ -62,7 +62,7 @@ public interface DatabaseComponent {
|
||||
* and returns an ID for the contact.
|
||||
*/
|
||||
ContactId addContact(Transaction txn, Author remote, AuthorId local,
|
||||
boolean active) throws DbException;
|
||||
boolean verified, boolean active) throws DbException;
|
||||
|
||||
/**
|
||||
* Stores a group.
|
||||
@@ -423,6 +423,12 @@ public interface DatabaseComponent {
|
||||
*/
|
||||
void removeTransport(Transaction txn, TransportId t) throws DbException;
|
||||
|
||||
/**
|
||||
* Marks the given contact as verified or unverified.
|
||||
*/
|
||||
void setContactVerified(Transaction txn, ContactId c, boolean verified)
|
||||
throws DbException;
|
||||
|
||||
/**
|
||||
* Marks the given contact as active or inactive.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user