use std::sync::mpsc::Sender;

mod unix_socket_listener;

#[cfg(unix)]
pub use unix_socket_listener::UnixSocketListener as Listener;

use crate::{PlayerEvent, daemon::DaemonError, player::PlayerRequest};

pub trait IpcListener {
    fn open(engine_tx: Sender<PlayerRequest>) -> Result<Sender<PlayerEvent>, DaemonError>;
    fn run(self) -> Result<(), DaemonError>;
}
