Package com.vdocipher.aegis.offline
Class DownloadStatus
-
- All Implemented Interfaces:
public final class DownloadStatus
Download status information corresponding to a media download.
-
-
Field Summary
Fields Modifier and Type Field Description public final static int
PERCENTAGE_UNSET
public final MediaInfo
mediaInfo
public final String
localStorageFolder
public final int
status
public final int
reason
public final String
reasonDescription
public final long
totalSizeBytes
public final long
bytesDownloaded
public final int
downloadPercent
public final String
poster
public final long
lastModifiedTimestamp
public boolean
isSavedOffline
public Date
lastPlayedAt
public final String
displayTitle
public final String
displayDescription
-
Constructor Summary
Constructors Constructor Description DownloadStatus(MediaInfo mediaInfo, String localStorageFolder, int status, int reason, String reasonDescription, long lastModifiedTime, long totalSizeBytes, long bytesDownloaded, int downloadPercent, String posterPath, boolean isSavedOffline, String displayTitle, String displayDescription)
-
Method Summary
Modifier and Type Method Description static DownloadStatus
createForNotFound(@NonNull() MediaInfo mediaInfo)
static DownloadStatus
createForPending(@NonNull() MediaInfo mediaInfo, String localStorageFolder, long lastModifiedTime, long totalSizeBytes, boolean isSavedOffline)
static DownloadStatus
createForRunning(@NonNull() MediaInfo mediaInfo, String localStorageFolder, long lastModifiedTime, long totalSizeBytes, long bytesDownloaded, int downloadPercent, String posterPath, boolean isSavedOffline)
static DownloadStatus
createForPaused(@NonNull() MediaInfo mediaInfo, String localStorageFolder, int reason, long lastModifiedTime, long totalSizeBytes, long bytesDownloaded, int downloadPercent, String posterPath, boolean isSavedOffline)
static DownloadStatus
createForFailed(@NonNull() MediaInfo mediaInfo, String localStorageFolder, int reason, String reasonDescription, long lastModifiedTime, long totalSizeBytes, long bytesDownloaded, int downloadPercent, String posterPath, boolean isSavedOffline)
static DownloadStatus
createForCompleted(@NonNull() MediaInfo mediaInfo, String localStorageFolder, long lastModifiedTime, long totalSizeBytes, long bytesDownloaded, int downloadPercent, String posterPath, boolean isSavedOffline)
static int
getStatus(@Download.State() int state)
static int
getState(int status)
static DownloadStatus
getDownloadStatus(Download download)
Converts Download to DownloadStatus static DownloadStatus
getDownloadStatus(Context context, Download download)
static String
getOfflineScrubbingPreviewUrl(Download download)
synchronized boolean
isExpired(Context context)
static Utils.WidevineLevel
getSecurityLevel(DownloadRequest downloadRequest)
-
-
Constructor Detail
-
DownloadStatus
DownloadStatus(MediaInfo mediaInfo, String localStorageFolder, int status, int reason, String reasonDescription, long lastModifiedTime, long totalSizeBytes, long bytesDownloaded, int downloadPercent, String posterPath, boolean isSavedOffline, String displayTitle, String displayDescription)
-
-
Method Detail
-
createForNotFound
static DownloadStatus createForNotFound(@NonNull() MediaInfo mediaInfo)
-
createForPending
static DownloadStatus createForPending(@NonNull() MediaInfo mediaInfo, String localStorageFolder, long lastModifiedTime, long totalSizeBytes, boolean isSavedOffline)
-
createForRunning
static DownloadStatus createForRunning(@NonNull() MediaInfo mediaInfo, String localStorageFolder, long lastModifiedTime, long totalSizeBytes, long bytesDownloaded, int downloadPercent, String posterPath, boolean isSavedOffline)
-
createForPaused
static DownloadStatus createForPaused(@NonNull() MediaInfo mediaInfo, String localStorageFolder, int reason, 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 lastModifiedTime, long totalSizeBytes, long bytesDownloaded, int downloadPercent, String posterPath, boolean isSavedOffline)
-
createForCompleted
static DownloadStatus createForCompleted(@NonNull() MediaInfo mediaInfo, String localStorageFolder, 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:
-
getDownloadStatus
static DownloadStatus getDownloadStatus(Context context, Download download)
-
getOfflineScrubbingPreviewUrl
static String getOfflineScrubbingPreviewUrl(Download download)
-
getSecurityLevel
static Utils.WidevineLevel getSecurityLevel(DownloadRequest downloadRequest)
-
-
-
-