Added Core Features chroium, config,console_ui,headless,webserver,states
This commit is contained in:
parent
4c6c6d572c
commit
c3c60efb81
13 changed files with 688 additions and 0 deletions
39
Core/state.rs
Normal file
39
Core/state.rs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
use std::sync::{Arc, Mutex};
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum ChromiumPhase {
|
||||
Idle,
|
||||
Checking,
|
||||
Downloading,
|
||||
Ready,
|
||||
Error(String),
|
||||
}
|
||||
impl Default for ChromiumPhase {
|
||||
fn default() -> Self { ChromiumPhase::Idle }
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum HeadlessPhase {
|
||||
Idle,
|
||||
Starting,
|
||||
Ready,
|
||||
Error(String),
|
||||
}
|
||||
impl Default for HeadlessPhase {
|
||||
fn default() -> Self { HeadlessPhase::Idle }
|
||||
}
|
||||
|
||||
#[derive(Default, Clone)]
|
||||
pub struct Status {
|
||||
pub web_server_active: bool,
|
||||
pub plugin_engine_active: bool,
|
||||
pub chromium: ChromiumPhase,
|
||||
pub headless: HeadlessPhase,
|
||||
pub loaded_plugins: Vec<String>,
|
||||
pub running_jobs: Vec<String>,
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Shared State Handle
|
||||
pub type SharedState = Arc<Mutex<Status>>;
|
||||
Loading…
Add table
Add a link
Reference in a new issue