onWillOpenBook

abstract fun onWillOpenBook(book: Book, currentPolicy: BookOpeningPolicy, callback: (policy: BookOpeningPolicy) -> Unit)

Called by the SDK before opening a book. At this point, the book has been already downloaded & decrypted successfully and is available for opening.

currentPolicy is the book opening policy which has been decided by the SDK.

The interface implementation must call callback at some point in all cases. currentPolicy can be passed directly to this callback if the interface implementation doesn't need to override the policy. The interface implementation may also choose to override current policy and pass BookOpeningPolicy.ALLOW or BookOpeningPolicy.DENY instead.