objc2_foundation/generated/
NSPortNameServer.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(NSObject))]
12 #[derive(Debug, PartialEq, Eq, Hash)]
13 #[deprecated = "Use NSXPCConnection instead"]
14 pub struct NSPortNameServer;
15);
16
17unsafe impl NSObjectProtocol for NSPortNameServer {}
18
19impl NSPortNameServer {
20 extern_methods!(
21 #[deprecated = "Use NSXPCConnection instead"]
22 #[unsafe(method(systemDefaultPortNameServer))]
23 #[unsafe(method_family = none)]
24 pub unsafe fn systemDefaultPortNameServer() -> Retained<NSPortNameServer>;
25
26 #[cfg(all(feature = "NSPort", feature = "NSString"))]
27 #[deprecated = "Use NSXPCConnection instead"]
28 #[unsafe(method(portForName:))]
29 #[unsafe(method_family = none)]
30 pub unsafe fn portForName(&self, name: &NSString) -> Option<Retained<NSPort>>;
31
32 #[cfg(all(feature = "NSPort", feature = "NSString"))]
33 #[deprecated = "Use NSXPCConnection instead"]
34 #[unsafe(method(portForName:host:))]
35 #[unsafe(method_family = none)]
36 pub unsafe fn portForName_host(
37 &self,
38 name: &NSString,
39 host: Option<&NSString>,
40 ) -> Option<Retained<NSPort>>;
41
42 #[cfg(all(feature = "NSPort", feature = "NSString"))]
43 #[deprecated = "Use NSXPCConnection instead"]
44 #[unsafe(method(registerPort:name:))]
45 #[unsafe(method_family = none)]
46 pub unsafe fn registerPort_name(&self, port: &NSPort, name: &NSString) -> bool;
47
48 #[cfg(feature = "NSString")]
49 #[deprecated = "Use NSXPCConnection instead"]
50 #[unsafe(method(removePortForName:))]
51 #[unsafe(method_family = none)]
52 pub unsafe fn removePortForName(&self, name: &NSString) -> bool;
53 );
54}
55
56impl NSPortNameServer {
58 extern_methods!(
59 #[unsafe(method(init))]
60 #[unsafe(method_family = init)]
61 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
62
63 #[unsafe(method(new))]
64 #[unsafe(method_family = new)]
65 pub unsafe fn new() -> Retained<Self>;
66 );
67}
68
69extern_class!(
70 #[unsafe(super(NSPortNameServer, NSObject))]
72 #[derive(Debug, PartialEq, Eq, Hash)]
73 #[deprecated = "Use NSXPCConnection instead"]
74 pub struct NSMachBootstrapServer;
75);
76
77unsafe impl NSObjectProtocol for NSMachBootstrapServer {}
78
79impl NSMachBootstrapServer {
80 extern_methods!(
81 #[deprecated = "Use NSXPCConnection instead"]
82 #[unsafe(method(sharedInstance))]
83 #[unsafe(method_family = none)]
84 pub unsafe fn sharedInstance() -> Retained<AnyObject>;
85
86 #[cfg(all(feature = "NSPort", feature = "NSString"))]
87 #[deprecated = "Use NSXPCConnection instead"]
88 #[unsafe(method(portForName:))]
89 #[unsafe(method_family = none)]
90 pub unsafe fn portForName(&self, name: &NSString) -> Option<Retained<NSPort>>;
91
92 #[cfg(all(feature = "NSPort", feature = "NSString"))]
93 #[deprecated = "Use NSXPCConnection instead"]
94 #[unsafe(method(portForName:host:))]
95 #[unsafe(method_family = none)]
96 pub unsafe fn portForName_host(
97 &self,
98 name: &NSString,
99 host: Option<&NSString>,
100 ) -> Option<Retained<NSPort>>;
101
102 #[cfg(all(feature = "NSPort", feature = "NSString"))]
103 #[deprecated = "Use NSXPCConnection instead"]
104 #[unsafe(method(registerPort:name:))]
105 #[unsafe(method_family = none)]
106 pub unsafe fn registerPort_name(&self, port: &NSPort, name: &NSString) -> bool;
107
108 #[cfg(all(feature = "NSPort", feature = "NSString"))]
109 #[unsafe(method(servicePortWithName:))]
110 #[unsafe(method_family = none)]
111 pub unsafe fn servicePortWithName(&self, name: &NSString) -> Option<Retained<NSPort>>;
112 );
113}
114
115impl NSMachBootstrapServer {
117 extern_methods!(
118 #[unsafe(method(init))]
119 #[unsafe(method_family = init)]
120 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
121
122 #[unsafe(method(new))]
123 #[unsafe(method_family = new)]
124 pub unsafe fn new() -> Retained<Self>;
125 );
126}
127
128extern_class!(
129 #[unsafe(super(NSPortNameServer, NSObject))]
131 #[derive(Debug, PartialEq, Eq, Hash)]
132 #[deprecated = "Use NSXPCConnection instead"]
133 pub struct NSMessagePortNameServer;
134);
135
136unsafe impl NSObjectProtocol for NSMessagePortNameServer {}
137
138impl NSMessagePortNameServer {
139 extern_methods!(
140 #[deprecated = "Use NSXPCConnection instead"]
141 #[unsafe(method(sharedInstance))]
142 #[unsafe(method_family = none)]
143 pub unsafe fn sharedInstance() -> Retained<AnyObject>;
144
145 #[cfg(all(feature = "NSPort", feature = "NSString"))]
146 #[deprecated = "Use NSXPCConnection instead"]
147 #[unsafe(method(portForName:))]
148 #[unsafe(method_family = none)]
149 pub unsafe fn portForName(&self, name: &NSString) -> Option<Retained<NSPort>>;
150
151 #[cfg(all(feature = "NSPort", feature = "NSString"))]
152 #[deprecated = "Use NSXPCConnection instead"]
153 #[unsafe(method(portForName:host:))]
154 #[unsafe(method_family = none)]
155 pub unsafe fn portForName_host(
156 &self,
157 name: &NSString,
158 host: Option<&NSString>,
159 ) -> Option<Retained<NSPort>>;
160 );
161}
162
163impl NSMessagePortNameServer {
165 extern_methods!(
166 #[unsafe(method(init))]
167 #[unsafe(method_family = init)]
168 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
169
170 #[unsafe(method(new))]
171 #[unsafe(method_family = new)]
172 pub unsafe fn new() -> Retained<Self>;
173 );
174}
175
176extern_class!(
177 #[unsafe(super(NSPortNameServer, NSObject))]
179 #[derive(Debug, PartialEq, Eq, Hash)]
180 #[deprecated = "Use NSXPCConnection instead"]
181 pub struct NSSocketPortNameServer;
182);
183
184unsafe impl NSObjectProtocol for NSSocketPortNameServer {}
185
186impl NSSocketPortNameServer {
187 extern_methods!(
188 #[deprecated = "Use NSXPCConnection instead"]
189 #[unsafe(method(sharedInstance))]
190 #[unsafe(method_family = none)]
191 pub unsafe fn sharedInstance() -> Retained<AnyObject>;
192
193 #[cfg(all(feature = "NSPort", feature = "NSString"))]
194 #[deprecated = "Use NSXPCConnection instead"]
195 #[unsafe(method(portForName:))]
196 #[unsafe(method_family = none)]
197 pub unsafe fn portForName(&self, name: &NSString) -> Option<Retained<NSPort>>;
198
199 #[cfg(all(feature = "NSPort", feature = "NSString"))]
200 #[deprecated = "Use NSXPCConnection instead"]
201 #[unsafe(method(portForName:host:))]
202 #[unsafe(method_family = none)]
203 pub unsafe fn portForName_host(
204 &self,
205 name: &NSString,
206 host: Option<&NSString>,
207 ) -> Option<Retained<NSPort>>;
208
209 #[cfg(all(feature = "NSPort", feature = "NSString"))]
210 #[deprecated = "Use NSXPCConnection instead"]
211 #[unsafe(method(registerPort:name:))]
212 #[unsafe(method_family = none)]
213 pub unsafe fn registerPort_name(&self, port: &NSPort, name: &NSString) -> bool;
214
215 #[cfg(feature = "NSString")]
216 #[deprecated = "Use NSXPCConnection instead"]
217 #[unsafe(method(removePortForName:))]
218 #[unsafe(method_family = none)]
219 pub unsafe fn removePortForName(&self, name: &NSString) -> bool;
220
221 #[cfg(all(feature = "NSPort", feature = "NSString"))]
222 #[deprecated = "Use NSXPCConnection instead"]
223 #[unsafe(method(portForName:host:nameServerPortNumber:))]
224 #[unsafe(method_family = none)]
225 pub unsafe fn portForName_host_nameServerPortNumber(
226 &self,
227 name: &NSString,
228 host: Option<&NSString>,
229 port_number: u16,
230 ) -> Option<Retained<NSPort>>;
231
232 #[cfg(all(feature = "NSPort", feature = "NSString"))]
233 #[deprecated = "Use NSXPCConnection instead"]
234 #[unsafe(method(registerPort:name:nameServerPortNumber:))]
235 #[unsafe(method_family = none)]
236 pub unsafe fn registerPort_name_nameServerPortNumber(
237 &self,
238 port: &NSPort,
239 name: &NSString,
240 port_number: u16,
241 ) -> bool;
242
243 #[deprecated = "Use NSXPCConnection instead"]
244 #[unsafe(method(defaultNameServerPortNumber))]
245 #[unsafe(method_family = none)]
246 pub unsafe fn defaultNameServerPortNumber(&self) -> u16;
247
248 #[deprecated = "Use NSXPCConnection instead"]
250 #[unsafe(method(setDefaultNameServerPortNumber:))]
251 #[unsafe(method_family = none)]
252 pub unsafe fn setDefaultNameServerPortNumber(&self, default_name_server_port_number: u16);
253 );
254}
255
256impl NSSocketPortNameServer {
258 extern_methods!(
259 #[unsafe(method(init))]
260 #[unsafe(method_family = init)]
261 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
262
263 #[unsafe(method(new))]
264 #[unsafe(method_family = new)]
265 pub unsafe fn new() -> Retained<Self>;
266 );
267}