# Copyright (c) 2021 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS.  All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.

import("../../../webrtc.gni")

rtc_source_set("send_queue") {
  deps = [
    "../../../api:array_view",
    "../common:internal_types",
    "../packet:chunk",
    "../packet:data",
    "../public:socket",
    "../public:types",
  ]
  sources = [ "send_queue.h" ]
  absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
}

rtc_library("rr_send_queue") {
  deps = [
    ":send_queue",
    ":stream_scheduler",
    "../../../api:array_view",
    "../../../rtc_base:checks",
    "../../../rtc_base:logging",
    "../../../rtc_base/containers:flat_map",
    "../common:internal_types",
    "../common:str_join",
    "../packet:data",
    "../public:socket",
    "../public:types",
  ]
  sources = [
    "rr_send_queue.cc",
    "rr_send_queue.h",
  ]
  absl_deps = [
    "//third_party/abseil-cpp/absl/algorithm:container",
    "//third_party/abseil-cpp/absl/algorithm:container",
    "//third_party/abseil-cpp/absl/strings",
    "//third_party/abseil-cpp/absl/types:optional",
  ]
}

rtc_library("stream_scheduler") {
  deps = [
    ":send_queue",
    "../../../api:array_view",
    "../../../rtc_base:checks",
    "../../../rtc_base:logging",
    "../../../rtc_base:strong_alias",
    "../../../rtc_base/containers:flat_set",
    "../common:str_join",
    "../packet:chunk",
    "../packet:data",
    "../packet:sctp_packet",
    "../public:socket",
    "../public:types",
  ]
  sources = [
    "stream_scheduler.cc",
    "stream_scheduler.h",
  ]
  absl_deps = [
    "//third_party/abseil-cpp/absl/algorithm:container",
    "//third_party/abseil-cpp/absl/memory",
    "//third_party/abseil-cpp/absl/strings",
    "//third_party/abseil-cpp/absl/types:optional",
  ]
}

rtc_library("retransmission_error_counter") {
  deps = [
    "../../../rtc_base:checks",
    "../../../rtc_base:logging",
    "../public:types",
  ]
  sources = [
    "retransmission_error_counter.cc",
    "retransmission_error_counter.h",
  ]
  absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
}

rtc_library("retransmission_timeout") {
  deps = [
    "../../../rtc_base:checks",
    "../public:types",
  ]
  sources = [
    "retransmission_timeout.cc",
    "retransmission_timeout.h",
  ]
}

rtc_library("outstanding_data") {
  deps = [
    ":retransmission_timeout",
    ":send_queue",
    "../../../api:array_view",
    "../../../rtc_base:checks",
    "../../../rtc_base:logging",
    "../../../rtc_base/containers:flat_set",
    "../common:internal_types",
    "../common:math",
    "../common:sequence_numbers",
    "../common:str_join",
    "../packet:chunk",
    "../packet:data",
    "../public:socket",
    "../public:types",
    "../timer",
  ]
  sources = [
    "outstanding_data.cc",
    "outstanding_data.h",
  ]
  absl_deps = [
    "//third_party/abseil-cpp/absl/algorithm:container",
    "//third_party/abseil-cpp/absl/strings",
    "//third_party/abseil-cpp/absl/types:optional",
  ]
}

rtc_library("retransmission_queue") {
  deps = [
    ":outstanding_data",
    ":retransmission_timeout",
    ":send_queue",
    "../../../api:array_view",
    "../../../rtc_base:checks",
    "../../../rtc_base:logging",
    "../../../rtc_base:stringutils",
    "../common:math",
    "../common:sequence_numbers",
    "../common:str_join",
    "../packet:chunk",
    "../packet:data",
    "../public:socket",
    "../public:types",
    "../timer",
  ]
  sources = [
    "retransmission_queue.cc",
    "retransmission_queue.h",
  ]
  absl_deps = [
    "//third_party/abseil-cpp/absl/algorithm:container",
    "//third_party/abseil-cpp/absl/strings",
    "//third_party/abseil-cpp/absl/types:optional",
  ]
}

if (rtc_include_tests) {
  rtc_source_set("mock_send_queue") {
    testonly = true
    deps = [
      ":send_queue",
      "../../../api:array_view",
      "../../../test:test_support",
    ]
    absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
    sources = [ "mock_send_queue.h" ]
  }

  rtc_library("dcsctp_tx_unittests") {
    testonly = true

    deps = [
      ":mock_send_queue",
      ":outstanding_data",
      ":retransmission_error_counter",
      ":retransmission_queue",
      ":retransmission_timeout",
      ":rr_send_queue",
      ":send_queue",
      ":stream_scheduler",
      "../../../api:array_view",
      "../../../api/task_queue:task_queue",
      "../../../rtc_base:checks",
      "../../../rtc_base:gunit_helpers",
      "../../../test:test_support",
      "../common:handover_testing",
      "../common:internal_types",
      "../common:math",
      "../common:sequence_numbers",
      "../packet:chunk",
      "../packet:data",
      "../packet:sctp_packet",
      "../public:socket",
      "../public:types",
      "../socket:mock_callbacks",
      "../socket:mock_callbacks",
      "../testing:data_generator",
      "../testing:testing_macros",
      "../timer",
    ]
    absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
    sources = [
      "outstanding_data_test.cc",
      "retransmission_error_counter_test.cc",
      "retransmission_queue_test.cc",
      "retransmission_timeout_test.cc",
      "rr_send_queue_test.cc",
      "stream_scheduler_test.cc",
    ]
  }
}
