homecore_hap/lib.rs
1//! `homecore-hap` — Apple Home HomeKit Accessory Protocol bridge (ADR-125).
2//!
3//! # Network foundation scope
4//!
5//! The crate provides persisted accessory/controller identity, SRP-6a
6//! Pair-Setup, X25519/Ed25519 Pair-Verify, encrypted HAP IP framing, bounded
7//! TLV8/HTTP parsing, characteristic event flow, and (with `hap-server`) a
8//! bounded TCP listener plus real mDNS.
9//!
10//! # Module layout
11//!
12//! | Module | Purpose |
13//! |--------|---------|
14//! | [`accessory`] | HAP service / characteristic enum catalogue |
15//! | [`mapping`] | `EntityToAccessoryMapper` — HOMECORE entity → HAP |
16//! | [`bridge`] | `HapBridge` — owns exposed accessories |
17//! | [`mdns`] | `MdnsAdvertiser` trait + `NullAdvertiser` stub |
18//! | [`pairing`] | Atomic accessory identity, setup, and pairing persistence |
19//! | [`protocol`] | Bounded TLV8 protocol primitives |
20//! | [`ruview`] | `RuViewToHapMapper` — sensing primitives → HAP |
21//! | [`session`] | Authenticated request-gating state machine |
22//! | `server` | Feature-gated bounded TCP/HTTP lifecycle |
23//! | [`error`] | Unified `HapError` type |
24
25pub mod accessory;
26pub mod bridge;
27mod crypto;
28pub mod error;
29pub mod mapping;
30pub mod mdns;
31mod pair_setup;
32mod pair_verify;
33pub mod pairing;
34pub mod protocol;
35pub mod ruview;
36#[cfg(feature = "hap-server")]
37pub mod server;
38pub mod session;
39
40pub use accessory::{HapAccessoryType, HapCharacteristic, HapCharacteristicValue};
41pub use bridge::{CharacteristicEvent, ExposedAccessory, HapBridge};
42pub use error::HapError;
43pub use mapping::EntityToAccessoryMapper;
44#[cfg(feature = "hap-server")]
45pub use mdns::MdnsSdAdvertiser;
46pub use mdns::{HapServiceRecord, MdnsAdvertiser, NullAdvertiser};
47pub use pairing::{ControllerPairing, PairingStore, PairingStoreProvisioning, SetupCode};
48pub use ruview::RuViewToHapMapper;
49#[cfg(feature = "hap-server")]
50pub use server::{start_server, HapServerConfig, HapServerHandle};
51pub use session::{Session, SessionState};