#[unsafe(no_mangle)]pub unsafe extern "C" fn moq_origin_announced(
origin: u32,
on_announce: Option<extern "C" fn(user_data: *mut c_void, announced: i32)>,
user_data: *mut c_void,
) -> i32Expand description
Learn about all broadcasts published to an origin.
on_announce is invoked with a positive announced ID for each broadcast,
then exactly once more with a terminal code: 0 (stopped cleanly) or a
negative error. After the terminal (<= 0) callback, on_announce is never
called again and user_data is never touched again, so release user_data
there. The terminal callback fires even after moq_origin_announced_close.
- moq_origin_announced_info is used to query information about the broadcast.
- moq_origin_announced_close is used to stop receiving announcements.
Returns a non-zero handle on success, or a negative code on failure.
ยงSafety
- The caller must keep
user_datavalid until the terminal (<= 0)on_announcecallback.