mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-11 18:29:05 +01:00
Refactor auto-delete code from Bramble to Briar.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package org.briarproject.briar.api.autodelete;
|
||||
|
||||
import static java.util.concurrent.TimeUnit.DAYS;
|
||||
import static java.util.concurrent.TimeUnit.MINUTES;
|
||||
|
||||
public interface AutoDeleteConstants {
|
||||
|
||||
/**
|
||||
* The minimum valid auto-delete timer duration in milliseconds.
|
||||
*/
|
||||
long MIN_AUTO_DELETE_TIMER_MS = MINUTES.toMillis(1);
|
||||
|
||||
/**
|
||||
* The maximum valid auto-delete timer duration in milliseconds.
|
||||
*/
|
||||
long MAX_AUTO_DELETE_TIMER_MS = DAYS.toMillis(365);
|
||||
|
||||
/**
|
||||
* Placeholder value indicating that a message has no auto-delete timer.
|
||||
* This value should not be sent over the wire - send null instead.
|
||||
*/
|
||||
long NO_AUTO_DELETE_TIMER = -1;
|
||||
}
|
||||
@@ -9,7 +9,7 @@ import java.util.List;
|
||||
import javax.annotation.concurrent.Immutable;
|
||||
|
||||
import static java.util.Collections.emptyList;
|
||||
import static org.briarproject.bramble.api.autodelete.AutoDeleteConstants.NO_AUTO_DELETE_TIMER;
|
||||
import static org.briarproject.briar.api.autodelete.AutoDeleteConstants.NO_AUTO_DELETE_TIMER;
|
||||
import static org.briarproject.briar.api.messaging.PrivateMessageFormat.TEXT_IMAGES;
|
||||
import static org.briarproject.briar.api.messaging.PrivateMessageFormat.TEXT_IMAGES_AUTO_DELETE;
|
||||
import static org.briarproject.briar.api.messaging.PrivateMessageFormat.TEXT_ONLY;
|
||||
|
||||
Reference in New Issue
Block a user