//readium-shared/org.readium.r2.shared.publication.services
Package-level declarations¶
Types¶
Name | Summary |
---|---|
CacheService | [androidJvm] interface CacheService : Publication.Service Provides publication-bound caches. |
ContentProtectionService | [androidJvm] interface ContentProtectionService : Publication.Service Provides information about a publication's content protection and manages user rights. |
CoverService | [androidJvm] interface CoverService : Publication.Service Provides an easy access to a bitmap version of the publication cover. |
DefaultLocatorService | [androidJvm] open class DefaultLocatorService(val readingOrder: List<Link>, val positionsByReadingOrder: suspend () -> List<List<Locator>>) : LocatorService |
GeneratedCoverService | [androidJvm] abstract class GeneratedCoverService : CoverService A CoverService which provides a unique cover for each Publication. |
InMemoryCacheService | [androidJvm] class InMemoryCacheService(context: Context?) : CacheService, MemoryObserver A basic CacheService implementation keeping the cached objects in memory. |
InMemoryCoverService | [androidJvm] class InMemoryCoverService : GeneratedCoverService A CoverService which uses a provided in-memory bitmap. |
LocatorService | [androidJvm] interface LocatorService : Publication.Service Locates the destination of various sources (e.g. locators, progression, etc.) in the publication. |
PerResourcePositionsService | [androidJvm] class PerResourcePositionsService(readingOrder: List<Link>, fallbackMediaType: String) : PositionsService Simple PositionsService for a Publication which generates one position per readingOrder resource. |
PositionsService | [androidJvm] interface PositionsService : Publication.Service Provides a list of discrete locations in the publication, no matter what the original format is. |
Functions¶
Name | Summary |
---|---|
cover | [androidJvm] suspend fun Publication.cover(): Bitmap? Returns the publication cover as a Bitmap at its maximum size. |
coverFitting | [androidJvm] suspend fun Publication.coverFitting(maxSize: Size): Bitmap? Returns the publication cover as a Bitmap, scaled down to fit the given maxSize. |
locate | [androidJvm] suspend fun Publication.locate(locator: Locator): Locator? Locates the target of the given locator. |
locateProgression | [androidJvm] suspend fun Publication.locateProgression(totalProgression: Double): Locator? Locates the target at the given progression relative to the whole publication. |
positions | [androidJvm] suspend fun Publication.positions(): List<Locator> Returns the list of all the positions in the publication. |
positionsByReadingOrder | [androidJvm] suspend fun Publication.positionsByReadingOrder(): List<List<Locator>> Returns the list of all the positions in the publication, grouped by the resource reading order index. |
Properties¶
Name | Summary |
---|---|
cacheService | [androidJvm] val PublicationServicesHolder.cacheService: CacheService? |
cacheServiceFactory | [androidJvm] var Publication.ServicesBuilder.cacheServiceFactory: ServiceFactory? Factory to build a CacheService. |
contentProtectionServiceFactory | [androidJvm] var Publication.ServicesBuilder.contentProtectionServiceFactory: ServiceFactory? Factory to build a ContentProtectionService. |
coverServiceFactory | [androidJvm] var Publication.ServicesBuilder.coverServiceFactory: ServiceFactory? Factory to build a CoverService. |
credentials | [androidJvm] val Publication.credentials: String? Credentials used to unlock this Publication. |
isProtected | [androidJvm] val Publication.isProtected: Boolean Returns whether this Publication is protected by a Content Protection technology. |
isRestricted | [androidJvm] val Publication.isRestricted: Boolean Whether the Publication has a restricted access to its resources, and can't be rendered in a Navigator. |
locatorServiceFactory | [androidJvm] var Publication.ServicesBuilder.locatorServiceFactory: ServiceFactory? Factory to build a LocatorService |
positionsByResource | [androidJvm] val Publication.~~positionsByResource~~: Map<String, List<Locator>> List of all the positions in each resource, indexed by their href. |
positionsServiceFactory | [androidJvm] var Publication.ServicesBuilder.positionsServiceFactory: ServiceFactory? Factory to build a PositionsService |
protectionError | [androidJvm] val Publication.protectionError: UserException? The error raised when trying to unlock the Publication, if any. |
protectionLocalizedName | [androidJvm] val Publication.protectionLocalizedName: LocalizedString? User-facing localized name for this Content Protection, e.g. "Readium LCP". It could be used in a sentence such as "Protected by {name}". |
protectionName | [androidJvm] val Publication.protectionName: String? User-facing name for this Content Protection, e.g. "Readium LCP". It could be used in a sentence such as "Protected by {name}". |
protectionScheme | [androidJvm] val Publication.protectionScheme: ContentProtection.Scheme? Known technology for this type of Content Protection. |
rights | [androidJvm] val Publication.rights: ContentProtectionService.UserRights Manages consumption of user rights and permissions. |