Skip to main content

Crate dahua_camera_onvif

Crate dahua_camera_onvif 

Source
Expand description

ONVIF Device, Media, Imaging and Users services — and the capability probe.

There is no code generation here. The workspace uses a handful of operations with stable, simple shapes; a generated SOAP stack would be far more machinery than that is worth, and far more surface to keep working across firmware revisions.

§Layers

ModuleResponsibility
soapEnvelopes and WS-Security. Where ONVIF clients usually go wrong.
xmlReading responses by local name, because prefixes vary by vendor.
capabilityTurning a GetCapabilities response into a CapabilitySet.
clientThe operations themselves.

Everything in soap, xml and capability is a pure function over &str, which is why the whole response-handling path is tested against captured responses in tests/fixtures/ with no network at all.

§Nothing is inferred

A capability is set only on positive evidence in a response. In particular, a present <Analytics> section says a service exists — never which analytics it implements — so it confirms none of the advanced detections. See capability.

Re-exports§

pub use client::DeviceInformation;
pub use client::MediaProfile;
pub use client::OnvifClient;
pub use client::OnvifUser;
pub use soap::SecurityToken;

Modules§

capability
Building a CapabilitySet from what a device actually reports.
client
The ONVIF client: Device, Media, Imaging and Users services.
soap
SOAP envelopes and WS-Security, hand-built.
xml
Reading values out of a SOAP response.