objc2_foundation/generated/
NSXMLDTD.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(NSXMLNode, NSObject))]
14 #[derive(Debug, PartialEq, Eq, Hash)]
15 #[cfg(feature = "NSXMLNode")]
16 pub struct NSXMLDTD;
17);
18
19#[cfg(all(feature = "NSObject", feature = "NSXMLNode"))]
20extern_conformance!(
21 unsafe impl NSCopying for NSXMLDTD {}
22);
23
24#[cfg(all(feature = "NSObject", feature = "NSXMLNode"))]
25unsafe impl CopyingHelper for NSXMLDTD {
26 type Result = Self;
27}
28
29#[cfg(feature = "NSXMLNode")]
30extern_conformance!(
31 unsafe impl NSObjectProtocol for NSXMLDTD {}
32);
33
34#[cfg(feature = "NSXMLNode")]
35impl NSXMLDTD {
36 extern_methods!(
37 #[unsafe(method(init))]
38 #[unsafe(method_family = init)]
39 pub fn init(this: Allocated<Self>) -> Retained<Self>;
40
41 #[cfg(feature = "NSXMLNodeOptions")]
42 #[unsafe(method(initWithKind:options:))]
43 #[unsafe(method_family = init)]
44 pub fn initWithKind_options(
45 this: Allocated<Self>,
46 kind: NSXMLNodeKind,
47 options: NSXMLNodeOptions,
48 ) -> Retained<Self>;
49
50 #[cfg(all(feature = "NSError", feature = "NSURL", feature = "NSXMLNodeOptions"))]
51 #[unsafe(method(initWithContentsOfURL:options:error:_))]
52 #[unsafe(method_family = init)]
53 pub fn initWithContentsOfURL_options_error(
54 this: Allocated<Self>,
55 url: &NSURL,
56 mask: NSXMLNodeOptions,
57 ) -> Result<Retained<Self>, Retained<NSError>>;
58
59 #[cfg(all(feature = "NSData", feature = "NSError", feature = "NSXMLNodeOptions"))]
60 #[unsafe(method(initWithData:options:error:_))]
61 #[unsafe(method_family = init)]
62 pub fn initWithData_options_error(
63 this: Allocated<Self>,
64 data: &NSData,
65 mask: NSXMLNodeOptions,
66 ) -> Result<Retained<Self>, Retained<NSError>>;
67
68 #[cfg(feature = "NSString")]
69 #[unsafe(method(publicID))]
71 #[unsafe(method_family = none)]
72 pub fn publicID(&self) -> Option<Retained<NSString>>;
73
74 #[cfg(feature = "NSString")]
75 #[unsafe(method(setPublicID:))]
79 #[unsafe(method_family = none)]
80 pub fn setPublicID(&self, public_id: Option<&NSString>);
81
82 #[cfg(feature = "NSString")]
83 #[unsafe(method(systemID))]
85 #[unsafe(method_family = none)]
86 pub fn systemID(&self) -> Option<Retained<NSString>>;
87
88 #[cfg(feature = "NSString")]
89 #[unsafe(method(setSystemID:))]
93 #[unsafe(method_family = none)]
94 pub fn setSystemID(&self, system_id: Option<&NSString>);
95
96 #[unsafe(method(insertChild:atIndex:))]
98 #[unsafe(method_family = none)]
99 pub fn insertChild_atIndex(&self, child: &NSXMLNode, index: NSUInteger);
100
101 #[cfg(feature = "NSArray")]
102 #[unsafe(method(insertChildren:atIndex:))]
104 #[unsafe(method_family = none)]
105 pub fn insertChildren_atIndex(&self, children: &NSArray<NSXMLNode>, index: NSUInteger);
106
107 #[unsafe(method(removeChildAtIndex:))]
109 #[unsafe(method_family = none)]
110 pub fn removeChildAtIndex(&self, index: NSUInteger);
111
112 #[cfg(feature = "NSArray")]
113 #[unsafe(method(setChildren:))]
115 #[unsafe(method_family = none)]
116 pub fn setChildren(&self, children: Option<&NSArray<NSXMLNode>>);
117
118 #[unsafe(method(addChild:))]
120 #[unsafe(method_family = none)]
121 pub fn addChild(&self, child: &NSXMLNode);
122
123 #[unsafe(method(replaceChildAtIndex:withNode:))]
125 #[unsafe(method_family = none)]
126 pub fn replaceChildAtIndex_withNode(&self, index: NSUInteger, node: &NSXMLNode);
127
128 #[cfg(all(feature = "NSString", feature = "NSXMLDTDNode"))]
129 #[unsafe(method(entityDeclarationForName:))]
131 #[unsafe(method_family = none)]
132 pub fn entityDeclarationForName(&self, name: &NSString) -> Option<Retained<NSXMLDTDNode>>;
133
134 #[cfg(all(feature = "NSString", feature = "NSXMLDTDNode"))]
135 #[unsafe(method(notationDeclarationForName:))]
137 #[unsafe(method_family = none)]
138 pub fn notationDeclarationForName(&self, name: &NSString)
139 -> Option<Retained<NSXMLDTDNode>>;
140
141 #[cfg(all(feature = "NSString", feature = "NSXMLDTDNode"))]
142 #[unsafe(method(elementDeclarationForName:))]
144 #[unsafe(method_family = none)]
145 pub fn elementDeclarationForName(&self, name: &NSString) -> Option<Retained<NSXMLDTDNode>>;
146
147 #[cfg(all(feature = "NSString", feature = "NSXMLDTDNode"))]
148 #[unsafe(method(attributeDeclarationForName:elementName:))]
150 #[unsafe(method_family = none)]
151 pub fn attributeDeclarationForName_elementName(
152 &self,
153 name: &NSString,
154 element_name: &NSString,
155 ) -> Option<Retained<NSXMLDTDNode>>;
156
157 #[cfg(all(feature = "NSString", feature = "NSXMLDTDNode"))]
158 #[unsafe(method(predefinedEntityDeclarationForName:))]
189 #[unsafe(method_family = none)]
190 pub fn predefinedEntityDeclarationForName(
191 name: &NSString,
192 ) -> Option<Retained<NSXMLDTDNode>>;
193 );
194}
195
196#[cfg(feature = "NSXMLNode")]
198impl NSXMLDTD {
199 extern_methods!(
200 #[unsafe(method(initWithKind:))]
208 #[unsafe(method_family = init)]
209 pub fn initWithKind(this: Allocated<Self>, kind: NSXMLNodeKind) -> Retained<Self>;
210 );
211}
212
213#[cfg(feature = "NSXMLNode")]
215impl NSXMLDTD {
216 extern_methods!(
217 #[unsafe(method(new))]
218 #[unsafe(method_family = new)]
219 pub fn new() -> Retained<Self>;
220 );
221}
222
223#[cfg(feature = "NSXMLNode")]
224impl DefaultRetained for NSXMLDTD {
225 #[inline]
226 fn default_retained() -> Retained<Self> {
227 Self::new()
228 }
229}