# Copyright 2023 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.

import("//build_overrides/pigweed.gni")

import("$dir_pw_unit_test/test.gni")

config("default_config") {
  include_dirs = [ "public" ]
}

pw_source_set("data_link") {
  public_configs = [ ":default_config" ]
  public = [ "public/pw_data_link/data_link.h" ]
  public_deps = [
    "$dir_pw_allocator",
    "$dir_pw_bytes",
    "$dir_pw_function",
    "$dir_pw_multibuf",
    "$dir_pw_status",
  ]
}

pw_source_set("socket_data_link") {
  public_configs = [ ":default_config" ]
  public = [ "public/pw_data_link/socket_data_link.h" ]
  public_deps = [
    ":data_link",
    "$dir_pw_allocator",
    "$dir_pw_assert",
    "$dir_pw_bytes",
    "$dir_pw_function",
    "$dir_pw_multibuf",
    "$dir_pw_status",
    "$dir_pw_string:to_string",
    "$dir_pw_sync:lock_annotations",
    "$dir_pw_sync:mutex",
  ]
  deps = [
    "$dir_pw_log",
    "$dir_pw_multibuf:test_utils",
  ]
  sources = [ "socket_data_link.cc" ]
}

pw_source_set("data_link_thread") {
  public_configs = [ ":default_config" ]
  public = [ "public/pw_data_link/socket_data_link_thread.h" ]
  public_deps = [
    ":socket_data_link",
    "$dir_pw_status",
    "$dir_pw_sync:lock_annotations",
    "$dir_pw_sync:mutex",
    "$dir_pw_sync:thread_notification",
    "$dir_pw_thread:thread_core",
    "$dir_pw_thread:yield",
  ]
}

pw_source_set("server_socket") {
  public_configs = [ ":default_config" ]
  public = [ "public/pw_data_link/server_socket.h" ]
  sources = [ "server_socket.cc" ]
  public_deps = [
    "$dir_pw_assert",
    "$dir_pw_result",
    "$dir_pw_status",
  ]
}

pw_executable("sample_app") {
  sources = [ "sample_app.cc" ]
  deps = [
    ":data_link",
    ":data_link_thread",
    ":server_socket",
    ":socket_data_link",
    "$dir_pw_allocator:simple_allocator",
    "$dir_pw_assert",
    "$dir_pw_log",
    "$dir_pw_sync:thread_notification",
    "$dir_pw_thread:thread",
    "$dir_pw_thread:thread_core",
  ]
}

pw_test("data_link_test") {
  sources = [ "data_link_test.cc" ]
  deps = [
    ":data_link",
    "$dir_pw_allocator",
    "$dir_pw_bytes",
    "$dir_pw_multibuf",
    "$dir_pw_status",
  ]
}

pw_test("socket_data_link_test") {
  sources = [ "socket_data_link_test.cc" ]
  deps = [
    ":socket_data_link",
    "$dir_pw_allocator:simple_allocator",
    "$dir_pw_bytes",
    "$dir_pw_status",
  ]
}

pw_test_group("tests") {
  tests = [
    ":data_link_test",
    ":socket_data_link_test",
  ]
}
