onvif-server 0.1.0

A spec-compliant ONVIF Profile S device server library for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::error::{not_implemented, OnvifError};
use crate::generated::ImagingSettings;
use async_trait::async_trait;

/// ONVIF Imaging Service (Profile S).
///
/// All methods default to `not_implemented()`. Object-safe: store as `Arc<dyn ImagingService>`.
#[async_trait]
pub trait ImagingService: Send + Sync + 'static {
    /// Returns the imaging settings (brightness, contrast, etc.) for a video source.
    async fn get_imaging_settings(
        &self,
        video_source_token: String,
    ) -> Result<ImagingSettings, OnvifError> {
        let _ = video_source_token;
        not_implemented()
    }
}