kordophoned becomes a lib
This commit is contained in:
@@ -4,7 +4,7 @@ use std::sync::Arc;
|
||||
use std::{future::Future, thread};
|
||||
use tokio::sync::{mpsc, oneshot, Mutex};
|
||||
|
||||
use crate::daemon::{
|
||||
use kordophoned::daemon::{
|
||||
contact_resolver::{ContactResolver, DefaultContactResolverBackend},
|
||||
events::{Event, Reply},
|
||||
settings::Settings,
|
||||
|
||||
3
kordophoned/src/lib.rs
Normal file
3
kordophoned/src/lib.rs
Normal file
@@ -0,0 +1,3 @@
|
||||
pub mod daemon;
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
mod daemon;
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
mod dbus;
|
||||
|
||||
@@ -9,7 +7,7 @@ mod xpc;
|
||||
use log::LevelFilter;
|
||||
use std::future;
|
||||
|
||||
use daemon::Daemon;
|
||||
use kordophoned::daemon::Daemon;
|
||||
|
||||
fn initialize_logging() {
|
||||
// Weird: is this the best way to do this?
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use crate::daemon::{events::Event, signals::Signal, DaemonResult};
|
||||
use kordophoned::daemon::{events::Event, signals::Signal, DaemonResult};
|
||||
use crate::xpc::interface::SERVICE_NAME;
|
||||
use futures_util::StreamExt;
|
||||
use std::collections::HashMap;
|
||||
@@ -58,7 +58,7 @@ impl XpcAgent {
|
||||
/// Send an event to the daemon and await its reply.
|
||||
pub async fn send_event<T>(
|
||||
&self,
|
||||
make_event: impl FnOnce(crate::daemon::events::Reply<T>) -> Event,
|
||||
make_event: impl FnOnce(kordophoned::daemon::events::Reply<T>) -> Event,
|
||||
) -> DaemonResult<T> {
|
||||
let (tx, rx) = oneshot::channel();
|
||||
self.event_sink
|
||||
|
||||
Reference in New Issue
Block a user