BookOpening
public protocol BookOpening
Undocumented
-
Called by the SDK before opening a book. At this point, the book has been already downloaded & decrypted successfully and is available for opening.
Declaration
Swift
@MainActor func willOpenBook(_ book: Book, currentPolicy: BookOpeningPolicy, callback: @escaping ((BookOpeningPolicy) -> Void))Parameters
bookThe book being opened.
currentPolicyCurrent book opening policy which has been decided by the SDK.
callbackProtocol implementation must call this block at some point in all cases.
currentPolicycan be passed directly to this callback if protocol implementation doesn’t need to override the policy. Protocol implementation may also choose to override current policy and passallowordenyinstead. -
Called by the SDK after opening a book successfully.
Declaration
Swift
@MainActor func didOpenBook(_ book: Book, mediaType: BookMediaType)