Skip to main content

dahua_camera_onvif/
lib.rs

1//! ONVIF Device, Media, Imaging and Users services — and the capability probe.
2//!
3//! There is no code generation here. The workspace uses a handful of
4//! operations with stable, simple shapes; a generated SOAP stack would be far
5//! more machinery than that is worth, and far more surface to keep working
6//! across firmware revisions.
7//!
8//! # Layers
9//!
10//! | Module | Responsibility |
11//! |---|---|
12//! | [`soap`] | Envelopes and WS-Security. Where ONVIF clients usually go wrong. |
13//! | [`xml`] | Reading responses by **local** name, because prefixes vary by vendor. |
14//! | [`capability`] | Turning a `GetCapabilities` response into a [`CapabilitySet`](dahua_camera_core::CapabilitySet). |
15//! | [`client`] | The operations themselves. |
16//!
17//! Everything in [`soap`], [`xml`] and [`capability`] is a pure function over
18//! `&str`, which is why the whole response-handling path is tested against
19//! captured responses in `tests/fixtures/` with no network at all.
20//!
21//! # Nothing is inferred
22//!
23//! A capability is set only on positive evidence in a response. In particular,
24//! a present `<Analytics>` section says a service exists — never *which*
25//! analytics it implements — so it confirms none of the advanced detections.
26//! See [`capability`].
27
28#![warn(missing_docs)]
29#![forbid(unsafe_code)]
30
31pub mod capability;
32pub mod client;
33pub mod soap;
34pub mod xml;
35
36pub use client::{DeviceInformation, MediaProfile, OnvifClient, OnvifUser};
37pub use soap::SecurityToken;