#[derive(Copy, Clone)]
#[allow(dead_code)]
pub enum MediaType {
MediaTypeNone,
MediaTypeVideo,
MediaTypeAudio,
}
#[derive(Copy, Clone)]
#[allow(dead_code)]
pub struct Timer {
tid: i32,
milliseconds: i32,
}
impl Timer {
pub fn get_tid(&self) -> i32 {
self.tid
}
pub fn get_milliseconds(&self) -> i32 {
self.milliseconds
}
pub fn new(_tid: i32, _milliseconds: i32) -> Self {
Timer {
tid: _tid,
milliseconds: _milliseconds,
}
}
}
pub trait BasePlugin {
fn get_name(&self) -> String;
fn get_author(&self) -> String;
fn get_args(&self) -> Vec<String>;
fn get_filter_name(&self) -> String;
fn get_media_type(&self) -> MediaType;
fn validate_user_args(&self, args: &Vec<String>) -> Result<bool, &'static str>;
fn print_log(&self, level: super::util::os::PrintLogLevel, log: &str) {
super::util::os::print_log(level, format!("[{}]", self.get_name()).to_string() + log)
}
fn register_task(&self) -> Vec<Timer> {
let empty: Vec<Timer> = Vec::new();
empty
}
fn register_message_keys(&self) -> Vec<super::proto::keys::EventMessageAction> {
let empty: Vec<super::proto::keys::EventMessageAction> = Vec::new();
empty
}
#[warn(unused_variables)]
fn execute_task(&mut self, _tid: u32) {}
#[allow(unused_variables)]
fn execute_message(&mut self, action: i32, body: String) {}
}