29 lines
773 B
Rust
29 lines
773 B
Rust
//! Contains all projector related commands
|
|
|
|
pub mod panasonic;
|
|
pub mod proj_traits;
|
|
|
|
use clap::Parser;
|
|
use panasonic::PanasonicProjector;
|
|
pub use proj_traits::{AdvancedCommands, GenericProjector};
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
/// Enumerate all the VP types
|
|
#[derive(Parser, Serialize, Deserialize, Clone, Debug)]
|
|
pub enum VPType {
|
|
/// A panasonic VideoProjector
|
|
Panasonic,
|
|
}
|
|
|
|
/// Create a new empty projector of the given type
|
|
///
|
|
/// While inelegant, this is the most straightforward way of having a generic projector
|
|
pub fn new_default_projector_of_type(
|
|
vptype: &VPType,
|
|
name: &str,
|
|
) -> Result<(), crate::RustyMidiError> {
|
|
match vptype {
|
|
VPType::Panasonic => PanasonicProjector::default().create_default_config_file(name),
|
|
}
|
|
}
|