2014-10-22 16:38:44 +00:00
|
|
|
package eu.siacs.conversations.entities;
|
|
|
|
|
2016-03-04 10:24:53 +00:00
|
|
|
import java.util.Arrays;
|
|
|
|
import java.util.List;
|
|
|
|
|
2015-07-10 13:11:03 +00:00
|
|
|
public interface Transferable {
|
2014-10-22 16:38:44 +00:00
|
|
|
|
2016-03-04 10:24:53 +00:00
|
|
|
List<String> VALID_IMAGE_EXTENSIONS = Arrays.asList("webp", "jpeg", "jpg", "png", "jpe");
|
2018-02-19 12:55:48 +00:00
|
|
|
List<String> VALID_CRYPTO_EXTENSIONS = Arrays.asList("pgp", "gpg");
|
2014-10-22 16:38:44 +00:00
|
|
|
|
2015-06-28 09:19:07 +00:00
|
|
|
int STATUS_UNKNOWN = 0x200;
|
|
|
|
int STATUS_CHECKING = 0x201;
|
|
|
|
int STATUS_FAILED = 0x202;
|
|
|
|
int STATUS_OFFER = 0x203;
|
|
|
|
int STATUS_DOWNLOADING = 0x204;
|
|
|
|
int STATUS_OFFER_CHECK_FILESIZE = 0x206;
|
|
|
|
int STATUS_UPLOADING = 0x207;
|
2019-10-05 19:58:21 +00:00
|
|
|
int STATUS_CANCELLED = 0x208;
|
2014-10-22 16:38:44 +00:00
|
|
|
|
2015-07-02 21:19:50 +00:00
|
|
|
|
2015-06-28 09:19:07 +00:00
|
|
|
boolean start();
|
2014-10-22 16:38:44 +00:00
|
|
|
|
2015-06-28 09:19:07 +00:00
|
|
|
int getStatus();
|
2014-10-22 16:38:44 +00:00
|
|
|
|
2015-06-28 09:19:07 +00:00
|
|
|
long getFileSize();
|
2014-11-13 20:04:05 +00:00
|
|
|
|
2015-06-28 09:19:07 +00:00
|
|
|
int getProgress();
|
2014-11-13 20:04:05 +00:00
|
|
|
|
2015-06-28 09:19:07 +00:00
|
|
|
void cancel();
|
2014-10-22 16:38:44 +00:00
|
|
|
}
|