#[unsafe(no_mangle)]pub unsafe extern "C" fn moq_origin_announced(
origin: u32,
prefix: *const c_char,
prefix_len: usize,
filter: *const c_char,
filter_len: usize,
on_announce: moq_status_callback,
user_data: *mut c_void,
) -> i32Expand description
Learn about broadcasts matching a pattern scope under an origin.
prefix is a literal path root. filter is a pattern relative to that
prefix, or NULL for every path beneath it. Empty is a valid exact filter.
Delivered moq_announce_update prefixes remain relative to the 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_cancel.
- moq_origin_announced_info is used to query information about the broadcast.
- moq_origin_announced_free releases each delivered announced ID once read.
- moq_origin_announced_cancel 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.