Skip to main content

localauthentication/ffi/
mod.rs

1//! Raw FFI declarations matching the Swift `la_*` bridge exports.
2
3#![allow(
4    non_camel_case_types,
5    non_snake_case,
6    non_upper_case_globals,
7    missing_docs
8)]
9
10pub mod la_authentication_requirement;
11pub mod la_context;
12pub mod la_credential;
13pub mod la_environment;
14pub mod la_error;
15pub mod la_persisted_right;
16pub mod la_policy;
17pub mod la_public_key;
18pub mod la_right;
19pub mod la_right_store;
20
21extern "C" {
22    pub fn la_set_sync_timeout(seconds: f64);
23    pub fn la_get_sync_timeout() -> f64;
24}
25
26pub mod status {
27    pub const OK: i32 = 0;
28    pub const INVALID_ARGUMENT: i32 = -10_000;
29    pub const TIMED_OUT: i32 = -10_001;
30    pub const BRIDGE_FAILED: i32 = -10_002;
31    pub const UNKNOWN: i32 = -10_099;
32}
33
34pub mod biometry {
35    pub const NONE: i32 = 0;
36    pub const TOUCH_ID: i32 = 1;
37    pub const FACE_ID: i32 = 2;
38    pub const OPTIC_ID: i32 = 4;
39}
40
41pub mod companion {
42    pub const WATCH: i32 = 1;
43    pub const MAC: i32 = 2;
44    pub const VISION: i32 = 4;
45}