| # Copyright 2023 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/components.gni") |
| import("//build/rust/rustc_library.gni") |
| |
| rustc_library("bt-obex") { |
| edition = "2021" |
| with_unit_tests = true |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.bluetooth.bredr:fuchsia.bluetooth.bredr_rust", |
| "//src/connectivity/bluetooth/lib/bt-rfcomm", |
| "//src/connectivity/bluetooth/lib/fuchsia-bluetooth", |
| "//src/connectivity/bluetooth/lib/packet-encoding", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:bitflags", |
| "//third_party/rust_crates:chrono", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:thiserror", |
| "//third_party/rust_crates:tracing", |
| ] |
| |
| test_deps = [ |
| "//src/connectivity/bluetooth/lib/async-helpers:async-test-helpers", |
| "//src/lib/async-utils", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-sync", |
| "//third_party/rust_crates:assert_matches", |
| ] |
| |
| sources = [ |
| "src/client/get.rs", |
| "src/client/mod.rs", |
| "src/client/put.rs", |
| "src/error.rs", |
| "src/header/header_set.rs", |
| "src/header/mod.rs", |
| "src/header/obex_string.rs", |
| "src/lib.rs", |
| "src/operation.rs", |
| "src/profile.rs", |
| "src/server/get.rs", |
| "src/server/handler.rs", |
| "src/server/mod.rs", |
| "src/server/put.rs", |
| "src/transport.rs", |
| ] |
| |
| configs -= [ "//build/config/rust/lints:allow_unused_results" ] |
| } |
| |
| fuchsia_unittest_package("bt-obex-tests") { |
| deps = [ ":bt-obex_test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":bt-obex-tests", |
| "//src/connectivity/bluetooth/lib/bt-obex/objects:bt-obex-objects-tests", |
| ] |
| } |