1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
/// [Apple's documentation](https://developer.apple.com/documentation/localauthentication/ladomainstatebiometry?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct LADomainStateBiometry;
);
extern_conformance!(
unsafe impl NSObjectProtocol for LADomainStateBiometry {}
);
impl LADomainStateBiometry {
extern_methods!(
#[cfg(feature = "LABiometryType")]
/// Indicates biometry type available on the device.
#[unsafe(method(biometryType))]
#[unsafe(method_family = none)]
pub unsafe fn biometryType(&self) -> LABiometryType;
/// Contains state hash data for the available biometry type. Returns `nil` if no biometry entities are enrolled.
///
///
/// If biometric database was modified (fingers, faces were removed or added), `stateHash`
/// data will change. Nature of such database changes cannot be determined
/// but comparing data of `stateHash` after different evaluatePolicy calls
/// will reveal the fact database was changed between the calls.
///
///
/// Warning: Please note that the value returned by this property can change exceptionally between major OS versions even if
/// the state of biometry has not changed.
#[unsafe(method(stateHash))]
#[unsafe(method_family = none)]
pub unsafe fn stateHash(&self) -> Option<Retained<NSData>>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
extern_class!(
/// [Apple's documentation](https://developer.apple.com/documentation/localauthentication/ladomainstatecompanion?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct LADomainStateCompanion;
);
extern_conformance!(
unsafe impl NSObjectProtocol for LADomainStateCompanion {}
);
impl LADomainStateCompanion {
extern_methods!(
/// Indicates types of companions paired with the device.
/// The elements are NSNumber-wrapped instances of
/// ``LACompanionType`.`
#[unsafe(method(availableCompanionTypes))]
#[unsafe(method_family = none)]
pub unsafe fn availableCompanionTypes(&self) -> Retained<NSSet<NSNumber>>;
/// Contains combined state hash data for all available companion types. . Returns `nil` if no companion devices are paired.
///
///
/// As long as database of paired companion devices doesn't change,
/// `stateHash` stays the same for the same set of `availableCompanions`.
///
/// If database of paired companion devices was modified, `stateHash`
/// data will change. Nature of such database changes cannot be determined
/// but comparing data of `stateHash` after different policy evaluation
/// will reveal the fact database was changed between calls.
///
/// If you are interested in a state hash for a specific companion type
/// you can use `stateHashForCompanionType` method.
///
///
/// Warning: Please note that the value returned by this property can change exceptionally between major OS versions even if
/// the list of paired companions has not changed.
#[unsafe(method(stateHash))]
#[unsafe(method_family = none)]
pub unsafe fn stateHash(&self) -> Option<Retained<NSData>>;
#[cfg(feature = "LACompanionType")]
/// Returns state hash data for the given companion type.
///
///
/// If database of paired devices of the given type was modified state hash
/// data will change. Nature of such database changes cannot be determined
/// but comparing data of state hash after different policy evaluation
/// will reveal the fact database was changed between calls.
///
///
/// Parameter `companionType`: The companion type for which state hash data should be returned.
#[unsafe(method(stateHashForCompanionType:))]
#[unsafe(method_family = none)]
pub unsafe fn stateHashForCompanionType(
&self,
companion_type: LACompanionType,
) -> Option<Retained<NSData>>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
extern_class!(
/// [Apple's documentation](https://developer.apple.com/documentation/localauthentication/ladomainstate?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct LADomainState;
);
extern_conformance!(
unsafe impl NSObjectProtocol for LADomainState {}
);
impl LADomainState {
extern_methods!(
/// Contains biometric domain state.
#[unsafe(method(biometry))]
#[unsafe(method_family = none)]
pub unsafe fn biometry(&self) -> Retained<LADomainStateBiometry>;
/// Contains companion domain state.
#[unsafe(method(companion))]
#[unsafe(method_family = none)]
pub unsafe fn companion(&self) -> Retained<LADomainStateCompanion>;
/// Contains combined state hash data for biometry and companion state hashes.
///
///
/// Warning: Please note that the value returned by this property can change exceptionally between major OS versions even if
/// the list of paired companions has not changed.
#[unsafe(method(stateHash))]
#[unsafe(method_family = none)]
pub unsafe fn stateHash(&self) -> Option<Retained<NSData>>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}