Some fixes for the examples and the crate
This commit is contained in:
+1
-2
@@ -1,4 +1,4 @@
|
||||
mod providers;
|
||||
pub mod providers;
|
||||
|
||||
use self::providers::prelude::HotspotConfig;
|
||||
use crate::platforms::{WifiError, WifiInterface};
|
||||
@@ -44,7 +44,6 @@ pub trait WifiHotspot: fmt::Debug + WifiInterface {
|
||||
}
|
||||
|
||||
/// Stop serving a wireless network.
|
||||
///
|
||||
/// **NOTE: All users connected will automatically be disconnected.**
|
||||
fn stop_hotspot(&mut self) -> Result<bool, WifiHotspotError> {
|
||||
unimplemented!();
|
||||
|
||||
@@ -16,6 +16,17 @@ pub struct HotspotConfig {
|
||||
channel: Option<Channel>,
|
||||
}
|
||||
|
||||
/// function to create a new config object
|
||||
#[allow(dead_code)]
|
||||
impl HotspotConfig {
|
||||
pub fn new(band: Option<HotspotBand>, channel: Option<Channel>) -> HotspotConfig {
|
||||
HotspotConfig {
|
||||
band,
|
||||
channel
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug)]
|
||||
/// Band type of wireless hotspot.
|
||||
@@ -58,9 +69,9 @@ impl WifiHotspot for WiFi {
|
||||
let mut command = vec![
|
||||
"device".to_string(),
|
||||
"wifi".to_string(),
|
||||
"hotspot".to_string(),
|
||||
"ifname".to_string(),
|
||||
self.interface.to_string(),
|
||||
"hotspot".to_string(),
|
||||
"con-name".to_string(),
|
||||
HOTSPOT_GROUP.to_string(),
|
||||
"ssid".to_string(),
|
||||
|
||||
@@ -6,6 +6,7 @@ mod platforms;
|
||||
pub mod prelude {
|
||||
pub use crate::connectivity::*;
|
||||
pub use crate::hotspot::*;
|
||||
pub use crate::hotspot::providers::prelude::*;
|
||||
pub use crate::platforms::Config;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user