Viewing is open to everyone. Downloading and starring need a GitHub sign-in.
Sign in with GitHub
CKeyScanObserver.swift
v0.1.0-build.85
Latest
Commit ede38f5
Sign in with GitHub to download. Each download is recorded with your GitHub username.
| 1 | import Foundation |
| 2 | |
| 3 | /// Receives scan-session events from `CKeyCameraScanner`, on the scanner's |
| 4 | /// frame queue (begin and end on the main thread). Implementations must be |
| 5 | /// fast and non-blocking: they run on the decode path. |
| 6 | /// |
| 7 | /// The `CKey` product installs its aggregate telemetry through this protocol |
| 8 | /// (see `CKeyScanner` there). The scan-only `CKeyScanner` product never |
| 9 | /// installs one, so it carries no telemetry. |
| 10 | public protocol CKeyScanObserver: AnyObject { |
| 11 | /// The host started scanning (a new scan session). |
| 12 | func scanSessionDidBegin() |
| 13 | /// One frame was processed in `milliseconds`. |
| 14 | func scanFrameProcessed(milliseconds: Double) |
| 15 | /// The session's first valid decode. |
| 16 | func scanSessionDidDecode(_ result: CKeyResult) |
| 17 | /// The host stopped scanning. |
| 18 | func scanSessionDidEnd() |
| 19 | } |