objc2_automatic_assessment_configuration/generated/
mod.rs1#![allow(unused_imports)]
5#![allow(deprecated)]
6#![allow(non_snake_case)]
7#![allow(non_camel_case_types)]
8#![allow(non_upper_case_globals)]
9#![allow(missing_docs)]
10#![allow(clippy::too_many_arguments)]
11#![allow(clippy::type_complexity)]
12#![allow(clippy::upper_case_acronyms)]
13#![allow(clippy::identity_op)]
14#![allow(clippy::missing_safety_doc)]
15#![allow(clippy::doc_lazy_continuation)]
16#![allow(rustdoc::broken_intra_doc_links)]
17#![allow(rustdoc::bare_urls)]
18#![allow(rustdoc::invalid_html_tags)]
19
20#[link(name = "AutomaticAssessmentConfiguration", kind = "framework")]
21extern "C" {}
22
23use core::ffi::*;
24use core::ptr::NonNull;
25use objc2::__framework_prelude::*;
26use objc2_foundation::*;
27
28use crate::*;
29
30extern_class!(
31 #[unsafe(super(NSObject))]
33 #[derive(Debug, PartialEq, Eq, Hash)]
34 pub struct AEAssessmentApplication;
35);
36
37extern_conformance!(
38 unsafe impl NSCopying for AEAssessmentApplication {}
39);
40
41unsafe impl CopyingHelper for AEAssessmentApplication {
42 type Result = Self;
43}
44
45extern_conformance!(
46 unsafe impl NSObjectProtocol for AEAssessmentApplication {}
47);
48
49impl AEAssessmentApplication {
50 extern_methods!(
51 #[unsafe(method(bundleIdentifier))]
52 #[unsafe(method_family = none)]
53 pub unsafe fn bundleIdentifier(&self) -> Retained<NSString>;
54
55 #[unsafe(method(teamIdentifier))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn teamIdentifier(&self) -> Option<Retained<NSString>>;
58
59 #[unsafe(method(requiresSignatureValidation))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn requiresSignatureValidation(&self) -> bool;
62
63 #[unsafe(method(setRequiresSignatureValidation:))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn setRequiresSignatureValidation(&self, requires_signature_validation: bool);
67
68 #[unsafe(method(initWithBundleIdentifier:))]
69 #[unsafe(method_family = init)]
70 pub unsafe fn initWithBundleIdentifier(
71 this: Allocated<Self>,
72 bundle_identifier: &NSString,
73 ) -> Retained<Self>;
74
75 #[unsafe(method(initWithBundleIdentifier:teamIdentifier:))]
76 #[unsafe(method_family = init)]
77 pub unsafe fn initWithBundleIdentifier_teamIdentifier(
78 this: Allocated<Self>,
79 bundle_identifier: &NSString,
80 team_identifier: Option<&NSString>,
81 ) -> Retained<Self>;
82
83 #[unsafe(method(init))]
84 #[unsafe(method_family = init)]
85 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
86
87 #[unsafe(method(new))]
88 #[unsafe(method_family = new)]
89 pub unsafe fn new() -> Retained<Self>;
90 );
91}
92
93#[repr(transparent)]
96#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
97pub struct AEAutocorrectMode(pub NSUInteger);
98bitflags::bitflags! {
99 impl AEAutocorrectMode: NSUInteger {
100 #[doc(alias = "AEAutocorrectModeNone")]
101 const None = 0;
102 #[doc(alias = "AEAutocorrectModeSpelling")]
103 const Spelling = 1<<0;
104 #[doc(alias = "AEAutocorrectModePunctuation")]
105 const Punctuation = 1<<1;
106 }
107}
108
109unsafe impl Encode for AEAutocorrectMode {
110 const ENCODING: Encoding = NSUInteger::ENCODING;
111}
112
113unsafe impl RefEncode for AEAutocorrectMode {
114 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
115}
116
117extern_class!(
118 #[unsafe(super(NSObject))]
120 #[derive(Debug, PartialEq, Eq, Hash)]
121 pub struct AEAssessmentConfiguration;
122);
123
124extern_conformance!(
125 unsafe impl NSCopying for AEAssessmentConfiguration {}
126);
127
128unsafe impl CopyingHelper for AEAssessmentConfiguration {
129 type Result = Self;
130}
131
132extern_conformance!(
133 unsafe impl NSObjectProtocol for AEAssessmentConfiguration {}
134);
135
136impl AEAssessmentConfiguration {
137 extern_methods!(
138 #[unsafe(method(autocorrectMode))]
139 #[unsafe(method_family = none)]
140 pub unsafe fn autocorrectMode(&self) -> AEAutocorrectMode;
141
142 #[unsafe(method(setAutocorrectMode:))]
144 #[unsafe(method_family = none)]
145 pub unsafe fn setAutocorrectMode(&self, autocorrect_mode: AEAutocorrectMode);
146
147 #[unsafe(method(allowsSpellCheck))]
148 #[unsafe(method_family = none)]
149 pub unsafe fn allowsSpellCheck(&self) -> bool;
150
151 #[unsafe(method(setAllowsSpellCheck:))]
153 #[unsafe(method_family = none)]
154 pub unsafe fn setAllowsSpellCheck(&self, allows_spell_check: bool);
155
156 #[unsafe(method(allowsPredictiveKeyboard))]
157 #[unsafe(method_family = none)]
158 pub unsafe fn allowsPredictiveKeyboard(&self) -> bool;
159
160 #[unsafe(method(setAllowsPredictiveKeyboard:))]
162 #[unsafe(method_family = none)]
163 pub unsafe fn setAllowsPredictiveKeyboard(&self, allows_predictive_keyboard: bool);
164
165 #[unsafe(method(allowsKeyboardShortcuts))]
166 #[unsafe(method_family = none)]
167 pub unsafe fn allowsKeyboardShortcuts(&self) -> bool;
168
169 #[unsafe(method(setAllowsKeyboardShortcuts:))]
171 #[unsafe(method_family = none)]
172 pub unsafe fn setAllowsKeyboardShortcuts(&self, allows_keyboard_shortcuts: bool);
173
174 #[unsafe(method(allowsActivityContinuation))]
175 #[unsafe(method_family = none)]
176 pub unsafe fn allowsActivityContinuation(&self) -> bool;
177
178 #[unsafe(method(setAllowsActivityContinuation:))]
180 #[unsafe(method_family = none)]
181 pub unsafe fn setAllowsActivityContinuation(&self, allows_activity_continuation: bool);
182
183 #[unsafe(method(allowsDictation))]
184 #[unsafe(method_family = none)]
185 pub unsafe fn allowsDictation(&self) -> bool;
186
187 #[unsafe(method(setAllowsDictation:))]
189 #[unsafe(method_family = none)]
190 pub unsafe fn setAllowsDictation(&self, allows_dictation: bool);
191
192 #[unsafe(method(allowsAccessibilitySpeech))]
193 #[unsafe(method_family = none)]
194 pub unsafe fn allowsAccessibilitySpeech(&self) -> bool;
195
196 #[unsafe(method(setAllowsAccessibilitySpeech:))]
198 #[unsafe(method_family = none)]
199 pub unsafe fn setAllowsAccessibilitySpeech(&self, allows_accessibility_speech: bool);
200
201 #[unsafe(method(allowsAccessibilityTypingFeedback))]
202 #[unsafe(method_family = none)]
203 pub unsafe fn allowsAccessibilityTypingFeedback(&self) -> bool;
204
205 #[unsafe(method(setAllowsAccessibilityTypingFeedback:))]
207 #[unsafe(method_family = none)]
208 pub unsafe fn setAllowsAccessibilityTypingFeedback(
209 &self,
210 allows_accessibility_typing_feedback: bool,
211 );
212
213 #[unsafe(method(allowsPasswordAutoFill))]
214 #[unsafe(method_family = none)]
215 pub unsafe fn allowsPasswordAutoFill(&self) -> bool;
216
217 #[unsafe(method(setAllowsPasswordAutoFill:))]
219 #[unsafe(method_family = none)]
220 pub unsafe fn setAllowsPasswordAutoFill(&self, allows_password_auto_fill: bool);
221
222 #[unsafe(method(allowsContinuousPathKeyboard))]
223 #[unsafe(method_family = none)]
224 pub unsafe fn allowsContinuousPathKeyboard(&self) -> bool;
225
226 #[unsafe(method(setAllowsContinuousPathKeyboard:))]
228 #[unsafe(method_family = none)]
229 pub unsafe fn setAllowsContinuousPathKeyboard(&self, allows_continuous_path_keyboard: bool);
230
231 #[unsafe(method(mainParticipantConfiguration))]
232 #[unsafe(method_family = none)]
233 pub unsafe fn mainParticipantConfiguration(
234 &self,
235 ) -> Retained<AEAssessmentParticipantConfiguration>;
236
237 #[unsafe(method(configurationsByApplication))]
238 #[unsafe(method_family = none)]
239 pub unsafe fn configurationsByApplication(
240 &self,
241 ) -> Retained<NSDictionary<AEAssessmentApplication, AEAssessmentParticipantConfiguration>>;
242
243 #[unsafe(method(setConfiguration:forApplication:))]
244 #[unsafe(method_family = none)]
245 pub unsafe fn setConfiguration_forApplication(
246 &self,
247 configuration: &AEAssessmentParticipantConfiguration,
248 application: &AEAssessmentApplication,
249 );
250
251 #[unsafe(method(removeApplication:))]
252 #[unsafe(method_family = none)]
253 pub unsafe fn removeApplication(&self, application: &AEAssessmentApplication);
254 );
255}
256
257impl AEAssessmentConfiguration {
259 extern_methods!(
260 #[unsafe(method(init))]
261 #[unsafe(method_family = init)]
262 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
263
264 #[unsafe(method(new))]
265 #[unsafe(method_family = new)]
266 pub unsafe fn new() -> Retained<Self>;
267 );
268}
269
270extern_class!(
271 #[unsafe(super(NSObject))]
273 #[derive(Debug, PartialEq, Eq, Hash)]
274 pub struct AEAssessmentParticipantConfiguration;
275);
276
277extern_conformance!(
278 unsafe impl NSCopying for AEAssessmentParticipantConfiguration {}
279);
280
281unsafe impl CopyingHelper for AEAssessmentParticipantConfiguration {
282 type Result = Self;
283}
284
285extern_conformance!(
286 unsafe impl NSObjectProtocol for AEAssessmentParticipantConfiguration {}
287);
288
289impl AEAssessmentParticipantConfiguration {
290 extern_methods!(
291 #[unsafe(method(allowsNetworkAccess))]
292 #[unsafe(method_family = none)]
293 pub unsafe fn allowsNetworkAccess(&self) -> bool;
294
295 #[unsafe(method(setAllowsNetworkAccess:))]
297 #[unsafe(method_family = none)]
298 pub unsafe fn setAllowsNetworkAccess(&self, allows_network_access: bool);
299
300 #[unsafe(method(isRequired))]
301 #[unsafe(method_family = none)]
302 pub unsafe fn isRequired(&self) -> bool;
303
304 #[unsafe(method(setRequired:))]
306 #[unsafe(method_family = none)]
307 pub unsafe fn setRequired(&self, required: bool);
308
309 #[unsafe(method(configurationInfo))]
310 #[unsafe(method_family = none)]
311 pub unsafe fn configurationInfo(&self) -> Retained<NSDictionary<NSString, AnyObject>>;
312
313 #[unsafe(method(setConfigurationInfo:))]
321 #[unsafe(method_family = none)]
322 pub unsafe fn setConfigurationInfo(
323 &self,
324 configuration_info: &NSDictionary<NSString, AnyObject>,
325 );
326
327 #[unsafe(method(init))]
328 #[unsafe(method_family = init)]
329 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
330
331 #[unsafe(method(new))]
332 #[unsafe(method_family = new)]
333 pub unsafe fn new() -> Retained<Self>;
334 );
335}
336
337extern_class!(
338 #[unsafe(super(NSObject))]
340 #[derive(Debug, PartialEq, Eq, Hash)]
341 pub struct AEAssessmentSession;
342);
343
344extern_conformance!(
345 unsafe impl NSObjectProtocol for AEAssessmentSession {}
346);
347
348impl AEAssessmentSession {
349 extern_methods!(
350 #[unsafe(method(supportsMultipleParticipants))]
351 #[unsafe(method_family = none)]
352 pub unsafe fn supportsMultipleParticipants() -> bool;
353
354 #[unsafe(method(supportsConfigurationUpdates))]
355 #[unsafe(method_family = none)]
356 pub unsafe fn supportsConfigurationUpdates() -> bool;
357
358 #[unsafe(method(delegate))]
359 #[unsafe(method_family = none)]
360 pub unsafe fn delegate(
361 &self,
362 ) -> Option<Retained<ProtocolObject<dyn AEAssessmentSessionDelegate>>>;
363
364 #[unsafe(method(setDelegate:))]
368 #[unsafe(method_family = none)]
369 pub unsafe fn setDelegate(
370 &self,
371 delegate: Option<&ProtocolObject<dyn AEAssessmentSessionDelegate>>,
372 );
373
374 #[unsafe(method(configuration))]
375 #[unsafe(method_family = none)]
376 pub unsafe fn configuration(&self) -> Retained<AEAssessmentConfiguration>;
377
378 #[unsafe(method(isActive))]
379 #[unsafe(method_family = none)]
380 pub unsafe fn isActive(&self) -> bool;
381
382 #[unsafe(method(initWithConfiguration:))]
383 #[unsafe(method_family = init)]
384 pub unsafe fn initWithConfiguration(
385 this: Allocated<Self>,
386 configuration: &AEAssessmentConfiguration,
387 ) -> Retained<Self>;
388
389 #[unsafe(method(init))]
390 #[unsafe(method_family = init)]
391 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
392
393 #[unsafe(method(new))]
394 #[unsafe(method_family = new)]
395 pub unsafe fn new() -> Retained<Self>;
396
397 #[unsafe(method(begin))]
398 #[unsafe(method_family = none)]
399 pub unsafe fn begin(&self);
400
401 #[unsafe(method(end))]
402 #[unsafe(method_family = none)]
403 pub unsafe fn end(&self);
404
405 #[unsafe(method(updateToConfiguration:))]
406 #[unsafe(method_family = none)]
407 pub unsafe fn updateToConfiguration(&self, configuration: &AEAssessmentConfiguration);
408 );
409}
410
411extern_protocol!(
412 pub unsafe trait AEAssessmentSessionDelegate: NSObjectProtocol {
414 #[optional]
415 #[unsafe(method(assessmentSessionDidBegin:))]
416 #[unsafe(method_family = none)]
417 unsafe fn assessmentSessionDidBegin(&self, session: &AEAssessmentSession);
418
419 #[optional]
420 #[unsafe(method(assessmentSession:failedToBeginWithError:))]
421 #[unsafe(method_family = none)]
422 unsafe fn assessmentSession_failedToBeginWithError(
423 &self,
424 session: &AEAssessmentSession,
425 error: &NSError,
426 );
427
428 #[optional]
429 #[unsafe(method(assessmentSession:wasInterruptedWithError:))]
430 #[unsafe(method_family = none)]
431 unsafe fn assessmentSession_wasInterruptedWithError(
432 &self,
433 session: &AEAssessmentSession,
434 error: &NSError,
435 );
436
437 #[optional]
438 #[unsafe(method(assessmentSessionDidEnd:))]
439 #[unsafe(method_family = none)]
440 unsafe fn assessmentSessionDidEnd(&self, session: &AEAssessmentSession);
441
442 #[optional]
443 #[unsafe(method(assessmentSessionDidUpdate:))]
444 #[unsafe(method_family = none)]
445 unsafe fn assessmentSessionDidUpdate(&self, session: &AEAssessmentSession);
446
447 #[optional]
448 #[unsafe(method(assessmentSession:failedToUpdateToConfiguration:error:))]
449 #[unsafe(method_family = none)]
450 unsafe fn assessmentSession_failedToUpdateToConfiguration_error(
451 &self,
452 session: &AEAssessmentSession,
453 configuration: &AEAssessmentConfiguration,
454 error: &NSError,
455 );
456 }
457);
458
459extern "C" {
460 pub static AEAssessmentErrorDomain: &'static NSErrorDomain;
462}
463
464#[repr(transparent)]
467#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
468pub struct AEAssessmentErrorCode(pub NSInteger);
469impl AEAssessmentErrorCode {
470 #[doc(alias = "AEAssessmentErrorUnknown")]
471 pub const Unknown: Self = Self(1);
472 #[doc(alias = "AEAssessmentErrorUnsupportedPlatform")]
473 pub const UnsupportedPlatform: Self = Self(2);
474 #[doc(alias = "AEAssessmentErrorMultipleParticipantsNotSupported")]
475 pub const MultipleParticipantsNotSupported: Self = Self(3);
476 #[doc(alias = "AEAssessmentErrorConfigurationUpdatesNotSupported")]
477 pub const ConfigurationUpdatesNotSupported: Self = Self(4);
478 #[doc(alias = "AEAssessmentErrorRequiredParticipantsNotAvailable")]
479 pub const RequiredParticipantsNotAvailable: Self = Self(5);
480}
481
482unsafe impl Encode for AEAssessmentErrorCode {
483 const ENCODING: Encoding = NSInteger::ENCODING;
484}
485
486unsafe impl RefEncode for AEAssessmentErrorCode {
487 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
488}
489
490extern "C" {
491 pub static AENotInstalledParticipantsKey: &'static NSString;
493}
494
495extern "C" {
496 pub static AERestrictedSystemParticipantsKey: &'static NSString;
498}