Skip to content

Commit bbf59e9

Browse files
authored
Remove deprecated symbols (#589)
1 parent d177e72 commit bbf59e9

File tree

100 files changed

+28
-5980
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+28
-5980
lines changed

readium/adapters/pdfium/document/src/main/java/org/readium/adapters/pdfium/document/Deprecated.kt

Lines changed: 0 additions & 15 deletions
This file was deleted.

readium/adapters/pdfium/navigator/src/main/java/org/readium/adapters/pdfium/navigator/Deprecated.kt

Lines changed: 0 additions & 82 deletions
This file was deleted.

readium/adapters/pspdfkit/document/src/main/java/org/readium/adapters/pspdfkit/document/Deprecated.kt

Lines changed: 0 additions & 15 deletions
This file was deleted.

readium/adapters/pspdfkit/navigator/src/main/java/org/readium/adapters/pspdfkit/navigator/Deprecated.kt

Lines changed: 0 additions & 82 deletions
This file was deleted.

readium/lcp/src/main/java/org/readium/r2/lcp/LcpAuthenticating.kt

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -96,43 +96,3 @@ public interface LcpAuthenticating {
9696
get() = document.user
9797
}
9898
}
99-
100-
@Deprecated(
101-
"Renamed to `LcpAuthenticating`",
102-
replaceWith = ReplaceWith("LcpAuthenticating"),
103-
level = DeprecationLevel.ERROR
104-
)
105-
public typealias LCPAuthenticating = LcpAuthenticating
106-
107-
@Deprecated("Not used anymore", level = DeprecationLevel.ERROR)
108-
public interface LCPAuthenticationDelegate
109-
110-
@Deprecated(
111-
"Renamed to `LcpAuthenticating.AuthenticationReason`",
112-
replaceWith = ReplaceWith("LcpAuthenticating.AuthenticationReason"),
113-
level = DeprecationLevel.ERROR
114-
)
115-
public typealias LCPAuthenticationReason = LcpAuthenticating.AuthenticationReason
116-
117-
@Deprecated(
118-
"Renamed to `LcpAuthenticating.AuthenticatedLicense`",
119-
replaceWith = ReplaceWith("LcpAuthenticating.AuthenticatedLicense"),
120-
level = DeprecationLevel.ERROR
121-
)
122-
public typealias LCPAuthenticatedLicense = LcpAuthenticating.AuthenticatedLicense
123-
124-
@Deprecated(
125-
"Renamed to `PassphraseNotFound`",
126-
replaceWith = ReplaceWith("PassphraseNotFound"),
127-
level = DeprecationLevel.ERROR
128-
)
129-
public val LcpAuthenticating.AuthenticationReason.Companion.passphraseNotFound: LcpAuthenticating.AuthenticationReason
130-
get() = LcpAuthenticating.AuthenticationReason.PassphraseNotFound
131-
132-
@Deprecated(
133-
"Renamed to `InvalidPassphrase`",
134-
replaceWith = ReplaceWith("InvalidPassphrase"),
135-
level = DeprecationLevel.ERROR
136-
)
137-
public val LcpAuthenticating.AuthenticationReason.Companion.invalidPassphrase: LcpAuthenticating.AuthenticationReason
138-
get() = LcpAuthenticating.AuthenticationReason.InvalidPassphrase

readium/lcp/src/main/java/org/readium/r2/lcp/LcpError.kt

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -251,17 +251,3 @@ public sealed class LcpError(
251251
}
252252

253253
internal class LcpException(val error: LcpError) : Exception(error.message, ErrorException(error))
254-
255-
@Deprecated(
256-
"Renamed to `LcpException`",
257-
replaceWith = ReplaceWith("LcpException"),
258-
level = DeprecationLevel.ERROR
259-
)
260-
public typealias LCPError = LcpError
261-
262-
@Deprecated(
263-
"Use `getUserMessage()` instead",
264-
replaceWith = ReplaceWith("getUserMessage(context)"),
265-
level = DeprecationLevel.ERROR
266-
)
267-
public val LcpError.errorDescription: String get() = message

readium/lcp/src/main/java/org/readium/r2/lcp/LcpLicense.kt

Lines changed: 4 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,14 @@
66

77
package org.readium.r2.lcp
88

9-
import java.net.URL
10-
import kotlinx.coroutines.DelicateCoroutinesApi
11-
import kotlinx.coroutines.GlobalScope
129
import kotlinx.coroutines.flow.StateFlow
13-
import kotlinx.coroutines.launch
14-
import kotlinx.coroutines.runBlocking
15-
import org.joda.time.DateTime
1610
import org.readium.r2.lcp.license.model.LicenseDocument
1711
import org.readium.r2.lcp.license.model.StatusDocument
1812
import org.readium.r2.shared.publication.services.ContentProtectionService
1913
import org.readium.r2.shared.util.Closeable
2014
import org.readium.r2.shared.util.Instant
2115
import org.readium.r2.shared.util.Try
2216
import org.readium.r2.shared.util.Url
23-
import org.readium.r2.shared.util.toDebugDescription
24-
import timber.log.Timber
2517

2618
/**
2719
* Opened license, used to decipher a protected publication and manage its license.
@@ -67,7 +59,10 @@ public interface LcpLicense : ContentProtectionService.UserRights, Closeable {
6759
* @param prefersWebPage Indicates whether the loan should be renewed through a web page if
6860
* available, instead of programmatically.
6961
*/
70-
public suspend fun renewLoan(listener: RenewListener, prefersWebPage: Boolean = false): Try<Instant?, LcpError>
62+
public suspend fun renewLoan(
63+
listener: RenewListener,
64+
prefersWebPage: Boolean = false
65+
): Try<Instant?, LcpError>
7166

7267
/**
7368
* Can the user return the loaned publication?
@@ -108,68 +103,4 @@ public interface LcpLicense : ContentProtectionService.UserRights, Closeable {
108103
*/
109104
public suspend fun openWebPage(url: Url)
110105
}
111-
112-
@Deprecated(
113-
"Use `license.encryption.profile` instead",
114-
ReplaceWith("license.encryption.profile"),
115-
level = DeprecationLevel.ERROR
116-
)
117-
public val encryptionProfile: String? get() =
118-
license.encryption.profile
119-
120-
@Deprecated(
121-
"Use `decrypt()` with coroutines instead",
122-
ReplaceWith("decrypt(data)"),
123-
level = DeprecationLevel.ERROR
124-
)
125-
public fun decipher(data: ByteArray): ByteArray? =
126-
runBlocking { decrypt(data) }
127-
.onFailure { Timber.e(it.toDebugDescription()) }
128-
.getOrNull()
129-
130-
@Deprecated(
131-
"Use `renewLoan` with `RenewListener` instead",
132-
ReplaceWith("renewLoan(LcpLicense.RenewListener)"),
133-
level = DeprecationLevel.ERROR
134-
)
135-
public suspend fun renewLoan(end: DateTime?, urlPresenter: suspend (URL) -> Unit): Try<Unit, LcpError> = Try.success(
136-
Unit
137-
)
138-
139-
@Deprecated(
140-
"Use `renewLoan` with `RenewListener` instead",
141-
ReplaceWith("renewLoan(LcpLicense.RenewListener)"),
142-
level = DeprecationLevel.ERROR
143-
)
144-
public fun renewLoan(
145-
end: DateTime?,
146-
present: (URL, dismissed: () -> Unit) -> Unit,
147-
completion: (LcpError?) -> Unit
148-
) {}
149-
150-
@Deprecated(
151-
"Use `returnPublication()` with coroutines instead",
152-
ReplaceWith("returnPublication"),
153-
level = DeprecationLevel.ERROR
154-
)
155-
@DelicateCoroutinesApi
156-
public fun returnPublication(completion: (LcpError?) -> Unit) {
157-
GlobalScope.launch {
158-
completion(returnPublication().failureOrNull())
159-
}
160-
}
161106
}
162-
163-
@Deprecated(
164-
"Renamed to `LcpService`",
165-
replaceWith = ReplaceWith("LcpService"),
166-
level = DeprecationLevel.ERROR
167-
)
168-
public typealias LCPService = LcpService
169-
170-
@Deprecated(
171-
"Renamed to `LcpLicense`",
172-
replaceWith = ReplaceWith("LcpLicense"),
173-
level = DeprecationLevel.ERROR
174-
)
175-
public typealias LCPLicense = LcpLicense

0 commit comments

Comments
 (0)