From e534cf0b176b73be90ec2dee4b3163779fd82fc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mickae=CC=88l=20Menu?= Date: Thu, 15 May 2025 17:23:40 +0200 Subject: [PATCH 1/2] Clean up deprecated APIs --- .../Adapters/GCDWebServer/GCDHTTPServer.swift | 4 - Sources/LCP/LCPAcquisition.swift | 38 -- Sources/LCP/LCPLicense.swift | 10 - Sources/LCP/LCPService.swift | 35 -- .../LCP/License/Model/Components/Link.swift | 4 - .../Navigator/Audiobook/AudioNavigator.swift | 12 - .../CBZ/CBZNavigatorViewController.swift | 8 - .../EPUB/EPUBNavigatorViewController.swift | 21 - .../EPUB/EPUBNavigatorViewModel.swift | 9 - Sources/Navigator/EPUB/UserSettings.swift | 33 -- Sources/Navigator/EditingAction.swift | 3 - Sources/Navigator/Navigator.swift | 20 - .../PDF/PDFNavigatorViewController.swift | 4 - Sources/Navigator/TTS/AVTTSEngine.swift | 8 - Sources/Navigator/TTS/TTSEngine.swift | 9 - Sources/Navigator/VisualNavigator.swift | 21 - Sources/Shared/Logger/Logger.swift | 5 - .../Shared/Publication/Asset/FileAsset.swift | 14 - .../Publication/Asset/PublicationAsset.swift | 14 - Sources/Shared/Publication/Link.swift | 46 -- Sources/Shared/Publication/Locator.swift | 9 - Sources/Shared/Publication/Manifest.swift | 29 -- Sources/Shared/Publication/Metadata.swift | 77 ---- Sources/Shared/Publication/Properties.swift | 8 - .../Publication/Publication+Deprecated.swift | 14 - Sources/Shared/Publication/Publication.swift | 66 --- .../ContentProtectionService.swift | 6 - .../Services/Cover/CoverService.swift | 3 - .../Services/PublicationService.swift | 6 - .../Services/Search/SearchService.swift | 28 -- .../Services/Search/StringSearchService.swift | 2 - .../User Settings/UserProperties.swift | 148 ------- .../User Settings/UserSettings.swift | 30 -- Sources/Shared/Toolkit/Archive/Archive.swift | 67 --- .../Toolkit/Archive/ExplodedArchive.swift | 11 - .../Shared/Toolkit/CancellableResult.swift | 127 ------ .../Toolkit/Data/Container/Fetcher.swift | 44 -- .../Toolkit/Data/Resource/LazyResource.swift | 10 - .../Toolkit/Data/Resource/Resource.swift | 26 -- Sources/Shared/Toolkit/Deferred.swift | 408 ------------------ Sources/Shared/Toolkit/DownloadSession.swift | 129 ------ Sources/Shared/Toolkit/Extensions/URL.swift | 73 ---- Sources/Shared/Toolkit/Format/MediaType.swift | 23 - .../Toolkit/Format/MediaTypeSniffer.swift | 85 ---- Sources/Shared/Toolkit/HREF.swift | 13 - Sources/Shared/Toolkit/HTTP/HTTPClient.swift | 56 --- Sources/Shared/Toolkit/HTTP/HTTPError.swift | 14 - .../Shared/Toolkit/Media/AudioSession.swift | 5 - .../Shared/Toolkit/Media/NowPlayingInfo.swift | 3 - Sources/Shared/Toolkit/ResourcesServer.swift | 25 -- .../Streamer/Server/PublicationServer.swift | 27 -- .../Server/WebServerResourceResponse.swift | 10 - Sources/Streamer/Streamer.swift | 20 - 53 files changed, 1920 deletions(-) delete mode 100644 Sources/LCP/LCPAcquisition.swift delete mode 100644 Sources/Navigator/EPUB/UserSettings.swift delete mode 100644 Sources/Shared/Publication/Asset/FileAsset.swift delete mode 100644 Sources/Shared/Publication/Asset/PublicationAsset.swift delete mode 100644 Sources/Shared/Publication/Publication+Deprecated.swift delete mode 100644 Sources/Shared/Publication/User Settings/UserProperties.swift delete mode 100644 Sources/Shared/Publication/User Settings/UserSettings.swift delete mode 100644 Sources/Shared/Toolkit/Archive/Archive.swift delete mode 100644 Sources/Shared/Toolkit/Archive/ExplodedArchive.swift delete mode 100644 Sources/Shared/Toolkit/CancellableResult.swift delete mode 100644 Sources/Shared/Toolkit/Data/Container/Fetcher.swift delete mode 100644 Sources/Shared/Toolkit/Data/Resource/LazyResource.swift delete mode 100644 Sources/Shared/Toolkit/Deferred.swift delete mode 100644 Sources/Shared/Toolkit/DownloadSession.swift delete mode 100644 Sources/Shared/Toolkit/Extensions/URL.swift delete mode 100644 Sources/Shared/Toolkit/Format/MediaTypeSniffer.swift delete mode 100644 Sources/Shared/Toolkit/HREF.swift delete mode 100644 Sources/Shared/Toolkit/ResourcesServer.swift delete mode 100644 Sources/Streamer/Server/PublicationServer.swift delete mode 100644 Sources/Streamer/Server/WebServerResourceResponse.swift delete mode 100644 Sources/Streamer/Streamer.swift diff --git a/Sources/Adapters/GCDWebServer/GCDHTTPServer.swift b/Sources/Adapters/GCDWebServer/GCDHTTPServer.swift index 7f65c15f2..3df551fd1 100644 --- a/Sources/Adapters/GCDWebServer/GCDHTTPServer.swift +++ b/Sources/Adapters/GCDWebServer/GCDHTTPServer.swift @@ -19,10 +19,6 @@ public enum GCDHTTPServerError: Error { /// Implementation of `HTTPServer` using ReadiumGCDWebServer under the hood. public class GCDHTTPServer: HTTPServer, Loggable { - /// Shared instance of the HTTP server. - @available(*, unavailable, message: "Create your own shared instance") - public static var shared: GCDHTTPServer { fatalError() } - /// The actual underlying HTTP server instance. private let server = ReadiumGCDWebServer() diff --git a/Sources/LCP/LCPAcquisition.swift b/Sources/LCP/LCPAcquisition.swift deleted file mode 100644 index 5fd1a27b3..000000000 --- a/Sources/LCP/LCPAcquisition.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// Copyright 2025 Readium Foundation. All rights reserved. -// Use of this source code is governed by the BSD-style license -// available in the top-level LICENSE file of the project. -// - -import Foundation -import ReadiumShared - -/// Represents an on-going LCP acquisition task. -/// -/// You can cancel the on-going download with `acquisition.cancel()`. -@available(*, deprecated) -public final class LCPAcquisition: Loggable { - /// Informations about an acquired publication protected with LCP. - @available(*, unavailable, renamed: "LCPAcquiredPublication") - public struct Publication { - /// Path to the downloaded publication. - /// You must move this file to the user library's folder. - public let localURL: FileURL - - /// Filename that should be used for the publication when importing it in the user library. - public let suggestedFilename: String - } - - @available(*, unavailable, renamed: "LCPProgress") - /// Percent-based progress of the acquisition. - public enum Progress { - /// Undetermined progress, a spinner should be shown to the user. - case indefinite - /// A finite progress from 0.0 to 1.0, a progress bar should be shown to the user. - case percent(Float) - } - - /// Cancels the acquisition. - @available(*, unavailable, message: "This is not needed with the new async variants") - public func cancel() {} -} diff --git a/Sources/LCP/LCPLicense.swift b/Sources/LCP/LCPLicense.swift index bc664c6b7..3d815c78a 100644 --- a/Sources/LCP/LCPLicense.swift +++ b/Sources/LCP/LCPLicense.swift @@ -52,14 +52,4 @@ public extension LCPLicense { func renewLoan(with delegate: LCPRenewDelegate) async -> Result { await renewLoan(with: delegate, prefersWebPage: false) } - - @available(*, unavailable, message: "Use the async variant.") - func renewLoan(with delegate: LCPRenewDelegate, prefersWebPage: Bool, completion: @escaping (CancellableResult) -> Void) { - fatalError() - } - - @available(*, unavailable, message: "Use the async variant.") - func returnPublication(completion: @escaping (LCPError?) -> Void) { - fatalError() - } } diff --git a/Sources/LCP/LCPService.swift b/Sources/LCP/LCPService.swift index a28932631..c8869289d 100644 --- a/Sources/LCP/LCPService.swift +++ b/Sources/LCP/LCPService.swift @@ -21,14 +21,6 @@ public final class LCPService: Loggable { private let licenses: LicensesService private let assetRetriever: AssetRetriever - @available(*, unavailable, message: "Provide a `licenseRepository` and `passphraseRepository`, following the migration guide") - public init( - client: LCPClient, - httpClient: HTTPClient = DefaultHTTPClient() - ) { - fatalError() - } - /// - Parameter deviceName: Device name used when registering a license to an LSD server. /// If not provided, the device name will be the default `UIDevice.current.name`. public init( @@ -72,11 +64,6 @@ public final class LCPService: Loggable { self.assetRetriever = assetRetriever } - @available(*, unavailable, message: "Check the conformance of the file `Format` to the `lcp` specification instead.") - public func isLCPProtected(_ file: FileURL) async -> Bool { - fatalError() - } - /// Acquires a protected publication from an LCPL. public func acquirePublication( from lcpl: LicenseDocumentSource, @@ -139,28 +126,6 @@ public final class LCPService: Loggable { return .failure(.wrap(error)) } } - - @available(*, unavailable, message: "Use the async variant.") - @discardableResult - public func acquirePublication(from lcpl: FileURL, onProgress: @escaping (LCPAcquisition.Progress) -> Void = { _ in }, completion: @escaping (CancellableResult) -> Void) -> LCPAcquisition { - fatalError() - } - - @available(*, unavailable, message: "Use the async variant using an `Asset`.") - public func retrieveLicense( - from publication: FileURL, - authentication: LCPAuthenticating = LCPDialogAuthentication(), - allowUserInteraction: Bool = true, - sender: Any? = nil, - completion: @escaping (CancellableResult) -> Void - ) { - fatalError() - } - - @available(*, unavailable, message: "Pass explicitly an `LCPDialogAuthentication()` for the same behavior as before") - public func contentProtection() -> ContentProtection { - contentProtection(with: LCPDialogAuthentication()) - } } /// Source of an LCP License Document (LCPL) file. diff --git a/Sources/LCP/License/Model/Components/Link.swift b/Sources/LCP/License/Model/Components/Link.swift index 03b76538d..956a6cfe3 100644 --- a/Sources/LCP/License/Model/Components/Link.swift +++ b/Sources/LCP/License/Model/Components/Link.swift @@ -60,10 +60,6 @@ public struct Link { return HTTPURL(string: href) } - /// Expands the href without any template context. - @available(*, unavailable, message: "Use url() instead") - var url: URL? { fatalError() } - var mediaType: MediaType? { type.flatMap { MediaType($0) } } diff --git a/Sources/Navigator/Audiobook/AudioNavigator.swift b/Sources/Navigator/Audiobook/AudioNavigator.swift index e09bb0baf..0c4fcdf6d 100644 --- a/Sources/Navigator/Audiobook/AudioNavigator.swift +++ b/Sources/Navigator/Audiobook/AudioNavigator.swift @@ -533,15 +533,3 @@ private extension CMTime { isNumeric ? seconds : 0 } } - -@available(*, unavailable, renamed: "AudioNavigator") -public typealias _AudioNavigator = AudioNavigator - -@available(*, unavailable, renamed: "AudioNavigatorDelegate") -public typealias _AudioNavigatorDelegate = AudioNavigatorDelegate - -@available(*, unavailable, renamed: "AudioNavigator") -public typealias _MediaNavigator = AudioNavigator - -@available(*, unavailable, renamed: "AudioNavigatorDelegate") -public typealias _MediaNavigatorDelegate = AudioNavigatorDelegate diff --git a/Sources/Navigator/CBZ/CBZNavigatorViewController.swift b/Sources/Navigator/CBZ/CBZNavigatorViewController.swift index bddabb3a1..66c76e565 100644 --- a/Sources/Navigator/CBZ/CBZNavigatorViewController.swift +++ b/Sources/Navigator/CBZ/CBZNavigatorViewController.swift @@ -76,11 +76,6 @@ open class CBZNavigatorViewController: } } - @available(*, unavailable, message: "See the 2.5.0 migration guide to migrate the HTTP server") - public convenience init(publication: Publication, initialLocation: Locator? = nil) { - fatalError() - } - private let tasks = CancellableTasks() private init( @@ -169,9 +164,6 @@ open class CBZNavigatorViewController: return imageViewController.index } - @available(*, unavailable, renamed: "currentLocation") - public var currentPosition: Locator? { fatalError() } - @discardableResult private func goToResourceAtIndex(_ index: Int, options: NavigatorGoOptions, isJump: Bool) async -> Bool { guard let imageViewController = imageViewController(at: index) else { diff --git a/Sources/Navigator/EPUB/EPUBNavigatorViewController.swift b/Sources/Navigator/EPUB/EPUBNavigatorViewController.swift index e84ae40cf..c4ffc7e60 100644 --- a/Sources/Navigator/EPUB/EPUBNavigatorViewController.swift +++ b/Sources/Navigator/EPUB/EPUBNavigatorViewController.swift @@ -119,9 +119,6 @@ open class EPUBNavigatorViewController: InputObservableViewController, didSet { updateCurrentLocation() } } - @available(*, unavailable, message: "See the 2.5.0 migration guide to migrate to the Preferences API") - public var userSettings: Any { fatalError() } - /// Navigation state. private enum State: Equatable { /// Initializing the navigator. @@ -278,16 +275,6 @@ open class EPUBNavigatorViewController: InputObservableViewController, ) } - @available(*, unavailable, message: "See the 2.5.0 migration guide to migrate the HTTP server and settings API") - public convenience init( - publication: Publication, - initialLocation: Locator? = nil, - resourcesServer: ResourcesServer, - config: Configuration = .init() - ) { - fatalError() - } - private init( viewModel: EPUBNavigatorViewModel, initialLocation: Locator?, @@ -470,9 +457,6 @@ open class EPUBNavigatorViewController: InputObservableViewController, return moved } - @available(*, unavailable, message: "See the 2.5.0 migration guide to migrate to the Preferences API") - public func updateUserSettingStyle() {} - // MARK: - Pagination and spreads private var paginationView: PaginationView? @@ -851,11 +835,6 @@ open class EPUBNavigatorViewController: InputObservableViewController, return await spreadView.evaluateScript(script) } - @available(*, unavailable, message: "Use the async variant") - public func evaluateJavaScript(_ script: String, completion: ((Result) -> Void)? = nil) { - fatalError() - } - // MARK: - UIAccessibilityAction override open func accessibilityScroll(_ direction: UIAccessibilityScrollDirection) -> Bool { diff --git a/Sources/Navigator/EPUB/EPUBNavigatorViewModel.swift b/Sources/Navigator/EPUB/EPUBNavigatorViewModel.swift index 03c8c516c..73d9cb14e 100644 --- a/Sources/Navigator/EPUB/EPUBNavigatorViewModel.swift +++ b/Sources/Navigator/EPUB/EPUBNavigatorViewModel.swift @@ -85,15 +85,6 @@ final class EPUBNavigatorViewModel: Loggable { } } - @available(*, unavailable, message: "See the 2.5.0 migration guide to migrate the Settings API") - convenience init( - publication: Publication, - config: EPUBNavigatorViewController.Configuration, - resourcesServer: ResourcesServer - ) { - fatalError() - } - private init( publication: Publication, config: EPUBNavigatorViewController.Configuration, diff --git a/Sources/Navigator/EPUB/UserSettings.swift b/Sources/Navigator/EPUB/UserSettings.swift deleted file mode 100644 index 481aa866a..000000000 --- a/Sources/Navigator/EPUB/UserSettings.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// Copyright 2025 Readium Foundation. All rights reserved. -// Use of this source code is governed by the BSD-style license -// available in the top-level LICENSE file of the project. -// - -import Foundation -import UIKit - -import ReadiumShared - -@available(*, unavailable, message: "Take a look at the migration guide to migrate to the new Preferences API") -public class UserSettings { - public init( - hyphens: Bool = false, - fontSize: Float = 100, - fontFamily: Int = 0, - appearance: Int = 0, - verticalScroll: Bool = false, - publisherDefaults: Bool = true, - textAlignment: Int = 0, - columnCount: Int = 0, - wordSpacing: Float = 0, - letterSpacing: Float = 0, - pageMargins: Float = 1, - lineHeight: Float = 1.5, - paragraphMargins: Float? = nil, - textColor: String? = nil, - backgroundColor: String? = nil - ) {} - - public func save() {} -} diff --git a/Sources/Navigator/EditingAction.swift b/Sources/Navigator/EditingAction.swift index 3a3b4267e..7203c9b9a 100644 --- a/Sources/Navigator/EditingAction.swift +++ b/Sources/Navigator/EditingAction.swift @@ -31,9 +31,6 @@ public struct EditingAction: Hashable { /// Search Web. public static let lookup = EditingAction(kind: .native(["lookup", "_lookup:", "define:", "_define:"])) - @available(*, unavailable, message: "lookup and define were merged", renamed: "lookup") - public static let define = lookup - /// Translate the text selection. public static let translate = EditingAction(kind: .native(["translate:", "_translate:"])) diff --git a/Sources/Navigator/Navigator.swift b/Sources/Navigator/Navigator.swift index 0672675c5..36652b395 100644 --- a/Sources/Navigator/Navigator.swift +++ b/Sources/Navigator/Navigator.swift @@ -97,26 +97,6 @@ public extension Navigator { func goBackward(options: NavigatorGoOptions = NavigatorGoOptions()) async -> Bool { await goBackward(options: options) } - - @available(*, unavailable, message: "Use the async variant") - func go(to locator: Locator, animated: Bool = false, completion: @escaping () -> Void = {}) -> Bool { - fatalError() - } - - @available(*, unavailable, message: "Use the async variant") - func go(to link: Link, animated: Bool = false, completion: @escaping () -> Void = {}) -> Bool { - fatalError() - } - - @available(*, unavailable, message: "Use the async variant") - func goForward(animated: Bool = false, completion: @escaping () -> Void = {}) -> Bool { - fatalError() - } - - @available(*, unavailable, message: "Use the async variant") - func goBackward(animated: Bool = false, completion: @escaping () -> Void = {}) -> Bool { - fatalError() - } } @MainActor public protocol NavigatorDelegate: AnyObject { diff --git a/Sources/Navigator/PDF/PDFNavigatorViewController.swift b/Sources/Navigator/PDF/PDFNavigatorViewController.swift index fe9bd063c..583ce374b 100644 --- a/Sources/Navigator/PDF/PDFNavigatorViewController.swift +++ b/Sources/Navigator/PDF/PDFNavigatorViewController.swift @@ -339,10 +339,6 @@ open class PDFNavigatorViewController: ?? pdfViewDefaultBackgroundColor } - /// Override to customize the PDFDocumentView. - @available(*, unavailable, message: "Override the PDFNavigatorDelegate instead") - open func setupPDFView() {} - @objc private func didTap(_ gesture: UITapGestureRecognizer) { let location = gesture.location(in: view) let pointer = Pointer.touch(TouchPointer(id: ObjectIdentifier(gesture))) diff --git a/Sources/Navigator/TTS/AVTTSEngine.swift b/Sources/Navigator/TTS/AVTTSEngine.swift index 2bd5f818e..bf0a07007 100644 --- a/Sources/Navigator/TTS/AVTTSEngine.swift +++ b/Sources/Navigator/TTS/AVTTSEngine.swift @@ -47,14 +47,6 @@ public class AVTTSEngine: NSObject, TTSEngine, AVSpeechSynthesizerDelegate, Logg synthesizer.delegate = self } - @available(*, unavailable, message: "The audio session is now configured through the `PublicationSpeechSynthesizer`") - public convenience init( - audioSessionConfig: AudioSession.Configuration? = nil, - delegate: AVTTSEngineDelegate? = nil - ) { - self.init(delegate: delegate) - } - public lazy var availableVoices: [TTSVoice] = AVSpeechSynthesisVoice.speechVoices() .map { TTSVoice(voice: $0) } diff --git a/Sources/Navigator/TTS/TTSEngine.swift b/Sources/Navigator/TTS/TTSEngine.swift index b4c6f3443..754474e60 100644 --- a/Sources/Navigator/TTS/TTSEngine.swift +++ b/Sources/Navigator/TTS/TTSEngine.swift @@ -31,15 +31,6 @@ public extension TTSEngine { func voiceWithIdentifier(_ identifier: String) -> TTSVoice? { availableVoices.first { $0.identifier == identifier } } - - @available(*, unavailable, message: "Use the async variant") - func speak( - _ utterance: TTSUtterance, - onSpeakRange: @escaping (Range) -> Void, - completion: @escaping (Result) -> Void - ) -> Cancellable { - fatalError() - } } public enum TTSError: Error { diff --git a/Sources/Navigator/VisualNavigator.swift b/Sources/Navigator/VisualNavigator.swift index 36c94bb77..5c737b391 100644 --- a/Sources/Navigator/VisualNavigator.swift +++ b/Sources/Navigator/VisualNavigator.swift @@ -41,12 +41,6 @@ public protocol VisualNavigator: Navigator, InputObservable { func firstVisibleElementLocator() async -> Locator? } -public extension VisualNavigator { - /// Current reading progression direction. - @available(*, unavailable, message: "Use `presentation.readingProgression` instead", renamed: "presentation.readingProgression") - var readingProgression: ReadiumShared.ReadingProgression { fatalError() } -} - public extension VisualNavigator { func firstVisibleElementLocator() async -> Locator? { currentLocation @@ -71,21 +65,6 @@ public extension VisualNavigator { return await goBackward(options: options) } } - - @available(*, unavailable, message: "Use the async variant") - func firstVisibleElementLocator(completion: @escaping (Locator?) -> Void) { - fatalError() - } - - @available(*, unavailable, message: "Use the async variant") - func goLeft(animated: Bool = false, completion: @escaping () -> Void = {}) -> Bool { - fatalError() - } - - @available(*, unavailable, message: "Use the async variant") - func goRight(animated: Bool = false, completion: @escaping () -> Void = {}) -> Bool { - fatalError() - } } public struct VisualNavigatorPresentation { diff --git a/Sources/Shared/Logger/Logger.swift b/Sources/Shared/Logger/Logger.swift index 41406b9b4..d8ed23b87 100644 --- a/Sources/Shared/Logger/Logger.swift +++ b/Sources/Shared/Logger/Logger.swift @@ -6,11 +6,6 @@ import Foundation -@available(*, unavailable, renamed: "ReadiumEnableLog") -public func R2EnableLog(withMinimumSeverityLevel level: SeverityLevel, customLogger: LoggerType = LoggerStub()) { - fatalError() -} - /// Initialize the Logger. /// Default logger is the `LoggerStub` class /// diff --git a/Sources/Shared/Publication/Asset/FileAsset.swift b/Sources/Shared/Publication/Asset/FileAsset.swift deleted file mode 100644 index edafe5324..000000000 --- a/Sources/Shared/Publication/Asset/FileAsset.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// Copyright 2025 Readium Foundation. All rights reserved. -// Use of this source code is governed by the BSD-style license -// available in the top-level LICENSE file of the project. -// - -import Foundation - -/// Represents a publication stored as a file on the local file system. -@available(*, unavailable, message: "Use an `AssetRetriever` instead. See the migration guide.") -public final class FileAsset: PublicationAsset { - public init(url: URL, mediaType: String? = nil) {} - public init(url: URL, mediaType: MediaType?) {} -} diff --git a/Sources/Shared/Publication/Asset/PublicationAsset.swift b/Sources/Shared/Publication/Asset/PublicationAsset.swift deleted file mode 100644 index 9dba291b2..000000000 --- a/Sources/Shared/Publication/Asset/PublicationAsset.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// Copyright 2025 Readium Foundation. All rights reserved. -// Use of this source code is governed by the BSD-style license -// available in the top-level LICENSE file of the project. -// - -import Foundation - -/// Represents a digital medium (e.g. a file) offering access to a publication. -@available(*, unavailable, message: "Use an `AssetRetriever` instead. See the migration guide.") -public protocol PublicationAsset {} - -@available(*, unavailable, message: "Use an `AssetRetriever` instead. See the migration guide.") -public struct PublicationAssetDependencies {} diff --git a/Sources/Shared/Publication/Link.swift b/Sources/Shared/Publication/Link.swift index 4bf9a333b..4b6f745ee 100644 --- a/Sources/Shared/Publication/Link.swift +++ b/Sources/Shared/Publication/Link.swift @@ -150,9 +150,6 @@ public struct Link: JSONEquatable, Hashable, Sendable { ]) } - @available(*, unavailable, renamed: "mediaType") - public var type: String? { mediaType?.string } - /// Returns the URL represented by this link's HREF. /// /// If the HREF is a template, the `parameters` are used to expand it @@ -204,38 +201,10 @@ public struct Link: JSONEquatable, Hashable, Sendable { templated = false } - // MARK: Copy - - @available(*, unavailable, message: "Make a mutable copy of the struct instead") - /// Makes a copy of the `Link`, after modifying some of its properties. - public func copy( - href: String? = nil, - mediaType: MediaType?? = nil, - templated: Bool? = nil, - title: String?? = nil, - rels: [LinkRelation]? = nil, - properties: Properties? = nil, - height: Int?? = nil, - width: Int?? = nil, - bitrate: Double?? = nil, - duration: Double?? = nil, - languages: [String]? = nil, - alternates: [Link]? = nil, - children: [Link]? = nil - ) -> Link { - fatalError() - } - /// Merges in the given additional other `properties`. public mutating func addProperties(_ properties: JSONDictionary.Wrapped) { self.properties.add(properties) } - - /// Makes a copy of this `Link` after merging in the given additional other `properties`. - @available(*, unavailable, message: "Use `addProperties` on a mutable copy") - public func addingProperties(_ properties: [String: Any]) -> Link { - fatalError() - } } public extension Array where Element == Link { @@ -332,19 +301,4 @@ public extension Array where Element == Link { } } } - - @available(*, unavailable, message: "This API will be removed.") - func firstIndex(withProperty otherProperty: String, matching: T, recursively: Bool = false) -> Int? { - firstIndex { ($0.properties.otherProperties[otherProperty] as? T) == matching } - } - - @available(*, unavailable, renamed: "firstWithHREF") - func first(withHref href: String) -> Link? { - fatalError() - } - - @available(*, unavailable, renamed: "firstIndexWithHREF") - func firstIndex(withHref href: String) -> Int? { - fatalError() - } } diff --git a/Sources/Shared/Publication/Locator.swift b/Sources/Shared/Publication/Locator.swift index cb26b1f4e..92bacac49 100644 --- a/Sources/Shared/Publication/Locator.swift +++ b/Sources/Shared/Publication/Locator.swift @@ -24,9 +24,6 @@ public struct Locator: Hashable, CustomStringConvertible, Loggable, Sendable { /// Textual context of the locator. public var text: Text - @available(*, unavailable, renamed: "mediaType") - public var type: String { mediaType.string } - public init(href: T, mediaType: MediaType, title: String? = nil, locations: Locations = .init(), text: Text = .init()) { self.href = href.anyURL self.mediaType = mediaType @@ -95,9 +92,6 @@ public struct Locator: Hashable, CustomStringConvertible, Loggable, Sendable { ) } - @available(*, unavailable, message: "This may create an incorrect `Locator` if the link `type` is missing. Use `publication.locate(Link)` instead.") - public init(link: Link) { fatalError() } - public var json: JSONDictionary.Wrapped { makeJSON([ "href": href.string, @@ -342,9 +336,6 @@ public extension Array where Element == Locator { } } -@available(*, unavailable, renamed: "LocatorCollection") -public typealias _LocatorCollection = LocatorCollection - /// Represents a sequential list of `Locator` objects. /// /// For example, a search result or a list of positions. diff --git a/Sources/Shared/Publication/Manifest.swift b/Sources/Shared/Publication/Manifest.swift index 7a7445b93..72c867c3d 100644 --- a/Sources/Shared/Publication/Manifest.swift +++ b/Sources/Shared/Publication/Manifest.swift @@ -169,33 +169,4 @@ public struct Manifest: JSONEquatable, Hashable, Sendable { public func linksMatching(_ predicate: (Link) -> Bool) -> [Link] { (readingOrder + resources + links).filter(predicate) } - - @available(*, unavailable, renamed: "linkWithHREF") - public func link(withHREF href: String) -> Link? { - fatalError() - } - - @available(*, unavailable, renamed: "linkWithRel") - public func link(withRel rel: LinkRelation) -> Link? { - fatalError() - } - - @available(*, unavailable, renamed: "linksWithRel") - public func links(withRel rel: LinkRelation) -> [Link] { - fatalError() - } - - /// Makes a copy of the `Manifest`, after modifying some of its properties. - @available(*, unavailable, message: "Make a mutable copy of the struct instead") - public func copy( - context: [String]? = nil, - metadata: Metadata? = nil, - links: [Link]? = nil, - readingOrder: [Link]? = nil, - resources: [Link]? = nil, - tableOfContents: [Link]? = nil, - subcollections: [String: [PublicationCollection]]? = nil - ) -> Manifest { - fatalError() - } } diff --git a/Sources/Shared/Publication/Metadata.swift b/Sources/Shared/Publication/Metadata.swift index 1922cc0b7..3c0aaecff 100644 --- a/Sources/Shared/Publication/Metadata.swift +++ b/Sources/Shared/Publication/Metadata.swift @@ -233,81 +233,4 @@ public struct Metadata: Hashable, Loggable, WarningLogger, Sendable { public var belongsToSeries: [Collection] { belongsTo["series"] ?? [] } - - @available(*, unavailable, renamed: "readingProgression") - public var effectiveReadingProgression: ReadingProgression { fatalError() } - - /// Makes a copy of the `Metadata`, after modifying some of its properties. - @available(*, unavailable, message: "Make a mutable copy of the struct instead") - public func copy( - identifier: String?? = nil, - type: String?? = nil, - conformsTo: [Publication.Profile]? = nil, - title: LocalizedStringConvertible? = nil, - subtitle: LocalizedStringConvertible?? = nil, - accessibility: Accessibility?? = nil, - modified: Date?? = nil, - published: Date?? = nil, - languages: [String]? = nil, - sortAs: String?? = nil, - subjects: [Subject]? = nil, - authors: [Contributor]? = nil, - translators: [Contributor]? = nil, - editors: [Contributor]? = nil, - artists: [Contributor]? = nil, - illustrators: [Contributor]? = nil, - letterers: [Contributor]? = nil, - pencilers: [Contributor]? = nil, - colorists: [Contributor]? = nil, - inkers: [Contributor]? = nil, - narrators: [Contributor]? = nil, - contributors: [Contributor]? = nil, - publishers: [Contributor]? = nil, - imprints: [Contributor]? = nil, - readingProgression: ReadingProgression? = nil, - description: String?? = nil, - duration: Double?? = nil, - numberOfPages: Int?? = nil, - belongsTo: [String: [Collection]]? = nil, - belongsToCollections: [Collection]? = nil, - belongsToSeries: [Collection]? = nil, - tdm: TDM? = nil, - otherMetadata: JSONDictionary.Wrapped? = nil - ) -> Metadata { - Metadata( - identifier: identifier ?? self.identifier, - type: type ?? self.type, - conformsTo: conformsTo ?? self.conformsTo, - title: title ?? localizedTitle, - subtitle: subtitle ?? localizedSubtitle, - accessibility: accessibility ?? self.accessibility, - modified: modified ?? self.modified, - published: published ?? self.published, - languages: languages ?? self.languages, - sortAs: sortAs ?? self.sortAs, - subjects: subjects ?? self.subjects, - authors: authors ?? self.authors, - translators: translators ?? self.translators, - editors: editors ?? self.editors, - artists: artists ?? self.artists, - illustrators: illustrators ?? self.illustrators, - letterers: letterers ?? self.letterers, - pencilers: pencilers ?? self.pencilers, - colorists: colorists ?? self.colorists, - inkers: inkers ?? self.inkers, - narrators: narrators ?? self.narrators, - contributors: contributors ?? self.contributors, - publishers: publishers ?? self.publishers, - imprints: imprints ?? self.imprints, - readingProgression: readingProgression ?? self.readingProgression, - description: description ?? self.description, - duration: duration ?? self.duration, - numberOfPages: numberOfPages ?? self.numberOfPages, - belongsTo: belongsTo ?? self.belongsTo, - belongsToCollections: belongsToCollections ?? self.belongsToCollections, - belongsToSeries: belongsToSeries ?? self.belongsToSeries, - tdm: tdm ?? self.tdm, - otherMetadata: otherMetadata ?? self.otherMetadata - ) - } } diff --git a/Sources/Shared/Publication/Properties.swift b/Sources/Shared/Publication/Properties.swift index 11c252cca..44d5eb898 100644 --- a/Sources/Shared/Publication/Properties.swift +++ b/Sources/Shared/Publication/Properties.swift @@ -48,12 +48,4 @@ public struct Properties: Hashable, Loggable, WarningLogger, Sendable { public mutating func add(_ properties: JSONDictionary.Wrapped) { otherPropertiesJSON.json.merge(properties, uniquingKeysWith: { _, second in second }) } - - /// Makes a copy of this `Properties` after merging in the given additional other `properties`. - @available(*, unavailable, message: "Use `add` on a mutable copy") - public func adding(_ properties: JSONDictionary.Wrapped) -> Properties { - var copy = self - copy.add(properties) - return copy - } } diff --git a/Sources/Shared/Publication/Publication+Deprecated.swift b/Sources/Shared/Publication/Publication+Deprecated.swift deleted file mode 100644 index dcb72a00c..000000000 --- a/Sources/Shared/Publication/Publication+Deprecated.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// Copyright 2025 Readium Foundation. All rights reserved. -// Use of this source code is governed by the BSD-style license -// available in the top-level LICENSE file of the project. -// - -import Foundation - -public extension Publication { - @available(*, unavailable, message: "format and formatVersion are deprecated", renamed: "init(manifest:fetcher:servicesBuilder:)") - convenience init(manifest: Manifest, fetcher: Fetcher, servicesBuilder: PublicationServicesBuilder = .init(), format: Format = .unknown, formatVersion: String? = nil) { - fatalError() - } -} diff --git a/Sources/Shared/Publication/Publication.swift b/Sources/Shared/Publication/Publication.swift index d57d5b692..daf5c44e9 100644 --- a/Sources/Shared/Publication/Publication.swift +++ b/Sources/Shared/Publication/Publication.swift @@ -109,10 +109,6 @@ public class Publication: Closeable, Loggable { services.filter { $0 is T } as! [T] } - /// Sets the URL where this `Publication`'s RWPM manifest is served. - @available(*, unavailable, message: "Not used anymore") - public func setSelfLink(href: String?) { fatalError() } - /// Historically, we used to have "absolute" HREFs in the manifest: /// - starting with a `/` for packaged publications. /// - resolved to the `self` link for remote publications. @@ -160,25 +156,6 @@ public class Publication: Closeable, Loggable { public static let pdf = Profile("https://readium.org/webpub-manifest/profiles/pdf") } - /// Errors occurring while opening a Publication. - @available(*, unavailable, message: "Not used anymore") - public enum OpeningError: Error { - /// The file format could not be recognized by any parser. - case unsupportedFormat - /// The publication file was not found on the file system. - case notFound - /// The publication parser failed with the given underlying error. - case parsingFailed(Error) - /// We're not allowed to open the publication at all, for example because it expired. - case forbidden(Error?) - /// The publication can't be opened at the moment, for example because of a networking error. - /// This error is generally temporary, so the operation may be retried or postponed. - case unavailable(Error?) - /// The provided credentials are incorrect and we can't open the publication in a - /// `restricted` state (e.g. for a password-protected ZIP). - case incorrectCredentials - } - /// Holds the components of a `Publication` to build it. /// /// A `Publication`'s construction is distributed over the Streamer and its @@ -225,47 +202,4 @@ public class Publication: Closeable, Loggable { ) } } - - /// Format of the publication, if specified. - @available(*, unavailable, message: "Use publication.conforms(to:) to check the profile of a Publication") - public var format: Format { fatalError() } - /// Version of the publication's format, eg. 3 for EPUB 3 - @available(*, unavailable, message: "This API will be removed in a future version. If you still need it, please explain your use case at https://github.com/readium/swift-toolkit/issues/new") - public var formatVersion: String? { fatalError() } - - @available(*, unavailable, message: "Use publication.conforms(to:) to check the profile of a Publication") - public enum Format: Equatable, Hashable { - /// Formats natively supported by Readium. - case cbz, epub, pdf, webpub - /// Default value when the format is not specified. - case unknown - } - - @available(*, unavailable, message: "Take a look at the migration guide to migrate to the new Preferences API") - public var userProperties: UserProperties { fatalError() } - - @available(*, unavailable, message: "Take a look at the migration guide to migrate to the new Preferences API") - public var userSettingsUIPreset: [AnyHashable: Bool]? { - fatalError() - } - - @available(*, unavailable, message: "Take a look at the migration guide to migrate to the new Preferences API") - public var userSettingsUIPresetUpdated: (([AnyHashable: Bool]?) -> Void)? { - fatalError() - } - - @available(*, unavailable, renamed: "linkWithHREF") - public func link(withHREF href: String) -> Link? { - fatalError() - } - - @available(*, unavailable, renamed: "linkWithRel") - public func link(withRel rel: LinkRelation) -> Link? { - fatalError() - } - - @available(*, unavailable, renamed: "linksWithRel") - public func links(withRel rel: LinkRelation) -> [Link] { - fatalError() - } } diff --git a/Sources/Shared/Publication/Services/Content Protection/ContentProtectionService.swift b/Sources/Shared/Publication/Services/Content Protection/ContentProtectionService.swift index e941544e9..4ae939858 100644 --- a/Sources/Shared/Publication/Services/Content Protection/ContentProtectionService.swift +++ b/Sources/Shared/Publication/Services/Content Protection/ContentProtectionService.swift @@ -84,12 +84,6 @@ public extension Publication { contentProtectionService?.rights ?? UnrestrictedUserRights() } - @available(*, unavailable, message: "Derive the name yourself from the DRM scheme") - var protectionLocalizedName: LocalizedString? { fatalError() } - - @available(*, unavailable, message: "Derive the name yourself from the DRM scheme") - var protectionName: String? { fatalError() } - private var contentProtectionService: ContentProtectionService? { findService(ContentProtectionService.self) } diff --git a/Sources/Shared/Publication/Services/Cover/CoverService.swift b/Sources/Shared/Publication/Services/Cover/CoverService.swift index 9484dce1c..911c7410d 100644 --- a/Sources/Shared/Publication/Services/Cover/CoverService.swift +++ b/Sources/Shared/Publication/Services/Cover/CoverService.swift @@ -39,9 +39,6 @@ public protocol CoverService: PublicationService { } public extension CoverService { - @available(*, unavailable, message: "Use the async variant") - var cover: UIImage? { fatalError() } - func coverFitting(maxSize: CGSize) async -> ReadResult { await cover().map { $0?.scaleToFit(maxSize: maxSize) } } diff --git a/Sources/Shared/Publication/Services/PublicationService.swift b/Sources/Shared/Publication/Services/PublicationService.swift index 4f9e0231f..79fd86f8a 100644 --- a/Sources/Shared/Publication/Services/PublicationService.swift +++ b/Sources/Shared/Publication/Services/PublicationService.swift @@ -40,9 +40,6 @@ public extension PublicationService { var links: [Link] { [] } func get(_ href: T) -> Resource? { nil } - - @available(*, unavailable, message: "Use get(URLConvertible) instead") - func get(link: Link) -> Resource? { nil } } /// Factory used to create a `PublicationService`. @@ -67,7 +64,4 @@ public struct PublicationServiceContext { self.manifest = manifest self.container = container } - - @available(*, unavailable, renamed: "container") - public var fetcher: Fetcher { fatalError() } } diff --git a/Sources/Shared/Publication/Services/Search/SearchService.swift b/Sources/Shared/Publication/Services/Search/SearchService.swift index 406727e5d..a6d8c49b2 100644 --- a/Sources/Shared/Publication/Services/Search/SearchService.swift +++ b/Sources/Shared/Publication/Services/Search/SearchService.swift @@ -55,18 +55,6 @@ public extension SearchIterator { return await next() } - - @available(*, unavailable, message: "Use the async variant") - @discardableResult - func forEach(_ block: @escaping (LocatorCollection) throws -> Void, completion: @escaping (SearchResult) -> Void) -> Cancellable { - fatalError() - } - - @available(*, unavailable, message: "Use the async variant") - @discardableResult - func next(completion: @escaping (SearchResult) -> Void) -> Cancellable { - fatalError() - } } /// Holds the available search options and their current values. @@ -159,19 +147,6 @@ public extension Publication { } } -public extension Publication { - @available(*, unavailable, renamed: "isSearchable") - var _isSearchable: Bool { fatalError() } - - @available(*, unavailable, renamed: "searchOptions") - var _searchOptions: SearchOptions { fatalError() } - - @available(*, unavailable, message: "Use the async variant") - func _search(query: String, options: SearchOptions? = nil, completion: @escaping (SearchResult) -> Void) -> Cancellable { - fatalError() - } -} - // MARK: PublicationServicesBuilder Helpers public extension PublicationServicesBuilder { @@ -183,6 +158,3 @@ public extension PublicationServicesBuilder { } } } - -@available(*, unavailable, renamed: "SearchService") -public typealias _SearchService = SearchService diff --git a/Sources/Shared/Publication/Services/Search/StringSearchService.swift b/Sources/Shared/Publication/Services/Search/StringSearchService.swift index c8fbabcbf..fe74f017d 100644 --- a/Sources/Shared/Publication/Services/Search/StringSearchService.swift +++ b/Sources/Shared/Publication/Services/Search/StringSearchService.swift @@ -5,8 +5,6 @@ // import Foundation -@available(*, unavailable, renamed: "StringSearchService") -public typealias _StringSearchService = StringSearchService /// Base implementation of `SearchService` iterating through the content of /// Publication's resources. diff --git a/Sources/Shared/Publication/User Settings/UserProperties.swift b/Sources/Shared/Publication/User Settings/UserProperties.swift deleted file mode 100644 index 1f66108d8..000000000 --- a/Sources/Shared/Publication/User Settings/UserProperties.swift +++ /dev/null @@ -1,148 +0,0 @@ -// -// Copyright 2025 Readium Foundation. All rights reserved. -// Use of this source code is governed by the BSD-style license -// available in the top-level LICENSE file of the project. -// - -import Foundation - -@available(*, unavailable, message: "Take a look at the migration guide to migrate to the new Preferences API") -public protocol UserPropertyStringifier { - func toString() -> String -} - -@available(*, unavailable, message: "Take a look at the migration guide to migrate to the new Preferences API") -public class UserProperty: UserPropertyStringifier { - public var reference: String - public var name: String - - init(_ reference: String, _ name: String) { - self.reference = reference - self.name = name - } - - public func toString() -> String { - "" - } -} - -@available(*, unavailable, message: "Take a look at the migration guide to migrate to the new Preferences API") -public class Enumerable: UserProperty { - public var index: Int - public var values: [String] - - init(index: Int, values: [String], reference: String, name: String) { - self.index = index - self.values = values - - super.init(reference, name) - } - - override public func toString() -> String { - values[index] - } -} - -@available(*, unavailable, message: "Take a look at the migration guide to migrate to the new Preferences API") -public class Incrementable: UserProperty { - public var value, min, max, step: Float - public var suffix: String - - init(value: Float, min: Float, max: Float, step: Float, suffix: String, reference: String, name: String) { - self.value = value - self.min = min - self.max = max - self.step = step - self.suffix = suffix - - super.init(reference, name) - } - - public func increment() { - value += ((value + step) <= max) ? step : 0.0 - } - - public func decrement() { - value -= ((value - step) >= min) ? step : 0.0 - } - - override public func toString() -> String { - "\(value)" + suffix - } -} - -@available(*, unavailable, message: "Take a look at the migration guide to migrate to the new Preferences API") -public class Switchable: UserProperty { - public var onValue: String - public var offValue: String - public var on: Bool - public var values: [Bool: String] - - init(onValue: String, offValue: String, on: Bool, reference: String, name: String) { - self.onValue = onValue - self.offValue = offValue - self.on = on - - values = [true: onValue, false: offValue] - - super.init(reference, name) - } - - public func switchValue() { - on = !on - } - - override public func toString() -> String { - values[on]! - } -} - -@available(*, unavailable, message: "Take a look at the migration guide to migrate to the new Preferences API") -public class StringProperty: UserProperty { - public var value: String? - - init(value: String?, reference: String, name: String) { - self.value = value - - super.init(reference, name) - } - - override public func toString() -> String { - value ?? "" - } -} - -@available(*, unavailable, message: "Take a look at the migration guide to migrate to the new Preferences API") -public class UserProperties { - public var properties = [UserProperty]() - - public init() {} - - public func addEnumerable(index: Int, values: [String], reference: String, name: String) { - properties.append(Enumerable(index: index, values: values, reference: reference, name: name)) - } - - public func addIncrementable(nValue: Float, min: Float, max: Float, step: Float, suffix: String, reference: String, name: String) { - properties.append(Incrementable(value: nValue, min: min, max: max, step: step, suffix: suffix, reference: reference, name: name)) - } - - public func addSwitchable(onValue: String, offValue: String, on: Bool, reference: String, name: String) { - properties.append(Switchable(onValue: onValue, offValue: offValue, on: on, reference: reference, name: name)) - } - - public func addString(value: String?, reference: String, name: String) { - properties.append(StringProperty(value: value, reference: reference, name: name)) - } - - public func getProperty(reference: String) -> UserProperty? { - properties.filter { $0.reference == reference }.first - } - - /// Removes a property matching a ReadiumCSS reference. - /// - Parameter ref: The CSS reference of the property to be removed. - public func removeProperty(forReference ref: ReadiumCSSReference) { - properties.removeAll { - $0.reference == ref.rawValue - } - } -} diff --git a/Sources/Shared/Publication/User Settings/UserSettings.swift b/Sources/Shared/Publication/User Settings/UserSettings.swift deleted file mode 100644 index d57ed03f3..000000000 --- a/Sources/Shared/Publication/User Settings/UserSettings.swift +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright 2025 Readium Foundation. All rights reserved. -// Use of this source code is governed by the BSD-style license -// available in the top-level LICENSE file of the project. -// - -import Foundation - -/// List of strings that can identify a user setting -@available(*, unavailable, message: "Take a look at the migration guide to migrate to the new Preferences API") -public enum ReadiumCSSReference: String { - case fontSize - case fontFamily - case fontOverride - case appearance - case scroll - case publisherDefault = "advancedSettings" - case textAlignment = "textAlign" - case columnCount = "colCount" - case wordSpacing - case letterSpacing - case pageMargins - case lineHeight - case paraIndent - case hyphens = "bodyHyphens" - case ligatures - case paragraphMargins - case textColor - case backgroundColor -} diff --git a/Sources/Shared/Toolkit/Archive/Archive.swift b/Sources/Shared/Toolkit/Archive/Archive.swift deleted file mode 100644 index f509eb74b..000000000 --- a/Sources/Shared/Toolkit/Archive/Archive.swift +++ /dev/null @@ -1,67 +0,0 @@ -// -// Copyright 2025 Readium Foundation. All rights reserved. -// Use of this source code is governed by the BSD-style license -// available in the top-level LICENSE file of the project. -// - -import Foundation - -@available(*, unavailable) -public enum ArchiveError: Error { - /// The provided password was incorrect. - case invalidPassword(archive: String) - /// Impossible to open the given archive. - case openFailed(archive: String, cause: Error?) - /// The entry could not be found in the archive. - case entryNotFound(entry: ArchivePath, archive: String) - /// Impossible to read the given entry. - case readFailed(entry: ArchivePath, archive: String, cause: Error?) -} - -@available(*, unavailable) -public typealias ArchiveResult = Result - -@available(*, unavailable) -public typealias ArchivePath = String - -@available(*, unavailable, renamed: "Container") -public protocol Archive { - var entries: [ArchiveEntry] { get } - func entry(at path: ArchivePath) -> ArchiveEntry? - func readEntry(at path: ArchivePath) -> ArchiveEntryReader? -} - -@available(*, unavailable) -public struct ArchiveEntry: Equatable { - /// Absolute path to the entry in the archive. It MUST start with /. - let path: ArchivePath - /// Uncompressed data length. - let length: UInt64 - /// Compressed data length, or nil if the entry is not compressed. - let compressedLength: UInt64? -} - -@available(*, unavailable) -public protocol ArchiveEntryReader { - /// Direct file to the entry, when available. For example when the archive is exploded on the file system. - /// - /// This is meant to be used as an optimization for consumers which can't work efficiently with streams. However, - /// the file is not guaranteed to be found, for example if the archive is a ZIP. Therefore, consumers should always - /// fallback on regular stream reading, using `read()`. - var file: FileURL? { get } - - /// Reads the content of this entry. - /// - /// When `range` is nil, the whole content is returned. Out-of-range indexes are clamped to the available length - /// automatically. - func read(range: Range?) -> ArchiveResult -} - -@available(*, unavailable, renamed: "ArchiveOpener") -public protocol ArchiveFactory { - /// Opens an archive from a local file path. - func open(file: FileURL, password: String?) -> ArchiveResult -} - -@available(*, unavailable, renamed: "DefaultArchiveOpener") -public class DefaultArchiveFactory {} diff --git a/Sources/Shared/Toolkit/Archive/ExplodedArchive.swift b/Sources/Shared/Toolkit/Archive/ExplodedArchive.swift deleted file mode 100644 index 8a29619be..000000000 --- a/Sources/Shared/Toolkit/Archive/ExplodedArchive.swift +++ /dev/null @@ -1,11 +0,0 @@ -// -// Copyright 2025 Readium Foundation. All rights reserved. -// Use of this source code is governed by the BSD-style license -// available in the top-level LICENSE file of the project. -// - -import Foundation - -/// An archive exploded on the file system as a directory. -@available(*, unavailable, renamed: "DirectoryContainer", message: "Use `DirectoryContainer` instead") -final class ExplodedArchive {} diff --git a/Sources/Shared/Toolkit/CancellableResult.swift b/Sources/Shared/Toolkit/CancellableResult.swift deleted file mode 100644 index 696bc0ed0..000000000 --- a/Sources/Shared/Toolkit/CancellableResult.swift +++ /dev/null @@ -1,127 +0,0 @@ -// -// Copyright 2025 Readium Foundation. All rights reserved. -// Use of this source code is governed by the BSD-style license -// available in the top-level LICENSE file of the project. -// - -import Foundation - -/// Represents a `Result` which can be in a `cancelled` state. -@available(*, unavailable, message: "Not used anymore") -public enum CancellableResult { - case success(Success) - case failure(Failure) - case cancelled - - public enum Error: Swift.Error { - case cancelled - } - - /// Creates a `CancelableResult` from a `Result`. - public init(_ result: Result) { - switch result { - case let .success(value): - self = .success(value) - case let .failure(error): - self = .failure(error) - } - } - - /// Creates a `CancelableResult` from a `Result` with the cancelled state represented as a `nil` - /// success. - public init(_ result: Result) { - switch result { - case let .success(value): - if let value = value { - self = .success(value) - } else { - self = .cancelled - } - case let .failure(error): - self = .failure(error) - } - } - - /// Gets a success result or throws an error. - /// - /// In case of cancellation, `Error.cancelled` is thrown. - public func get() throws -> Success { - switch self { - case let .success(success): - return success - case let .failure(error): - throw error - case .cancelled: - throw Error.cancelled - } - } - - /// Creates a `Result` with the cancelled state represented as a `Error.cancelled` failure. - public var result: Result { - switch self { - case let .success(success): - return .success(success) - case let .failure(error): - return .failure(error) - case .cancelled: - return .failure(Error.cancelled) - } - } - - /// Creates a `Result` with a custom cancelled error. - public func result(withCancelledError cancelledError: @autoclosure () -> Failure) -> Result { - switch self { - case let .success(success): - return .success(success) - case let .failure(error): - return .failure(error) - case .cancelled: - return .failure(cancelledError()) - } - } - - public func map(_ transform: (Success) -> NewSuccess) -> CancellableResult { - switch self { - case let .success(success): - return .success(transform(success)) - case let .failure(error): - return .failure(error) - case .cancelled: - return .cancelled - } - } - - public func mapCatching(_ transform: (Success) throws -> NewSuccess) -> CancellableResult { - switch self { - case let .success(success): - do { - return try .success(transform(success)) - } catch { - return .failure(error) - } - case let .failure(error): - return .failure(error) - case .cancelled: - return .cancelled - } - } - - public func mapError(_ transform: (Failure) -> NewFailure) -> CancellableResult { - switch self { - case let .success(success): - return .success(success) - case let .failure(error): - return .failure(transform(error)) - case .cancelled: - return .cancelled - } - } - - /// Returns a `CancellableResult` with the same value, but typed with a generic `Error`. - public func eraseToAnyError() -> CancellableResult { - mapError { $0 as Swift.Error } - } -} - -@available(*, unavailable, message: "Not used anymore") -extension CancellableResult: Equatable where Success: Equatable, Failure: Equatable {} diff --git a/Sources/Shared/Toolkit/Data/Container/Fetcher.swift b/Sources/Shared/Toolkit/Data/Container/Fetcher.swift deleted file mode 100644 index 673ce89f9..000000000 --- a/Sources/Shared/Toolkit/Data/Container/Fetcher.swift +++ /dev/null @@ -1,44 +0,0 @@ -// -// Copyright 2025 Readium Foundation. All rights reserved. -// Use of this source code is governed by the BSD-style license -// available in the top-level LICENSE file of the project. -// - -import Foundation - -/// Provides access to a `Resource` from a `Link`. -@available(*, unavailable, message: "Use a `Container` instead") -public protocol Fetcher { - /// Known resources available in the medium, such as file paths on the file system - /// or entries in a ZIP archive. This list is not exhaustive, and additional - /// unknown resources might be reachable. - /// - /// If the medium has an inherent resource order, it should be followed. - /// Otherwise, HREFs are sorted alphabetically. - var links: [Link] { get } - - /// Returns the `Resource` at the given `link`'s HREF. - /// - /// A `Resource` is always returned, since for some cases we can't know if it exists before - /// actually fetching it, such as HTTP. Therefore, errors are handled at the Resource level. - func get(_ link: Link) -> Resource -} - -/// A `Fetcher` providing no resources at all. -@available(*, unavailable, message: "Use an `EmptyContainer` instead") -public final class EmptyFetcher {} - -@available(*, unavailable, message: "Use a `TransformingContainer` instead") -public final class TransformingFetcher {} - -@available(*, unavailable, message: "Not available anymore") -public final class RoutingFetcher {} - -@available(*, unavailable, message: "Use an `HTTPContainer` instead") -public final class HTTPFetcher {} - -@available(*, unavailable, message: "Use an `FileContainer` instead") -public final class FileFetcher {} - -@available(*, unavailable, message: "Use an `ArchiveOpener` instead") -public final class ArchiveFetcher {} diff --git a/Sources/Shared/Toolkit/Data/Resource/LazyResource.swift b/Sources/Shared/Toolkit/Data/Resource/LazyResource.swift deleted file mode 100644 index c34573abb..000000000 --- a/Sources/Shared/Toolkit/Data/Resource/LazyResource.swift +++ /dev/null @@ -1,10 +0,0 @@ -// -// Copyright 2025 Readium Foundation. All rights reserved. -// Use of this source code is governed by the BSD-style license -// available in the top-level LICENSE file of the project. -// - -import Foundation - -@available(*, unavailable, message: "Create your own Resource implementation for this use case") -public final class LazyResource {} diff --git a/Sources/Shared/Toolkit/Data/Resource/Resource.swift b/Sources/Shared/Toolkit/Data/Resource/Resource.swift index 3a3a1ba81..1dc21d562 100644 --- a/Sources/Shared/Toolkit/Data/Resource/Resource.swift +++ b/Sources/Shared/Toolkit/Data/Resource/Resource.swift @@ -28,29 +28,3 @@ public protocol Resource: Streamable { /// This is opened for extensions. func properties() async -> ReadResult } - -public extension Resource { - @available(*, unavailable, message: "Not available anymore in a Resource") - var link: Link { fatalError() } - - @available(*, unavailable, message: "Use the async variant") - var length: ResourceResult { fatalError() } - - @available(*, unavailable, renamed: "sourceURL") - var file: FileURL? { fatalError() } - - @available(*, unavailable, message: "Use the async variant") - func read(range: Range?) -> ResourceResult { fatalError() } - - @available(*, unavailable, message: "Use the async variant") - func stream(range: Range?, consume: @escaping (Data) -> Void, completion: @escaping (ReadResult) -> Void) -> Cancellable { - fatalError() - } -} - -/// Errors occurring while accessing a resource. -@available(*, unavailable, renamed: "ReadError") -public typealias ResourceError = ReadError - -@available(*, unavailable, renamed: "ReadResult") -public typealias ResourceResult = ReadResult diff --git a/Sources/Shared/Toolkit/Deferred.swift b/Sources/Shared/Toolkit/Deferred.swift deleted file mode 100644 index 233449d11..000000000 --- a/Sources/Shared/Toolkit/Deferred.swift +++ /dev/null @@ -1,408 +0,0 @@ -// -// Copyright 2025 Readium Foundation. All rights reserved. -// Use of this source code is governed by the BSD-style license -// available in the top-level LICENSE file of the project. -// - -import Foundation - -/// Continuation monad implementation to manipulate asynchronous values easily, with error -/// forwarding. -/// -/// This is NOT a Promise implementation, because state-less, simpler and not thread-safe. It's a -/// purely syntactic tool meant to flatten a sequence of closure-based asynchronous calls into a -/// monadic chain. -/// -/// For example: -/// -/// fetchFoo { status, error1 in -/// guard var status = val1 else { -/// completion(nil, error1) -/// return -/// } -/// status = "\(status + 100)" -/// parseBar(status) { object, error2 in -/// guard let object = object else { -/// completion(nil, error2) -/// return -/// } -/// do { -/// let result = try processThing(object) -/// completion(result, nil) -/// } catch { -/// completion(nil, error) -/// } -/// } -/// } -/// -/// becomes (if the async functions return Deferred objects): -/// -/// fetchFoo() -/// .map { status in "\(status + 100)" } // Transforms the value synchronously with map -/// .flatMap(parseBar) // Transforms using an async function with flatMap, if it returns a Deferred -/// .map(processThing) // Thrown errors are automatically forwarded -/// .resolve(completion) // If you don't call resolve nothing is executed, unlike Promises which are eager. -/// -/// `Deferred` uses internally `CancellableResult`, which means that the result can be in a -/// cancelled state, which is convenient for asynchronous APIs. -@available(*, unavailable, message: "Not used anymore") -public final class Deferred { - /// Traditional completion closure signature, with a `CancelableResult` object. - public typealias Completion = (CancellableResult) -> Void - public typealias NewCompletion = (CancellableResult) -> Void - - private let closure: (@escaping Completion) -> Void - - /// Dispatch queue on which the `closure` will be (asynchronously) executed. If `nil`, it will - /// be executed synchronously on the caller of `resolve`. - private let queue: DispatchQueue? - - /// Indicates whether the `Deferred` was resolved. It can only be resolved once. - private var resolved: Bool = false - - public init(on queue: DispatchQueue? = nil, _ closure: @escaping (@escaping Completion) -> Void) { - self.closure = closure - self.queue = queue - } - - /// Shortcut to build a Deferred from a success value. - /// - /// Can be useful to return early a value in a `.flatMap` or `deferred { ... }` construct. - public class func success(_ value: Success) -> Self { - Self { $0(.success(value)) } - } - - /// Shortcut to build a Deferred from an error. - /// - /// Can be useful to return early a value in a `.flatMap` or `deferred { ... }` construct. - public class func failure(_ error: Failure) -> Self { - Self { $0(.failure(error)) } - } - - /// Shortcut to build a Deferred from a cancellation. - /// - /// Can be useful to return early a value in a `.flatMap` or `deferred { ... }` construct. - public class var cancelled: Deferred { Deferred { $0(.cancelled) } } - - /// Fires the deferred closure to resolve its value and forward it to the given traditional - /// completion closure. - /// - /// To keep things simple, this can only be called once since the value is not cached. - /// The completion block is systematically dispatched asynchronously on the given queue (default - /// is the main thread), to avoid temporal coupling at the calling site. - public func resolve(on completionQueue: DispatchQueue? = .main, _ completion: @escaping Completion = { _ in }) { - assert(!resolved, "Deferred doesn't cache the closure's value. It must only be called once.") - resolved = true - - let completionOnQueue: Completion = { result in - if let completionQueue = completionQueue { - completionQueue.async { completion(result) } - } else { - completion(result) - } - } - - if let queue = queue { - queue.async { self.closure(completionOnQueue) } - } else { - closure(completionOnQueue) - } - } - - /// Transforms the value synchronously. - /// - /// .map { user in - /// "Hello, \(user.name)" - /// } - public func map(on queue: DispatchQueue? = nil, _ transform: @escaping (Success) -> NewSuccess) -> Deferred { - map( - on: queue, - success: { val, compl in compl(.success(transform(val))) }, - failure: { err, compl in compl(.failure(err)) } - ) - } - - /// Transforms the value synchronously, catching any error. - public func tryMap(on queue: DispatchQueue? = nil, _ transform: @escaping (Success) throws -> NewSuccess) -> Deferred { - map( - on: queue, - success: { val, compl in - do { - try compl(.success(transform(val))) - } catch { - compl(.failure(error)) - } - }, - failure: { err, compl in compl(.failure(err)) } - ) - } - - /// Transforms the value asynchronously, through a nested Deferred. - /// - /// func asyncOperation(value: Int) -> Deferred - /// - /// .flatMap { val in - /// asyncOperation(val) - /// } - public func flatMap(on queue: DispatchQueue? = nil, _ transform: @escaping (Success) -> Deferred) -> Deferred { - map( - on: queue, - success: { val, compl in transform(val).resolve(compl) }, - failure: { err, compl in compl(.failure(err)) } - ) - } - - /// Transforms the value asynchronously, through a nested Deferred, which may throw an error. - /// - /// func asyncOperation(value: Int) throws -> Deferred - /// - /// .tryFlatMap { val in - /// try asyncOperation(val) - /// } - public func tryFlatMap(on queue: DispatchQueue? = nil, _ transform: @escaping (Success) throws -> Deferred) -> Deferred { - map( - on: queue, - success: { val, compl in - do { - try transform(val).resolve(compl) - } catch { - compl(.failure(error)) - } - }, - failure: { err, compl in compl(.failure(err)) } - ) - } - - /// Transforms the value through a traditional completion-based asynchronous function. - /// - /// func traditionalAsync(value: Int, _ completion: @escaping (CancelableResult) -> Void) throws { ... } - /// - /// .asyncMap { val, completion in - /// traditionalAsync(value: val, completion) - /// } - public func asyncMap(on queue: DispatchQueue? = nil, _ transform: @escaping (Success, @escaping NewCompletion) -> Void) -> Deferred { - map( - on: queue, - success: { val, compl in transform(val, compl) }, - failure: { err, compl in compl(.failure(err)) } - ) - } - - /// Transforms the value through a traditional completion-based asynchronous function, which may - /// throw an error. - /// - /// func traditionalAsync(value: Int, _ completion: @escaping (Result) -> Void) throws { ... } - /// - /// .tryAsyncMap { val, completion in - /// guard let val = val else { - /// throw Error.x - /// } - /// traditionalAsync(value: val, completion) - /// } - public func tryAsyncMap(on queue: DispatchQueue? = nil, _ transform: @escaping (Success, @escaping NewCompletion) throws -> Void) -> Deferred { - map( - on: queue, - success: { val, compl in - do { - try transform(val, compl) - } catch { - compl(.failure(error)) - } - }, - failure: { err, compl in compl(.failure(err)) } - ) - } - - /// Attempts to recover from an error occured previously. - /// You can either return an alternate success value, or throw again another (or the same) error - /// to forward it. - /// - /// .catch { error in - /// if case Error.network = error { - /// return fetch() - /// } - /// throw error - /// } - public func `catch`(on queue: DispatchQueue? = nil, _ recover: @escaping (Failure) -> CancellableResult) -> Deferred { - map( - on: queue, - success: { val, compl in compl(.success(val)) }, - failure: { err, compl in compl(recover(err)) } - ) - } - - /// Same as `catch`, but attempts to recover asynchronously, by returning a new Deferred object. - public func flatCatch(on queue: DispatchQueue? = nil, _ recover: @escaping (Failure) -> Deferred) -> Deferred { - map( - on: queue, - success: { val, compl in compl(.success(val)) }, - failure: { err, compl in recover(err).resolve(compl) } - ) - } - - /// Returns a new `Deferred`, mapping any failure value using the given transformation. - public func mapError(on queue: DispatchQueue? = nil, _ transform: @escaping (Failure) -> NewFailure) -> Deferred { - map( - on: queue, - success: { val, compl in compl(.success(val)) }, - failure: { err, compl in compl(.failure(transform(err))) } - ) - } - - /// Performs the given `block` once the `Deferred` is successfully resolved, without changing - /// its result. - public func also(on queue: DispatchQueue? = nil, _ block: @escaping (Success) -> Void) -> Deferred { - map( - on: queue, - success: { val, compl in - block(val) - return compl(.success(val)) - }, - failure: { err, compl in compl(.failure(err)) } - ) - } - - /// Delays the chain by the given `seconds`, and then continue on the given `queue`. - public func delay(for seconds: TimeInterval, on queue: DispatchQueue? = nil) -> Deferred { - asyncMap(on: queue) { output, completion in - (queue ?? .main).asyncAfter(deadline: .now() + seconds) { - completion(.success(output)) - } - } - } - - /// Transforms (potentially) asynchronously the resolved value or error. - /// The transformation is wrapped in another Deferred to be able to chain the transformations. - /// - /// All other mapping functions are based on this one. - /// To add new mapping functions, first figure out the typed signature and then the - /// implementation should flow naturally from available values, thanks to the type checker. - private func map( - on queue: DispatchQueue? = nil, - success: @escaping (Success, @escaping NewCompletion) -> Void, - failure: @escaping (Failure, @escaping NewCompletion) -> Void, - cancelled: @escaping (@escaping NewCompletion) -> Void = { $0(.cancelled) } - ) -> Deferred { - Deferred { completion in - self.resolve(on: queue) { result in - switch result { - case let .success(value): - success(value, completion) - case let .failure(error): - failure(error, completion) - case .cancelled: - cancelled(completion) - } - } - } - } - - /// Returns a `Deferred` with the same value, but typed with a generic `Error`. - public func eraseToAnyError() -> Deferred { - mapError { $0 as Error } - } -} - -/// Constructs a Deferred from a closure taking a traditional completion block to return its -/// result. -/// -/// func traditionalAsync(_ completion: @escaping (CancelableResult) -> Void) { ... } -/// -/// deferred { completion in -/// traditionalAsync(completion) -/// } -@available(*, unavailable, message: "Not used anymore") -public func deferred(on queue: DispatchQueue? = nil, closure: @escaping (@escaping Deferred.Completion) -> Void) -> Deferred { - Deferred(on: queue, closure) -} - -/// Constructs a Deferred from a closure taking a traditional completion block to return its -/// result. -/// -/// Any thrown error is caught and wrapped in a result. -@available(*, unavailable, message: "Not used anymore") -public func deferredCatching(on queue: DispatchQueue? = nil, closure: @escaping (@escaping Deferred.Completion) throws -> Void) -> Deferred { - Deferred(on: queue) { completion in - do { - try closure(completion) - } catch { - completion(.failure(error)) - } - } -} - -/// Constructs a Deferred by wrapping another Deferred. -/// -/// This is useful for example when returning a Deferred in a function that performs some -/// synchronous check before using another Deferred. Since we want the check to be performed -/// when the Deferred is resolved (and not synchronously, when the function is called), we must -/// wrap the full body of the function in a Deferred. -/// -/// func fetchStatus(for id: String?) -> Deferred { -/// return deferred { -/// if let status = self.cachedStatus { -/// return .success(status) // shortcut for: return Deferred.success(status) -/// } -/// let url = self.statusURL(for: id) -/// return Network.fetch(url) // Network.fetch returns a Deferred -/// .map { response in -/// return response.data -/// } -/// } -/// } -@available(*, unavailable, message: "Not used anymore") -public func deferred(on queue: DispatchQueue? = nil, closure: @escaping () -> Deferred) -> Deferred { - Deferred(on: queue) { completion in - closure().resolve(completion) - } -} - -/// Constructs a Deferred by wrapping another Deferred. -/// -/// Any thrown error is caught and wrapped in a result. -@available(*, unavailable, message: "Not used anymore") -public func deferredCatching(on queue: DispatchQueue? = nil, closure: @escaping () throws -> Deferred) -> Deferred { - Deferred(on: queue) { completion in - do { - try closure().resolve(completion) - } catch { - completion(.failure(error)) - } - } -} - -/// Constructs a Deferred in a Promise style with three completion closures: one for the success, -/// one for the failure and one for cancellation. -/// -/// Deferred { success, failure, cancel in -/// fetch(input) { response in -/// guard response.status == 200 else { -/// failure(Error.failed) -/// return -/// } -/// success(response.data) -/// } -/// } -@available(*, unavailable, message: "Not used anymore") -public func deferred(on queue: DispatchQueue? = nil, closure: @escaping (@escaping (Success) -> Void, @escaping (Failure) -> Void, @escaping () -> Void) -> Void) -> Deferred { - Deferred(on: queue) { completion in - closure( - { completion(.success($0)) }, - { completion(.failure($0)) }, - { completion(.cancelled) } - ) - } -} - -public extension Result { - /// Converts a `Result` to a `Deferred`. - @available(*, unavailable, message: "Not used anymore") - var deferred: Deferred { - switch self { - case let .success(value): - return .success(value) - case let .failure(error): - return .failure(error) - } - } -} diff --git a/Sources/Shared/Toolkit/DownloadSession.swift b/Sources/Shared/Toolkit/DownloadSession.swift deleted file mode 100644 index 925fe0536..000000000 --- a/Sources/Shared/Toolkit/DownloadSession.swift +++ /dev/null @@ -1,129 +0,0 @@ -// -// Copyright 2025 Readium Foundation. All rights reserved. -// Use of this source code is governed by the BSD-style license -// available in the top-level LICENSE file of the project. -// - -import Foundation - -@available(*, unavailable, message: "This API will be removed in the future, please use your own download solution in your app") -public protocol DownloadDisplayDelegate { - func didStartDownload(task: URLSessionDownloadTask, description: String) - func didFinishDownload(task: URLSessionDownloadTask) - func didFailWithError(task: URLSessionDownloadTask, error: Error?) - func didUpdateDownloadPercentage(task: URLSessionDownloadTask, percentage: Float) -} - -/// Represents the percent-based progress of the download. -@available(*, unavailable, message: "This API will be removed in the future, please use your own download solution in your app") -public enum DownloadProgress { - /// Undetermined progress, a spinner should be shown to the user. - case infinite - /// A finite progress from 0.0 to 1.0, a progress bar should be shown to the user. - case finite(Float) -} - -@available(*, unavailable, message: "This API will be removed in the future, please use your own download solution in your app") -public class DownloadSession: NSObject, URLSessionDelegate, URLSessionDownloadDelegate { - public typealias CompletionHandler = (URL?, URLResponse?, Error?, URLSessionDownloadTask) -> Bool? - - struct Download { - let progress = MutableObservable(.infinite) - let completion: CompletionHandler - } - - enum RequestError: Error { - case notFound - } - - public static let shared = DownloadSession() - override private init() { super.init() } - - private lazy var session: URLSession = { - let config = URLSessionConfiguration.background(withIdentifier: "org.readium.swift-toolkit.shared.DownloadSession") - return URLSession(configuration: config, delegate: self, delegateQueue: OperationQueue.main) - }() - - public var displayDelegate: DownloadDisplayDelegate? - private var taskMap = [URLSessionTask: Download]() - - /// Returns: an observable download progress value, from 0.0 to 1.0 - @discardableResult - public func launch(request: URLRequest, description: String?, completionHandler: CompletionHandler?) -> Observable { - launchTask(request: request, description: description, completionHandler: completionHandler).progress - } - - @discardableResult - public func launchTask(request: URLRequest, description: String?, completionHandler: CompletionHandler?) -> (task: URLSessionDownloadTask, progress: Observable) { - let task = session.downloadTask(with: request) - task.resume() - let download = Download(completion: completionHandler ?? { _, _, _, _ in true }) - taskMap[task] = download - - DispatchQueue.main.async { - let localizedDescription = description ?? "..." - self.displayDelegate?.didStartDownload(task: task, description: localizedDescription) - } - - return (task, download.progress) - } - - public func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didFinishDownloadingTo location: URL) { - let done: Bool? - let download = taskMap[downloadTask] - - do { - guard let response = downloadTask.response as? HTTPURLResponse, response.statusCode == 200 else { - throw RequestError.notFound - } - - let tempURL = URL(fileURLWithPath: NSTemporaryDirectory()) - .appendingPathComponent(UUID().uuidString) - .appendingPathExtension(location.pathExtension) - - try FileManager.default.moveItem(at: location, to: tempURL) - done = download?.completion(tempURL, response, nil, downloadTask) - } catch { - done = download?.completion(nil, nil, error, downloadTask) - } - - DispatchQueue.main.async { - self.taskMap.removeValue(forKey: downloadTask) - - if done ?? false { - self.displayDelegate?.didFinishDownload(task: downloadTask) - } else { - self.displayDelegate?.didFailWithError(task: downloadTask, error: nil) - } - } - } - - private func didUpdateProgress(_ progress: Float, of task: URLSessionDownloadTask) { - DispatchQueue.main.async { - self.taskMap[task]?.progress.value = .finite(progress) - self.displayDelegate?.didUpdateDownloadPercentage(task: task, percentage: progress) - } - } - - public func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didWriteData bytesWritten: Int64, totalBytesWritten: Int64, totalBytesExpectedToWrite: Int64) { - let progress = Float(totalBytesWritten) / Float(totalBytesExpectedToWrite) - didUpdateProgress(progress, of: downloadTask) - } - - public func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didResumeAtOffset fileOffset: Int64, expectedTotalBytes: Int64) { - let progress = Float(fileOffset) / Float(expectedTotalBytes) - didUpdateProgress(progress, of: downloadTask) - } - - public func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) { - DispatchQueue.main.async { - guard let downloadTask = task as? URLSessionDownloadTask else { return } - - guard let theError = error else { return } - _ = self.taskMap[task]?.completion(nil, nil, error, downloadTask) - self.taskMap.removeValue(forKey: task) - - self.displayDelegate?.didFailWithError(task: downloadTask, error: theError) - } - } -} diff --git a/Sources/Shared/Toolkit/Extensions/URL.swift b/Sources/Shared/Toolkit/Extensions/URL.swift deleted file mode 100644 index f70b6d93b..000000000 --- a/Sources/Shared/Toolkit/Extensions/URL.swift +++ /dev/null @@ -1,73 +0,0 @@ -// -// Copyright 2025 Readium Foundation. All rights reserved. -// Use of this source code is governed by the BSD-style license -// available in the top-level LICENSE file of the project. -// - -import CommonCrypto -import Foundation - -extension URL: Loggable { - /// Indicates whether this URL is an HTTP or HTTPS URL. - @available(*, unavailable, message: "Copy the implementation in your app if you need it") - public var isHTTP: Bool { - ["http", "https"].contains(scheme?.lowercased()) - } - - /// Returns whether the given `url` is `self` or one of its descendants. - @available(*, unavailable, message: "Copy the implementation in your app if you need it") - public func isParentOf(_ url: URL) -> Bool { - let standardizedSelf = standardizedFileURL.path - let other = url.standardizedFileURL.path - return standardizedSelf == other || other.hasPrefix(standardizedSelf + "/") - } - - /// Computes the MD5 hash of the file, if the URL is a file URL. - /// Source: https://stackoverflow.com/a/42935601/1474476 - @available(*, unavailable) - public func md5() -> String? { fatalError() } - - /// Returns the first available URL by appending the given `pathComponent`. - /// - /// If `pathComponent` is already taken, then it appends a number to it. - @available(*, unavailable, message: "Copy the implementation in your app if you need it") - public func appendingUniquePathComponent(_ pathComponent: String? = nil) -> URL { - /// Returns the first path component matching the given `validation` closure. - /// Numbers are appended to the path component until a valid candidate is found. - func uniquify(_ pathComponent: String?, validation: (String) -> Bool) -> String { - let pathComponent = pathComponent ?? UUID().uuidString - var ext = (pathComponent as NSString).pathExtension - if !ext.isEmpty { - ext = ".\(ext)" - } - let pathComponentWithoutExtension = (pathComponent as NSString).deletingPathExtension - - var candidate = pathComponent - var i = 0 - while !validation(candidate) { - i += 1 - candidate = "\(pathComponentWithoutExtension) \(i)\(ext)" - } - return candidate - } - - let pathComponent = uniquify(pathComponent) { candidate in - let destination = appendingPathComponent(candidate) - return !((try? destination.checkResourceIsReachable()) ?? false) - } - - return appendingPathComponent(pathComponent) - } - - /// Adds the given `newScheme` to the URL, but only if the URL doesn't already have one. - @available(*, unavailable, message: "Copy the implementation in your app if you need it") - public func addingSchemeIfMissing(_ newScheme: String) -> URL { - guard scheme == nil else { - return self - } - - var components = URLComponents(url: self, resolvingAgainstBaseURL: true) - components?.scheme = newScheme - return components?.url ?? self - } -} diff --git a/Sources/Shared/Toolkit/Format/MediaType.swift b/Sources/Shared/Toolkit/Format/MediaType.swift index 8870abaec..1f5291c6d 100644 --- a/Sources/Shared/Toolkit/Format/MediaType.swift +++ b/Sources/Shared/Toolkit/Format/MediaType.swift @@ -53,22 +53,6 @@ public struct MediaType: Hashable, Loggable, Sendable { parameters["charset"].flatMap { String.Encoding(charset: $0) } } - /// Returns the canonical version of this media type, if it is known. - /// - /// This is useful to find the name and file extension of a known media type, or to get the canonical media type - /// from an alias. For example, `application/x-cbz` is an alias of the canonical `application/vnd.comicbook+zip`. - /// - /// Non-significant parameters are also discarded. - @available(*, unavailable, message: "Use a FormatSniffer instead.") - public var canonicalized: MediaType { - fatalError() - } - - @available(*, unavailable, message: "File extension was moved to `Format`") - public var fileExtension: String { - fatalError() - } - /// Returns the UTI (Uniform Type Identifier) matching this media type, if any. public var uti: String? { UTI.findFrom(mediaTypes: [string], fileExtensions: [])?.string @@ -222,13 +206,6 @@ public struct MediaType: Hashable, Loggable, Sendable { matchesAny(.readiumWebPubManifest, .readiumAudiobookManifest, .divinaManifest) } - /// Returns whether this media type is declared in the Document Types section of the app's main - /// bundle. - @available(*, unavailable) - public var isSupportedDocumentType: Bool { - fatalError() - } - // MARK: Known Media Types public static let aac = MediaType("audio/aac")! diff --git a/Sources/Shared/Toolkit/Format/MediaTypeSniffer.swift b/Sources/Shared/Toolkit/Format/MediaTypeSniffer.swift deleted file mode 100644 index cb7a8ef32..000000000 --- a/Sources/Shared/Toolkit/Format/MediaTypeSniffer.swift +++ /dev/null @@ -1,85 +0,0 @@ -// -// Copyright 2025 Readium Foundation. All rights reserved. -// Use of this source code is governed by the BSD-style license -// available in the top-level LICENSE file of the project. -// - -import CoreServices -import Foundation -import ReadiumFuzi - -public extension MediaType { - @available(*, unavailable, message: "Use an `AssetRetriever` to sniff a `Format` instead") - typealias Sniffer = (_ context: Any) -> MediaType? - - @available(*, unavailable, renamed: "MediaType.init(_:)", message: "Create the MediaType directly with MediaType(type)") - static func of(mediaType: String?) -> MediaType? { - fatalError() - } - - /// resolves a media type from a single file extension and media type hint, without checking the - /// actual content. - @available(*, unavailable, message: "Use an `AssetRetriever` to sniff a `Format` instead") - static func of(mediaType: String? = nil, fileExtension: String? = nil, sniffers: [Sniffer] = []) -> MediaType? { - fatalError() - } - - /// Resolves a media type from file extension and media type hints, without checking the actual - /// content. - @available(*, unavailable, message: "Use an `AssetRetriever` to sniff a `Format` instead") - static func of(mediaTypes: [String], fileExtensions: [String], sniffers: [Sniffer] = []) -> MediaType? { - fatalError() - } - - /// Resolves a media type from a local file path. - /// **Warning**: This API should never be called from the UI thread. - @available(*, unavailable, message: "Use an `AssetRetriever` to sniff a `Format` instead") - static func of(_ file: FileURL, mediaType: String? = nil, fileExtension: String? = nil, sniffers: [Sniffer] = []) -> MediaType? { - fatalError() - } - - /// Resolves a media type from a local file path. - /// **Warning**: This API should never be called from the UI thread. - @available(*, unavailable, message: "Use an `AssetRetriever` to sniff a `Format` instead") - static func of(_ file: FileURL, mediaTypes: [String], fileExtensions: [String], sniffers: [Sniffer] = []) -> MediaType? { - fatalError() - } - - /// Resolves a media type from bytes, e.g. from an HTTP response. - /// **Warning**: This API should never be called from the UI thread. - @available(*, unavailable, message: "Use an `AssetRetriever` to sniff a `Format` instead") - static func of(_ data: @escaping () -> Data, mediaType: String? = nil, fileExtension: String? = nil, sniffers: [Sniffer] = []) -> MediaType? { - fatalError() - } - - /// Resolves a media type from bytes, e.g. from an HTTP response. - /// **Warning**: This API should never be called from the UI thread. - @available(*, unavailable, message: "Use an `AssetRetriever` to sniff a `Format` instead") - static func of(_ data: @escaping () -> Data, mediaTypes: [String], fileExtensions: [String], sniffers: [Sniffer] = []) -> MediaType? { - fatalError() - } - - /// Resolves a media type from a sniffer context. - /// - /// Sniffing a media type is done in two rounds, because we want to give an opportunity to all - /// sniffers to return a `MediaType` quickly before inspecting the content itself: - /// * *Light Sniffing* checks only the provided file extension or media type hints. - /// * *Heavy Sniffing* reads the bytes to perform more advanced sniffing. - @available(*, unavailable, message: "Use an `AssetRetriever` to sniff a `Format` instead") - private static func of(content: Any, mediaTypes: [String], fileExtensions: [String], sniffers: [Sniffer]) -> MediaType? { - fatalError() - } -} - -public extension URLResponse { - /// Sniffs the media type for this `URLResponse`, using the default media type sniffers. - @available(*, unavailable, message: "Use an AssetRetriever to retrieve the media type of an HTTP resource") - var mediaType: MediaType? { fatalError() } - - /// Resolves the media type for this `URLResponse`, with optional extra file extension and media - /// type hints. - @available(*, unavailable, message: "Use an AssetRetriever to retrieve the media type of an HTTP resource") - func sniffMediaType(data: (() -> Data)? = nil, mediaTypes: [String] = [], fileExtensions: [String] = []) -> MediaType? { - fatalError() - } -} diff --git a/Sources/Shared/Toolkit/HREF.swift b/Sources/Shared/Toolkit/HREF.swift deleted file mode 100644 index e6d54f45d..000000000 --- a/Sources/Shared/Toolkit/HREF.swift +++ /dev/null @@ -1,13 +0,0 @@ -// -// Copyright 2025 Readium Foundation. All rights reserved. -// Use of this source code is governed by the BSD-style license -// available in the top-level LICENSE file of the project. -// - -import Foundation - -/// Represents an HREF, optionally relative to another one. -/// -/// This is used to normalize the string representation. -@available(*, unavailable, message: "Use `AnyURL` instead") -public struct HREF {} diff --git a/Sources/Shared/Toolkit/HTTP/HTTPClient.swift b/Sources/Shared/Toolkit/HTTP/HTTPClient.swift index 398be8d9b..6cbf66290 100644 --- a/Sources/Shared/Toolkit/HTTP/HTTPClient.swift +++ b/Sources/Shared/Toolkit/HTTP/HTTPClient.swift @@ -148,59 +148,6 @@ public extension HTTPClient { return .failure(error) } } - - @available(*, unavailable, message: "Use the async variant.") - func stream(_ request: HTTPRequestConvertible, receiveResponse: ((HTTPResponse) -> Void)?, consume: @escaping (_ chunk: Data, _ progress: Double?) -> Void, completion: @escaping (HTTPResult) -> Void) -> Cancellable { - fatalError() - } - - @available(*, unavailable, message: "Use the async variant.") - func stream(_ request: HTTPRequestConvertible, consume: @escaping (Data, Double?) -> Void, completion: @escaping (HTTPResult) -> Void) -> Cancellable { - fatalError() - } - - @available(*, unavailable, message: "Use the async variant.") - func fetch(_ request: HTTPRequestConvertible, completion: @escaping (HTTPResult) -> Void) -> Cancellable { - fatalError() - } - - @available(*, unavailable, message: "Use the async variant.") - func fetchSync(_ request: HTTPRequestConvertible) -> HTTPResult { - fatalError() - } - - @available(*, unavailable, message: "Use the async variant.") - func fetch( - _ request: HTTPRequestConvertible, - decoder: @escaping (HTTPResponse, Data) throws -> T?, - completion: @escaping (HTTPResult) -> Void - ) -> Cancellable { - fatalError() - } - - @available(*, unavailable, message: "Use the async variant.") - func fetchJSON(_ request: HTTPRequestConvertible, completion: @escaping (HTTPResult<[String: Any]>) -> Void) -> Cancellable { - fatalError() - } - - @available(*, unavailable, message: "Use the async variant.") - func fetchString(_ request: HTTPRequestConvertible, completion: @escaping (HTTPResult) -> Void) -> Cancellable { - fatalError() - } - - @available(*, unavailable, message: "Use the async variant.") - func fetchImage(_ request: HTTPRequestConvertible, completion: @escaping (HTTPResult) -> Void) -> Cancellable { - fatalError() - } - - @available(*, unavailable, message: "Use the async variant.") - func download( - _ request: HTTPRequestConvertible, - onProgress: @escaping (Double) -> Void, - completion: @escaping (HTTPResult) -> Void - ) -> Cancellable { - fatalError() - } } /// Status code of an HTTP response. @@ -260,9 +207,6 @@ public struct HTTPResponse: Equatable { /// HTTP status code returned by the server. public let status: HTTPStatus - @available(*, unavailable, renamed: "status.rawValue") - public var statusCode: HTTPStatus { fatalError() } - /// HTTP response headers, indexed by their name. public let headers: [String: String] diff --git a/Sources/Shared/Toolkit/HTTP/HTTPError.swift b/Sources/Shared/Toolkit/HTTP/HTTPError.swift index 27a21e306..983ae5948 100644 --- a/Sources/Shared/Toolkit/HTTP/HTTPError.swift +++ b/Sources/Shared/Toolkit/HTTP/HTTPError.swift @@ -48,20 +48,6 @@ public enum HTTPError: Error, Loggable { /// An other unknown error occurred. case other(Error) - @available(*, unavailable, message: "Use the HTTPError enum instead. HTTP status codes are available with HTTPError.errorResponse.") - public enum Kind: Sendable {} - - @available(*, unavailable, message: "Use the HTTPError enum instead. HTTP status codes are available with HTTPError.errorResponse.") - public var kind: Kind { fatalError() } - - /// Underlying error, if any. - @available(*, unavailable, message: "Use the HTTPError enum instead. HTTP status codes are available with HTTPError.errorResponse.") - public var cause: Error? { fatalError() } - - /// Received HTTP response, if any. - @available(*, unavailable, message: "Use the HTTPError.errorResponse enum case instead.") - public var response: HTTPResponse? { fatalError() } - /// Response body parsed as a JSON problem details. public func problemDetails() throws -> HTTPProblemDetails? { guard diff --git a/Sources/Shared/Toolkit/Media/AudioSession.swift b/Sources/Shared/Toolkit/Media/AudioSession.swift index 98695f8ea..8e3ae77ec 100644 --- a/Sources/Shared/Toolkit/Media/AudioSession.swift +++ b/Sources/Shared/Toolkit/Media/AudioSession.swift @@ -8,11 +8,6 @@ import AVFoundation import Foundation import UIKit -@available(*, unavailable, message: "Use `AudioSession` instead") -public typealias _AudioSession = AudioSession -@available(*, unavailable, message: "Use `AudioSessionUser` instead") -public typealias _AudioSessionUser = AudioSessionUser - /// An user of the `AudioSession`, for example a media player object. public protocol AudioSessionUser: AnyObject { /// Audio session configuration to use for this user. diff --git a/Sources/Shared/Toolkit/Media/NowPlayingInfo.swift b/Sources/Shared/Toolkit/Media/NowPlayingInfo.swift index ef757d443..acf9c67b4 100644 --- a/Sources/Shared/Toolkit/Media/NowPlayingInfo.swift +++ b/Sources/Shared/Toolkit/Media/NowPlayingInfo.swift @@ -8,9 +8,6 @@ import Foundation import MediaPlayer import UIKit -@available(*, unavailable, message: "Use `NowPlayingInfo` instead") -public typealias _NowPlayingInfo = NowPlayingInfo - /// Manages the Now Playing media item displayed on the lock screen. /// /// Simply set the `playback` and `media` properties when needed, the calls will automatically be diff --git a/Sources/Shared/Toolkit/ResourcesServer.swift b/Sources/Shared/Toolkit/ResourcesServer.swift deleted file mode 100644 index e9469cad2..000000000 --- a/Sources/Shared/Toolkit/ResourcesServer.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// Copyright 2025 Readium Foundation. All rights reserved. -// Use of this source code is governed by the BSD-style license -// available in the top-level LICENSE file of the project. -// - -import Foundation - -@available(*, unavailable, message: "Not used anymore") -public enum ResourcesServerError: Error { - case fileNotFound - case invalidPath - case serverFailure -} - -@available(*, unavailable, message: "Not used anymore") -public protocol ResourcesServer { - /// Serves the local file URL at the given absolute path on the server. - /// If the given URL is a directory, then all the files in the directory are served. - /// Subsequent calls with the same served path overwrite each other. - /// - /// Returns: The URL to access the file on the server. - @discardableResult - func serve(_ url: URL, at path: String) throws -> URL -} diff --git a/Sources/Streamer/Server/PublicationServer.swift b/Sources/Streamer/Server/PublicationServer.swift deleted file mode 100644 index ccc3d1188..000000000 --- a/Sources/Streamer/Server/PublicationServer.swift +++ /dev/null @@ -1,27 +0,0 @@ -// -// Copyright 2025 Readium Foundation. All rights reserved. -// Use of this source code is governed by the BSD-style license -// available in the top-level LICENSE file of the project. -// - -import Foundation -import ReadiumShared -import UIKit - -/// Errors thrown by the `PublicationServer`. -/// -/// - parser: An error thrown by the Parser. -/// - fetcher: An error thrown by the Fetcher. -/// - nilBaseUrl: The base url is nil. -/// - usedEndpoint: This endpoint is already in use. -@available(*, unavailable, message: "See the 2.5.0 migration guide to migrate the HTTP server") -public enum PublicationServerError: Error { - case parser(underlyingError: Error) - case fetcher(underlyingError: Error) - case nilBaseURL - case usedEndpoint -} - -/// The HTTP server for the publication's manifests and assets. Serves Epubs. -@available(*, unavailable, message: "See the 2.5.0 migration guide to migrate the HTTP server") -public class PublicationServer {} diff --git a/Sources/Streamer/Server/WebServerResourceResponse.swift b/Sources/Streamer/Server/WebServerResourceResponse.swift deleted file mode 100644 index 94ce5d397..000000000 --- a/Sources/Streamer/Server/WebServerResourceResponse.swift +++ /dev/null @@ -1,10 +0,0 @@ -// -// Copyright 2025 Readium Foundation. All rights reserved. -// Use of this source code is governed by the BSD-style license -// available in the top-level LICENSE file of the project. -// - -import Foundation - -@available(*, unavailable, message: "See the 2.5.0 migration guide to migrate the HTTP server") -public class WebServerResourceResponse {} diff --git a/Sources/Streamer/Streamer.swift b/Sources/Streamer/Streamer.swift deleted file mode 100644 index a61528da4..000000000 --- a/Sources/Streamer/Streamer.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// Copyright 2025 Readium Foundation. All rights reserved. -// Use of this source code is governed by the BSD-style license -// available in the top-level LICENSE file of the project. -// - -import Foundation -import ReadiumShared - -/// Opens a `Publication` using a list of parsers. -@available(*, unavailable, renamed: "PublicationOpener", message: "Use a `PublicationOpener` instead") -public final class Streamer { - public init( - parsers: [PublicationParser] = [], - ignoreDefaultParsers: Bool = false, - contentProtections: [ContentProtection] = [], - httpClient: HTTPClient = DefaultHTTPClient(), - onCreatePublication: Publication.Builder.Transform? = nil - ) {} -} From 1843dd29e6e34421424b49f9818060ec3dcb9108 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mickae=CC=88l=20Menu?= Date: Thu, 15 May 2025 17:32:53 +0200 Subject: [PATCH 2/2] Update Carthage project --- Support/Carthage/.xcodegen | 24 ---- .../Readium.xcodeproj/project.pbxproj | 108 ------------------ 2 files changed, 132 deletions(-) diff --git a/Support/Carthage/.xcodegen b/Support/Carthage/.xcodegen index f9703c100..58ae4fd33 100644 --- a/Support/Carthage/.xcodegen +++ b/Support/Carthage/.xcodegen @@ -343,7 +343,6 @@ ../../Sources/LCP/Content Protection/LCPContentProtection.swift ../../Sources/LCP/Content Protection/LCPDecryptor.swift ../../Sources/LCP/LCPAcquiredPublication.swift -../../Sources/LCP/LCPAcquisition.swift ../../Sources/LCP/LCPClient.swift ../../Sources/LCP/LCPError.swift ../../Sources/LCP/LCPLicense.swift @@ -518,7 +517,6 @@ ../../Sources/Navigator/EPUB/Scripts/src/vendor/hypothesis/anchoring/xpath.js ../../Sources/Navigator/EPUB/Scripts/src/vendor/hypothesis/README.md ../../Sources/Navigator/EPUB/Scripts/webpack.config.js -../../Sources/Navigator/EPUB/UserSettings.swift ../../Sources/Navigator/Input ../../Sources/Navigator/Input/.DS_Store ../../Sources/Navigator/Input/CompositeInputObserver.swift @@ -605,9 +603,6 @@ ../../Sources/Shared/Publication/Accessibility/Accessibility.swift ../../Sources/Shared/Publication/Accessibility/AccessibilityDisplayString+Generated.swift ../../Sources/Shared/Publication/Accessibility/AccessibilityMetadataDisplayGuide.swift -../../Sources/Shared/Publication/Asset -../../Sources/Shared/Publication/Asset/FileAsset.swift -../../Sources/Shared/Publication/Asset/PublicationAsset.swift ../../Sources/Shared/Publication/Contributor.swift ../../Sources/Shared/Publication/Extensions ../../Sources/Shared/Publication/Extensions/Archive @@ -647,7 +642,6 @@ ../../Sources/Shared/Publication/Protection/ContentProtection.swift ../../Sources/Shared/Publication/Protection/FallbackContentProtection.swift ../../Sources/Shared/Publication/Publication.swift -../../Sources/Shared/Publication/Publication+Deprecated.swift ../../Sources/Shared/Publication/PublicationCollection.swift ../../Sources/Shared/Publication/ReadingProgression.swift ../../Sources/Shared/Publication/Services @@ -680,23 +674,17 @@ ../../Sources/Shared/Publication/Services/Table Of Contents/TableOfContentsService.swift ../../Sources/Shared/Publication/Subject.swift ../../Sources/Shared/Publication/TDM.swift -../../Sources/Shared/Publication/User Settings -../../Sources/Shared/Publication/User Settings/UserProperties.swift -../../Sources/Shared/Publication/User Settings/UserSettings.swift ../../Sources/Shared/Resources ../../Sources/Shared/Resources/en-US.lproj ../../Sources/Shared/Resources/en-US.lproj/W3CAccessibilityMetadataDisplayGuide.strings ../../Sources/Shared/Toolkit ../../Sources/Shared/Toolkit/Archive -../../Sources/Shared/Toolkit/Archive/Archive.swift ../../Sources/Shared/Toolkit/Archive/ArchiveOpener.swift ../../Sources/Shared/Toolkit/Archive/ArchiveProperties.swift ../../Sources/Shared/Toolkit/Archive/CompositeArchiveOpener.swift ../../Sources/Shared/Toolkit/Archive/DefaultArchiveOpener.swift -../../Sources/Shared/Toolkit/Archive/ExplodedArchive.swift ../../Sources/Shared/Toolkit/Atomic.swift ../../Sources/Shared/Toolkit/Cancellable.swift -../../Sources/Shared/Toolkit/CancellableResult.swift ../../Sources/Shared/Toolkit/Closeable.swift ../../Sources/Shared/Toolkit/ControlFlow.swift ../../Sources/Shared/Toolkit/Data @@ -705,7 +693,6 @@ ../../Sources/Shared/Toolkit/Data/Asset/AssetRetriever.swift ../../Sources/Shared/Toolkit/Data/Container ../../Sources/Shared/Toolkit/Data/Container/Container.swift -../../Sources/Shared/Toolkit/Data/Container/Fetcher.swift ../../Sources/Shared/Toolkit/Data/Container/SingleResourceContainer.swift ../../Sources/Shared/Toolkit/Data/Container/TransformingContainer.swift ../../Sources/Shared/Toolkit/Data/ReadError.swift @@ -715,7 +702,6 @@ ../../Sources/Shared/Toolkit/Data/Resource/CachingResource.swift ../../Sources/Shared/Toolkit/Data/Resource/DataResource.swift ../../Sources/Shared/Toolkit/Data/Resource/FailureResource.swift -../../Sources/Shared/Toolkit/Data/Resource/LazyResource.swift ../../Sources/Shared/Toolkit/Data/Resource/Resource.swift ../../Sources/Shared/Toolkit/Data/Resource/ResourceContentExtractor.swift ../../Sources/Shared/Toolkit/Data/Resource/ResourceFactory.swift @@ -724,9 +710,7 @@ ../../Sources/Shared/Toolkit/Data/Resource/TransformingResource.swift ../../Sources/Shared/Toolkit/Data/Streamable.swift ../../Sources/Shared/Toolkit/DebugError.swift -../../Sources/Shared/Toolkit/Deferred.swift ../../Sources/Shared/Toolkit/DocumentTypes.swift -../../Sources/Shared/Toolkit/DownloadSession.swift ../../Sources/Shared/Toolkit/Either.swift ../../Sources/Shared/Toolkit/Extensions ../../Sources/Shared/Toolkit/Extensions/Bundle.swift @@ -735,7 +719,6 @@ ../../Sources/Shared/Toolkit/Extensions/String.swift ../../Sources/Shared/Toolkit/Extensions/StringEncoding.swift ../../Sources/Shared/Toolkit/Extensions/UIImage.swift -../../Sources/Shared/Toolkit/Extensions/URL.swift ../../Sources/Shared/Toolkit/File ../../Sources/Shared/Toolkit/File/DirectoryContainer.swift ../../Sources/Shared/Toolkit/File/FileContainer.swift @@ -748,7 +731,6 @@ ../../Sources/Shared/Toolkit/Format/FormatSniffer.swift ../../Sources/Shared/Toolkit/Format/FormatSnifferBlob.swift ../../Sources/Shared/Toolkit/Format/MediaType.swift -../../Sources/Shared/Toolkit/Format/MediaTypeSniffer.swift ../../Sources/Shared/Toolkit/Format/Sniffers ../../Sources/Shared/Toolkit/Format/Sniffers/AudiobookFormatSniffer.swift ../../Sources/Shared/Toolkit/Format/Sniffers/AudioFormatSniffer.swift @@ -768,7 +750,6 @@ ../../Sources/Shared/Toolkit/Format/Sniffers/RWPMFormatSniffer.swift ../../Sources/Shared/Toolkit/Format/Sniffers/XMLFormatSniffer.swift ../../Sources/Shared/Toolkit/Format/Sniffers/ZIPFormatSniffer.swift -../../Sources/Shared/Toolkit/HREF.swift ../../Sources/Shared/Toolkit/HTTP ../../Sources/Shared/Toolkit/HTTP/DefaultHTTPClient.swift ../../Sources/Shared/Toolkit/HTTP/HTTPClient.swift @@ -793,7 +774,6 @@ ../../Sources/Shared/Toolkit/PDF/PDFKit.swift ../../Sources/Shared/Toolkit/PDF/PDFOutlineNode.swift ../../Sources/Shared/Toolkit/ReadiumLocalizedString.swift -../../Sources/Shared/Toolkit/ResourcesServer.swift ../../Sources/Shared/Toolkit/Tokenizer ../../Sources/Shared/Toolkit/Tokenizer/TextTokenizer.swift ../../Sources/Shared/Toolkit/Tokenizer/Tokenizer.swift @@ -862,10 +842,6 @@ ../../Sources/Streamer/Parser/Readium ../../Sources/Streamer/Parser/Readium/ReadiumWebPubParser.swift ../../Sources/Streamer/PublicationOpener.swift -../../Sources/Streamer/Server -../../Sources/Streamer/Server/PublicationServer.swift -../../Sources/Streamer/Server/WebServerResourceResponse.swift -../../Sources/Streamer/Streamer.swift ../../Sources/Streamer/Toolkit ../../Sources/Streamer/Toolkit/DataCompression.swift ../../Sources/Streamer/Toolkit/Extensions diff --git a/Support/Carthage/Readium.xcodeproj/project.pbxproj b/Support/Carthage/Readium.xcodeproj/project.pbxproj index 4bfe581c1..65609a7e8 100644 --- a/Support/Carthage/Readium.xcodeproj/project.pbxproj +++ b/Support/Carthage/Readium.xcodeproj/project.pbxproj @@ -54,8 +54,6 @@ 1CB986C7E440F94F264A3567 /* EPUBSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4741AE26D76A8C2508437C2D /* EPUBSettings.swift */; }; 1D0B4067739311F6A54240E7 /* UIImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4598F4671CE7BAE9299BF84B /* UIImage.swift */; }; 20D530EDB2B26ADECB4DAE82 /* EPUBDeobfuscator.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3D785FEFDA202A61E620890 /* EPUBDeobfuscator.swift */; }; - 213857145D7EE713CA7E2EAA /* LazyResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54BCF97166D5A6F03C0C999B /* LazyResource.swift */; }; - 2141243525084B4088DF387D /* FileAsset.swift in Sources */ = {isa = PBXBuildFile; fileRef = 691C96D23D42A0C6AC03B1AE /* FileAsset.swift */; }; 216EA1C1ABA15836D60D910C /* GeneratedCoverService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 925CDE3176715EBEBF40B21F /* GeneratedCoverService.swift */; }; 21B27CD89562506DDC1D62D1 /* Signature.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0A5959877EC9688CB0C370E /* Signature.swift */; }; 2207C27B96F098AAF8B31F2C /* PassphrasesService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 606416A552192BF66FBDF3C2 /* PassphrasesService.swift */; }; @@ -66,15 +64,10 @@ 25349166318EB00EE8A0765C /* LCPError+wrap.swift in Sources */ = {isa = PBXBuildFile; fileRef = A266D398324C20079B0780BC /* LCPError+wrap.swift */; }; 253E72EB0422BEFD86DA2C95 /* PublicationContentIterator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BF38F71FDEC1920325B62D3 /* PublicationContentIterator.swift */; }; 25A925BF87206CB1781B04A5 /* PDFSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 305833C6F16FAB2E23F40382 /* PDFSettings.swift */; }; - 25D4D9FFA2286E7FCB1C44E9 /* CancellableResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CB0D3EE83AE0CE1F0B0B0CF /* CancellableResult.swift */; }; - 25E7A4A839D3BDB07D8A7203 /* Streamer.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE961CB4827D937CE3862B51 /* Streamer.swift */; }; - 26CA8F00CA85378CA0F8B3F2 /* MediaTypeSniffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3080C801A414DECC0227690 /* MediaTypeSniffer.swift */; }; 26CC9CB6CA4D81EB60AE860C /* CryptoSwift.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = E37F94C388A86CB8A34812A5 /* CryptoSwift.xcframework */; }; 27317F73ADCE4F5369BAACD0 /* Key.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DC02496961068F28D1B2A52 /* Key.swift */; }; - 27697B901FB5808F319FD1F6 /* PublicationAsset.swift in Sources */ = {isa = PBXBuildFile; fileRef = 419064D714A90CE07D575629 /* PublicationAsset.swift */; }; 27E40D709BD64E86EEF8EE7E /* Database.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6B9F632E457F20ADC4235EF /* Database.swift */; }; 294217B18570409AB1C317AD /* DeviceService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 616C70674FBF020FE4607617 /* DeviceService.swift */; }; - 2AE6A09759A80A668D08CDEC /* Archive.swift in Sources */ = {isa = PBXBuildFile; fileRef = A90EA81ECD9488CB3CBDAB41 /* Archive.swift */; }; 2B4D0BD8E7A2E53319CD7782 /* TransformingResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88ACF6B7BA6B9BDE7DD076BE /* TransformingResource.swift */; }; 2B8BC06B6B366E67C716DDA1 /* OPFMeta.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FC49AFB32B525AAC5BF7612 /* OPFMeta.swift */; }; 2C5436091DD72FDBF6FF136D /* OPFParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61575203A3BEB8E218CAFE38 /* OPFParser.swift */; }; @@ -82,7 +75,6 @@ 2E518C960D386F13E0A5E9B7 /* EPUBFixedSpreadView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF99DAF66659A218CEC25EAE /* EPUBFixedSpreadView.swift */; }; 2E8569120AD994A88CBE65FC /* ReadiumLCP.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 37120DA973F5C438B59BC014 /* ReadiumLCP.framework */; }; 2EEC1F0DF4BA4B8B1820FF9B /* LCPProgress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91F34B9B08BC6FB84CE54A26 /* LCPProgress.swift */; }; - 2F0C310DF17E6D7F1F567FD7 /* UserProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 707D6D09349FB31406847ABE /* UserProperties.swift */; }; 2F5F45D1B53B088D84B33658 /* ReadiumCSS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06C4BDFF128C774BCD660419 /* ReadiumCSS.swift */; }; 2F750D55729BB87E105E143F /* HTTPResourceFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6D7EDF33594A73EADA04511 /* HTTPResourceFactory.swift */; }; 2F8F8B6A05F8E124BA9D6B22 /* PublicationOpener.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5380F05215D8ED61B97F8021 /* PublicationOpener.swift */; }; @@ -123,7 +115,6 @@ 448374F2605586249A6CB4C8 /* FailureResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78FFDF8CF77437EDB41E4547 /* FailureResource.swift */; }; 46D29739FB017C62767CBE63 /* Presentation+EPUB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42EFF9139B59D763CE254F92 /* Presentation+EPUB.swift */; }; 47125BFFEC67DEB2C3D1B48C /* AudioNavigator.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCE34D74E282834684E1C999 /* AudioNavigator.swift */; }; - 47FE7B25B5DB153D406CF0CE /* UserSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4937644CB65AE6801CE3295 /* UserSettings.swift */; }; 4977279900B4BA602D92B5C4 /* ReadiumFuzi.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2828D89EBB52CCA782ED1146 /* ReadiumFuzi.xcframework */; }; 4A5F53CCC083D3E348379963 /* Types.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BF64D7C05A790D9CA5DD442 /* Types.swift */; }; 4AD286114A634A74BE78B1A0 /* LicenseContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15980B67505AAF10642B56C8 /* LicenseContainer.swift */; }; @@ -170,8 +161,6 @@ 63E239C6620E16BBA458452E /* PositionsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC45956B8991A9488F957B06 /* PositionsService.swift */; }; 644B6E4FEBD8A7C3DBCC86BB /* Bundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCEE6DBDF8E3D1ABE990DB33 /* Bundle.swift */; }; 66018235ED40B89D27EE9F33 /* Group.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FAAD26EE52713DB9F103610 /* Group.swift */; }; - 66A251DA78C53384E94F169F /* PublicationServer.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6D87AB6FB1B213E6269736B /* PublicationServer.swift */; }; - 6719F981514309A65D206A85 /* LCPAcquisition.swift in Sources */ = {isa = PBXBuildFile; fileRef = F622773881411FB8BE686B9F /* LCPAcquisition.swift */; }; 674BEEF110667C3051296E9B /* Double.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F3481F848A616A9A825A4BD /* Double.swift */; }; 67F1C7C3D434D2AA542376E3 /* PublicationParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = F609C27F073E40D662CFE093 /* PublicationParser.swift */; }; 682DFC1AF2BD7CAE0862B331 /* CryptoSwift.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = E37F94C388A86CB8A34812A5 /* CryptoSwift.xcframework */; }; @@ -211,7 +200,6 @@ 7E456E5AA21BCD712C325B62 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57074892837A37E3BFEDB481 /* String.swift */; }; 7E45E10720EA6B4F18196316 /* Metadata+Presentation.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC59A963F316359DF8B119AC /* Metadata+Presentation.swift */; }; 8029C2773AF704561B09BA99 /* DirectionalNavigationAdapter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85F7D914B293DF0A912613D2 /* DirectionalNavigationAdapter.swift */; }; - 8046E0E588860C8C5F67BF33 /* Publication+Deprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9627A9AFF7C08010248E1700 /* Publication+Deprecated.swift */; }; 8066A9FCBA3AA96717A01CFD /* W3CAccessibilityMetadataDisplayGuide.strings in Resources */ = {isa = PBXBuildFile; fileRef = 63AE10E3A29A24DD9C05C1D3 /* W3CAccessibilityMetadataDisplayGuide.strings */; }; 80FACAC721EBA4A11764482C /* EPUBPreferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5DA40519A11DDE69CDDBB1C /* EPUBPreferences.swift */; }; 81ADB258F083647221CED24F /* DataCompression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EBC685D4A0E07997088DD2D /* DataCompression.swift */; }; @@ -272,7 +260,6 @@ A8F8C4F2C0795BACE0A8C62C /* HREFNormalizer.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC8639886BD43362741AADD0 /* HREFNormalizer.swift */; }; A903542B8398018EB9C5A7F6 /* AudioFormatSniffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE5CE54D209AEA4AE5B07618 /* AudioFormatSniffer.swift */; }; A9DFAA4F1D752E15B432FFAB /* AudioPublicationManifestAugmentor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EE333717736247C6F846CEF /* AudioPublicationManifestAugmentor.swift */; }; - AABE86D87AEF1253765D1A88 /* HREF.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34CA9A244D941CB63515EDDE /* HREF.swift */; }; AADE9BC2642DEAD9B2936FB6 /* ResourceLicenseContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2D5DCD95C7B908BB6CA77C8 /* ResourceLicenseContainer.swift */; }; AAF00F4BC4765B6755AB46A3 /* Properties+Archive.swift in Sources */ = {isa = PBXBuildFile; fileRef = 294E01A2E6FF25539EBC1082 /* Properties+Archive.swift */; }; ACD1914D2D9BB7141148740F /* ReadiumShared.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97BC822B36D72EF548162129 /* ReadiumShared.framework */; }; @@ -286,13 +273,10 @@ B0B2C38D1A7B36E73C3E3779 /* DifferenceKit.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3F95F3F20D758BE0E7005EA3 /* DifferenceKit.xcframework */; }; B0F62AC136EF3587E147468E /* AssetRetriever.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C054DDC6D1BCF4A420C980C /* AssetRetriever.swift */; }; B1008DFBDE3E33CA552E0E26 /* Optional.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D8FCFFDA8AA421435CB40DE /* Optional.swift */; }; - B1495FA8FF075FCF1E95E0F6 /* ResourcesServer.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8D7AF06866C53D07E094337 /* ResourcesServer.swift */; }; B23C740199DCBD23BDF0670F /* Container.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2085E9C042F54271D5B9555 /* Container.swift */; }; - B24AC3D961591A4DBCA06602 /* ExplodedArchive.swift in Sources */ = {isa = PBXBuildFile; fileRef = C59803AADFCF32C93C9D9D29 /* ExplodedArchive.swift */; }; B49522888052E9F41D0DD013 /* ZIPFormatSniffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8AA8BD22E2F5495286C0A1C /* ZIPFormatSniffer.swift */; }; B4D55F234AD2CB5728184346 /* Bundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = F669F31B0B6EC690C48916EC /* Bundle.swift */; }; B57EC602072D4276D502B80D /* AudiobookFormatSniffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1674CCC0BA8B1F4E2D2B3A4C /* AudiobookFormatSniffer.swift */; }; - B5B5CD2B8BE1F8EAFB626A48 /* Fetcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = B39BF68DBB28D655023ADB62 /* Fetcher.swift */; }; B676871C6BC2D08EC8279B8D /* ReadingProgression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74F646B746EB27124F9456F8 /* ReadingProgression.swift */; }; B7B0C7AD992344EA09937D6D /* ReadiumShared.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97BC822B36D72EF548162129 /* ReadiumShared.framework */; }; B912ABB7DE8FC1A7A8EC1D84 /* EPUBNavigatorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC5ED9E15482AED288A6634F /* EPUBNavigatorViewController.swift */; }; @@ -314,11 +298,9 @@ C0A492BDDCB4A472F408B3B4 /* ReadiumZIPFoundation.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 69E17C4870C64264819EB227 /* ReadiumZIPFoundation.xcframework */; }; C122D3F719E77AEFA36E3034 /* RPFFormatSniffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9ACA9031C70DAB05CE0DD463 /* RPFFormatSniffer.swift */; }; C1A94B2A9C446CB03650DC47 /* NCXParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4363E8A92B1EA9AF2561DCE9 /* NCXParser.swift */; }; - C1CD3DA1A9EF154667E5B50B /* WebServerResourceResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = D008F7BB187AE82CBB115D0F /* WebServerResourceResponse.swift */; }; C1FE3D17C59E10E63F81DF70 /* TTSEngine.swift in Sources */ = {isa = PBXBuildFile; fileRef = D88E58FF0AC7D506273FD8D9 /* TTSEngine.swift */; }; C283E515CA6A8EEA1C89AD98 /* License.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2C93C33347DC0A41FE15AC6 /* License.swift */; }; C2A1FAC4ADA33EABA1E45EF8 /* ParseData.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1085F2D690A73984E675D54 /* ParseData.swift */; }; - C333D5E30C91AE34B3479505 /* Deferred.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17D22986A3ADE9E883691EE2 /* Deferred.swift */; }; C35C6AB637D2048D9B0A3C62 /* OPDSAvailability.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2E780027410F4B6CC872B3D /* OPDSAvailability.swift */; }; C368C73C819F65CE3409D35D /* Fuzi.swift in Sources */ = {isa = PBXBuildFile; fileRef = CFE34EA8AF2D815F7169CA45 /* Fuzi.swift */; }; C3F4CBE80D741D4158CA8407 /* ReadiumInternal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 42FD63C2720614E558522675 /* ReadiumInternal.framework */; }; @@ -384,7 +366,6 @@ ED67A0EFAE830F72846BF9C0 /* Range.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3231F989F7D7E560DD5364B9 /* Range.swift */; }; EDDAB394E312B7A7AE5BB758 /* Publication+OPDS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BB5D42EEF0083D833E2A572 /* Publication+OPDS.swift */; }; EE16BE486539BC9B3C3C6896 /* ReadiumInternal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 42FD63C2720614E558522675 /* ReadiumInternal.framework */; }; - EE91BD9CF087FC151BC8E31E /* UserSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D586820910099E82E7C35B5 /* UserSettings.swift */; }; EE951A131E38E316BF7A1129 /* LCPDialogViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = ED5C6546C24E5E619E4CC9D1 /* LCPDialogViewController.xib */; }; EF15E9163EBC82672B22F6E0 /* ImageParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37087C0D0B36FE7F20F1C891 /* ImageParser.swift */; }; EF26968E6A2087142F5334AF /* HTTPClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4C94659A8749299DBE3628D /* HTTPClient.swift */; }; @@ -399,7 +380,6 @@ F5E15982E5B0E3AE1D59B7A3 /* DebugError.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6CB6D3B390CC927AE547A5C /* DebugError.swift */; }; F631EA324143E669070523F3 /* NSRegularExpression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 714F1696AC76F6AFEA1924D5 /* NSRegularExpression.swift */; }; F717B34FACAFBC50DA0A1513 /* BitmapFormatSniffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0977FA3A6BDEDE2F91A7C444 /* BitmapFormatSniffer.swift */; }; - F80C561495197EE829162340 /* URL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 733C1DF0A4612D888376358B /* URL.swift */; }; F8FAAB52DFE1B5E3B93ABD31 /* URLConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = D828AE80E51FC75FAF6DD7DB /* URLConvertible.swift */; }; F9011983B7BD2782E98A8DF0 /* CompositeArchiveOpener.swift in Sources */ = {isa = PBXBuildFile; fileRef = A666276329312F001163298C /* CompositeArchiveOpener.swift */; }; F90CF6CE1D4F5FA195E19D76 /* LCPPassphraseAuthentication.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D5053C2151DDDE4E8F06513 /* LCPPassphraseAuthentication.swift */; }; @@ -407,7 +387,6 @@ FAE889176170C79E97671E78 /* PDFDocumentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 999F16769EC3127CE292B8DB /* PDFDocumentView.swift */; }; FBC62A9EC21695FF47572E04 /* URITemplate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CFE1142A6C038A35C527CE84 /* URITemplate.swift */; }; FCFFE5305127D9FC72549EAA /* LCPDFPositionsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B9196192A22B8AB80E6B2F /* LCPDFPositionsService.swift */; }; - FD7E029AF57356BC74140EA0 /* DownloadSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = E76DFDE600369E9D3EF452E1 /* DownloadSession.swift */; }; FED01A1734FAAD72683CC79E /* CompletionList.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65C8719E9CC8EF0D2430AD85 /* CompletionList.swift */; }; /* End PBXBuildFile section */ @@ -527,7 +506,6 @@ 0BB64178365BFA9ED75C7078 /* LCPDialogViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LCPDialogViewController.swift; sourceTree = ""; }; 0C054DDC6D1BCF4A420C980C /* AssetRetriever.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AssetRetriever.swift; sourceTree = ""; }; 0C45688D0A9C1F81F463FF92 /* EPUBReflowableSpreadView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EPUBReflowableSpreadView.swift; sourceTree = ""; }; - 0CB0D3EE83AE0CE1F0B0B0CF /* CancellableResult.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CancellableResult.swift; sourceTree = ""; }; 0FC49AFB32B525AAC5BF7612 /* OPFMeta.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OPFMeta.swift; sourceTree = ""; }; 1039900AC78465AD989D7464 /* Content.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Content.swift; sourceTree = ""; }; 103E0171A3CDEFA1B1F1F180 /* WKWebView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WKWebView.swift; sourceTree = ""; }; @@ -539,7 +517,6 @@ 15980B67505AAF10642B56C8 /* LicenseContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LicenseContainer.swift; sourceTree = ""; }; 1674CCC0BA8B1F4E2D2B3A4C /* AudiobookFormatSniffer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudiobookFormatSniffer.swift; sourceTree = ""; }; 17ACAC3E8F61DA108DCC9F51 /* SQLiteLCPLicenseRepository.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SQLiteLCPLicenseRepository.swift; sourceTree = ""; }; - 17D22986A3ADE9E883691EE2 /* Deferred.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Deferred.swift; sourceTree = ""; }; 18E809378D79D09192A0AAE1 /* ContentService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentService.swift; sourceTree = ""; }; 1B80A1477F527C0B2142005E /* PDFPreferencesEditor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PDFPreferencesEditor.swift; sourceTree = ""; }; 1B864C304333E329B893D6A4 /* HTMLFormatSniffer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HTMLFormatSniffer.swift; sourceTree = ""; }; @@ -576,7 +553,6 @@ 342D5C0FEE79A2ABEE24A43E /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = System/Library/Frameworks/CoreServices.framework; sourceTree = SDKROOT; }; 34AB954525AC159166C96A36 /* HTMLResourceContentIterator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HTMLResourceContentIterator.swift; sourceTree = ""; }; 34B5C938E4973406F110F2E6 /* OPDS1Parser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OPDS1Parser.swift; sourceTree = ""; }; - 34CA9A244D941CB63515EDDE /* HREF.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HREF.swift; sourceTree = ""; }; 3510E7E84A5361BCECC90569 /* WarningLogger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WarningLogger.swift; sourceTree = ""; }; 37087C0D0B36FE7F20F1C891 /* ImageParser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageParser.swift; sourceTree = ""; }; 37120DA973F5C438B59BC014 /* ReadiumLCP.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ReadiumLCP.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -595,7 +571,6 @@ 3F95F3F20D758BE0E7005EA3 /* DifferenceKit.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = DifferenceKit.xcframework; path = ../../Carthage/Build/DifferenceKit.xcframework; sourceTree = ""; }; 3FD12CFF76C3F2946929CF93 /* Result.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Result.swift; sourceTree = ""; }; 4031FC7E7A15217731764EB2 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; - 419064D714A90CE07D575629 /* PublicationAsset.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublicationAsset.swift; sourceTree = ""; }; 41B61198128D628CFB3FD22A /* DiffableDecoration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DiffableDecoration.swift; sourceTree = ""; }; 41E54A18E2983098A6A4DAE0 /* CompositeFormatSniffer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompositeFormatSniffer.swift; sourceTree = ""; }; 41EB258B894B86A0DA1D00D4 /* ArchiveOpener.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArchiveOpener.swift; sourceTree = ""; }; @@ -630,7 +605,6 @@ 53DAB92EBBB8031CA66B1E6F /* ReadiumAdapterLCPSQLite.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ReadiumAdapterLCPSQLite.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 5420CABB4B38006F64160F49 /* AccessibilityDisplayString+Generated.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AccessibilityDisplayString+Generated.swift"; sourceTree = ""; }; 54699BC0E00F327E67908F6A /* Encryption.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Encryption.swift; sourceTree = ""; }; - 54BCF97166D5A6F03C0C999B /* LazyResource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LazyResource.swift; sourceTree = ""; }; 55BC4119B8937D17ED80B1AB /* ControlFlow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ControlFlow.swift; sourceTree = ""; }; 55D0EAD1ABB7B829A3891D3A /* UIView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIView.swift; sourceTree = ""; }; 56286133DD0AE093F2C5E9FD /* LicensesService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LicensesService.swift; sourceTree = ""; }; @@ -660,17 +634,14 @@ 68719C5F09F9193E378DF585 /* LCPDecryptor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LCPDecryptor.swift; sourceTree = ""; }; 68D2804AD0439307575B3073 /* MappedPreference.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MappedPreference.swift; sourceTree = ""; }; 68FF131876FA3A63025F2662 /* Language.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Language.swift; sourceTree = ""; }; - 691C96D23D42A0C6AC03B1AE /* FileAsset.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileAsset.swift; sourceTree = ""; }; 69212974E62EF509BC1F0C7A /* UnknownAbsoluteURL.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnknownAbsoluteURL.swift; sourceTree = ""; }; 69E17C4870C64264819EB227 /* ReadiumZIPFoundation.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = ReadiumZIPFoundation.xcframework; path = ../../Carthage/Build/ReadiumZIPFoundation.xcframework; sourceTree = ""; }; 6BC71BAFF7A20D7903E6EE4D /* Properties+EPUB.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Properties+EPUB.swift"; sourceTree = ""; }; 6D80848AADD20D4384D9AF59 /* HTMLFontFamilyDeclaration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HTMLFontFamilyDeclaration.swift; sourceTree = ""; }; 6FA3AA272772FCF7D6268A74 /* FileURL.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileURL.swift; sourceTree = ""; }; - 707D6D09349FB31406847ABE /* UserProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserProperties.swift; sourceTree = ""; }; 714F1696AC76F6AFEA1924D5 /* NSRegularExpression.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSRegularExpression.swift; sourceTree = ""; }; 7214B2366A4E024517FF8C76 /* HTTPRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HTTPRequest.swift; sourceTree = ""; }; 72922E22040CEFB3B7BBCDAF /* LoggerStub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggerStub.swift; sourceTree = ""; }; - 733C1DF0A4612D888376358B /* URL.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URL.swift; sourceTree = ""; }; 739566E777BA37891BCECB95 /* Streamable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Streamable.swift; sourceTree = ""; }; 74F646B746EB27124F9456F8 /* ReadingProgression.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadingProgression.swift; sourceTree = ""; }; 75DFA22C741A09C81E23D084 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LCPDialogViewController.xib; sourceTree = ""; }; @@ -718,7 +689,6 @@ 93BF3947EBA8736BF20F36FB /* WebView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebView.swift; sourceTree = ""; }; 9407E818636BEA4550E57F57 /* ReadiumNavigator.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ReadiumNavigator.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 94414130EC3731CD9920F27D /* LCPDFTableOfContentsService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LCPDFTableOfContentsService.swift; sourceTree = ""; }; - 9627A9AFF7C08010248E1700 /* Publication+Deprecated.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Publication+Deprecated.swift"; sourceTree = ""; }; 968B4EB4AD29DFA430C8A563 /* LicenseDocument.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LicenseDocument.swift; sourceTree = ""; }; 97BC822B36D72EF548162129 /* ReadiumShared.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ReadiumShared.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 9883F57707AC488197F4312E /* ReadiumLCPLocalizedString.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadiumLCPLocalizedString.swift; sourceTree = ""; }; @@ -732,7 +702,6 @@ 9BD31F314E7B3A61C55635E5 /* prod-license.lcpl */ = {isa = PBXFileReference; path = "prod-license.lcpl"; sourceTree = ""; }; 9C2F9F4D29EBDE812891418F /* HTTPURL.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HTTPURL.swift; sourceTree = ""; }; 9D2B24C3150D502382AAC939 /* ReadiumStreamer.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ReadiumStreamer.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 9D586820910099E82E7C35B5 /* UserSettings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserSettings.swift; sourceTree = ""; }; 9D8FCFFDA8AA421435CB40DE /* Optional.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Optional.swift; sourceTree = ""; }; 9DDB25FC1693613B72DFDB6E /* OpdsMetadata.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpdsMetadata.swift; sourceTree = ""; }; 9E3543F628B017E9BF65DD08 /* StringSearchService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringSearchService.swift; sourceTree = ""; }; @@ -751,7 +720,6 @@ A75B535BBE6EE5898327DB52 /* HTMLInjection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HTMLInjection.swift; sourceTree = ""; }; A77C8BE0AC489E5FF2DA1FE3 /* ProxyPreference.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProxyPreference.swift; sourceTree = ""; }; A8F9AFE740CFFFAD65BA095E /* ContentKey.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentKey.swift; sourceTree = ""; }; - A90EA81ECD9488CB3CBDAB41 /* Archive.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Archive.swift; sourceTree = ""; }; A94DA04D56753CC008F65B1A /* VisualNavigator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VisualNavigator.swift; sourceTree = ""; }; AACBE378F01200C74992CA91 /* KeyObserver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyObserver.swift; sourceTree = ""; }; AB0EF21FADD12D51D0619C0D /* LinkRelation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinkRelation.swift; sourceTree = ""; }; @@ -767,7 +735,6 @@ B1085F2D690A73984E675D54 /* ParseData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ParseData.swift; sourceTree = ""; }; B15C9123EA383ED81DE0393A /* AVTTSEngine.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AVTTSEngine.swift; sourceTree = ""; }; B22A0E76866F626D79F0A64C /* SQLiteLCPPassphraseRepository.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SQLiteLCPPassphraseRepository.swift; sourceTree = ""; }; - B39BF68DBB28D655023ADB62 /* Fetcher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Fetcher.swift; sourceTree = ""; }; B53B841C2F5A59BA3B161258 /* Resource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Resource.swift; sourceTree = ""; }; B5CE464C519852D38F873ADB /* PotentialRights.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PotentialRights.swift; sourceTree = ""; }; B7457AD096857CA307F6ED6A /* InputObservable+Legacy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "InputObservable+Legacy.swift"; sourceTree = ""; }; @@ -794,7 +761,6 @@ C51A36BFDC79EB5377D69582 /* CSSLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CSSLayout.swift; sourceTree = ""; }; C51C74A5990A3BA93B3DC587 /* ZIPArchiveOpener.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZIPArchiveOpener.swift; sourceTree = ""; }; C57EC6B0ADED2B0D395F2AEA /* ContentProtection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentProtection.swift; sourceTree = ""; }; - C59803AADFCF32C93C9D9D29 /* ExplodedArchive.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExplodedArchive.swift; sourceTree = ""; }; C5BCDE636CED5B883CC5F2B4 /* TableOfContentsService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TableOfContentsService.swift; sourceTree = ""; }; C5E7CEDF6EA681FE8119791B /* Feed.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Feed.swift; sourceTree = ""; }; C96FD34093B3C3E83827B70C /* FileSystemError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSystemError.swift; sourceTree = ""; }; @@ -806,7 +772,6 @@ CFE1142A6C038A35C527CE84 /* URITemplate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URITemplate.swift; sourceTree = ""; }; CFE34EA8AF2D815F7169CA45 /* Fuzi.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Fuzi.swift; sourceTree = ""; }; CFFEBDFE931745C07DACD4A3 /* Minizip.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Minizip.xcframework; path = ../../Carthage/Build/Minizip.xcframework; sourceTree = ""; }; - D008F7BB187AE82CBB115D0F /* WebServerResourceResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebServerResourceResponse.swift; sourceTree = ""; }; D0C2A38D366CE8560BCBAC8B /* PDFPositionsService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PDFPositionsService.swift; sourceTree = ""; }; D0E8D322A523DA324E3E2E59 /* MinizipContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MinizipContainer.swift; sourceTree = ""; }; D13272E03B63E96D4246F79D /* PDFParser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PDFParser.swift; sourceTree = ""; }; @@ -849,9 +814,7 @@ E5DF154DCC73CFBDB0F919DE /* AbsoluteURL.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AbsoluteURL.swift; sourceTree = ""; }; E6CB6D3B390CC927AE547A5C /* DebugError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DebugError.swift; sourceTree = ""; }; E6E97CCA91F910315C260373 /* ReadiumWebPubParser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadiumWebPubParser.swift; sourceTree = ""; }; - E76DFDE600369E9D3EF452E1 /* DownloadSession.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DownloadSession.swift; sourceTree = ""; }; E7D002FDDAD1A21AC5BB84CE /* Container.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Container.swift; sourceTree = ""; }; - E8D7AF06866C53D07E094337 /* ResourcesServer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResourcesServer.swift; sourceTree = ""; }; EC329362A0E8AC6CC018452A /* ReadiumOPDS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ReadiumOPDS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; EC59A963F316359DF8B119AC /* Metadata+Presentation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Metadata+Presentation.swift"; sourceTree = ""; }; EC5ED9E15482AED288A6634F /* EPUBNavigatorViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EPUBNavigatorViewController.swift; sourceTree = ""; }; @@ -867,17 +830,13 @@ F07214E263C6589987A561F9 /* SQLite.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = SQLite.xcframework; path = ../../Carthage/Build/SQLite.xcframework; sourceTree = ""; }; F1F5FEE0323287B9CAA09F03 /* MediaOverlays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaOverlays.swift; sourceTree = ""; }; F2E780027410F4B6CC872B3D /* OPDSAvailability.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OPDSAvailability.swift; sourceTree = ""; }; - F3080C801A414DECC0227690 /* MediaTypeSniffer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaTypeSniffer.swift; sourceTree = ""; }; - F4937644CB65AE6801CE3295 /* UserSettings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserSettings.swift; sourceTree = ""; }; F4FC8F971F00B5876803B62A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; F5C6D0C5860E802EDA23068C /* EditingAction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditingAction.swift; sourceTree = ""; }; F5DA40519A11DDE69CDDBB1C /* EPUBPreferences.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EPUBPreferences.swift; sourceTree = ""; }; F609C27F073E40D662CFE093 /* PublicationParser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublicationParser.swift; sourceTree = ""; }; - F622773881411FB8BE686B9F /* LCPAcquisition.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LCPAcquisition.swift; sourceTree = ""; }; F64FBE3CA5C1B0C73A22E86D /* Bundle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Bundle.swift; sourceTree = ""; }; F669F31B0B6EC690C48916EC /* Bundle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Bundle.swift; sourceTree = ""; }; F6D54D373E999936DBAD7E6F /* ResourceFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResourceFactory.swift; sourceTree = ""; }; - F6D87AB6FB1B213E6269736B /* PublicationServer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublicationServer.swift; sourceTree = ""; }; F6E45005E776078B46DB8E14 /* Memoize.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Memoize.swift; sourceTree = ""; }; F6EB7CAF6D058380A2AB711A /* CGPDF.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CGPDF.swift; sourceTree = ""; }; F76073E8E6DACE7F9D22E0DD /* PointerEvent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PointerEvent.swift; sourceTree = ""; }; @@ -893,7 +852,6 @@ FCD0F310FEAC86A2DD40B8AE /* FileResourceFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileResourceFactory.swift; sourceTree = ""; }; FCEE6DBDF8E3D1ABE990DB33 /* Bundle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Bundle.swift; sourceTree = ""; }; FE483F1E43C61C3678A25803 /* ResourceContentExtractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResourceContentExtractor.swift; sourceTree = ""; }; - FE961CB4827D937CE3862B51 /* Streamer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Streamer.swift; sourceTree = ""; }; FEB6D68278E0A593C810E2C0 /* AudioLocatorService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioLocatorService.swift; sourceTree = ""; }; FFE4559CE100932572C843E5 /* RWPMFormatSniffer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RWPMFormatSniffer.swift; sourceTree = ""; }; /* End PBXFileReference section */ @@ -1097,7 +1055,6 @@ 98D8CC7BC117BBFB206D01CC /* EPUBSpread.swift */, E233289C75C9F73E6E28DDB4 /* EPUBSpreadView.swift */, 8AB3B86AB42261727B2811CF /* HTMLDecorationTemplate.swift */, - F4937644CB65AE6801CE3295 /* UserSettings.swift */, 01819314A9C8B44F7EF6EC7D /* CSS */, AC7E4A4E70D2E94C04BB1366 /* Preferences */, ); @@ -1261,12 +1218,10 @@ 371E5D46DEBBE58A793B2546 /* Archive */ = { isa = PBXGroup; children = ( - A90EA81ECD9488CB3CBDAB41 /* Archive.swift */, 41EB258B894B86A0DA1D00D4 /* ArchiveOpener.swift */, BAFBCF0D898A8BF16923E264 /* ArchiveProperties.swift */, A666276329312F001163298C /* CompositeArchiveOpener.swift */, AC150FB45A4AB33AF516AE09 /* DefaultArchiveOpener.swift */, - C59803AADFCF32C93C9D9D29 /* ExplodedArchive.swift */, ); path = Archive; sourceTree = ""; @@ -1381,7 +1336,6 @@ 57074892837A37E3BFEDB481 /* String.swift */, BB11EA964FBB42D44C3E4A50 /* StringEncoding.swift */, 4598F4671CE7BAE9299BF84B /* UIImage.swift */, - 733C1DF0A4612D888376358B /* URL.swift */, ); path = Extensions; sourceTree = ""; @@ -1591,15 +1545,6 @@ path = Resources; sourceTree = ""; }; - 7F295F683A7D4F3D3F74724F /* User Settings */ = { - isa = PBXGroup; - children = ( - 707D6D09349FB31406847ABE /* UserProperties.swift */, - 9D586820910099E82E7C35B5 /* UserSettings.swift */, - ); - path = "User Settings"; - sourceTree = ""; - }; 7F42F058A2DC364B554BF7F2 /* Authentications */ = { isa = PBXGroup; children = ( @@ -1622,24 +1567,6 @@ path = Preferences; sourceTree = ""; }; - 87352D29A81641A4B9054319 /* Asset */ = { - isa = PBXGroup; - children = ( - 691C96D23D42A0C6AC03B1AE /* FileAsset.swift */, - 419064D714A90CE07D575629 /* PublicationAsset.swift */, - ); - path = Asset; - sourceTree = ""; - }; - 8B081F7BB4E12998397F575A /* Server */ = { - isa = PBXGroup; - children = ( - F6D87AB6FB1B213E6269736B /* PublicationServer.swift */, - D008F7BB187AE82CBB115D0F /* WebServerResourceResponse.swift */, - ); - path = Server; - sourceTree = ""; - }; 9481E4E9060E976FB3516CD1 /* Logger */ = { isa = PBXGroup; children = ( @@ -1654,7 +1581,6 @@ isa = PBXGroup; children = ( C2085E9C042F54271D5B9555 /* Container.swift */, - B39BF68DBB28D655023ADB62 /* Fetcher.swift */, 868A38C213F1D0BAF276CF97 /* SingleResourceContainer.swift */, 0918DA360AAB646144E435D5 /* TransformingContainer.swift */, ); @@ -1748,7 +1674,6 @@ E1FB533E84CE563807BDB012 /* FormatSniffer.swift */, D388387CD2A23CD5DB30F74A /* FormatSnifferBlob.swift */, 0BA2EAF033943573AB84F8BE /* MediaType.swift */, - F3080C801A414DECC0227690 /* MediaTypeSniffer.swift */, 9A608269D7012B9452CD39AB /* Sniffers */, ); path = Format; @@ -1808,7 +1733,6 @@ 789B56D6D8A6AA79CD3643F4 /* CachingResource.swift */, 3C7A5494480CD5A896B1F388 /* DataResource.swift */, 78FFDF8CF77437EDB41E4547 /* FailureResource.swift */, - 54BCF97166D5A6F03C0C999B /* LazyResource.swift */, B53B841C2F5A59BA3B161258 /* Resource.swift */, FE483F1E43C61C3678A25803 /* ResourceContentExtractor.swift */, F6D54D373E999936DBAD7E6F /* ResourceFactory.swift */, @@ -1889,21 +1813,16 @@ children = ( CBB57FCAEE605484A7290DBB /* Atomic.swift */, 7BBD54FD376456C1925316BC /* Cancellable.swift */, - 0CB0D3EE83AE0CE1F0B0B0CF /* CancellableResult.swift */, C02A9225D636D845BF24F6AC /* Closeable.swift */, 55BC4119B8937D17ED80B1AB /* ControlFlow.swift */, E6CB6D3B390CC927AE547A5C /* DebugError.swift */, - 17D22986A3ADE9E883691EE2 /* Deferred.swift */, 8A00FF0C84822A134A353BD4 /* DocumentTypes.swift */, - E76DFDE600369E9D3EF452E1 /* DownloadSession.swift */, 10FB29EDCCE5910C869295F1 /* Either.swift */, D555435E2BADB2B877FD50C7 /* FileExtension.swift */, - 34CA9A244D941CB63515EDDE /* HREF.swift */, EDA827FC94F5CB3F9032028F /* JSON.swift */, 68FF131876FA3A63025F2662 /* Language.swift */, 5BC6AE42A31D77B548CB0BB4 /* Observable.swift */, 38984FD65CFF1D54FF7F794F /* ReadiumLocalizedString.swift */, - E8D7AF06866C53D07E094337 /* ResourcesServer.swift */, EE7B762C97CFC214997EC677 /* Weak.swift */, 371E5D46DEBBE58A793B2546 /* Archive */, 0B06420A6651D6D94BE937F3 /* Data */, @@ -1950,7 +1869,6 @@ isa = PBXGroup; children = ( 3C61B620DE6C012805269111 /* LCPAcquiredPublication.swift */, - F622773881411FB8BE686B9F /* LCPAcquisition.swift */, A214B5DC13576FB36935B5EA /* LCPClient.swift */, A5A115134AA0B8F5254C8139 /* LCPError.swift */, 093629E752DE17264B97C598 /* LCPLicense.swift */, @@ -2078,18 +1996,15 @@ 01B24895126F2A744A8E9E61 /* Metadata.swift */, 76638D3D1220E4C2620B9A80 /* Properties.swift */, 2DF03272C07D6951ADC1311E /* Publication.swift */, - 9627A9AFF7C08010248E1700 /* Publication+Deprecated.swift */, 3B0A149FC97C747F55F6463C /* PublicationCollection.swift */, 74F646B746EB27124F9456F8 /* ReadingProgression.swift */, 98CD4C99103DC795E44F56AE /* Subject.swift */, 28792F801221D49F61B92CF8 /* TDM.swift */, AD3EFEE43B6E256F6AFB1F53 /* Accessibility */, - 87352D29A81641A4B9054319 /* Asset */, 055166DFDEE6C6A17D04D42D /* Extensions */, C1002695D860AE505D689C26 /* Media Overlays */, 75C5238287B0D2F1DF6889DB /* Protection */, 4898F65BFF048F7966C82B74 /* Services */, - 7F295F683A7D4F3D3F74724F /* User Settings */, ); path = Publication; sourceTree = ""; @@ -2129,9 +2044,7 @@ isa = PBXGroup; children = ( 5380F05215D8ED61B97F8021 /* PublicationOpener.swift */, - FE961CB4827D937CE3862B51 /* Streamer.swift */, C6D767E6D0B9374779FD7D84 /* Parser */, - 8B081F7BB4E12998397F575A /* Server */, 3DEAB9E5B6D2F30246C7884E /* Toolkit */, ); name = Streamer; @@ -2507,7 +2420,6 @@ 4A5F53CCC083D3E348379963 /* Types.swift in Sources */, D8C9C54CC84D1C0810343D9E /* UIColor.swift in Sources */, 8BA982B992E0370C7BF94DF6 /* UIView.swift in Sources */, - 47FE7B25B5DB153D406CF0CE /* UserSettings.swift in Sources */, B96E8865DCA4A0CEFDA24DDF /* VisualNavigator.swift in Sources */, 6F042D80A0E07C285E006678 /* WKWebView.swift in Sources */, 7305815B0C701A4E9BA2DF7C /* WebView.swift in Sources */, @@ -2544,11 +2456,8 @@ 46D29739FB017C62767CBE63 /* Presentation+EPUB.swift in Sources */, 2F8F8B6A05F8E124BA9D6B22 /* PublicationOpener.swift in Sources */, 67F1C7C3D434D2AA542376E3 /* PublicationParser.swift in Sources */, - 66A251DA78C53384E94F169F /* PublicationServer.swift in Sources */, C9FBD23E459FB395377E149E /* ReadiumWebPubParser.swift in Sources */, - 25E7A4A839D3BDB07D8A7203 /* Streamer.swift in Sources */, 4AE70F783C07D9938B40E792 /* StringExtension.swift in Sources */, - C1CD3DA1A9EF154667E5B50B /* WebServerResourceResponse.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2603,7 +2512,6 @@ 93214069D844E340CEA229AB /* EncryptionParser.swift in Sources */, 1BF9469B4574D30E5C9BB75E /* Event.swift in Sources */, 3B5A8A76665391D2D32CB012 /* LCPAcquiredPublication.swift in Sources */, - 6719F981514309A65D206A85 /* LCPAcquisition.swift in Sources */, 837C0BC3151E302508B4BC44 /* LCPAuthenticating.swift in Sources */, A13490DA4406382752B8EA2B /* LCPClient.swift in Sources */, 4C6E7DF3D71660E723E148CF /* LCPContentProtection.swift in Sources */, @@ -2660,7 +2568,6 @@ 36653806ADC48EFC65316955 /* AccessibilityDisplayString+Generated.swift in Sources */, 795B476F8BA9A8704E78394A /* AccessibilityMetadataDisplayGuide.swift in Sources */, 0A6BF62D6FE0C04DA8B8D3CA /* AnyURL.swift in Sources */, - 2AE6A09759A80A668D08CDEC /* Archive.swift in Sources */, AD0C25FD15876213BD8A3AAE /* ArchiveOpener.swift in Sources */, BB77E1A7A043F0B357AAA80F /* ArchiveProperties.swift in Sources */, 1004CE1C72C85CC3702C09C0 /* Asset.swift in Sources */, @@ -2676,7 +2583,6 @@ 6F01765B4C03EC36C95D02E3 /* CGPDF.swift in Sources */, ECCE64CDEDA32509382A8520 /* CachingResource.swift in Sources */, D1248D9E9EE269C3245927F7 /* Cancellable.swift in Sources */, - 25D4D9FFA2286E7FCB1C44E9 /* CancellableResult.swift in Sources */, D29E1DBC5BD1B82C996427C4 /* Closeable.swift in Sources */, BD520A603D8351461485877F /* ComicFormatSniffer.swift in Sources */, F9011983B7BD2782E98A8DF0 /* CompositeArchiveOpener.swift in Sources */, @@ -2697,21 +2603,16 @@ 69FDA9FBD2BA1775F73B3CE0 /* DefaultFormatSniffer.swift in Sources */, 73B7E6C4D4B157F61D4C11C9 /* DefaultHTTPClient.swift in Sources */, 37F8A777BB5C13CA98545F6E /* DefaultLocatorService.swift in Sources */, - C333D5E30C91AE34B3479505 /* Deferred.swift in Sources */, 3E195F4601612E7B4B9CB232 /* DirectoryContainer.swift in Sources */, 5912EC9BB073282862F325F2 /* DocumentTypes.swift in Sources */, - FD7E029AF57356BC74140EA0 /* DownloadSession.swift in Sources */, 8BD3DB373A8785BE8E71845D /* EPUBFormatSniffer.swift in Sources */, 5DE027530786CFB542965AC6 /* EPUBLayout.swift in Sources */, 6263D73CD26D391A6E7D0DCA /* Either.swift in Sources */, 9A1877FBEAA0BFC4C74AD3BB /* Encryption.swift in Sources */, - B24AC3D961591A4DBCA06602 /* ExplodedArchive.swift in Sources */, 188D742F80B70DE8A625AD21 /* Facet.swift in Sources */, 448374F2605586249A6CB4C8 /* FailureResource.swift in Sources */, 23CDD350C85A31950B9AB780 /* FallbackContentProtection.swift in Sources */, 32EA394BBACCA7C17EF2BA9F /* Feed.swift in Sources */, - B5B5CD2B8BE1F8EAFB626A48 /* Fetcher.swift in Sources */, - 2141243525084B4088DF387D /* FileAsset.swift in Sources */, 7E303F9D6DDE98BEF63E67F1 /* FileContainer.swift in Sources */, 1AEF63A8471C7676092842D2 /* FileExtension.swift in Sources */, 0025BE4D568B560277323B95 /* FileResource.swift in Sources */, @@ -2724,7 +2625,6 @@ C368C73C819F65CE3409D35D /* Fuzi.swift in Sources */, 216EA1C1ABA15836D60D910C /* GeneratedCoverService.swift in Sources */, 66018235ED40B89D27EE9F33 /* Group.swift in Sources */, - AABE86D87AEF1253765D1A88 /* HREF.swift in Sources */, A8F8C4F2C0795BACE0A8C62C /* HREFNormalizer.swift in Sources */, A348284A6738CD705288CB8C /* HTMLFormatSniffer.swift in Sources */, 594CE84C2B11169AA0B86615 /* HTMLResourceContentIterator.swift in Sources */, @@ -2743,7 +2643,6 @@ 4D4915BB3847EF285362CF50 /* LCPLicenseFormatSniffer.swift in Sources */, 56CB87DACCA10F737710BFF6 /* Language.swift in Sources */, AD572C6A7AD031FEC40A0BD7 /* LanguageFormatSniffer.swift in Sources */, - 213857145D7EE713CA7E2EAA /* LazyResource.swift in Sources */, DD8E2E0D394399A51F295380 /* Link.swift in Sources */, C8A94F023B6C0F96875D5D62 /* LinkRelation.swift in Sources */, 8CCDF77696A0F2C7BF3171CC /* LocalizedString.swift in Sources */, @@ -2759,7 +2658,6 @@ 76F6EE39F504B6A80837C90D /* MediaOverlayNode.swift in Sources */, 9E064BC9E99D4F7D8AC3109B /* MediaOverlays.swift in Sources */, A5073271D3DDAE4056629C53 /* MediaType.swift in Sources */, - 26CA8F00CA85378CA0F8B3F2 /* MediaTypeSniffer.swift in Sources */, 7E45E10720EA6B4F18196316 /* Metadata+Presentation.swift in Sources */, 78C52EED635B5F8C38A02298 /* Metadata.swift in Sources */, E39B7BCA5ACB6D33C47FCB38 /* MinizipArchiveOpener.swift in Sources */, @@ -2787,11 +2685,9 @@ 8F5B0B5B83BF7F1145556FF8 /* Properties+OPDS.swift in Sources */, 96380C55604AF52289CC91C3 /* Properties+Presentation.swift in Sources */, E408BBB74A13AFB83C953C67 /* Properties.swift in Sources */, - 8046E0E588860C8C5F67BF33 /* Publication+Deprecated.swift in Sources */, E75D342B54BD25242A29B105 /* Publication+EPUB.swift in Sources */, EDDAB394E312B7A7AE5BB758 /* Publication+OPDS.swift in Sources */, 5730E84475195005D1291672 /* Publication.swift in Sources */, - 27697B901FB5808F319FD1F6 /* PublicationAsset.swift in Sources */, D81ECD34F39E58E30E7E13B2 /* PublicationCollection.swift in Sources */, 253E72EB0422BEFD86DA2C95 /* PublicationContentIterator.swift in Sources */, 8889176F35267918E2B3577E /* PublicationService.swift in Sources */, @@ -2808,7 +2704,6 @@ 94E5D205567FEBB52E38F318 /* ResourceContentExtractor.swift in Sources */, 92C06DC4CF7986B15F1C82B3 /* ResourceFactory.swift in Sources */, 30F89196BD5163B0A09BF9F7 /* ResourceProperties.swift in Sources */, - B1495FA8FF075FCF1E95E0F6 /* ResourcesServer.swift in Sources */, 01E785BEA7F30AD1C8A5F3DE /* SearchService.swift in Sources */, 332DAC5192963BB17CBA5A02 /* SingleResourceContainer.swift in Sources */, 9065C4C0F40B6A5601541EF7 /* Streamable.swift in Sources */, @@ -2825,15 +2720,12 @@ 2B4D0BD8E7A2E53319CD7782 /* TransformingResource.swift in Sources */, 1D0B4067739311F6A54240E7 /* UIImage.swift in Sources */, FBC62A9EC21695FF47572E04 /* URITemplate.swift in Sources */, - F80C561495197EE829162340 /* URL.swift in Sources */, F8FAAB52DFE1B5E3B93ABD31 /* URLConvertible.swift in Sources */, D4BBC0AD7652265497B5CD1C /* URLExtensions.swift in Sources */, 1600DB04CEACF97EE8AD9CEE /* URLProtocol.swift in Sources */, 222E5BC7A9E632DD6BB9A78E /* URLQuery.swift in Sources */, A1B834459A13B655624E6618 /* UnknownAbsoluteURL.swift in Sources */, - 2F0C310DF17E6D7F1F567FD7 /* UserProperties.swift in Sources */, A25F76D41A944B81CB911A63 /* UserRights.swift in Sources */, - EE91BD9CF087FC151BC8E31E /* UserSettings.swift in Sources */, 3ECB525CEB712CEC5EFCD26D /* WarningLogger.swift in Sources */, 89A7CA4173B39673A237EAED /* Weak.swift in Sources */, 936B9525C0CBA8D6D05515FE /* XML.swift in Sources */,