mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-24 13:40:55 +03:00
reduce visibility of some structs
This commit is contained in:
@@ -19,7 +19,7 @@ use crate::{client::ClientHandle, frontend::Status, server::State};
|
||||
use super::Server;
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum LanMouseCaptureError {
|
||||
pub(crate) enum LanMouseCaptureError {
|
||||
#[error("error creating input-capture: `{0}`")]
|
||||
Create(#[from] CaptureCreationError),
|
||||
#[error("error while capturing input: `{0}`")]
|
||||
@@ -27,7 +27,7 @@ pub enum LanMouseCaptureError {
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub enum CaptureEvent {
|
||||
pub(crate) enum CaptureEvent {
|
||||
/// capture must release the mouse
|
||||
Release,
|
||||
/// add a capture client
|
||||
@@ -36,7 +36,7 @@ pub enum CaptureEvent {
|
||||
Destroy(CaptureHandle),
|
||||
}
|
||||
|
||||
pub fn new(
|
||||
pub(crate) fn new(
|
||||
server: Server,
|
||||
capture_rx: Receiver<CaptureEvent>,
|
||||
udp_send: Sender<(Event, SocketAddr)>,
|
||||
|
||||
@@ -21,7 +21,7 @@ use input_event::{Event, KeyboardEvent};
|
||||
use super::{network_task::NetworkError, CaptureEvent, Server};
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum EmulationEvent {
|
||||
pub(crate) enum EmulationEvent {
|
||||
/// create a new client
|
||||
Create(EmulationHandle),
|
||||
/// destroy a client
|
||||
@@ -30,7 +30,7 @@ pub enum EmulationEvent {
|
||||
ReleaseKeys(ClientHandle),
|
||||
}
|
||||
|
||||
pub fn new(
|
||||
pub(crate) fn new(
|
||||
server: Server,
|
||||
emulation_rx: Receiver<EmulationEvent>,
|
||||
udp_rx: Receiver<Result<(Event, SocketAddr), NetworkError>>,
|
||||
|
||||
@@ -11,7 +11,7 @@ use input_event::{Event, ProtocolError};
|
||||
|
||||
use super::Server;
|
||||
|
||||
pub async fn new(
|
||||
pub(crate) async fn new(
|
||||
server: Server,
|
||||
udp_recv_tx: Sender<Result<(Event, SocketAddr), NetworkError>>,
|
||||
udp_send_rx: Receiver<(Event, SocketAddr)>,
|
||||
|
||||
@@ -10,7 +10,7 @@ use super::{capture_task::CaptureEvent, emulation_task::EmulationEvent, Server,
|
||||
|
||||
const MAX_RESPONSE_TIME: Duration = Duration::from_millis(500);
|
||||
|
||||
pub fn new(
|
||||
pub(crate) fn new(
|
||||
server: Server,
|
||||
sender_ch: Sender<(Event, SocketAddr)>,
|
||||
emulate_notify: Sender<EmulationEvent>,
|
||||
|
||||
Reference in New Issue
Block a user