Skip to content
This repository has been archived by the owner on Jul 29, 2022. It is now read-only.

Refactor public API with coroutines and rewrite decryptor #84

Merged
merged 16 commits into from
Aug 14, 2020
Merged

Refactor public API with coroutines and rewrite decryptor #84

merged 16 commits into from
Aug 14, 2020

Conversation

qnga
Copy link
Contributor

@qnga qnga commented Aug 9, 2020

I'm not sure yet in particular about:

  • URLPresenter: I can't understand why the dismiss callback is exposed.
  • Are LicenseDocument and LicenseStatus intended to be public?

@mickael-menu
Copy link
Member

  • URLPresenter: I can't understand why the dismiss callback is exposed.

We need to know when the user is done with the HTML renew (through a web view), to call the completion closure provided in renewLoan(). Although we could use a term more idiomatic for Kotlin than dismiss.

  • Are LicenseDocument and LicenseStatus intended to be public?

Yes, they hold information about the license.

@qnga
Copy link
Contributor Author

qnga commented Aug 9, 2020

Ok, so I think the dismiss callback would be useless with the suspend signature.

suspend fun renewLoan(end: DateTime?, urlPresenter: suspend (URL) -> Unit): Try<Unit, LcpException> should be fine.

@mickael-menu mickael-menu merged commit 71c29c0 into readium:alpha Aug 14, 2020
@qnga qnga deleted the refactorlcp branch September 17, 2020 14:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants