blob: 67862eb9437bc1d2cb46adb7ec9c30e61269dff9 [file] [log] [blame]
header = """
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
"""
autogen_warning = """
// Warning:
// This file was autogenerated by cbindgen.
// Do not modify this file manually.
"""
include_guard = "SRC_CONNECTIVITY_WLAN_LIB_MLME_RUST_C_BINDING_BINDINGS_H_"
language = "C"
sys_includes = [
# Banjo types.
"fuchsia/hardware/wlan/info/c/banjo.h", # wlan_channel_t
"fuchsia/hardware/wlan/mac/c/banjo.h", # wlanmac_info_t, wlan_hw_scan_config_t, wlan_rx_info_t
# Other existing types.
"garnet/lib/wlan/protocol/include/wlan/protocol/mac.h", # wlan_key_config_t
]
[parse]
parse_deps = true
include = ["wlan_mlme", "wlan_common", "wlan_span"]
[export]
# Explicitly declare types to export as cbindgen seems to have trouble
# detecting their usage.
include = [
"Ap",
"BufferProvider",
"Client",
"ClientConfig",
"ClientMlme",
"CppChannelScheduler",
"CSpan",
"Device",
"EventId",
"InBuf",
"OutBuf",
"PowerState",
"Scheduler"
]
exclude = [
# Banjo types.
"WlanAssocCtx",
"WlanChannel",
"WlanBssConfig",
"WlanHwScanConfig",
"WlanIndication",
"WlanmacInfo",
"WlanRxInfo",
# Other existing types.
"KeyConfig",
]
[export.rename]
# Unfortunately cbindgen's rename machinery is rather simple
# and doesn't accomodate our needs. As a result we have to
# explicitly declare the items which should get renamed
"Ap" = "wlan_ap_sta_t"
"BufferProvider" = "mlme_buffer_provider_ops_t"
"Client" = "wlan_client_sta_t"
"ClientConfig" = "wlan_client_mlme_config_t"
"ClientMlme" = "wlan_client_mlme_t"
"CppChannelScheduler" = "wlan_cpp_chan_sched_t"
"CSpan" = "wlan_span_t"
"Device" = "mlme_device_ops_t"
"EventId" = "wlan_scheduler_event_id_t"
"InBuf" = "mlme_in_buf_t"
"OutBuf" = "mlme_out_buf_t"
"PowerState" = "wlan_power_state_t"
"Scheduler" = "wlan_scheduler_ops_t"
"SequenceManager" = "mlme_sequence_manager_t"
# Banjo types.
"WlanAssocCtx" = "wlan_assoc_ctx_t"
"WlanBssConfig" = "wlan_bss_config_t"
"WlanChannel" = "wlan_channel_t"
"WlanHwScanConfig" = "wlan_hw_scan_config_t"
"WlanmacInfo" = "wlanmac_info_t"
"WlanIndication" = "wlan_indication_t"
"WlanRxInfo" = "wlan_rx_info_t"
# Other existing types.
"KeyConfig" = "wlan_key_config_t"
[fn]
prefix = 'extern "C"'
[enum]
rename_variants = "ScreamingSnakeCase"
prefix_with_name = true