License class

Implemented types
Available Extensions

Constructors

License(ValidatedDocuments _documents, LicenseValidation _validation, LicensesRepository _licenses, DeviceService _device, NetworkService _network, LcpClient _lcpClient)

Properties

canCopy bool
Returns whether the user is currently allowed to copy content to the pasteboard.
no setter
canPrint bool
Returns whether the user is currently allowed to print the content.
no setter
canRenewLoan bool
Can the user renew the loaned publication?
no setteroverride
canReturnPublication bool
Can the user return the loaned publication?
no setteroverride
charactersToCopyLeft int?
Number of remaining characters allowed to be copied by the user. If null, there's no limit.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
license LicenseDocument
License Document information. https://readium.org/lcp-specs/releases/lcp/latest.html
no setteroverride
maxRenewDate DateTime?
The maximum potential date to renew to. If null, then the renew date might not be customizable.
no setteroverride
pagesToPrintLeft int?
Number of pages allowed to be printed by the user. If null, there's no limit.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status StatusDocument?
License Status Document information. https://readium.org/lcp-specs/releases/lsd/latest.html
no setteroverride

Methods

canCopyText(String text) bool
Returns whether the user is allowed to copy the given text to the pasteboard.
canPrintPageCount(int pageCount) bool
Returns whether the user is allowed to print the given amount of pages.
copy(String text) bool
Consumes the given text with the copy right.
decrypt(ByteData data) Future<Try<ByteData, LcpException>>
Decrypts the given data encrypted with the license's content key.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
print(int pageCount) bool
Consumes the given amount of pages with the print right.
renewLoan(RenewListener listener, {bool prefersWebPage = false}) Future<Try<DateTime, LcpException>>
Renews the loan by starting a renew LSD interaction.
override
returnPublication() Future<Try<bool, LcpException>>
Returns the publication to its provider.
override
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited