use crate::{WebRTCICECandidate, WebRTCICECandidatePair};
impl WebRTCICECandidatePair {
pub fn local(&self) -> Option<&WebRTCICECandidate> {
unsafe {
if (*self.as_ptr()).local.is_null() {
None
} else {
Some(WebRTCICECandidate::from_glib_ptr_borrow(
&(*self.as_ptr()).local,
))
}
}
}
pub fn remote(&self) -> Option<&WebRTCICECandidate> {
unsafe {
if (*self.as_ptr()).remote.is_null() {
None
} else {
Some(WebRTCICECandidate::from_glib_ptr_borrow(
&(*self.as_ptr()).remote,
))
}
}
}
}