ContentProtection

Bridge between a Content Protection technology and the Readium toolkit.

Its responsibilities are to:

Inheritors

Types

Link copied to clipboard
sealed class OpenError : Error
Link copied to clipboard
data class OpenResult(val asset: Asset, val onCreatePublication: Publication.Builder.() -> Unit = {})

Holds the result of opening an Asset with a ContentProtection.

Link copied to clipboard
value class Scheme(val uri: String)

Represents a specific Content Protection technology, uniquely identified with an uri.

Functions

Link copied to clipboard
abstract suspend fun open(asset: Asset, credentials: String?, allowUserInteraction: Boolean): Try<ContentProtection.OpenResult, ContentProtection.OpenError>

Attempts to unlock a potentially protected publication asset.