//! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT use core::ffi::*; use core::ptr::NonNull; use objc2::__framework_prelude::*; use crate::*; extern_class!( /// DEPRECATION NOTICE /// /// If you’re using `NSHost` to resolve DNS names so that you can connect to a /// service, switch to a connect-by-name API, for example, `nw_connection`. /// /// If you have other DNS resolution needs, switch to /// . /// /// See also [Apple's documentation](https://developer.apple.com/documentation/foundation/nshost?language=objc) #[unsafe(super(NSObject))] #[derive(Debug, PartialEq, Eq, Hash)] #[deprecated = "Use Network framework instead, see deprecation notice in "] pub struct NSHost; ); extern_conformance!( unsafe impl NSObjectProtocol for NSHost {} ); impl NSHost { extern_methods!( #[deprecated = "Use Network framework instead, see deprecation notice in "] #[unsafe(method(currentHost))] #[unsafe(method_family = none)] pub fn currentHost() -> Retained; #[cfg(feature = "NSString")] #[deprecated = "Use Network framework instead, see deprecation notice in "] #[unsafe(method(hostWithName:))] #[unsafe(method_family = none)] pub fn hostWithName(name: Option<&NSString>) -> Retained; #[cfg(feature = "NSString")] #[deprecated = "Use Network framework instead, see deprecation notice in "] #[unsafe(method(hostWithAddress:))] #[unsafe(method_family = none)] pub fn hostWithAddress(address: &NSString) -> Retained; #[deprecated = "Use Network framework instead, see deprecation notice in "] #[unsafe(method(isEqualToHost:))] #[unsafe(method_family = none)] pub fn isEqualToHost(&self, a_host: &NSHost) -> bool; #[cfg(feature = "NSString")] #[deprecated = "Use Network framework instead, see deprecation notice in "] #[unsafe(method(name))] #[unsafe(method_family = none)] pub fn name(&self) -> Option>; #[cfg(all(feature = "NSArray", feature = "NSString"))] #[deprecated = "Use Network framework instead, see deprecation notice in "] #[unsafe(method(names))] #[unsafe(method_family = none)] pub fn names(&self) -> Retained>; #[cfg(feature = "NSString")] #[deprecated = "Use Network framework instead, see deprecation notice in "] #[unsafe(method(address))] #[unsafe(method_family = none)] pub fn address(&self) -> Option>; #[cfg(all(feature = "NSArray", feature = "NSString"))] #[deprecated = "Use Network framework instead, see deprecation notice in "] #[unsafe(method(addresses))] #[unsafe(method_family = none)] pub fn addresses(&self) -> Retained>; #[cfg(feature = "NSString")] #[unsafe(method(localizedName))] #[unsafe(method_family = none)] pub fn localizedName(&self) -> Option>; #[deprecated = "Caching no longer supported"] #[unsafe(method(setHostCacheEnabled:))] #[unsafe(method_family = none)] pub fn setHostCacheEnabled(flag: bool); #[deprecated = "Caching no longer supported"] #[unsafe(method(isHostCacheEnabled))] #[unsafe(method_family = none)] pub fn isHostCacheEnabled() -> bool; #[deprecated = "Caching no longer supported"] #[unsafe(method(flushHostCache))] #[unsafe(method_family = none)] pub fn flushHostCache(); ); } /// Methods declared on superclass `NSObject`. impl NSHost { extern_methods!( #[unsafe(method(init))] #[unsafe(method_family = init)] pub fn init(this: Allocated) -> Retained; #[unsafe(method(new))] #[unsafe(method_family = new)] pub fn new() -> Retained; ); } impl DefaultRetained for NSHost { #[inline] fn default_retained() -> Retained { Self::new() } }