.TH "mobile.h" 3 "Bark" \" -*- nroff -*- .ad l .nh .SH NAME mobile.h \- Native mobile AOT lifecycle C ABI (Android arm64-v8a & iOS arm64)\&. .SH SYNOPSIS .br .PP .SS "Classes" .in +1c .ti -1c .RI "struct \fBbark_mobile_config\fP" .br .RI "Configuration passed by the native mobile shell to \fBbark_mobile_boot()\fP\&. " .ti -1c .RI "struct \fBbark_mobile_status\fP" .br .RI "Fixed-size 128-byte mobile runtime & attestation status snapshot\&. " .in -1c .SS "Typedefs" .in +1c .ti -1c .RI "typedef struct \fBbark_mobile_config\fP \fBbark_mobile_config_t\fP" .br .RI "Configuration passed by the native mobile shell to \fBbark_mobile_boot()\fP\&. " .ti -1c .RI "typedef struct \fBbark_mobile_status\fP \fBbark_mobile_status_t\fP" .br .RI "Fixed-size 128-byte mobile runtime & attestation status snapshot\&. " .in -1c .SS "Enumerations" .in +1c .ti -1c .RI "enum \fBbark_mobile_cfg_flags\fP { \fBBARK_MOBILE_CFG_REQUIRE_APK_CERT\fP = 1u << 0, \fBBARK_MOBILE_CFG_REQUIRE_NO_DEBUGGER\fP = 1u << 1, \fBBARK_MOBILE_CFG_ENABLE_ANTI_DEBUG\fP = 1u << 2, \fBBARK_MOBILE_CFG_REQUIRE_LEASE\fP = 1u << 3 }" .br .RI "Feature/hardening flags for \fBbark_mobile_config_t\fP\&. " .in -1c .SS "Functions" .in +1c .ti -1c .RI "int \fBbark_mobile_boot\fP (const \fBbark_mobile_config_t\fP *cfg, uint64_t now_sec)" .br .RI "Initialize mobile session, hardware keychain, anti-tamper baseline, and app hooks\&. " .ti -1c .RI "int \fBbark_mobile_step\fP (uint64_t now_sec)" .br .RI "Advance one 60Hz native frame: check lease/integrity, poll, flush, and present\&. " .ti -1c .RI "void \fBbark_mobile_pause\fP (void)" .br .RI "Notify runtime that the mobile app entered background (pauses render & wipes volatile state)\&. " .ti -1c .RI "int \fBbark_mobile_resume\fP (uint64_t now_sec)" .br .RI "Notify runtime that the mobile app returned to foreground and re-verify live code integrity\&. " .ti -1c .RI "int \fBbark_mobile_apply_lease\fP (const uint8_t *resp_bytes, size_t resp_len, uint64_t now_sec)" .br .RI "Verify and install an Ed25519-signed lease response blob and notify on_ticket()\&. " .ti -1c .RI "void \fBbark_mobile_revoke_lease\fP (void)" .br .RI "Revoke/clear the active lease and wipe session DEK + ticket immediately\&. " .ti -1c .RI "int \fBbark_mobile_build_heartbeat\fP (const uint8_t chal_bytes[80], uint64_t now_sec, uint8_t out_resp[80])" .br .RI "Build an 80-byte keyed integrity heartbeat response for an 80-byte server challenge\&. " .ti -1c .RI "int \fBbark_mobile_get_status\fP (\fBbark_mobile_status_t\fP *out)" .br .RI "Copy the current 128-byte mobile runtime status snapshot into \fRout\fP\&. " .ti -1c .RI "int \fBbark_mobile_get_device_pk\fP (uint8_t out_pk[32])" .br .RI "Copy the hardware-bound 32-byte X25519 device public key into \fRout_pk\fP\&. " .ti -1c .RI "void \fBbark_mobile_shutdown\fP (void)" .br .RI "Destroy application state, wipe secrets, and close the hardware keychain\&. " .in -1c .SH "Detailed Description" .PP Native mobile AOT lifecycle C ABI (Android arm64-v8a & iOS arm64)\&. Used by the thin Android JNI and iOS Objective-C/Swift native shells to drive any Bark application compiled with -DBARK_MOBILE_AOT without WebView, WASM, or dynamic PROT_EXEC/MAP_JIT code loading\&. .SH "Enumeration Type Documentation" .PP .SS "enum \fBbark_mobile_cfg_flags\fP" .PP Feature/hardening flags for \fBbark_mobile_config_t\fP\&. .PP \fBEnumerator\fP .in +1c .TP \f(BIBARK_MOBILE_CFG_REQUIRE_APK_CERT \fP Fail-closed if APK signing cert != expected_apk_cert_sha256\&. .TP \f(BIBARK_MOBILE_CFG_REQUIRE_NO_DEBUGGER \fP Taint session if debugger/ptrace is attached\&. .TP \f(BIBARK_MOBILE_CFG_ENABLE_ANTI_DEBUG \fP Activate OS anti-debug (PT_DENY_ATTACH / PR_SET_DUMPABLE=0)\&. .TP \f(BIBARK_MOBILE_CFG_REQUIRE_LEASE \fP Gate step() on active non-expired untainted lease (offline-brick)\&. .SH "Function Documentation" .PP .SS "int bark_mobile_step (uint64_t now_sec)" .PP Advance one 60Hz native frame: check lease/integrity, poll, flush, and present\&. .PP \fBReturns\fP .RS 4 0 normal frame, 1 quit requested, -2 lease required/expired/tainted (offline-brick), -1 invalid\&. .RE .PP .SH "Author" .PP Generated automatically by Doxygen for Bark from the source code\&.