ewilken / hap-rs

Rust implementation of the Apple HomeKit Accessory Protocol (HAP)
Apache License 2.0
196 stars 33 forks source link

v0.1 Release #57

Closed ewilken closed 2 years ago

ewilken commented 2 years ago

Extend the Storage trait to be able to store arbitrary binary data

Closes #52.

We're adding 3 new functions to the Storage trait for a basic binary KV storage:

async fn load_bytes(&self, key: &str) -> Result<Vec<u8>>;
async fn save_bytes(&mut self, key: &str, value: &[u8]) -> Result<()>;
async fn delete_bytes(&mut self, key: &str) -> Result<()>;

This is a breaking change to existing file storage due to the internal addition of subdirectories. It can be fixed by moving every <uuid>.json in the current data directory into data/pairings.

Re-check whether deferring the ControllerPaired event emission is a good idea

It doesn't seem to be. Controllers don't seem to drop connections on pairing anymore and having the emission deferred like on the previous implementation could result in the pairing event being emitted after an unpairing event after an unsuccessful pairing process. Doing it undeferred now. Closing #60.

Upgrade to Rust 2021

Closes #59.

Codegen for iOS 15 & macOS 12

Closes #58.

New characteristics

Updated characteristics

Removed characteristics

New services

Updated services (with additional characteristics)

Removed services

Re-check the crate's re-exports

tokio isn't exported anymore.