mod capabilities;
mod device;
mod events;
mod imaging;
mod media;
mod ptz;
mod video;
pub use capabilities::*;
pub use device::*;
pub use events::*;
pub use imaging::*;
pub use media::*;
pub use ptz::*;
pub use video::*;
use crate::soap::XmlNode;
#[cfg(test)]
pub use crate::error::OnvifError;
#[cfg(test)]
pub use crate::soap::SoapError;
#[cfg(test)]
pub(crate) use device::civil_to_unix;
pub(crate) fn xml_bool(node: &XmlNode, child: &str) -> bool {
node.child(child)
.is_some_and(|n| n.text() == "true" || n.text() == "1")
}
pub(crate) fn xml_u32(node: &XmlNode, child: &str) -> Option<u32> {
node.child(child).and_then(|n| n.text().parse().ok())
}
pub(crate) fn xml_str(node: &XmlNode, child: &str) -> Option<String> {
node.child(child).map(|n| n.text().to_string())
}
#[cfg(test)]
#[path = "../tests/types_tests.rs"]
mod tests;