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.
BookOpeningPolicy.ALLOW if current user is authorized to open book at this moment.
BookOpeningPolicy.DENY if current user is not authorized to open book at this moment.
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.