|
|
| InputDecoder (const InputDecoder &)=delete |
| | Stateful streams cannot be copied.
|
|
InputDecoder & | operator= (const InputDecoder &)=delete |
| | Stateful streams cannot be copied.
|
| | InputDecoder (InputDecoder &&other) noexcept=default |
| | Moved-from object must be reset before use.
|
| InputDecoder & | operator= (InputDecoder &&other) noexcept=default |
| | Reset moved-from object before reuse.
|
| std::expected< InputStep, InputError > | next (std::string_view bytes, InputTime now) |
| | Pull at most one event or protocol report, accepting at most work_bytes from a borrowed view.
|
| std::expected< InputStep, InputError > | finish (InputTime now) |
| | End the stream, flushing at most one pending event per call. Repeat until finished/failed. next() then returns closed; reset starts a new session. Monotonic time and allocation/error contracts match next(). No input is consumed.
|
| std::optional< InputTime > | deadline () const noexcept |
| | Return the next decode deadline, or none in ground/closed/failed state. Pending events must be drained before waiting. No allocation or mutation.
|
| std::expected< void, InputError > | expectReplies (InputProbeWindow window) noexcept |
| | Replace expected replies; valid only in ground with no pending event. Returns INVALID_WINDOW if deadline <= opens_at or not at a sequence boundary. Does not change time, own a query, send bytes, or authenticate future candidates.
|
| void | setPointerContext (InputPointerContext context) noexcept |
| | Set the owning context for subsequently started CSI sequences, without resetting partial input.
|
|
void | reset () noexcept |
| | Drop pending input/window/time/offset and recover at an explicit new session boundary. Options remain. Frees retained paste; does not invalidate already returned events.
|
Bounded streaming decoder for a deliberately small 7-bit VT input profile.
One executor owns an instance; synchronize any transfer between threads. Independent instances may run concurrently. No callbacks, I/O, shared globals or terminal mode changes occur. Events and protocol reports own their data; input views are borrowed only during next(). Storage is O(max_paste_bytes) plus fixed scratch and one pending issue. Caller must bound its own retained events. Allocation failures propagate, leaving the decoder failed until reset; no partial paste is delivered.
- Note
- For identical timestamps and feed/finish/window schedules, event order does not depend on chunk boundaries. Preserve timestamps when resubmitting suffixes. Deadlines saturate at UINT64_MAX; now >= deadline expires before accepting bytes. The legacy protocol cannot distinguish typed/forged replies or paste end markers.