LcpService

interface LcpService

Service used to acquire and open publications protected with LCP.

Types

Link copied to clipboard
data class AcquiredPublication(val localFile: File, val suggestedFilename: String, val format: Format, val licenseDocument: LicenseDocument)

Information about an acquired publication protected with LCP.

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract suspend fun acquirePublication(lcpl: File, onProgress: (Double) -> Unit = {}): Try<LcpService.AcquiredPublication, LcpError>

Acquires a protected publication from a standalone LCPL file.

abstract suspend fun acquirePublication(lcpl: ByteArray, onProgress: (Double) -> Unit = {}): Try<LcpService.AcquiredPublication, LcpError>

Acquires a protected publication from a standalone LCPL's bytes.

Link copied to clipboard

Creates a ContentProtection instance which can be used with a Streamer to unlock LCP protected publications.

Link copied to clipboard
abstract suspend fun injectLicenseDocument(licenseDocument: LicenseDocument, publicationFile: File): Try<Unit, LcpError>

Injects a licenseDocument into the given publicationFile package.

Link copied to clipboard
abstract suspend fun retrieveLicense(asset: Asset, authentication: LcpAuthenticating, allowUserInteraction: Boolean): Try<LcpLicense, LcpError>

Opens the LCP license of a protected publication, to access its DRM metadata and decipher its content. If the updated license cannot be stored into the Asset, you'll get an exception if the license points to a LSD server that cannot be reached, for instance because no Internet gateway is available.

Link copied to clipboard

Retrieves the license document from a LCP-protected publication asset.