mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 03:39:05 +01:00
Factor out generic sharing code from ForumSharingManger
This commit is contained in:
@@ -4,21 +4,16 @@ import org.briarproject.api.contact.ContactId;
|
||||
import org.briarproject.api.forum.Forum;
|
||||
import org.briarproject.api.introduction.IntroductionRequest;
|
||||
|
||||
public class ForumInvitationReceivedEvent extends Event {
|
||||
public class ForumInvitationReceivedEvent extends InvitationReceivedEvent {
|
||||
|
||||
private final Forum forum;
|
||||
private final ContactId contactId;
|
||||
|
||||
public ForumInvitationReceivedEvent(Forum forum, ContactId contactId) {
|
||||
super(contactId);
|
||||
this.forum = forum;
|
||||
this.contactId = contactId;
|
||||
}
|
||||
|
||||
public Forum getForum() {
|
||||
return forum;
|
||||
}
|
||||
|
||||
public ContactId getContactId() {
|
||||
return contactId;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,23 +2,17 @@ package org.briarproject.api.event;
|
||||
|
||||
import org.briarproject.api.contact.ContactId;
|
||||
|
||||
public class ForumInvitationResponseReceivedEvent extends Event {
|
||||
public class ForumInvitationResponseReceivedEvent extends InvitationResponseReceivedEvent {
|
||||
|
||||
private final String forumName;
|
||||
private final ContactId contactId;
|
||||
|
||||
public ForumInvitationResponseReceivedEvent(String forumName,
|
||||
ContactId contactId) {
|
||||
|
||||
super(contactId);
|
||||
this.forumName = forumName;
|
||||
this.contactId = contactId;
|
||||
}
|
||||
|
||||
public String getForumName() {
|
||||
return forumName;
|
||||
}
|
||||
|
||||
public ContactId getContactId() {
|
||||
return contactId;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package org.briarproject.api.event;
|
||||
|
||||
import org.briarproject.api.contact.ContactId;
|
||||
import org.briarproject.api.forum.Forum;
|
||||
|
||||
public abstract class InvitationReceivedEvent extends Event {
|
||||
|
||||
private final ContactId contactId;
|
||||
|
||||
public InvitationReceivedEvent(ContactId contactId) {
|
||||
this.contactId = contactId;
|
||||
}
|
||||
|
||||
public ContactId getContactId() {
|
||||
return contactId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.briarproject.api.event;
|
||||
|
||||
import org.briarproject.api.contact.ContactId;
|
||||
|
||||
public abstract class InvitationResponseReceivedEvent extends Event {
|
||||
|
||||
private final ContactId contactId;
|
||||
|
||||
public InvitationResponseReceivedEvent(ContactId contactId) {
|
||||
this.contactId = contactId;
|
||||
}
|
||||
|
||||
public ContactId getContactId() {
|
||||
return contactId;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user