| # Copyright 2020 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. |
| |
| import("//build/dist/resource.gni") |
| import("//build/rust/rustc_binary.gni") |
| import("//src/sys/build/components.gni") |
| |
| rustc_binary("bin") { |
| name = "bt_hfp_audio_gateway" |
| with_unit_tests = true |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.bluetooth.bredr:fuchsia.bluetooth.bredr-rustc", |
| "//sdk/fidl/fuchsia.bluetooth.hfp:fuchsia.bluetooth.hfp-rustc", |
| "//src/connectivity/bluetooth/lib/async-helpers", |
| "//src/connectivity/bluetooth/lib/fuchsia-bluetooth", |
| "//src/connectivity/lib/at-commands", |
| "//src/lib/async-utils", |
| "//src/lib/diagnostics/inspect/rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/syslog/rust:syslog", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:bitflags", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:regex", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| test_deps = [ |
| "//sdk/fidl/fuchsia.bluetooth:fuchsia.bluetooth-rustc", |
| "//third_party/rust_crates:matches", |
| "//third_party/rust_crates:proptest", |
| ] |
| |
| sources = [ |
| "src/config.rs", |
| "src/error.rs", |
| "src/fidl_service.rs", |
| "src/hfp.rs", |
| "src/main.rs", |
| "src/peer.rs", |
| "src/peer/calls.rs", |
| "src/peer/gain_control.rs", |
| "src/peer/ringer.rs", |
| "src/peer/service_level_connection.rs", |
| "src/peer/task.rs", |
| "src/procedure.rs", |
| "src/procedure/answer.rs", |
| "src/procedure/call_line_ident_notifications.rs", |
| "src/procedure/call_waiting_notifications.rs", |
| "src/procedure/dtmf.rs", |
| "src/procedure/extended_errors.rs", |
| "src/procedure/hang_up.rs", |
| "src/procedure/indicators_activation.rs", |
| "src/procedure/nrec.rs", |
| "src/procedure/phone_status.rs", |
| "src/procedure/query_current_calls.rs", |
| "src/procedure/query_operator_selection.rs", |
| "src/procedure/ring.rs", |
| "src/procedure/slc_initialization.rs", |
| "src/procedure/subscriber_number_information.rs", |
| "src/procedure/transfer_hf_indicator.rs", |
| "src/procedure/volume_synchronization.rs", |
| "src/profile.rs", |
| "src/protocol.rs", |
| "src/protocol/features.rs", |
| "src/protocol/indicators.rs", |
| "src/service_definitions.rs", |
| ] |
| } |
| |
| # A default configuration for bt-hfp-audio-gateway. There is no stability guarantee |
| # provided with the default config. It should only be used for local development and testing |
| # purposes. A product integrator should always define a product specific configuration. |
| resource("default_config") { |
| sources = [ "config/default_supported_features.config" ] |
| outputs = [ "data/supported_features.config" ] |
| } |
| |
| # A test configuration that can be used to check that configuration |
| # parsing is wired up correctly and that the config file is in the |
| # expected format. |
| resource("test_config") { |
| sources = [ "config/default_supported_features.config" ] |
| outputs = [ "data/supported_features.config" ] |
| } |
| |
| fuchsia_component("component") { |
| component_name = "bt-hfp-audio-gateway" |
| deps = [ ":bin" ] |
| manifest = "meta/bt-hfp-audio-gateway.cmx" |
| } |
| |
| fuchsia_package("bt-hfp-audio-gateway-default") { |
| deps = [ |
| ":component", |
| ":default_config", |
| ] |
| } |
| |
| group("bt-hfp-audio-gateway") { |
| deps = [ ":bt-hfp-audio-gateway-default" ] |
| } |
| |
| fuchsia_unittest_package("bt-hfp-audio-gateway-tests") { |
| v2 = true |
| deps = [ |
| ":bin_test", |
| ":test_config", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":bt-hfp-audio-gateway-tests" ] |
| } |