objc2_core_wlan/generated/
CWNetworkProfile.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 pub struct CWNetworkProfile;
17);
18
19extern_conformance!(
20 unsafe impl NSCoding for CWNetworkProfile {}
21);
22
23extern_conformance!(
24 unsafe impl NSCopying for CWNetworkProfile {}
25);
26
27unsafe impl CopyingHelper for CWNetworkProfile {
28 type Result = Self;
29}
30
31extern_conformance!(
32 unsafe impl NSMutableCopying for CWNetworkProfile {}
33);
34
35unsafe impl MutableCopyingHelper for CWNetworkProfile {
36 type Result = CWMutableNetworkProfile;
37}
38
39extern_conformance!(
40 unsafe impl NSObjectProtocol for CWNetworkProfile {}
41);
42
43extern_conformance!(
44 unsafe impl NSSecureCoding for CWNetworkProfile {}
45);
46
47impl CWNetworkProfile {
48 extern_methods!(
49 #[unsafe(method(ssid))]
54 #[unsafe(method_family = none)]
55 pub unsafe fn ssid(&self) -> Option<Retained<NSString>>;
56
57 #[unsafe(method(ssidData))]
62 #[unsafe(method_family = none)]
63 pub unsafe fn ssidData(&self) -> Option<Retained<NSData>>;
64
65 #[cfg(feature = "CoreWLANTypes")]
66 #[unsafe(method(security))]
68 #[unsafe(method_family = none)]
69 pub unsafe fn security(&self) -> CWSecurity;
70
71 #[unsafe(method(networkProfile))]
73 #[unsafe(method_family = none)]
74 pub unsafe fn networkProfile() -> Retained<Self>;
75
76 #[unsafe(method(init))]
78 #[unsafe(method_family = init)]
79 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
80
81 #[unsafe(method(initWithNetworkProfile:))]
89 #[unsafe(method_family = init)]
90 pub unsafe fn initWithNetworkProfile(
91 this: Allocated<Self>,
92 network_profile: &CWNetworkProfile,
93 ) -> Retained<Self>;
94
95 #[unsafe(method(networkProfileWithNetworkProfile:))]
103 #[unsafe(method_family = none)]
104 pub unsafe fn networkProfileWithNetworkProfile(
105 network_profile: &CWNetworkProfile,
106 ) -> Retained<Self>;
107
108 #[unsafe(method(isEqualToNetworkProfile:))]
127 #[unsafe(method_family = none)]
128 pub unsafe fn isEqualToNetworkProfile(&self, network_profile: &CWNetworkProfile) -> bool;
129 );
130}
131
132impl CWNetworkProfile {
134 extern_methods!(
135 #[unsafe(method(new))]
136 #[unsafe(method_family = new)]
137 pub unsafe fn new() -> Retained<Self>;
138 );
139}
140
141extern_class!(
142 #[unsafe(super(CWNetworkProfile, NSObject))]
150 #[derive(Debug, PartialEq, Eq, Hash)]
151 pub struct CWMutableNetworkProfile;
152);
153
154extern_conformance!(
155 unsafe impl NSCoding for CWMutableNetworkProfile {}
156);
157
158extern_conformance!(
159 unsafe impl NSCopying for CWMutableNetworkProfile {}
160);
161
162unsafe impl CopyingHelper for CWMutableNetworkProfile {
163 type Result = CWNetworkProfile;
164}
165
166extern_conformance!(
167 unsafe impl NSMutableCopying for CWMutableNetworkProfile {}
168);
169
170unsafe impl MutableCopyingHelper for CWMutableNetworkProfile {
171 type Result = Self;
172}
173
174extern_conformance!(
175 unsafe impl NSObjectProtocol for CWMutableNetworkProfile {}
176);
177
178extern_conformance!(
179 unsafe impl NSSecureCoding for CWMutableNetworkProfile {}
180);
181
182impl CWMutableNetworkProfile {
183 extern_methods!(
184 #[unsafe(method(ssidData))]
186 #[unsafe(method_family = none)]
187 pub unsafe fn ssidData(&self) -> Option<Retained<NSData>>;
188
189 #[unsafe(method(setSsidData:))]
193 #[unsafe(method_family = none)]
194 pub unsafe fn setSsidData(&self, ssid_data: Option<&NSData>);
195
196 #[cfg(feature = "CoreWLANTypes")]
197 #[unsafe(method(security))]
199 #[unsafe(method_family = none)]
200 pub unsafe fn security(&self) -> CWSecurity;
201
202 #[cfg(feature = "CoreWLANTypes")]
203 #[unsafe(method(setSecurity:))]
205 #[unsafe(method_family = none)]
206 pub unsafe fn setSecurity(&self, security: CWSecurity);
207 );
208}
209
210impl CWMutableNetworkProfile {
212 extern_methods!(
213 #[unsafe(method(networkProfile))]
215 #[unsafe(method_family = none)]
216 pub unsafe fn networkProfile() -> Retained<Self>;
217
218 #[unsafe(method(init))]
220 #[unsafe(method_family = init)]
221 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
222
223 #[unsafe(method(initWithNetworkProfile:))]
231 #[unsafe(method_family = init)]
232 pub unsafe fn initWithNetworkProfile(
233 this: Allocated<Self>,
234 network_profile: &CWNetworkProfile,
235 ) -> Retained<Self>;
236
237 #[unsafe(method(networkProfileWithNetworkProfile:))]
245 #[unsafe(method_family = none)]
246 pub unsafe fn networkProfileWithNetworkProfile(
247 network_profile: &CWNetworkProfile,
248 ) -> Retained<Self>;
249 );
250}
251
252impl CWMutableNetworkProfile {
254 extern_methods!(
255 #[unsafe(method(new))]
256 #[unsafe(method_family = new)]
257 pub unsafe fn new() -> Retained<Self>;
258 );
259}