Package com.vdocipher.aegis.offline
Class DownloadStatus
-
- All Implemented Interfaces:
public final class DownloadStatusDownload status information corresponding to a media download.
-
-
Field Summary
Fields Modifier and Type Field Description public final static intPERCENTAGE_UNSETpublic final MediaInfomediaInfopublic final StringlocalStorageFolderpublic final intstatuspublic final intreasonpublic final StringreasonDescriptionpublic final longtotalSizeBytespublic final longbytesDownloadedpublic final intdownloadPercentpublic final Stringposterpublic final longcreationTimestamppublic final longlastModifiedTimestamppublic booleanisSavedOfflinepublic DatelastPlayedAtpublic final StringdisplayTitlepublic final StringdisplayDescription
-
Constructor Summary
Constructors Constructor Description DownloadStatus(MediaInfo mediaInfo, String localStorageFolder, int status, int reason, String reasonDescription, long creationTimestamp, long lastModifiedTime, long totalSizeBytes, long bytesDownloaded, int downloadPercent, String posterPath, boolean isSavedOffline, String displayTitle, String displayDescription)
-
Method Summary
Modifier and Type Method Description static DownloadStatuscreateForPending(@NonNull() MediaInfo mediaInfo, String localStorageFolder, long creationTimestamp, long lastModifiedTime, long totalSizeBytes, boolean isSavedOffline)static DownloadStatuscreateForRunning(@NonNull() MediaInfo mediaInfo, String localStorageFolder, long creationTimestamp, long lastModifiedTime, long totalSizeBytes, long bytesDownloaded, int downloadPercent, String posterPath, boolean isSavedOffline)static DownloadStatuscreateForPaused(@NonNull() MediaInfo mediaInfo, String localStorageFolder, int reason, long creationTimestamp, long lastModifiedTime, long totalSizeBytes, long bytesDownloaded, int downloadPercent, String posterPath, boolean isSavedOffline)static DownloadStatuscreateForFailed(@NonNull() MediaInfo mediaInfo, String localStorageFolder, int reason, String reasonDescription, long creationTimestamp, long lastModifiedTime, long totalSizeBytes, long bytesDownloaded, int downloadPercent, String posterPath, boolean isSavedOffline)static DownloadStatuscreateForCompleted(@NonNull() MediaInfo mediaInfo, String localStorageFolder, long creationTimestamp, long lastModifiedTime, long totalSizeBytes, long bytesDownloaded, int downloadPercent, String posterPath, boolean isSavedOffline)static intgetStatus(@Download.State() int state)static intgetState(int status)static DownloadStatusgetDownloadStatus(Download download)Converts Download to DownloadStatus static StringgetOfflineScrubbingPreviewUrl(Download download)synchronized booleanisExpired(Context context)static Utils.WidevineLevelgetSecurityLevel(DownloadRequest downloadRequest)-
-
Constructor Detail
-
DownloadStatus
DownloadStatus(MediaInfo mediaInfo, String localStorageFolder, int status, int reason, String reasonDescription, long creationTimestamp, long lastModifiedTime, long totalSizeBytes, long bytesDownloaded, int downloadPercent, String posterPath, boolean isSavedOffline, String displayTitle, String displayDescription)
-
-
Method Detail
-
createForPending
static DownloadStatus createForPending(@NonNull() MediaInfo mediaInfo, String localStorageFolder, long creationTimestamp, long lastModifiedTime, long totalSizeBytes, boolean isSavedOffline)
-
createForRunning
static DownloadStatus createForRunning(@NonNull() MediaInfo mediaInfo, String localStorageFolder, long creationTimestamp, long lastModifiedTime, long totalSizeBytes, long bytesDownloaded, int downloadPercent, String posterPath, boolean isSavedOffline)
-
createForPaused
static DownloadStatus createForPaused(@NonNull() MediaInfo mediaInfo, String localStorageFolder, int reason, long creationTimestamp, long lastModifiedTime, long totalSizeBytes, long bytesDownloaded, int downloadPercent, String posterPath, boolean isSavedOffline)
-
createForFailed
static DownloadStatus createForFailed(@NonNull() MediaInfo mediaInfo, String localStorageFolder, int reason, String reasonDescription, long creationTimestamp, long lastModifiedTime, long totalSizeBytes, long bytesDownloaded, int downloadPercent, String posterPath, boolean isSavedOffline)
-
createForCompleted
static DownloadStatus createForCompleted(@NonNull() MediaInfo mediaInfo, String localStorageFolder, long creationTimestamp, long lastModifiedTime, long totalSizeBytes, long bytesDownloaded, int downloadPercent, String posterPath, boolean isSavedOffline)
-
getStatus
static int getStatus(@Download.State() int state)
-
getState
static int getState(int status)
-
getDownloadStatus
static DownloadStatus getDownloadStatus(Download download)
Converts Download to DownloadStatus
- Parameters:
download- Download- Returns:
-
getOfflineScrubbingPreviewUrl
static String getOfflineScrubbingPreviewUrl(Download download)
-
getSecurityLevel
static Utils.WidevineLevel getSecurityLevel(DownloadRequest downloadRequest)
-
-
-
-