code wiki / (root) / nx_escl.nx

nx_escl.nx

buildroot/runtime/nx_escl.nx

5418 B108 linesdepth 2pulls 2 transitivereach 2 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_escl.nx -- sovereign eSCL (AirScan / Mopria Scan) protocol layer -- R-SCAN R0, the "scan from ANY scanner" rung. eSCL is to scanners what IPP is to printers: a vendor-neutral HTTP + XML standard that Apple AirScan and Mopria Scan use, and that modern Brother/HP/Canon/Epson MFPs answer. This file is the pure protocol layer: - EMIT a ScanSettings XML document (the POST body for /eSCL/ScanJobs): resolution, color mode, region, input source, document format. - PARSE the key fields from a ScannerCapabilities XML response (GET /eSCL/ScannerCapabilities): MaxWidth, MaxHeight, supported color modes + document formats, via targeted tag extraction (no full XML parser). Live transport (GET caps -> POST ScanJobs -> GET NextDocument over HTTP) + the JPEG decode are the next rungs (R-SCAN R1/R2). never-brick #26: pure byte emit/parse, the only syscall is sys_mmap for an int-format scratch. no_silent_failure: an absent tag yields -1, a missing format yields 0 -- never a fabricated value. genealogy_id: project-printer-management-ipp-sclass-2026-06-20 ; license_tier: ORIGINAL CITED: eSCL/Mopria scan uses the PWG SM + HP eSCL schemas; XML uses single-quoted attrs here to stay literal-clean. Namespace prefixes scan:/pwg: are the common emission; prefix-robust parsing is a follow-on.

dependencies 1 imports · 2 importers

nx_syscalls.nx nx_escl.nx nx_escl_probe.nx nx_escl_test.nx

imports: nx_syscalls.nx

imported by: nx_escl_probe.nxnx_escl_test.nx

structs

none

consts

none

functions

20func ex_puts(buf: *u8, off: i64, s: *u8) -> i64
27func ex_puti(buf: *u8, off: i64, v: i64) -> i64
calls 1: sys_mmap
42func nx_escl_scan_settings(buf: *u8, res: i64, w: i64, h: i64, color: *u8, fmt: *u8, source: *u8) -> i64
calls 1: ex_puts
63func nx_escl_find(buf: *u8, n: i64, needle: *u8, nlen: i64) -> i64
84func nx_escl_has(buf: *u8, n: i64, needle: *u8, nlen: i64) -> i64
91func nx_escl_caps_int(buf: *u8, n: i64, tagopen: *u8, tlen: i64) -> i64