1 #[cxx::bridge(namespace = bluetooth::common::init_flags)]
2 #[allow(unsafe_op_in_unsafe_fn)]
3 mod ffi {
4     struct InitFlagWithValue {
5         flag: &'static str,
6         value: String,
7     }
8 
9     extern "Rust" {
load(flags: Vec<String>)10         fn load(flags: Vec<String>);
set_all_for_testing()11         fn set_all_for_testing();
12 
dump() -> Vec<InitFlagWithValue>13         fn dump() -> Vec<InitFlagWithValue>;
14 
always_send_services_if_gatt_disc_done_is_enabled() -> bool15         fn always_send_services_if_gatt_disc_done_is_enabled() -> bool;
always_use_private_gatt_for_debugging_is_enabled() -> bool16         fn always_use_private_gatt_for_debugging_is_enabled() -> bool;
bluetooth_power_telemetry_is_enabled() -> bool17         fn bluetooth_power_telemetry_is_enabled() -> bool;
btm_dm_flush_discovery_queue_on_search_cancel_is_enabled() -> bool18         fn btm_dm_flush_discovery_queue_on_search_cancel_is_enabled() -> bool;
classic_discovery_only_is_enabled() -> bool19         fn classic_discovery_only_is_enabled() -> bool;
dynamic_avrcp_version_enhancement_is_enabled() -> bool20         fn dynamic_avrcp_version_enhancement_is_enabled() -> bool;
gatt_robust_caching_server_is_enabled() -> bool21         fn gatt_robust_caching_server_is_enabled() -> bool;
get_hci_adapter() -> i3222         fn get_hci_adapter() -> i32;
get_asha_packet_drop_frequency_threshold() -> i3223         fn get_asha_packet_drop_frequency_threshold() -> i32;
get_asha_phy_update_retry_limit() -> i3224         fn get_asha_phy_update_retry_limit() -> i32;
hfp_dynamic_version_is_enabled() -> bool25         fn hfp_dynamic_version_is_enabled() -> bool;
irk_rotation_is_enabled() -> bool26         fn irk_rotation_is_enabled() -> bool;
leaudio_targeted_announcement_reconnection_mode_is_enabled() -> bool27         fn leaudio_targeted_announcement_reconnection_mode_is_enabled() -> bool;
pbap_pse_dynamic_version_upgrade_is_enabled() -> bool28         fn pbap_pse_dynamic_version_upgrade_is_enabled() -> bool;
redact_log_is_enabled() -> bool29         fn redact_log_is_enabled() -> bool;
sco_codec_timeout_clear_is_enabled() -> bool30         fn sco_codec_timeout_clear_is_enabled() -> bool;
sdp_serialization_is_enabled() -> bool31         fn sdp_serialization_is_enabled() -> bool;
sdp_skip_rnr_if_known_is_enabled() -> bool32         fn sdp_skip_rnr_if_known_is_enabled() -> bool;
set_min_encryption_is_enabled() -> bool33         fn set_min_encryption_is_enabled() -> bool;
subrating_is_enabled() -> bool34         fn subrating_is_enabled() -> bool;
use_unified_connection_manager_is_enabled() -> bool35         fn use_unified_connection_manager_is_enabled() -> bool;
sdp_return_classic_services_when_le_discovery_fails_is_enabled() -> bool36         fn sdp_return_classic_services_when_le_discovery_fails_is_enabled() -> bool;
use_rsi_from_cached_inqiry_results_is_enabled() -> bool37         fn use_rsi_from_cached_inqiry_results_is_enabled() -> bool;
get_att_mtu_default() -> i3238         fn get_att_mtu_default() -> i32;
encryption_in_busy_state_is_enabled() -> bool39         fn encryption_in_busy_state_is_enabled() -> bool;
40     }
41 }
42 
43 use crate::init_flags::ffi::InitFlagWithValue;
44 
dump() -> Vec<InitFlagWithValue>45 fn dump() -> Vec<InitFlagWithValue> {
46     bt_common::init_flags::dump()
47         .into_iter()
48         .map(|(flag, value)| InitFlagWithValue { flag, value })
49         .collect()
50 }
51 
52 use bt_common::init_flags::*;
53