Skip to content

Commit

Permalink
Support for the new 2.x LCP Profiles (#510)
Browse files Browse the repository at this point in the history
  • Loading branch information
mickael-menu committed May 6, 2024
1 parent 7649378 commit 157b218
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ All notable changes to this project will be documented in this file. Take a look

**Warning:** Features marked as *experimental* may change or be removed in a future release without notice. Use with caution.

<!-- ## [Unreleased] -->
## [Unreleased]

### Added

#### LCP

* [#509](https://github.com/readium/kotlin-toolkit/issues/509) Support for the new 2.x LCP Profiles.


## [2.4.0]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

package org.readium.r2.lcp.license

import java.util.*
import kotlin.time.Duration.Companion.seconds
import kotlin.time.ExperimentalTime
import kotlinx.coroutines.runBlocking
Expand All @@ -29,7 +28,20 @@ internal sealed class Either<A, B> {
class Right<A, B>(val right: B) : Either<A, B>()
}

private val supportedProfiles = listOf("http://readium.org/lcp/basic-profile", "http://readium.org/lcp/profile-1.0")
private val supportedProfiles = listOf(
"http://readium.org/lcp/basic-profile",
"http://readium.org/lcp/profile-1.0",
"http://readium.org/lcp/profile-2.0",
"http://readium.org/lcp/profile-2.1",
"http://readium.org/lcp/profile-2.2",
"http://readium.org/lcp/profile-2.3",
"http://readium.org/lcp/profile-2.4",
"http://readium.org/lcp/profile-2.5",
"http://readium.org/lcp/profile-2.6",
"http://readium.org/lcp/profile-2.7",
"http://readium.org/lcp/profile-2.8",
"http://readium.org/lcp/profile-2.9"
)

internal typealias Context = Either<LcpClient.Context, LcpException.LicenseStatus>

Expand Down

0 comments on commit 157b218

Please sign in to comment.