pub trait CameraConfigProvider: Send + Sync {
Show 15 methods
// Required methods
fn get_device_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AppResult<DeviceInfo>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_video_configs<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AppResult<Vec<VideoConfig>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_video_config<'life0, 'async_trait>(
&'life0 self,
channel: u32,
) -> Pin<Box<dyn Future<Output = AppResult<VideoConfig>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn put_video_config<'life0, 'life1, 'async_trait>(
&'life0 self,
channel: u32,
cfg: &'life1 VideoConfig,
) -> Pin<Box<dyn Future<Output = AppResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_time_config<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AppResult<TimeConfig>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn put_time_config<'life0, 'life1, 'async_trait>(
&'life0 self,
cfg: &'life1 TimeConfig,
) -> Pin<Box<dyn Future<Output = AppResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_ntp_config<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AppResult<NtpConfig>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn put_ntp_config<'life0, 'life1, 'async_trait>(
&'life0 self,
cfg: &'life1 NtpConfig,
) -> Pin<Box<dyn Future<Output = AppResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn sync_time_now<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AppResult<TimeConfig>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_onvif_settings<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AppResult<OnvifSettings>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn put_onvif_settings<'life0, 'life1, 'async_trait>(
&'life0 self,
cfg: &'life1 OnvifSettings,
) -> Pin<Box<dyn Future<Output = AppResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn ensure_onvif_user<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
username: &'life1 str,
password: &'life2 str,
user_type: OnvifUserType,
) -> Pin<Box<dyn Future<Output = AppResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_osd_config<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AppResult<OsdConfig>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn put_osd_config<'life0, 'life1, 'async_trait>(
&'life0 self,
cfg: &'life1 OsdConfig,
) -> Pin<Box<dyn Future<Output = AppResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn reboot<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AppResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
A vendor-agnostic surface for reading and writing a camera’s on-device configuration. The kernel
owns the persistence/audit; an implementor only talks the device’s native protocol (HikVision
ISAPI today). All methods are best-effort against a live device and surface AppError on
transport/protocol failure.
Required Methods§
Sourcefn get_device_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AppResult<DeviceInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_device_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AppResult<DeviceInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Device identity (name/model/firmware/serial).
Sourcefn list_video_configs<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AppResult<Vec<VideoConfig>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_video_configs<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AppResult<Vec<VideoConfig>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Every streaming channel’s video-encoding configuration (main + sub + any extras).
Sourcefn get_video_config<'life0, 'async_trait>(
&'life0 self,
channel: u32,
) -> Pin<Box<dyn Future<Output = AppResult<VideoConfig>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_video_config<'life0, 'async_trait>(
&'life0 self,
channel: u32,
) -> Pin<Box<dyn Future<Output = AppResult<VideoConfig>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
One streaming channel’s video-encoding configuration (e.g. 101 main, 102 sub).
Sourcefn put_video_config<'life0, 'life1, 'async_trait>(
&'life0 self,
channel: u32,
cfg: &'life1 VideoConfig,
) -> Pin<Box<dyn Future<Output = AppResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn put_video_config<'life0, 'life1, 'async_trait>(
&'life0 self,
channel: u32,
cfg: &'life1 VideoConfig,
) -> Pin<Box<dyn Future<Output = AppResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Write a channel’s video-encoding configuration (read-modify-write of the device’s XML).
Sourcefn get_time_config<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AppResult<TimeConfig>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_time_config<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AppResult<TimeConfig>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The device clock configuration (mode/local-time/timezone).
Sourcefn put_time_config<'life0, 'life1, 'async_trait>(
&'life0 self,
cfg: &'life1 TimeConfig,
) -> Pin<Box<dyn Future<Output = AppResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn put_time_config<'life0, 'life1, 'async_trait>(
&'life0 self,
cfg: &'life1 TimeConfig,
) -> Pin<Box<dyn Future<Output = AppResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Write the device clock configuration.
Sourcefn get_ntp_config<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AppResult<NtpConfig>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_ntp_config<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AppResult<NtpConfig>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The configured NTP server.
Sourcefn put_ntp_config<'life0, 'life1, 'async_trait>(
&'life0 self,
cfg: &'life1 NtpConfig,
) -> Pin<Box<dyn Future<Output = AppResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn put_ntp_config<'life0, 'life1, 'async_trait>(
&'life0 self,
cfg: &'life1 NtpConfig,
) -> Pin<Box<dyn Future<Output = AppResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Write the NTP server.
Sourcefn sync_time_now<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AppResult<TimeConfig>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn sync_time_now<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AppResult<TimeConfig>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Switch the clock to NTP if it is currently in manual mode; returns the resulting clock config.
Sourcefn get_onvif_settings<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AppResult<OnvifSettings>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_onvif_settings<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AppResult<OnvifSettings>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The ONVIF/ISAPI integration toggles.
Sourcefn put_onvif_settings<'life0, 'life1, 'async_trait>(
&'life0 self,
cfg: &'life1 OnvifSettings,
) -> Pin<Box<dyn Future<Output = AppResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn put_onvif_settings<'life0, 'life1, 'async_trait>(
&'life0 self,
cfg: &'life1 OnvifSettings,
) -> Pin<Box<dyn Future<Output = AppResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Write the ONVIF/ISAPI integration toggles.
Sourcefn ensure_onvif_user<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
username: &'life1 str,
password: &'life2 str,
user_type: OnvifUserType,
) -> Pin<Box<dyn Future<Output = AppResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn ensure_onvif_user<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
username: &'life1 str,
password: &'life2 str,
user_type: OnvifUserType,
) -> Pin<Box<dyn Future<Output = AppResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Ensure a dedicated ONVIF user exists (create-if-absent; a duplicate create is treated as Ok).
Sourcefn get_osd_config<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AppResult<OsdConfig>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_osd_config<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AppResult<OsdConfig>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The on-screen-display (timestamp / channel-name) overlay configuration.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".