mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Update blog and forum sharing clients to include self-destruct timers.
This commit is contained in:
@@ -15,9 +15,9 @@ public class BlogInvitationRequest extends InvitationRequest<Blog> {
|
||||
public BlogInvitationRequest(MessageId id, GroupId groupId, long time,
|
||||
boolean local, boolean read, boolean sent, boolean seen,
|
||||
SessionId sessionId, Blog blog, @Nullable String text,
|
||||
boolean available, boolean canBeOpened) {
|
||||
boolean available, boolean canBeOpened, long autoDeleteTimer) {
|
||||
super(id, groupId, time, local, read, sent, seen, sessionId, blog,
|
||||
text, available, canBeOpened);
|
||||
text, available, canBeOpened, autoDeleteTimer);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,9 +12,10 @@ public class BlogInvitationResponse extends InvitationResponse {
|
||||
|
||||
public BlogInvitationResponse(MessageId id, GroupId groupId, long time,
|
||||
boolean local, boolean read, boolean sent, boolean seen,
|
||||
SessionId sessionId, boolean accept, GroupId shareableId) {
|
||||
SessionId sessionId, boolean accept, GroupId shareableId,
|
||||
long autoDeleteTimer) {
|
||||
super(id, groupId, time, local, read, sent, seen, sessionId,
|
||||
accept, shareableId);
|
||||
accept, shareableId, autoDeleteTimer);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,5 +18,5 @@ public interface BlogSharingManager extends SharingManager<Blog> {
|
||||
/**
|
||||
* The current minor version of the blog sharing client.
|
||||
*/
|
||||
int MINOR_VERSION = 0;
|
||||
int MINOR_VERSION = 1;
|
||||
}
|
||||
|
||||
@@ -17,9 +17,9 @@ public class ForumInvitationRequest extends InvitationRequest<Forum> {
|
||||
public ForumInvitationRequest(MessageId id, GroupId groupId, long time,
|
||||
boolean local, boolean read, boolean sent, boolean seen,
|
||||
SessionId sessionId, Forum forum, @Nullable String text,
|
||||
boolean available, boolean canBeOpened) {
|
||||
boolean available, boolean canBeOpened, long autoDeleteTimer) {
|
||||
super(id, groupId, time, local, read, sent, seen, sessionId, forum,
|
||||
text, available, canBeOpened);
|
||||
text, available, canBeOpened, autoDeleteTimer);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -15,9 +15,10 @@ public class ForumInvitationResponse extends InvitationResponse {
|
||||
|
||||
public ForumInvitationResponse(MessageId id, GroupId groupId, long time,
|
||||
boolean local, boolean read, boolean sent, boolean seen,
|
||||
SessionId sessionId, boolean accept, GroupId shareableId) {
|
||||
SessionId sessionId, boolean accept, GroupId shareableId,
|
||||
long autoDeleteTimer) {
|
||||
super(id, groupId, time, local, read, sent, seen, sessionId,
|
||||
accept, shareableId);
|
||||
accept, shareableId, autoDeleteTimer);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,5 +18,5 @@ public interface ForumSharingManager extends SharingManager<Forum> {
|
||||
/**
|
||||
* The current minor version of the forum sharing client.
|
||||
*/
|
||||
int MINOR_VERSION = 0;
|
||||
int MINOR_VERSION = 1;
|
||||
}
|
||||
|
||||
@@ -11,6 +11,8 @@ import org.briarproject.briar.api.sharing.InvitationRequest;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.annotation.concurrent.Immutable;
|
||||
|
||||
import static org.briarproject.bramble.api.autodelete.AutoDeleteConstants.NO_AUTO_DELETE_TIMER;
|
||||
|
||||
@Immutable
|
||||
@NotNullByDefault
|
||||
public class GroupInvitationRequest extends InvitationRequest<PrivateGroup> {
|
||||
@@ -20,7 +22,7 @@ public class GroupInvitationRequest extends InvitationRequest<PrivateGroup> {
|
||||
SessionId sessionId, PrivateGroup shareable,
|
||||
@Nullable String text, boolean available, boolean canBeOpened) {
|
||||
super(id, groupId, time, local, read, sent, seen, sessionId, shareable,
|
||||
text, available, canBeOpened);
|
||||
text, available, canBeOpened, NO_AUTO_DELETE_TIMER);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -9,6 +9,8 @@ import org.briarproject.briar.api.sharing.InvitationResponse;
|
||||
|
||||
import javax.annotation.concurrent.Immutable;
|
||||
|
||||
import static org.briarproject.bramble.api.autodelete.AutoDeleteConstants.NO_AUTO_DELETE_TIMER;
|
||||
|
||||
@Immutable
|
||||
@NotNullByDefault
|
||||
public class GroupInvitationResponse extends InvitationResponse {
|
||||
@@ -17,7 +19,7 @@ public class GroupInvitationResponse extends InvitationResponse {
|
||||
boolean local, boolean read, boolean sent, boolean seen,
|
||||
SessionId sessionId, boolean accept, GroupId shareableId) {
|
||||
super(id, groupId, time, local, read, sent, seen, sessionId,
|
||||
accept, shareableId);
|
||||
accept, shareableId, NO_AUTO_DELETE_TIMER);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -7,8 +7,6 @@ import org.briarproject.briar.api.conversation.ConversationRequest;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import static org.briarproject.bramble.api.autodelete.AutoDeleteConstants.NO_AUTO_DELETE_TIMER;
|
||||
|
||||
public abstract class InvitationRequest<S extends Shareable> extends
|
||||
ConversationRequest<S> {
|
||||
|
||||
@@ -17,9 +15,9 @@ public abstract class InvitationRequest<S extends Shareable> extends
|
||||
public InvitationRequest(MessageId messageId, GroupId groupId, long time,
|
||||
boolean local, boolean read, boolean sent, boolean seen,
|
||||
SessionId sessionId, S object, @Nullable String text,
|
||||
boolean available, boolean canBeOpened) {
|
||||
boolean available, boolean canBeOpened, long autoDeleteTimer) {
|
||||
super(messageId, groupId, time, local, read, sent, seen, sessionId,
|
||||
object, text, !available, NO_AUTO_DELETE_TIMER);
|
||||
object, text, !available, autoDeleteTimer);
|
||||
this.canBeOpened = canBeOpened;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,17 +5,16 @@ import org.briarproject.bramble.api.sync.MessageId;
|
||||
import org.briarproject.briar.api.client.SessionId;
|
||||
import org.briarproject.briar.api.conversation.ConversationResponse;
|
||||
|
||||
import static org.briarproject.bramble.api.autodelete.AutoDeleteConstants.NO_AUTO_DELETE_TIMER;
|
||||
|
||||
public abstract class InvitationResponse extends ConversationResponse {
|
||||
|
||||
private final GroupId shareableId;
|
||||
|
||||
public InvitationResponse(MessageId id, GroupId groupId, long time,
|
||||
boolean local, boolean read, boolean sent, boolean seen,
|
||||
SessionId sessionId, boolean accepted, GroupId shareableId) {
|
||||
SessionId sessionId, boolean accepted, GroupId shareableId,
|
||||
long autoDeleteTimer) {
|
||||
super(id, groupId, time, local, read, sent, seen, sessionId, accepted,
|
||||
NO_AUTO_DELETE_TIMER);
|
||||
autoDeleteTimer);
|
||||
this.shareableId = shareableId;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user