pub(crate) async fn update_connection<'a>(
        &self,
        connection_path: dbus::Path<'a>,
        ssid: &SSID,
        old_connection: WiFiConnectionSettings,
        credentials: AccessPointCredentials,
    ) -> Result<(dbus::Path<'a>, dbus::Path<'_>), CaptivePortalError> {
        use super::generated::connection_nm::Connection;
        let p = nonblock::Proxy::new(NM_BUSNAME, connection_path.clone(), self.conn.clone());
        let settings = wifi_settings::make_arguments_for_ap::<&'static str>(ssid, credentials, Some(old_connection))?;
        p.update2(settings, IN_MEMORY_ONLY, VariantMap::new()).await?;
        // Activate connection
        let p = nonblock::Proxy::new(NM_BUSNAME, NM_PATH, self.conn.clone());
        use super::generated::networkmanager::NetworkManager;
        let active_path = p
            .activate_connection(connection_path.clone(), self.wifi_device_path.clone(), "/".into())
            .await?;
        Ok((connection_path, active_path))
    }
/// Returns a tuple with network manager dbus paths on success: (connection, active_connection)
Returns a tuple with network manager dbus paths on success: (connection, active_connection)
Returns a tuple with network manager dbus paths on success : ( connection active_connection )
pub(crate) async fn update_connection<'a>(
        &self,
        connection_path: dbus::Path<'a>,
        ssid: &SSID,
        old_connection: WiFiConnectionSettings,
        credentials: AccessPointCredentials,
    ) -> Result<(dbus::Path<'a>, dbus::Path<'_>), CaptivePortalError> {
        use super::generated::connection_nm::Connection;
        let p = nonblock::Proxy::new(NM_BUSNAME, connection_path.clone(), self.conn.clone());
        let settings = wifi_settings::make_arguments_for_ap::<&'static str>(ssid, credentials, Some(old_connection))?;
        p.update2(settings, IN_MEMORY_ONLY, VariantMap::new()).await?;
        // Activate connection
        let p = nonblock::Proxy::new(NM_BUSNAME, NM_PATH, self.conn.clone());
        use super::generated::networkmanager::NetworkManager;
        let active_path = p
            .activate_connection(connection_path.clone(), self.wifi_device_path.clone(), "/".into())
            .await?;
        Ok((connection_path, active_path))
    }
pub ( crate ) async fn update_connection < ' a > ( & self , connection_path : dbus :: Path < ' a > , ssid : & SSID , old_connection : WiFiConnectionSettings , credentials : AccessPointCredentials , ) -> Result < ( dbus :: Path < ' a > , dbus :: Path < ' _ > ) , CaptivePortalError > { use super :: generated :: connection_nm :: Connection ; let p = nonblock :: Proxy :: new ( NM_BUSNAME , connection_path . clone ( ) , self . conn . clone ( ) ) ; let settings = wifi_settings :: make_arguments_for_ap :: < & ' static str > ( ssid , credentials , Some ( old_connection ) ) ? ; p . update2 ( settings , IN_MEMORY_ONLY , VariantMap :: new ( ) ) . await ? ; // Activate connection let p = nonblock :: Proxy :: new ( NM_BUSNAME , NM_PATH , self . conn . clone ( ) ) ; use super :: generated :: networkmanager :: NetworkManager ; let active_path = p . activate_connection ( connection_path . clone ( ) , self . wifi_device_path . clone ( ) , " " . into ( ) ) . await ? ; Ok ( ( connection_path , active_path ) ) }
Returns a tuple with network manager dbus paths on success: (connection, active_connection)
Returns a tuple with network manager dbus paths on success : ( connection active_connection )
&self
connection_path
dbus::Path<'a>
ssid
&SSID
old_connection
WiFiConnectionSettings
credentials
AccessPointCredentials
&self
connection_path
dbus::Path<'a>
ssid
&SSID
old_connection
WiFiConnectionSettings
credentials
AccessPointCredentials