mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Updated group-related events and exceptions.
This commit is contained in:
@@ -2,12 +2,12 @@ package org.briarproject.api.event;
|
||||
|
||||
import org.briarproject.api.sync.Group;
|
||||
|
||||
/** An event that is broadcast when the user subscribes to a group. */
|
||||
public class SubscriptionAddedEvent extends Event {
|
||||
/** An event that is broadcast when a group is added. */
|
||||
public class GroupAddedEvent extends Event {
|
||||
|
||||
private final Group group;
|
||||
|
||||
public SubscriptionAddedEvent(Group group) {
|
||||
public GroupAddedEvent(Group group) {
|
||||
this.group = group;
|
||||
}
|
||||
|
||||
@@ -2,12 +2,12 @@ package org.briarproject.api.event;
|
||||
|
||||
import org.briarproject.api.sync.Group;
|
||||
|
||||
/** An event that is broadcast when the user unsubscribes from a group. */
|
||||
public class SubscriptionRemovedEvent extends Event {
|
||||
/** An event that is broadcast when a group is removed. */
|
||||
public class GroupRemovedEvent extends Event {
|
||||
|
||||
private final Group group;
|
||||
|
||||
public SubscriptionRemovedEvent(Group group) {
|
||||
public GroupRemovedEvent(Group group) {
|
||||
this.group = group;
|
||||
}
|
||||
|
||||
@@ -4,15 +4,12 @@ import org.briarproject.api.contact.ContactId;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* An event that is broadcast when the set of subscriptions visible to one or
|
||||
* more contacts is updated.
|
||||
*/
|
||||
public class LocalSubscriptionsUpdatedEvent extends Event {
|
||||
/** An event that is broadcast when the visibility of a group is updated. */
|
||||
public class GroupVisibilityUpdatedEvent extends Event {
|
||||
|
||||
private final Collection<ContactId> affected;
|
||||
|
||||
public LocalSubscriptionsUpdatedEvent(Collection<ContactId> affected) {
|
||||
public GroupVisibilityUpdatedEvent(Collection<ContactId> affected) {
|
||||
this.affected = affected;
|
||||
}
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
package org.briarproject.api.event;
|
||||
|
||||
import org.briarproject.api.contact.ContactId;
|
||||
|
||||
/** An event that is broadcast when a contact's subscriptions are updated. */
|
||||
public class RemoteSubscriptionsUpdatedEvent extends Event {
|
||||
|
||||
private final ContactId contactId;
|
||||
|
||||
public RemoteSubscriptionsUpdatedEvent(ContactId contactId) {
|
||||
this.contactId = contactId;
|
||||
}
|
||||
|
||||
public ContactId getContactId() {
|
||||
return contactId;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user