use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use crate::*;
extern_class!(
#[unsafe(super(NSXMLNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "NSXMLNode")]
pub struct NSXMLDTD;
);
#[cfg(all(feature = "NSObject", feature = "NSXMLNode"))]
extern_conformance!(
unsafe impl NSCopying for NSXMLDTD {}
);
#[cfg(all(feature = "NSObject", feature = "NSXMLNode"))]
unsafe impl CopyingHelper for NSXMLDTD {
type Result = Self;
}
#[cfg(feature = "NSXMLNode")]
extern_conformance!(
unsafe impl NSObjectProtocol for NSXMLDTD {}
);
#[cfg(feature = "NSXMLNode")]
impl NSXMLDTD {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "NSXMLNodeOptions")]
#[unsafe(method(initWithKind:options:))]
#[unsafe(method_family = init)]
pub fn initWithKind_options(
this: Allocated<Self>,
kind: NSXMLNodeKind,
options: NSXMLNodeOptions,
) -> Retained<Self>;
#[cfg(all(feature = "NSError", feature = "NSURL", feature = "NSXMLNodeOptions"))]
#[unsafe(method(initWithContentsOfURL:options:error:_))]
#[unsafe(method_family = init)]
pub fn initWithContentsOfURL_options_error(
this: Allocated<Self>,
url: &NSURL,
mask: NSXMLNodeOptions,
) -> Result<Retained<Self>, Retained<NSError>>;
#[cfg(all(feature = "NSData", feature = "NSError", feature = "NSXMLNodeOptions"))]
#[unsafe(method(initWithData:options:error:_))]
#[unsafe(method_family = init)]
pub fn initWithData_options_error(
this: Allocated<Self>,
data: &NSData,
mask: NSXMLNodeOptions,
) -> Result<Retained<Self>, Retained<NSError>>;
#[cfg(feature = "NSString")]
#[unsafe(method(publicID))]
#[unsafe(method_family = none)]
pub fn publicID(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[unsafe(method(setPublicID:))]
#[unsafe(method_family = none)]
pub fn setPublicID(&self, public_id: Option<&NSString>);
#[cfg(feature = "NSString")]
#[unsafe(method(systemID))]
#[unsafe(method_family = none)]
pub fn systemID(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[unsafe(method(setSystemID:))]
#[unsafe(method_family = none)]
pub fn setSystemID(&self, system_id: Option<&NSString>);
#[unsafe(method(insertChild:atIndex:))]
#[unsafe(method_family = none)]
pub fn insertChild_atIndex(&self, child: &NSXMLNode, index: NSUInteger);
#[cfg(feature = "NSArray")]
#[unsafe(method(insertChildren:atIndex:))]
#[unsafe(method_family = none)]
pub fn insertChildren_atIndex(&self, children: &NSArray<NSXMLNode>, index: NSUInteger);
#[unsafe(method(removeChildAtIndex:))]
#[unsafe(method_family = none)]
pub fn removeChildAtIndex(&self, index: NSUInteger);
#[cfg(feature = "NSArray")]
#[unsafe(method(setChildren:))]
#[unsafe(method_family = none)]
pub fn setChildren(&self, children: Option<&NSArray<NSXMLNode>>);
#[unsafe(method(addChild:))]
#[unsafe(method_family = none)]
pub fn addChild(&self, child: &NSXMLNode);
#[unsafe(method(replaceChildAtIndex:withNode:))]
#[unsafe(method_family = none)]
pub fn replaceChildAtIndex_withNode(&self, index: NSUInteger, node: &NSXMLNode);
#[cfg(all(feature = "NSString", feature = "NSXMLDTDNode"))]
#[unsafe(method(entityDeclarationForName:))]
#[unsafe(method_family = none)]
pub fn entityDeclarationForName(&self, name: &NSString) -> Option<Retained<NSXMLDTDNode>>;
#[cfg(all(feature = "NSString", feature = "NSXMLDTDNode"))]
#[unsafe(method(notationDeclarationForName:))]
#[unsafe(method_family = none)]
pub fn notationDeclarationForName(&self, name: &NSString)
-> Option<Retained<NSXMLDTDNode>>;
#[cfg(all(feature = "NSString", feature = "NSXMLDTDNode"))]
#[unsafe(method(elementDeclarationForName:))]
#[unsafe(method_family = none)]
pub fn elementDeclarationForName(&self, name: &NSString) -> Option<Retained<NSXMLDTDNode>>;
#[cfg(all(feature = "NSString", feature = "NSXMLDTDNode"))]
#[unsafe(method(attributeDeclarationForName:elementName:))]
#[unsafe(method_family = none)]
pub fn attributeDeclarationForName_elementName(
&self,
name: &NSString,
element_name: &NSString,
) -> Option<Retained<NSXMLDTDNode>>;
#[cfg(all(feature = "NSString", feature = "NSXMLDTDNode"))]
#[unsafe(method(predefinedEntityDeclarationForName:))]
#[unsafe(method_family = none)]
pub fn predefinedEntityDeclarationForName(
name: &NSString,
) -> Option<Retained<NSXMLDTDNode>>;
);
}
#[cfg(feature = "NSXMLNode")]
impl NSXMLDTD {
extern_methods!(
#[unsafe(method(initWithKind:))]
#[unsafe(method_family = init)]
pub fn initWithKind(this: Allocated<Self>, kind: NSXMLNodeKind) -> Retained<Self>;
);
}
#[cfg(feature = "NSXMLNode")]
impl NSXMLDTD {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new() -> Retained<Self>;
);
}
#[cfg(feature = "NSXMLNode")]
impl DefaultRetained for NSXMLDTD {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}