Begin also working on current networks
This commit is contained in:
parent
131b1e501c
commit
8f170b9147
1 changed files with 21 additions and 1 deletions
|
|
@ -1,5 +1,25 @@
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later
|
// SPDX-License-Identifier: LGPL-3.0-or-later
|
||||||
|
|
||||||
use gtk4::Label;
|
use cosmic_dbus_networkmanager::{
|
||||||
|
access_point::AccessPoint, device::wired::WiredDevice, nm::NetworkManager,
|
||||||
|
};
|
||||||
|
use gtk4::glib::{self, clone, source::PRIORITY_DEFAULT, MainContext, Sender};
|
||||||
|
use zbus::Connection;
|
||||||
|
|
||||||
pub fn add_current_networks(target: >k4::Box) {}
|
pub fn add_current_networks(target: >k4::Box) {}
|
||||||
|
|
||||||
|
fn add_vpn(target: >k4::Box) {}
|
||||||
|
|
||||||
|
fn add_access_point(target: >k4::Box, access_point: &AccessPoint) {}
|
||||||
|
|
||||||
|
fn add_wired_device(target: >k4::Box, device: &WiredDevice) {}
|
||||||
|
|
||||||
|
async fn handle_devices() -> zbus::Result<()> {
|
||||||
|
let conn = Connection::system().await?;
|
||||||
|
let network_manager = NetworkManager::new(&conn).await?;
|
||||||
|
loop {
|
||||||
|
// TODO: NetworkManager::active_connections
|
||||||
|
tokio::time::sleep(std::time::Duration::from_secs(5)).await;
|
||||||
|
}
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue