objc2_local_authentication/generated/
LAEnvironment.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 pub struct LAEnvironment;
14);
15
16extern_conformance!(
17 unsafe impl NSObjectProtocol for LAEnvironment {}
18);
19
20impl LAEnvironment {
21 extern_methods!(
22 #[unsafe(method(new))]
25 #[unsafe(method_family = new)]
26 pub unsafe fn new() -> Retained<Self>;
27
28 #[unsafe(method(init))]
31 #[unsafe(method_family = init)]
32 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
33
34 #[unsafe(method(addObserver:))]
38 #[unsafe(method_family = none)]
39 pub unsafe fn addObserver(&self, observer: &ProtocolObject<dyn LAEnvironmentObserver>);
40
41 #[unsafe(method(removeObserver:))]
45 #[unsafe(method_family = none)]
46 pub unsafe fn removeObserver(&self, observer: &ProtocolObject<dyn LAEnvironmentObserver>);
47
48 #[unsafe(method(currentUser))]
50 #[unsafe(method_family = none)]
51 pub unsafe fn currentUser() -> Retained<LAEnvironment>;
52
53 #[cfg(feature = "LAEnvironmentState")]
54 #[unsafe(method(state))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn state(&self) -> Retained<LAEnvironmentState>;
58 );
59}
60
61extern_protocol!(
62 pub unsafe trait LAEnvironmentObserver: NSObjectProtocol {
64 #[cfg(feature = "LAEnvironmentState")]
65 #[optional]
72 #[unsafe(method(environment:stateDidChangeFromOldState:))]
73 #[unsafe(method_family = none)]
74 unsafe fn environment_stateDidChangeFromOldState(
75 &self,
76 environment: &LAEnvironment,
77 old_state: &LAEnvironmentState,
78 );
79 }
80);