From 88ff7bd13d9602b61d8db3506afaca3e01bee519 Mon Sep 17 00:00:00 2001 From: Hong Ngoc Nguyen Date: Tue, 13 Feb 2024 15:40:55 -0500 Subject: [PATCH] [APT-9577] Add DRM for downloads for offline usage : code improvement : update and add some missing kdocs --- .../scribd/armadillo/download/drm/DrmLicenseDownloader.kt | 2 +- .../src/main/java/com/scribd/armadillo/models/Models.kt | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Armadillo/src/main/java/com/scribd/armadillo/download/drm/DrmLicenseDownloader.kt b/Armadillo/src/main/java/com/scribd/armadillo/download/drm/DrmLicenseDownloader.kt index 60ab4b2..41c1486 100644 --- a/Armadillo/src/main/java/com/scribd/armadillo/download/drm/DrmLicenseDownloader.kt +++ b/Armadillo/src/main/java/com/scribd/armadillo/download/drm/DrmLicenseDownloader.kt @@ -14,7 +14,7 @@ internal interface DrmLicenseDownloader { /** * Download and persist the DRM license - * @return the key ID of the DRM license. This key ID can be used to fetch the license from storage + * @return object containing information about the downloaded DRM license */ suspend fun downloadDrmLicense( requestUrl: String, diff --git a/Armadillo/src/main/java/com/scribd/armadillo/models/Models.kt b/Armadillo/src/main/java/com/scribd/armadillo/models/Models.kt index dcfe0ab..2b1b472 100644 --- a/Armadillo/src/main/java/com/scribd/armadillo/models/Models.kt +++ b/Armadillo/src/main/java/com/scribd/armadillo/models/Models.kt @@ -144,6 +144,13 @@ data class Chapter( data class DrmInfo(val drmType: DrmType, val licenseServer: String, val drmHeaders: Map = emptyMap()) : Serializable +/** + * Object representing information about a downloaded DRM license. + * + * @param drmKeyId ID used to identify and to retrieve the downloaded license from local storage + * @param drmType the type of DRM solution of this license + * @param licenseServer the URL of the license server + */ @kotlinx.serialization.Serializable data class DrmDownload( val drmKeyId: ByteArray,