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

    func willOpenBook(_ book: Book, currentPolicy: BookOpeningPolicy, callback: @escaping ((BookOpeningPolicy) -> Void))

    Parameters

    book

    The book being opened.

    currentPolicy

    Current book opening policy which has been decided by the SDK.

    callback

    Protocol implementation must call this block at some point in all cases. currentPolicy can 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 pass allow or deny instead.

  • Called by the SDK after opening a book successfully.

    Declaration

    Swift

    func didOpenBook(_ book: Book, mediaType: BookMediaType)