Skip to content

Commit

Permalink
Merge pull request #175 from akshayr-mecha/chore-services
Browse files Browse the repository at this point in the history
chore(mechanix services): removes unused code from mechanix system and desktop service
  • Loading branch information
akshayr-mecha authored Jan 30, 2025
2 parents ff527d8 + e95d74a commit f325caa
Show file tree
Hide file tree
Showing 36 changed files with 54 additions and 1,597 deletions.
1 change: 1 addition & 0 deletions apps/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ tracing = "0.1.37"
tracing-subscriber = { version = "0.3.17", features = ["env-filter"]}
anyhow = { version = "1.0.75", features = ["backtrace"]}
tokio = { version = "1.33", features = ["full"] }
networkmanager = { path = "../commons/networkmanager"}
1 change: 1 addition & 0 deletions apps/settings-app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ thiserror = "1.0.59"
uname = "0.1.1"
local-ip-address="0.6.3"
get_if_addrs = "0.5.3"
networkmanager = { workspace = true }

[build-dependencies]
tonic-build = "0.9.2"
Expand Down
1 change: 0 additions & 1 deletion apps/settings-app/src/gui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ use mctk_core::{
Color, Node,
};
use mctk_macros::{component, state_component_impl};
use mechanix_system_dbus_client::wireless::KnownNetworkResponse;
use std::{
any::Any,
sync::{Arc, RwLock},
Expand Down
2 changes: 1 addition & 1 deletion apps/settings-app/src/screens/network/add_network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use mctk_core::{
Color, Node,
};
use mctk_macros::component;
use mechanix_system_dbus_client::wireless::WirelessInfoResponse;
use networkmanager::network_manager::WirelessInfoResponse;

use super::wireless_model::WirelessModel;

Expand Down
2 changes: 1 addition & 1 deletion apps/settings-app/src/screens/network/network_details.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use mctk_core::{
};
use mctk_macros::{component, state_component_impl};

use mechanix_system_dbus_client::wireless::WirelessInfoResponse;
use networkmanager::network_manager::WirelessInfoResponse;

enum NetworkDetailsMessage {
openModel(bool),
Expand Down
2 changes: 1 addition & 1 deletion apps/settings-app/src/screens/network/networking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use mctk_core::{
Color, Node,
};
use mctk_core::{event, widgets::HDivider};
use mechanix_system_dbus_client::wireless::WirelessInfoResponse;
use networkmanager::network_manager::WirelessInfoResponse;

pub struct ClicableIconComponent {
pub on_click: Option<Box<dyn Fn() -> Box<Message> + Send + Sync>>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use mctk_core::{
Color, Node,
};
use mctk_macros::{component, state_component_impl};
use mechanix_system_dbus_client::wireless::WirelessInfoResponse;
use networkmanager::network_manager::WirelessInfoResponse;

enum NetworkDetailsMessage {
openModel(bool),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use mctk_core::{
widgets::{self, Div, IconButton, IconType, Text, Toggle},
Color, Node,
};
use mechanix_system_dbus_client::wireless::WirelessInfoResponse;
use networkmanager::network_manager::WirelessInfoResponse;

#[derive(Debug)]
pub struct NetworkDetailsState {}
Expand Down
16 changes: 1 addition & 15 deletions apps/settings-app/src/screens/network/wireless_model/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ use futures::StreamExt;
use lazy_static::lazy_static;
use mctk_core::context::Context;
use mctk_macros::Model;
use mechanix_system_dbus_client::security;
use mechanix_system_dbus_client::wireless::{
self, KnownNetworkListResponse, KnownNetworkResponse, NotificationStream, WirelessInfoResponse,
WirelessScanListResponse, WirelessService,
};
use networkmanager::network_manager::{self, KnownNetworkListResponse, KnownNetworkResponse, WirelessInfoResponse, WirelessScanListResponse};
use tokio::runtime::Runtime;
use tokio::{select, signal};
use uuid::Uuid;
Expand All @@ -20,7 +16,6 @@ mod access_point;
mod active_connection;
mod connection;
mod device;
mod network_manager;
mod settings;
mod wireless_device;

Expand Down Expand Up @@ -588,13 +583,4 @@ impl WirelessModel {
Self::stream_scan_result();
Self::stream_known_networks();
}

pub fn select_network(network_id: String) {
RUNTIME.spawn(async move {
WirelessService::connect_to_known_network(network_id.as_str())
.await
.unwrap();
WirelessModel::update();
});
}
}

This file was deleted.

Loading

0 comments on commit f325caa

Please sign in to comment.