pub async fn access_point<'b, P: Into<dbus::Path<'b>>>(
        &self,
        ap_path: P,
    ) -> Result<WifiConnection, CaptivePortalError> {
        let ap_path = ap_path.into();
        let security = security::get_access_point_security(self.conn.clone(), &ap_path)
            .await?
            .as_str();
        let access_point_data = nonblock::Proxy::new(NM_BUSNAME, ap_path, self.conn.clone());
        use access_point::AccessPoint;
        let hw = access_point_data.hw_address().await?;
        let ssid = String::from_utf8(access_point_data.ssid().await?)?;

        let wifi_connection = WifiConnection {
            is_own: hw == self.hw,
            ssid,
            hw,
            security,
            strength: access_point_data.strength().await?,
            frequency: access_point_data.frequency().await?,
        };
        if !wifi_connection.is_own {
            info!("Found AP {:?}", &wifi_connection.ssid);
        }
        Ok(wifi_connection)
    }
/// Get access point data for the given access point network manager dbus path.
Get access point data for the given access point network manager dbus path.
Get access point data for the given access point network manager dbus path .
pub async fn access_point<'b, P: Into<dbus::Path<'b>>>(
        &self,
        ap_path: P,
    ) -> Result<WifiConnection, CaptivePortalError> {
        let ap_path = ap_path.into();
        let security = security::get_access_point_security(self.conn.clone(), &ap_path)
            .await?
            .as_str();
        let access_point_data = nonblock::Proxy::new(NM_BUSNAME, ap_path, self.conn.clone());
        use access_point::AccessPoint;
        let hw = access_point_data.hw_address().await?;
        let ssid = String::from_utf8(access_point_data.ssid().await?)?;
        let wifi_connection = WifiConnection {
            is_own: hw == self.hw,
            ssid,
            hw,
            security,
            strength: access_point_data.strength().await?,
            frequency: access_point_data.frequency().await?,
        };
        if !wifi_connection.is_own {
            info!("Found AP {:?}", &wifi_connection.ssid);
        }
        Ok(wifi_connection)
    }
pub async fn access_point < ' b , P : Into < dbus :: Path < ' b > > > ( & self , ap_path : P , ) -> Result < WifiConnection , CaptivePortalError > { let ap_path = ap_path . into ( ) ; let security = security :: get_access_point_security ( self . conn . clone ( ) , & ap_path ) . await ? . as_str ( ) ; let access_point_data = nonblock :: Proxy :: new ( NM_BUSNAME , ap_path , self . conn . clone ( ) ) ; use access_point :: AccessPoint ; let hw = access_point_data . hw_address ( ) . await ? ; let ssid = String :: from_utf8 ( access_point_data . ssid ( ) . await ? ) ? ; let wifi_connection = WifiConnection { is_own : hw == self . hw , ssid , hw , security , strength : access_point_data . strength ( ) . await ? , frequency : access_point_data . frequency ( ) . await ? , } ; if ! wifi_connection . is_own { info ! ( " " wifi_connection ssid ) ; } Ok ( wifi_connection ) }
Get access point data for the given access point network manager dbus path.
Get access point data for the given access point network manager dbus path .
&self
ap_path
P
&self
ap_path
P