# 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",
    "../../../api/units:timestamp",
    "../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 = [
    "../../../api/units:time_delta",
    "../../../rtc_base:checks",
    "../public:types",
  ]
  sources = [
    "retransmission_timeout.cc",
    "retransmission_timeout.h",
  ]
}

rtc_library("outstanding_data") {
  deps = [
    ":retransmission_timeout",
    ":send_queue",
    "../../../api:array_view",
    "../../../api/units:time_delta",
    "../../../api/units:timestamp",
    "../../../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",
      "../../../api/units:timestamp",
      "../../../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",
    ]
  }
}
