network_framework_sys/
content_context.rs

1use crate::*;
2
3use libc::c_char;
4use libc::c_double;
5
6
7pub enum nw_content_context {}
8pub type nw_content_context_t = *mut nw_content_context;
9
10
11extern "C" {
12    pub fn nw_content_context_create(context_identifier: *const c_char) -> nw_content_context_t;
13    pub fn nw_content_context_get_identifier(context: nw_content_context_t) -> *const c_char;
14
15    pub fn nw_content_context_get_is_final(context: nw_content_context_t) -> bool;
16    pub fn nw_content_context_set_is_final(context: nw_content_context_t, is_final: bool);
17    pub fn nw_content_context_get_expiration_milliseconds(context: nw_content_context_t) -> u64;
18    pub fn nw_content_context_set_expiration_milliseconds(context: nw_content_context_t, expiration_milliseconds: u64);
19
20    pub fn nw_content_context_get_relative_priority(context: nw_content_context_t) -> c_double;
21    pub fn nw_content_context_set_relative_priority(context: nw_content_context_t, relative_priority: c_double);
22    pub fn nw_content_context_set_antecedent(context: nw_content_context_t, antecendent_context: nw_content_context_t);
23    pub fn nw_content_context_copy_antecedent(context: nw_content_context_t) -> nw_content_context_t;
24    pub fn nw_content_context_set_metadata_for_protocol(context: nw_content_context_t, protocol_metadata: nw_protocol_metadata_t);
25    pub fn nw_content_context_copy_protocol_metadata(context: nw_content_context_t,
26                                                     protocol: nw_protocol_definition_t)
27        -> nw_protocol_metadata_t;
28
29    // void (^foreach_block)(nw_protocol_definition_t definition, nw_protocol_metadata_t metadata)
30    // pub fn nw_content_context_foreach_protocol_metadata(context: nw_content_context_t,
31    //                                                     foreach_block: foreach_block_t);
32}