mirror of
https://github.com/Djeeberjr/fw-anwesenheit.git
synced 2026-05-01 02:59:09 +00:00
refactored hardware components
detach trait from mock and hardware implementation
This commit is contained in:
@@ -6,6 +6,8 @@ use std::{
|
||||
};
|
||||
use tokio::process::Command;
|
||||
|
||||
use crate::hardware::Hotspot;
|
||||
|
||||
const SSID: &str = "fwa";
|
||||
const CON_NAME: &str = "fwa-hotspot";
|
||||
const PASSWORD: &str = "a9LG2kUVrsRRVUo1";
|
||||
@@ -41,16 +43,6 @@ impl fmt::Display for HotspotError {
|
||||
|
||||
impl std::error::Error for HotspotError {}
|
||||
|
||||
pub trait Hotspot {
|
||||
fn enable_hotspot(
|
||||
&self,
|
||||
) -> impl std::future::Future<Output = Result<(), HotspotError>> + std::marker::Send;
|
||||
|
||||
fn disable_hotspot(
|
||||
&self,
|
||||
) -> impl std::future::Future<Output = Result<(), HotspotError>> + std::marker::Send;
|
||||
}
|
||||
|
||||
/// NetworkManager Hotspot
|
||||
pub struct NMHotspot {
|
||||
ssid: String,
|
||||
|
||||
Reference in New Issue
Block a user