From 8a13d7f0106230ca0b4a6f82328a507d53d9f47a Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Fri, 18 Oct 2019 13:06:36 +0200 Subject: [PATCH] jingle_ice_udp: Add methods to add a RTP candidate and set the DTLS-SRTP fingerprint. --- src/jingle_ice_udp.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/jingle_ice_udp.rs b/src/jingle_ice_udp.rs index be5dbc9..b7f9e77 100644 --- a/src/jingle_ice_udp.rs +++ b/src/jingle_ice_udp.rs @@ -36,6 +36,18 @@ impl Transport { fingerprint: None, } } + + /// Add a candidate to this transport. + pub fn add_candidate(mut self, candidate: Candidate) -> Self { + self.candidates.push(candidate); + self + } + + /// Set the DTLS-SRTP fingerprint of this transport. + pub fn with_fingerprint(mut self, fingerprint: Fingerprint) -> Self { + self.fingerprint = Some(fingerprint); + self + } } generate_attribute!(