38 lines
1.2 KiB
Rust
38 lines
1.2 KiB
Rust
extern crate blurz;
|
|
|
|
// use blurz::bluetooth_adapter::BluetoothAdapter;
|
|
// use blurz::bluetooth_device::BluetoothDevice;
|
|
// use blurz::bluetooth_gatt_characteristic::BluetoothGATTCharacteristic;
|
|
// use blurz::bluetooth_gatt_service::BluetoothGATTService;
|
|
|
|
// use crate::message::Message;
|
|
// pub use crate::output::*;
|
|
// use serde_derive::*;
|
|
|
|
// #[derive(Debug)]
|
|
// pub struct BluetoothLightbulb<'a> {
|
|
// config: BluetoothLightbulbConfig,
|
|
// adapter: BluetoothAdapter<'a>,
|
|
// }
|
|
// #[derive(Debug, PartialEq, Serialize, Deserialize)]
|
|
// struct BluetoothLightbulbConfig {
|
|
// mac: Vec<String>,
|
|
// }
|
|
|
|
// impl Output for BluetoothLightbulb {
|
|
// fn new(config: &HashMap<String, serde_yaml::Value>) -> Self {
|
|
// let config_node = config.get("config").expect("Missing `config` key").clone();
|
|
// let config =
|
|
// serde_yaml::from_value(config_node).expect("Invalid config for wifi_availability");
|
|
|
|
// let adapter = BluetoothAdapter::init().expect("Cannot initialize bluetooth adapter");
|
|
|
|
// BluetoothLightbulb { config: config }
|
|
// }
|
|
// fn process_message(&mut self, message: Message) {
|
|
// println!("Received message: {:?}", message);
|
|
|
|
// let device = Device::new(dev_path);
|
|
// }
|
|
// }
|