X-Git-Url: https://code.octet-stream.net/m17rt/blobdiff_plain/18349069c27a0b4fb2e39669fb535600805ad160..2c7d53c113f4e19f24c928b2c5eca1c3f6f799af:/m17app/src/link_setup.rs?ds=sidebyside diff --git a/m17app/src/link_setup.rs b/m17app/src/link_setup.rs index 007dc78..2394725 100644 --- a/m17app/src/link_setup.rs +++ b/m17app/src/link_setup.rs @@ -17,6 +17,14 @@ impl LinkSetup { Self { raw: frame } } + pub fn source(&self) -> M17Address { + M17Address(self.raw.source()) + } + + pub fn destination(&self) -> M17Address { + M17Address(self.raw.destination()) + } + /// Set up an unencrypted voice stream with channel access number 0 and the given source and destination. pub fn new_voice(source: &M17Address, destination: &M17Address) -> Self { Self { @@ -71,7 +79,7 @@ impl M17Address { Ok(Self(Address::Callsign(Callsign(address)))) } - pub(crate) fn address(&self) -> &Address { + pub fn address(&self) -> &Address { &self.0 } }