mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Broadcast an event when remote transport properties are updated.
This commit is contained in:
@@ -35,4 +35,15 @@ public interface TransportPropertyConstants {
|
||||
* contact, as a BDF dictionary.
|
||||
*/
|
||||
String GROUP_KEY_DISCOVERED = "discovered";
|
||||
|
||||
/**
|
||||
* Group metadata key for the contact's ID as a BDF long.
|
||||
*/
|
||||
String GROUP_KEY_CONTACT_ID = "contactId";
|
||||
|
||||
/**
|
||||
* Group metadata key for the local group, indicating that contact IDs have
|
||||
* been stored in the group metadata of contact groups.
|
||||
*/
|
||||
String GROUP_KEY_CONTACT_IDS_STORED = "contactIdsStored";
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
package org.briarproject.bramble.api.properties.event;
|
||||
|
||||
import org.briarproject.bramble.api.contact.ContactId;
|
||||
import org.briarproject.bramble.api.event.Event;
|
||||
import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
|
||||
import org.briarproject.bramble.api.plugin.TransportId;
|
||||
import org.briarproject.bramble.api.properties.TransportProperties;
|
||||
|
||||
import javax.annotation.concurrent.Immutable;
|
||||
|
||||
/**
|
||||
* An event that is broadcast when {@link TransportProperties} are received
|
||||
* from a contact.
|
||||
*/
|
||||
@Immutable
|
||||
@NotNullByDefault
|
||||
public class RemoteTransportPropertiesUpdatedEvent extends Event {
|
||||
|
||||
private final ContactId contactId;
|
||||
private final TransportId transportId;
|
||||
|
||||
public RemoteTransportPropertiesUpdatedEvent(ContactId contactId,
|
||||
TransportId transportId) {
|
||||
this.contactId = contactId;
|
||||
this.transportId = transportId;
|
||||
}
|
||||
|
||||
public ContactId getContactId() {
|
||||
return contactId;
|
||||
}
|
||||
|
||||
public TransportId getTransportId() {
|
||||
return transportId;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user