use core::ptr::NonNull;
use objc2_core_foundation::*;
use crate::*;
#[cfg(feature = "SCDynamicStore")]
impl SCDynamicStore {
#[doc(alias = "SCDynamicStoreKeyCreateNetworkGlobalEntity")]
#[inline]
pub fn key_create_network_global_entity(
allocator: Option<&CFAllocator>,
domain: &CFString,
entity: &CFString,
) -> CFRetained<CFString> {
extern "C-unwind" {
fn SCDynamicStoreKeyCreateNetworkGlobalEntity(
allocator: Option<&CFAllocator>,
domain: &CFString,
entity: &CFString,
) -> Option<NonNull<CFString>>;
}
let ret = unsafe { SCDynamicStoreKeyCreateNetworkGlobalEntity(allocator, domain, entity) };
let ret =
ret.expect("function was marked as returning non-null, but actually returned NULL");
unsafe { CFRetained::from_raw(ret) }
}
#[doc(alias = "SCDynamicStoreKeyCreateNetworkInterface")]
#[inline]
pub fn key_create_network_interface(
allocator: Option<&CFAllocator>,
domain: &CFString,
) -> CFRetained<CFString> {
extern "C-unwind" {
fn SCDynamicStoreKeyCreateNetworkInterface(
allocator: Option<&CFAllocator>,
domain: &CFString,
) -> Option<NonNull<CFString>>;
}
let ret = unsafe { SCDynamicStoreKeyCreateNetworkInterface(allocator, domain) };
let ret =
ret.expect("function was marked as returning non-null, but actually returned NULL");
unsafe { CFRetained::from_raw(ret) }
}
#[doc(alias = "SCDynamicStoreKeyCreateNetworkInterfaceEntity")]
#[inline]
pub fn key_create_network_interface_entity(
allocator: Option<&CFAllocator>,
domain: &CFString,
ifname: &CFString,
entity: Option<&CFString>,
) -> CFRetained<CFString> {
extern "C-unwind" {
fn SCDynamicStoreKeyCreateNetworkInterfaceEntity(
allocator: Option<&CFAllocator>,
domain: &CFString,
ifname: &CFString,
entity: Option<&CFString>,
) -> Option<NonNull<CFString>>;
}
let ret = unsafe {
SCDynamicStoreKeyCreateNetworkInterfaceEntity(allocator, domain, ifname, entity)
};
let ret =
ret.expect("function was marked as returning non-null, but actually returned NULL");
unsafe { CFRetained::from_raw(ret) }
}
#[doc(alias = "SCDynamicStoreKeyCreateNetworkServiceEntity")]
#[inline]
pub fn key_create_network_service_entity(
allocator: Option<&CFAllocator>,
domain: &CFString,
service_id: &CFString,
entity: Option<&CFString>,
) -> CFRetained<CFString> {
extern "C-unwind" {
fn SCDynamicStoreKeyCreateNetworkServiceEntity(
allocator: Option<&CFAllocator>,
domain: &CFString,
service_id: &CFString,
entity: Option<&CFString>,
) -> Option<NonNull<CFString>>;
}
let ret = unsafe {
SCDynamicStoreKeyCreateNetworkServiceEntity(allocator, domain, service_id, entity)
};
let ret =
ret.expect("function was marked as returning non-null, but actually returned NULL");
unsafe { CFRetained::from_raw(ret) }
}
#[doc(alias = "SCDynamicStoreKeyCreateComputerName")]
#[inline]
pub fn key_create_computer_name(allocator: Option<&CFAllocator>) -> CFRetained<CFString> {
extern "C-unwind" {
fn SCDynamicStoreKeyCreateComputerName(
allocator: Option<&CFAllocator>,
) -> Option<NonNull<CFString>>;
}
let ret = unsafe { SCDynamicStoreKeyCreateComputerName(allocator) };
let ret =
ret.expect("function was marked as returning non-null, but actually returned NULL");
unsafe { CFRetained::from_raw(ret) }
}
#[doc(alias = "SCDynamicStoreKeyCreateConsoleUser")]
#[inline]
pub fn key_create_console_user(allocator: Option<&CFAllocator>) -> CFRetained<CFString> {
extern "C-unwind" {
fn SCDynamicStoreKeyCreateConsoleUser(
allocator: Option<&CFAllocator>,
) -> Option<NonNull<CFString>>;
}
let ret = unsafe { SCDynamicStoreKeyCreateConsoleUser(allocator) };
let ret =
ret.expect("function was marked as returning non-null, but actually returned NULL");
unsafe { CFRetained::from_raw(ret) }
}
#[doc(alias = "SCDynamicStoreKeyCreateHostNames")]
#[inline]
pub fn key_create_host_names(allocator: Option<&CFAllocator>) -> CFRetained<CFString> {
extern "C-unwind" {
fn SCDynamicStoreKeyCreateHostNames(
allocator: Option<&CFAllocator>,
) -> Option<NonNull<CFString>>;
}
let ret = unsafe { SCDynamicStoreKeyCreateHostNames(allocator) };
let ret =
ret.expect("function was marked as returning non-null, but actually returned NULL");
unsafe { CFRetained::from_raw(ret) }
}
#[doc(alias = "SCDynamicStoreKeyCreateLocation")]
#[inline]
pub fn key_create_location(allocator: Option<&CFAllocator>) -> CFRetained<CFString> {
extern "C-unwind" {
fn SCDynamicStoreKeyCreateLocation(
allocator: Option<&CFAllocator>,
) -> Option<NonNull<CFString>>;
}
let ret = unsafe { SCDynamicStoreKeyCreateLocation(allocator) };
let ret =
ret.expect("function was marked as returning non-null, but actually returned NULL");
unsafe { CFRetained::from_raw(ret) }
}
#[doc(alias = "SCDynamicStoreKeyCreateProxies")]
#[inline]
pub fn key_create_proxies(allocator: Option<&CFAllocator>) -> CFRetained<CFString> {
extern "C-unwind" {
fn SCDynamicStoreKeyCreateProxies(
allocator: Option<&CFAllocator>,
) -> Option<NonNull<CFString>>;
}
let ret = unsafe { SCDynamicStoreKeyCreateProxies(allocator) };
let ret =
ret.expect("function was marked as returning non-null, but actually returned NULL");
unsafe { CFRetained::from_raw(ret) }
}
}
#[deprecated = "renamed to `SCDynamicStore::key_create_network_global_entity`"]
#[inline]
pub extern "C-unwind" fn SCDynamicStoreKeyCreateNetworkGlobalEntity(
allocator: Option<&CFAllocator>,
domain: &CFString,
entity: &CFString,
) -> CFRetained<CFString> {
extern "C-unwind" {
fn SCDynamicStoreKeyCreateNetworkGlobalEntity(
allocator: Option<&CFAllocator>,
domain: &CFString,
entity: &CFString,
) -> Option<NonNull<CFString>>;
}
let ret = unsafe { SCDynamicStoreKeyCreateNetworkGlobalEntity(allocator, domain, entity) };
let ret = ret.expect("function was marked as returning non-null, but actually returned NULL");
unsafe { CFRetained::from_raw(ret) }
}
#[deprecated = "renamed to `SCDynamicStore::key_create_network_interface`"]
#[inline]
pub extern "C-unwind" fn SCDynamicStoreKeyCreateNetworkInterface(
allocator: Option<&CFAllocator>,
domain: &CFString,
) -> CFRetained<CFString> {
extern "C-unwind" {
fn SCDynamicStoreKeyCreateNetworkInterface(
allocator: Option<&CFAllocator>,
domain: &CFString,
) -> Option<NonNull<CFString>>;
}
let ret = unsafe { SCDynamicStoreKeyCreateNetworkInterface(allocator, domain) };
let ret = ret.expect("function was marked as returning non-null, but actually returned NULL");
unsafe { CFRetained::from_raw(ret) }
}
#[deprecated = "renamed to `SCDynamicStore::key_create_network_interface_entity`"]
#[inline]
pub extern "C-unwind" fn SCDynamicStoreKeyCreateNetworkInterfaceEntity(
allocator: Option<&CFAllocator>,
domain: &CFString,
ifname: &CFString,
entity: Option<&CFString>,
) -> CFRetained<CFString> {
extern "C-unwind" {
fn SCDynamicStoreKeyCreateNetworkInterfaceEntity(
allocator: Option<&CFAllocator>,
domain: &CFString,
ifname: &CFString,
entity: Option<&CFString>,
) -> Option<NonNull<CFString>>;
}
let ret =
unsafe { SCDynamicStoreKeyCreateNetworkInterfaceEntity(allocator, domain, ifname, entity) };
let ret = ret.expect("function was marked as returning non-null, but actually returned NULL");
unsafe { CFRetained::from_raw(ret) }
}
#[deprecated = "renamed to `SCDynamicStore::key_create_network_service_entity`"]
#[inline]
pub extern "C-unwind" fn SCDynamicStoreKeyCreateNetworkServiceEntity(
allocator: Option<&CFAllocator>,
domain: &CFString,
service_id: &CFString,
entity: Option<&CFString>,
) -> CFRetained<CFString> {
extern "C-unwind" {
fn SCDynamicStoreKeyCreateNetworkServiceEntity(
allocator: Option<&CFAllocator>,
domain: &CFString,
service_id: &CFString,
entity: Option<&CFString>,
) -> Option<NonNull<CFString>>;
}
let ret = unsafe {
SCDynamicStoreKeyCreateNetworkServiceEntity(allocator, domain, service_id, entity)
};
let ret = ret.expect("function was marked as returning non-null, but actually returned NULL");
unsafe { CFRetained::from_raw(ret) }
}
#[deprecated = "renamed to `SCDynamicStore::key_create_computer_name`"]
#[inline]
pub extern "C-unwind" fn SCDynamicStoreKeyCreateComputerName(
allocator: Option<&CFAllocator>,
) -> CFRetained<CFString> {
extern "C-unwind" {
fn SCDynamicStoreKeyCreateComputerName(
allocator: Option<&CFAllocator>,
) -> Option<NonNull<CFString>>;
}
let ret = unsafe { SCDynamicStoreKeyCreateComputerName(allocator) };
let ret = ret.expect("function was marked as returning non-null, but actually returned NULL");
unsafe { CFRetained::from_raw(ret) }
}
#[deprecated = "renamed to `SCDynamicStore::key_create_console_user`"]
#[inline]
pub extern "C-unwind" fn SCDynamicStoreKeyCreateConsoleUser(
allocator: Option<&CFAllocator>,
) -> CFRetained<CFString> {
extern "C-unwind" {
fn SCDynamicStoreKeyCreateConsoleUser(
allocator: Option<&CFAllocator>,
) -> Option<NonNull<CFString>>;
}
let ret = unsafe { SCDynamicStoreKeyCreateConsoleUser(allocator) };
let ret = ret.expect("function was marked as returning non-null, but actually returned NULL");
unsafe { CFRetained::from_raw(ret) }
}
#[deprecated = "renamed to `SCDynamicStore::key_create_host_names`"]
#[inline]
pub extern "C-unwind" fn SCDynamicStoreKeyCreateHostNames(
allocator: Option<&CFAllocator>,
) -> CFRetained<CFString> {
extern "C-unwind" {
fn SCDynamicStoreKeyCreateHostNames(
allocator: Option<&CFAllocator>,
) -> Option<NonNull<CFString>>;
}
let ret = unsafe { SCDynamicStoreKeyCreateHostNames(allocator) };
let ret = ret.expect("function was marked as returning non-null, but actually returned NULL");
unsafe { CFRetained::from_raw(ret) }
}
#[deprecated = "renamed to `SCDynamicStore::key_create_location`"]
#[inline]
pub extern "C-unwind" fn SCDynamicStoreKeyCreateLocation(
allocator: Option<&CFAllocator>,
) -> CFRetained<CFString> {
extern "C-unwind" {
fn SCDynamicStoreKeyCreateLocation(
allocator: Option<&CFAllocator>,
) -> Option<NonNull<CFString>>;
}
let ret = unsafe { SCDynamicStoreKeyCreateLocation(allocator) };
let ret = ret.expect("function was marked as returning non-null, but actually returned NULL");
unsafe { CFRetained::from_raw(ret) }
}
#[deprecated = "renamed to `SCDynamicStore::key_create_proxies`"]
#[inline]
pub extern "C-unwind" fn SCDynamicStoreKeyCreateProxies(
allocator: Option<&CFAllocator>,
) -> CFRetained<CFString> {
extern "C-unwind" {
fn SCDynamicStoreKeyCreateProxies(
allocator: Option<&CFAllocator>,
) -> Option<NonNull<CFString>>;
}
let ret = unsafe { SCDynamicStoreKeyCreateProxies(allocator) };
let ret = ret.expect("function was marked as returning non-null, but actually returned NULL");
unsafe { CFRetained::from_raw(ret) }
}