Package-level declarations

Types

Link copied to clipboard
@Serializable
data class Adf(val simplexCaps: InputSourceCaps, val duplexCaps: InputSourceCaps? = null, val feederCapacity: UInt? = null, val adfOptions: List<EnumOrRaw<AdfOption>>)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
object CcdChannelSerializer : KSerializer<EnumOrRaw<CcdChannel>>
Link copied to clipboard
@Serializable
data class Certification(val name: String, val version: String)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@Serializable
data class CompressionFactorSupport(val min: Int, val max: Int, val normal: Int, val step: Int)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@Serializable
data class DiscreteResolution(val xResolution: UInt, val yResolution: UInt)
Link copied to clipboard
@Serializable(with = DocumentFormatsSerializer::class)
data class DocumentFormats(val documentFormats: List<String>, val documentFormatExt: List<String>)
Link copied to clipboard
Link copied to clipboard
enum Edge : Enum<Edge>
Link copied to clipboard
sealed class EnumOrRaw<E : Enum<E>>
Link copied to clipboard
class EnumOrRawSerializer<E : Enum<E>>(enumValues: Array<E>) : KSerializer<EnumOrRaw<E>>
Link copied to clipboard
sealed class ESCLHttpCallResult<out T>
Link copied to clipboard
class ESCLQuirkFilteringReader(reader: XmlReader) : XmlDelegatingReader

An XMLReader that filters out scanner quirks

Link copied to clipboard
class ESCLRequestClient(val baseUrl: Url, val usedHttpClient: HttpClient = HttpClient { install(HttpTimeout) { requestTimeoutMillis = 100_000 connectTimeoutMillis = 100_000 socketTimeoutMillis = 100_000 } })

A client for the eSCL scanning protocol

Link copied to clipboard
class ESCLXml
Link copied to clipboard
Link copied to clipboard
@Serializable
value class Inches(val value: Double) : LengthUnit
Link copied to clipboard
Link copied to clipboard
@Serializable
data class InputSourceCaps(val minWidth: ThreeHundredthsOfInch, val maxWidth: ThreeHundredthsOfInch, val minHeight: ThreeHundredthsOfInch, val maxHeight: ThreeHundredthsOfInch, val maxScanRegions: UInt?, val maxOpticalXResolution: UInt?, val maxOpticalYResolution: UInt?, val riskyLeftMargin: ThreeHundredthsOfInch?, val riskyRightMargin: ThreeHundredthsOfInch?, val riskyTopMargin: ThreeHundredthsOfInch?, val riskyBottomMargin: ThreeHundredthsOfInch?, val maxPhysicalWidth: ThreeHundredthsOfInch?, val maxPhysicalHeight: ThreeHundredthsOfInch?, val settingProfiles: List<SettingProfile>, val supportedIntents: List<EnumOrRaw<ScanIntent>>, val edgeAutoDetection: List<Edge>)
Link copied to clipboard
@Serializable
data class JobInfo(val jobURI: String, val jobUUID: String, val age: UInt, val imagesCompleted: UInt, val imagesToTransfer: UInt? = null, val transferRetryCount: UInt? = null, val jobState: JobState, val jobStateReasons: List<String>? = null)
Link copied to clipboard
Link copied to clipboard
data class JsError(val message: String?, val cause: String?, val name: String?, val stack: String?)
Link copied to clipboard
sealed interface LengthUnit
Link copied to clipboard
@Serializable
value class Millimeters(val value: Double) : LengthUnit
Link copied to clipboard
@Serializable
data class Platen(val inputSourceCaps: InputSourceCaps)
Link copied to clipboard
sealed class Result<T>
Link copied to clipboard
@Serializable
data class ScanImageInfo(val jobURI: String, val jobUuid: Uuid, val actualWidth: UInt, val actualHeight: UInt, val actualBytesPerLine: UInt, val blankPageDetected: Boolean?)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class ScanJob(val jobUri: String, val esclClient: ESCLRequestClient, val scanSettings: ScanSettings)
Link copied to clipboard
@Serializable
data class ScannerCapabilities(val interfaceVersion: String, val makeAndModel: String, val manufacturer: String? = null, val deviceUuid: Uuid? = null, val serialNumber: String, val adminURI: String? = null, val iconURI: String? = null, val certifications: List<Certification>? = null, val platen: Platen? = null, val adf: Adf? = null, val supportedMediaTypes: List<String>? = null, val sharpenSupport: SharpenSupport? = null, val compressionFactorSupport: CompressionFactorSupport? = null, val storedJobRequestSupport: StoredJobRequestSupport? = null)
Link copied to clipboard
Link copied to clipboard
@Serializable
data class ScannerStatus(val version: String, val state: ScannerState, val jobs: List<JobInfo> = listOf(), val adfState: AdfState? = null)
Link copied to clipboard
@Serializable
data class ScanRegion(val height: ThreeHundredthsOfInch, val width: ThreeHundredthsOfInch, val xOffset: ThreeHundredthsOfInch, val yOffset: ThreeHundredthsOfInch)
Link copied to clipboard
@Serializable
data class ScanRegions(val regions: List<ScanRegion>, val mustHonor: Boolean = true)
Link copied to clipboard
@Serializable
data class ScanSettings(val version: String, val intent: EnumOrRaw<ScanIntent>? = null, val scanRegions: ScanRegions? = null, val documentFormat: String? = null, val documentFormatExt: String? = null, val contentType: EnumOrRaw<ContentType>? = null, val inputSource: InputSource? = null, val xResolution: UInt? = null, val yResolution: UInt? = null, val colorMode: ColorMode? = null, val colorSpace: String? = null, val mediaType: String? = null, val ccdChannel: CcdChannel? = null, val binaryRendering: BinaryRendering? = null, val duplex: Boolean? = null, val numberOfPages: UInt? = null, val brightness: UInt? = null, val compressionFactor: UInt? = null, val contrast: UInt? = null, val gamma: UInt? = null, val highlight: UInt? = null, val noiseRemoval: UInt? = null, val shadow: UInt? = null, val sharpen: UInt? = null, val threshold: UInt? = null, val contextID: String? = null, val blankPageDetection: Boolean? = null, val feedDirection: FeedDirection? = null, val blankPageDetectionAndRemoval: Boolean? = null)
Link copied to clipboard
@Serializable
data class SettingProfile(val colorModes: List<EnumOrRaw<ColorMode>>, val contentTypes: List<EnumOrRaw<ContentType>>?, val documentFormats: DocumentFormats, val supportedResolutions: SupportedResolutions, val colorSpaces: List<String>? = null, val ccdChannels: List<EnumOrRaw<CcdChannel>>? = null, val binaryRenderings: List<String>? = null)
Link copied to clipboard
@Serializable
data class SharpenSupport(val min: Int, val max: Int, val normal: Int?, val step: Int)
Link copied to clipboard
@Serializable
data class StoredJobRequestSupport(val maxStoredJobRequests: UInt, val timoutInSeconds: UInt)
Link copied to clipboard
@Serializable
data class SupportedResolutions(val discreteResolutions: List<DiscreteResolution>)
Link copied to clipboard
@Serializable
value class ThreeHundredthsOfInch(val value: UInt) : LengthUnit
Link copied to clipboard
data class UnknownInput(val inputKind: InputKind, val descriptor: XmlDescriptor, val name: QName?, val candidates: Collection<Any>)

Properties

Link copied to clipboard
const val MILLIMETERS_PER_INCH: Double = 25.4
Link copied to clipboard
const val NS_PWG: String

URL used by the pwg namespace in eSCL XML documents

Link copied to clipboard
const val NS_SCAN: String

URL used by the scan namespace in eSCL XML documents

Link copied to clipboard

Functions

Link copied to clipboard
fun allProps(o: dynamic): Array<String>
Link copied to clipboard
expect suspend fun <T> catchAny(block: suspend () -> T): Result<T>
actual suspend fun <T> catchAny(block: suspend () -> T): Result<T>
actual suspend fun <T> catchAny(block: suspend () -> T): Result<T>
actual suspend fun <T> catchAny(block: suspend () -> T): Result<T>
Link copied to clipboard
Link copied to clipboard
inline fun <E : Enum<E>> enumOrRawSerializer(): KSerializer<EnumOrRaw<E>>
Link copied to clipboard
inline suspend fun ResponseException.errorBody(): String?
Link copied to clipboard
fun gatherJsErrorIfPossible(e: dynamic): Any
Link copied to clipboard
Link copied to clipboard
fun isJsError(e: dynamic): Boolean
Link copied to clipboard
Link copied to clipboard
actual fun <T> platformErrorMapping(e: Any): ESCLHttpCallResult<T>

This function maps Ktor engine and system specific exceptions to system-independent error types

actual fun <T> platformErrorMapping(e: Any): ESCLHttpCallResult<T>
actual fun <T> platformErrorMapping(e: Any): ESCLHttpCallResult<T>
actual fun <T> platformErrorMapping(e: Any): ESCLHttpCallResult<T>
Link copied to clipboard
inline suspend fun <T> HttpClient.safeRequest(urlString: String, crossinline block: HttpRequestBuilder.() -> Unit): ESCLHttpCallResult<T>
Link copied to clipboard
fun <T> undefinedToNull(value: dynamic): T?