Add bounded stored-recording metadata listing - #4
Open
megablocks wants to merge 4 commits into
Open
Conversation
megablocks
marked this pull request as ready for review
July 31, 2026 10:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FileInfoListXML models and a bounded core recording-metadata APIBcCameraneolink recordingsCLI for same-day, channel-aware metadata searchesThis deliberately implements listing only. It does not replay or download recording content.
Safety, compatibility, and behavior
0..=31in the core APIRecordingSearchOptions::defaultFileDateTimealongside the recording APIBcCameraOptand uses it without issuing a UID discovery requestuid()API and adds explicit-channelget_uid_for_channel()/uid_for_channel()APIs for NVR and multi-channel callersfinished=0even on short pages; uses page-size completion only when the marker is absentId,ID, andid, plus structured and plain-text date/time layouts<type>, then<recordType>, then<alarmType>--json; UID, credentials, and raw XML are never emittedThe command reports fields already present in the FileInfoList response and does not perform separate filename enrichment.
Validation
Validated on ARM64 with Rust/Clippy 1.88.0:
cargo +1.88.0 fmt --checkcargo +1.88.0 test --no-default-features --workspace— 12 CLI, 108 core, and 2 doc tests passedcargo +1.88.0 clippy --no-default-features --workspace --all-targets -- -A clippy::uninlined-format-args -A clippy::too-many-arguments -D warningsbuild.rsformat args andUdpSource::new_from_socketargument countcargo +1.88.0 build --no-default-features --workspacecargo +1.88.0 doc --no-default-features --workspace --no-depsSynthetic regressions cover explicit unfinished short pages, invalid core channels, type precedence, ID aliases, structured/plain timestamps, unmatched-response redaction, generic successful bodies, concurrent cursor serialization, top-level handles, nested completion markers, valid defaults, configured-UID discovery bypass, query-channel UID requests, bounded discovery timeout/error behavior, UID-before-cursor lock ordering, UID trimming, and combined failures.
The protocol flow was also validated read-only against a dual-channel camera over UID relay: both channels paginated independently, an empty date terminated cleanly, and all opened cursors in those completed runs received acknowledged CLOSE commands. No real UID, filenames, credentials, dates, hostnames, or response XML are included in this branch; fixtures are synthetic.
Compatibility
cd05fc97ea4eac356d99354cae3a43e029100142(master/0.7.19)