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:))]
191 #[unsafe(method_family = none)]
192 pub unsafe fn setSsidData(&self, ssid_data: Option<&NSData>);
193
194 #[cfg(feature = "CoreWLANTypes")]
195 #[unsafe(method(security))]
197 #[unsafe(method_family = none)]
198 pub unsafe fn security(&self) -> CWSecurity;
199
200 #[cfg(feature = "CoreWLANTypes")]
201 #[unsafe(method(setSecurity:))]
203 #[unsafe(method_family = none)]
204 pub unsafe fn setSecurity(&self, security: CWSecurity);
205 );
206}
207
208impl CWMutableNetworkProfile {
210 extern_methods!(
211 #[unsafe(method(networkProfile))]
213 #[unsafe(method_family = none)]
214 pub unsafe fn networkProfile() -> Retained<Self>;
215
216 #[unsafe(method(init))]
218 #[unsafe(method_family = init)]
219 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
220
221 #[unsafe(method(initWithNetworkProfile:))]
229 #[unsafe(method_family = init)]
230 pub unsafe fn initWithNetworkProfile(
231 this: Allocated<Self>,
232 network_profile: &CWNetworkProfile,
233 ) -> Retained<Self>;
234
235 #[unsafe(method(networkProfileWithNetworkProfile:))]
243 #[unsafe(method_family = none)]
244 pub unsafe fn networkProfileWithNetworkProfile(
245 network_profile: &CWNetworkProfile,
246 ) -> Retained<Self>;
247 );
248}
249
250impl CWMutableNetworkProfile {
252 extern_methods!(
253 #[unsafe(method(new))]
254 #[unsafe(method_family = new)]
255 pub unsafe fn new() -> Retained<Self>;
256 );
257}