Skip to main content

hap_ble/
lib.rs

1//! HomeKit Accessory Protocol (HAP) **Bluetooth LE** transport.
2//!
3//! Discover, pair with, read from, and stream events off a HomeKit accessory
4//! over BLE, reusing the pairing crypto from [`hap_crypto`], the TLV8 codec
5//! from [`hap_tlv8`], and the attribute model from [`hap_model`].
6//!
7//! This is Milestone A: a standalone transport. Unifying it with the IP
8//! `hap_controller` under one `HapController` is Milestone B.
9#![forbid(unsafe_code)]
10
11mod accessory;
12mod advert;
13mod bluest_gatt;
14mod broadcast_state;
15mod controller;
16mod db;
17mod discovery;
18mod error;
19mod gatt;
20mod pairing;
21mod pdu;
22mod scan_gate;
23mod session;
24
25pub use accessory::{BleAccessory, CharacteristicEvent};
26pub use advert::HapAdvert;
27pub use bluest_gatt::BluestConnection;
28pub use broadcast_state::BleBroadcastState;
29pub use controller::{BleController, Paired};
30pub use discovery::{connect_gatt, scan, DiscoveredBleAccessory};
31pub use error::{BleError, Result};
32pub use gatt::{AdvertSource, GattCharacteristic, GattConnection, GattService, RawAdvert};
33
34// Lower-crate types that appear in this crate's public API.
35pub use hap_crypto::{AccessoryPairing, BroadcastKey, ControllerKeypair};
36pub use hap_model::{
37    format::{CharFormat, CharValue},
38    tree::{Accessory, Characteristic, Service},
39    CharacteristicType, ServiceType,
40};