Skip to content

Commit

Permalink
Merge pull request #713 from imobachgs/agama-dbus-server-lib
Browse files Browse the repository at this point in the history
Move most of the agama_dbus_server logic to a lib crate
  • Loading branch information
imobachgs authored Aug 23, 2023
2 parents e60dee0 + 18ffdab commit 2698429
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 4 additions & 0 deletions rust/agama-dbus-server/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pub mod error;
pub mod locale;
pub mod network;
pub mod questions;
10 changes: 3 additions & 7 deletions rust/agama-dbus-server/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
pub mod error;
pub mod locale;
pub mod network;
pub mod questions;
use agama_dbus_server::{locale, network::NetworkService, questions};

use log::LevelFilter;
use network::NetworkService;
use std::future::pending;

const ADDRESS: &str = "unix:path=/run/agama/bus";
Expand All @@ -28,9 +24,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
.unwrap(); // unwrap here as we are sure no other logger active
}
// When adding more services here, the order might be important.
crate::questions::start_service(ADDRESS).await?;
questions::start_service(ADDRESS).await?;
log::info!("Started questions interface");
let _conn = crate::locale::start_service(ADDRESS).await?;
let _conn = locale::start_service(ADDRESS).await?;
log::info!("Started locale interface");
NetworkService::start(ADDRESS).await?;
log::info!("Started network interface");
Expand Down

0 comments on commit 2698429

Please sign in to comment.