ESCLRequestClient

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

Parameters

baseUrl

The base url to make requests to. Has to be a URL which is derived with "http URL to printer" + "rs" txt record acquired from mDNS

usedHttpClient

eSCL is an HTTP-based protocol. This OkHttpClient will be used to execute requests

Constructors

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

Types

Link copied to clipboard
Link copied to clipboard
data class ScannedPage(val contentType: String, val contentLocation: String? = null, val data: ByteArray, val supportRangeHeader: Boolean)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
sealed class ScannerStatusResult

Properties

Link copied to clipboard
val baseUrl: Url
Link copied to clipboard
Link copied to clipboard
val usedHttpClient: HttpClient

Functions

Link copied to clipboard

Posts a job to the scanner

Link copied to clipboard

Cancels a job on the scanner

Link copied to clipboard

Executes a ScannerCapabilities request to receive the characteristics of the scanner.

Link copied to clipboard

Executes a ScannerStatus request to receive the current status of the scanner.

Link copied to clipboard

Retrieves the next page for a job on the scanner

Link copied to clipboard

Retrieves the scan image info for the last page retrieved for a job on the scanner