Private
Public Access
1
0

daemon: main reorg

This commit is contained in:
2025-02-12 00:32:44 -08:00
parent 68ff158d6c
commit dd9025cc10

View File

@@ -4,6 +4,10 @@ mod daemon;
use std::future;
use std::sync::Arc;
use log::LevelFilter;
use daemon::Daemon;
use dbus::endpoint::Endpoint as DbusEndpoint;
fn initialize_logging() {
env_logger::Builder::from_default_env()
.filter_level(LevelFilter::Info)
@@ -15,8 +19,10 @@ fn initialize_logging() {
async fn main() {
initialize_logging();
let daemon = Arc::new(daemon::Daemon::new());
let endpoint = Arc::new(dbus::endpoint::Endpoint::new(daemon));
// Daemon is stored in an Arc so it can be shared with other endpoints eventually.
let daemon = Arc::new(Daemon::new());
let endpoint = DbusEndpoint::new(daemon);
endpoint.start().await;
future::pending::<()>().await;