hci_emulator_client/
types.rsuse fidl_fuchsia_hardware_bluetooth as fidl;
#[derive(Clone, Debug, Default, PartialEq)]
pub struct LegacyAdvertisingState {
pub enabled: bool,
pub type_: Option<fidl::LegacyAdvertisingType>,
pub address_type: Option<fidl_fuchsia_bluetooth::AddressType>,
pub interval_min: Option<u16>,
pub interval_max: Option<u16>,
pub advertising_data: Option<fidl::AdvertisingData>,
pub scan_response: Option<fidl::AdvertisingData>,
}
impl From<fidl::LegacyAdvertisingState> for LegacyAdvertisingState {
fn from(src: fidl::LegacyAdvertisingState) -> LegacyAdvertisingState {
LegacyAdvertisingState {
enabled: src.enabled.unwrap_or(false),
type_: src.type_,
address_type: src.address_type,
interval_min: src.interval_min,
interval_max: src.interval_max,
advertising_data: src.advertising_data,
scan_response: src.scan_response,
}
}
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct ControllerParameters {
pub local_name: Option<String>,
pub device_class: Option<fidl_fuchsia_bluetooth::DeviceClass>,
}
impl From<fidl::ControllerParameters> for ControllerParameters {
fn from(src: fidl::ControllerParameters) -> ControllerParameters {
ControllerParameters { local_name: src.local_name, device_class: src.device_class }
}
}