Skip to content

Commit 157b218

Browse files
committed
Support for the new 2.x LCP Profiles (#510)
1 parent 7649378 commit 157b218

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@ All notable changes to this project will be documented in this file. Take a look
44

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

7-
<!-- ## [Unreleased] -->
7+
## [Unreleased]
8+
9+
### Added
10+
11+
#### LCP
12+
13+
* [#509](https://github.com/readium/kotlin-toolkit/issues/509) Support for the new 2.x LCP Profiles.
14+
815

916
## [2.4.0]
1017

readium/lcp/src/main/java/org/readium/r2/lcp/license/LicenseValidation.kt

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
package org.readium.r2.lcp.license
1111

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

32-
private val supportedProfiles = listOf("http://readium.org/lcp/basic-profile", "http://readium.org/lcp/profile-1.0")
31+
private val supportedProfiles = listOf(
32+
"http://readium.org/lcp/basic-profile",
33+
"http://readium.org/lcp/profile-1.0",
34+
"http://readium.org/lcp/profile-2.0",
35+
"http://readium.org/lcp/profile-2.1",
36+
"http://readium.org/lcp/profile-2.2",
37+
"http://readium.org/lcp/profile-2.3",
38+
"http://readium.org/lcp/profile-2.4",
39+
"http://readium.org/lcp/profile-2.5",
40+
"http://readium.org/lcp/profile-2.6",
41+
"http://readium.org/lcp/profile-2.7",
42+
"http://readium.org/lcp/profile-2.8",
43+
"http://readium.org/lcp/profile-2.9"
44+
)
3345

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

0 commit comments

Comments
 (0)