Added database events for retention updates.

This commit is contained in:
akwizgran
2013-01-29 14:45:05 +00:00
parent c3c349970b
commit 81397ef1c2
4 changed files with 47 additions and 23 deletions

View File

@@ -0,0 +1,9 @@
package net.sf.briar.api.db.event;
/**
* An event that is broadcast when the retention time of the local database
* changes.
*/
public class LocalRetentionTimeUpdatedEvent extends DatabaseEvent {
}

View File

@@ -1,7 +1,6 @@
package net.sf.briar.api.db.event;
import java.util.Collection;
import java.util.Collections;
import net.sf.briar.api.ContactId;
@@ -13,10 +12,6 @@ public class LocalSubscriptionsUpdatedEvent extends DatabaseEvent {
private final Collection<ContactId> affected;
public LocalSubscriptionsUpdatedEvent() {
affected = Collections.emptyList();
}
public LocalSubscriptionsUpdatedEvent(Collection<ContactId> affected) {
this.affected = affected;
}

View File

@@ -0,0 +1,20 @@
package net.sf.briar.api.db.event;
import net.sf.briar.api.ContactId;
/**
* An event that is broadcast when the retention time of a contact's database
* changes.
*/
public class RemoteRetentionTimeUpdatedEvent extends DatabaseEvent {
private final ContactId contactId;
public RemoteRetentionTimeUpdatedEvent(ContactId contactId) {
this.contactId = contactId;
}
public ContactId getContactId() {
return contactId;
}
}