blob: 67615c9429c1319ff46489d477b0a8b931a4bc64 [file] [log] [blame]
# Copyright 2024 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.
load(
"@fuchsia_sdk//fuchsia:defs.bzl",
"fuchsia_cc_test",
"fuchsia_unittest_package",
)
package(default_visibility = ["//visibility:public"])
cc_library(
name = "definitions",
srcs = [
"gatt_defs.cc",
],
deps = [
"//src/connectivity/bluetooth/core/bt-host:public",
"//src/connectivity/bluetooth/core/bt-host/att:definitions",
],
)
cc_library(
name = "gatt",
srcs = [
"client.cc",
"connection.cc",
"gatt.cc",
"generic_attribute_service.cc",
"local_service_manager.cc",
"remote_characteristic.cc",
"remote_service.cc",
"remote_service_manager.cc",
"server.cc",
"types.cc",
],
deps = [
":definitions",
"//src/connectivity/bluetooth/core/bt-host:public",
"//src/connectivity/bluetooth/core/bt-host/att",
"@pigweed//third_party/fuchsia:fit",
],
)
cc_library(
name = "testing",
testonly = True,
srcs = [
"fake_client.cc",
"fake_layer.cc",
"mock_server.cc",
],
deps = [
":gatt",
"//src/connectivity/bluetooth/core/bt-host:public",
"//src/connectivity/bluetooth/core/bt-host/common",
"//src/connectivity/bluetooth/core/bt-host/common:uuid_string_util",
"@pigweed//pw_async:heap_dispatcher",
"@pigweed//pw_unit_test",
],
)
fuchsia_cc_test(
name = "gatt_test",
testonly = True,
srcs = [
],
death_unittest = True,
visibility = ["//visibility:public"],
deps = [
"//src/connectivity/bluetooth/core/bt-host/testing:gtest_main",
],
)
fuchsia_unittest_package(
name = "test_pkg",
package_name = "gatt_tests",
testonly = True,
fuchsia_api_level = "HEAD",
unit_tests = [
":gatt_test",
],
visibility = ["//visibility:public"],
)