X-Git-Url: https://code.octet-stream.net/m17rt/blobdiff_plain/9e40113187a3eb54335de0277f8038ee35d9428a..608ca7e33ab51d812607ddcc3429bfa9aa3c34b0:/m17app/src/adapter.rs?ds=sidebyside diff --git a/m17app/src/adapter.rs b/m17app/src/adapter.rs index e31234b..8fdf9d9 100644 --- a/m17app/src/adapter.rs +++ b/m17app/src/adapter.rs @@ -1,26 +1,44 @@ -use crate::app::TxHandle; -use m17core::protocol::{LsfFrame, PacketType}; +use crate::{app::TxHandle, link_setup::LinkSetup}; +use m17core::protocol::PacketType; use std::sync::Arc; pub trait PacketAdapter: Send + Sync + 'static { - fn adapter_registered(&self, id: usize, handle: TxHandle); - fn adapter_removed(&self); - fn tnc_started(&self); - fn tnc_closed(&self); - fn packet_received(&self, lsf: LsfFrame, packet_type: PacketType, content: Arc<[u8]>); + fn adapter_registered(&self, id: usize, handle: TxHandle) { + let _ = id; + let _ = handle; + } + fn adapter_removed(&self) {} + fn tnc_started(&self) {} + fn tnc_closed(&self) {} + fn packet_received(&self, link_setup: LinkSetup, packet_type: PacketType, content: Arc<[u8]>) { + let _ = link_setup; + let _ = packet_type; + let _ = content; + } } pub trait StreamAdapter: Send + Sync + 'static { - fn adapter_registered(&self, id: usize, handle: TxHandle); - fn adapter_removed(&self); - fn tnc_started(&self); - fn tnc_closed(&self); - fn stream_began(&self, lsf: LsfFrame); - fn stream_data(&self, frame_number: u16, is_final: bool, data: Arc<[u8; 16]>); - fn stream_lost(&self); + fn adapter_registered(&self, id: usize, handle: TxHandle) { + let _ = id; + let _ = handle; + } + fn adapter_removed(&self) {} + fn tnc_started(&self) {} + fn tnc_closed(&self) {} + fn stream_began(&self, link_setup: LinkSetup) { + let _ = link_setup; + } + fn stream_data(&self, frame_number: u16, is_final: bool, data: Arc<[u8; 16]>) { + let _ = frame_number; + let _ = is_final; + let _ = data; + } // TODO + // fn stream_lost(&self); // fn stream_assembled_text_block() // fn stream_gnss_data() // fn stream_extended_callsign_data() + + // fn stream_tx_ended_early(&self); // underrun/overrun }