system_configuration_sys/
dynamic_store.rs

1/* automatically generated by rust-bindgen 0.66.1 */
2
3// Generated using:
4// bindgen 0.66.1
5// macOS SDK 13.3.
6
7use core::ffi::c_void;
8use core_foundation_sys::array::CFArrayRef;
9use core_foundation_sys::base::{Boolean, CFAllocatorRef, CFIndex, CFTypeID};
10use core_foundation_sys::dictionary::CFDictionaryRef;
11use core_foundation_sys::propertylist::CFPropertyListRef;
12use core_foundation_sys::runloop::CFRunLoopSourceRef;
13use core_foundation_sys::string::CFStringRef;
14
15use crate::dispatch_queue_t;
16
17#[repr(C)]
18pub struct __SCDynamicStore(c_void);
19
20pub type SCDynamicStoreRef = *const __SCDynamicStore;
21#[repr(C)]
22pub struct SCDynamicStoreContext {
23    pub version: CFIndex,
24    pub info: *mut ::core::ffi::c_void,
25    pub retain: Option<
26        unsafe extern "C" fn(info: *const ::core::ffi::c_void) -> *const ::core::ffi::c_void,
27    >,
28    pub release: Option<unsafe extern "C" fn(info: *const ::core::ffi::c_void)>,
29    pub copyDescription:
30        Option<unsafe extern "C" fn(info: *const ::core::ffi::c_void) -> CFStringRef>,
31}
32pub type SCDynamicStoreCallBack = Option<
33    unsafe extern "C" fn(
34        store: SCDynamicStoreRef,
35        changedKeys: CFArrayRef,
36        info: *mut ::core::ffi::c_void,
37    ),
38>;
39extern "C" {
40    pub fn SCDynamicStoreGetTypeID() -> CFTypeID;
41
42    pub fn SCDynamicStoreCreate(
43        allocator: CFAllocatorRef,
44        name: CFStringRef,
45        callout: SCDynamicStoreCallBack,
46        context: *mut SCDynamicStoreContext,
47    ) -> SCDynamicStoreRef;
48
49    pub fn SCDynamicStoreCreateWithOptions(
50        allocator: CFAllocatorRef,
51        name: CFStringRef,
52        storeOptions: CFDictionaryRef,
53        callout: SCDynamicStoreCallBack,
54        context: *mut SCDynamicStoreContext,
55    ) -> SCDynamicStoreRef;
56
57    pub static kSCDynamicStoreUseSessionKeys: CFStringRef;
58
59    pub fn SCDynamicStoreCreateRunLoopSource(
60        allocator: CFAllocatorRef,
61        store: SCDynamicStoreRef,
62        order: CFIndex,
63    ) -> CFRunLoopSourceRef;
64
65    pub fn SCDynamicStoreSetDispatchQueue(
66        store: SCDynamicStoreRef,
67        queue: dispatch_queue_t,
68    ) -> Boolean;
69
70    pub fn SCDynamicStoreCopyKeyList(store: SCDynamicStoreRef, pattern: CFStringRef) -> CFArrayRef;
71
72    pub fn SCDynamicStoreAddValue(
73        store: SCDynamicStoreRef,
74        key: CFStringRef,
75        value: CFPropertyListRef,
76    ) -> Boolean;
77
78    pub fn SCDynamicStoreAddTemporaryValue(
79        store: SCDynamicStoreRef,
80        key: CFStringRef,
81        value: CFPropertyListRef,
82    ) -> Boolean;
83
84    pub fn SCDynamicStoreCopyValue(store: SCDynamicStoreRef, key: CFStringRef)
85        -> CFPropertyListRef;
86
87    pub fn SCDynamicStoreCopyMultiple(
88        store: SCDynamicStoreRef,
89        keys: CFArrayRef,
90        patterns: CFArrayRef,
91    ) -> CFDictionaryRef;
92
93    pub fn SCDynamicStoreSetValue(
94        store: SCDynamicStoreRef,
95        key: CFStringRef,
96        value: CFPropertyListRef,
97    ) -> Boolean;
98
99    pub fn SCDynamicStoreSetMultiple(
100        store: SCDynamicStoreRef,
101        keysToSet: CFDictionaryRef,
102        keysToRemove: CFArrayRef,
103        keysToNotify: CFArrayRef,
104    ) -> Boolean;
105
106    pub fn SCDynamicStoreRemoveValue(store: SCDynamicStoreRef, key: CFStringRef) -> Boolean;
107
108    pub fn SCDynamicStoreNotifyValue(store: SCDynamicStoreRef, key: CFStringRef) -> Boolean;
109
110    pub fn SCDynamicStoreSetNotificationKeys(
111        store: SCDynamicStoreRef,
112        keys: CFArrayRef,
113        patterns: CFArrayRef,
114    ) -> Boolean;
115
116    pub fn SCDynamicStoreCopyNotifiedKeys(store: SCDynamicStoreRef) -> CFArrayRef;
117}