1# Copyright (c) 2021 The WebRTC project authors. All Rights Reserved. 2# 3# Use of this source code is governed by a BSD-style license 4# that can be found in the LICENSE file in the root of the source 5# tree. An additional intellectual property rights grant can be found 6# in the file PATENTS. All contributing project authors may 7# be found in the AUTHORS file in the root of the source tree. 8 9import("../../../webrtc.gni") 10 11rtc_source_set("types") { 12 deps = [ 13 "../../../api:array_view", 14 "../../../rtc_base:strong_alias", 15 ] 16 sources = [ 17 "dcsctp_message.h", 18 "dcsctp_options.h", 19 "types.h", 20 ] 21 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ] 22} 23 24rtc_source_set("socket") { 25 deps = [ 26 ":types", 27 "../../../api:array_view", 28 "../../../api/task_queue:task_queue", 29 "../../../rtc_base:checks", 30 "../../../rtc_base:strong_alias", 31 ] 32 sources = [ 33 "dcsctp_handover_state.cc", 34 "dcsctp_handover_state.h", 35 "dcsctp_socket.h", 36 "packet_observer.h", 37 "timeout.h", 38 ] 39 absl_deps = [ 40 "//third_party/abseil-cpp/absl/strings", 41 "//third_party/abseil-cpp/absl/types:optional", 42 ] 43} 44 45rtc_source_set("factory") { 46 deps = [ 47 ":socket", 48 ":types", 49 "../socket:dcsctp_socket", 50 ] 51 sources = [ 52 "dcsctp_socket_factory.cc", 53 "dcsctp_socket_factory.h", 54 ] 55 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ] 56} 57 58rtc_source_set("mocks") { 59 testonly = true 60 sources = [ 61 "mock_dcsctp_socket.h", 62 "mock_dcsctp_socket_factory.h", 63 ] 64 deps = [ 65 ":factory", 66 ":socket", 67 "../../../test:test_support", 68 ] 69} 70 71rtc_source_set("utils") { 72 deps = [ 73 ":socket", 74 ":types", 75 "../../../api:array_view", 76 "../../../rtc_base:logging", 77 "../../../rtc_base:stringutils", 78 "../socket:dcsctp_socket", 79 ] 80 sources = [ 81 "text_pcap_packet_observer.cc", 82 "text_pcap_packet_observer.h", 83 ] 84 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ] 85} 86 87if (rtc_include_tests) { 88 rtc_library("dcsctp_public_unittests") { 89 testonly = true 90 91 deps = [ 92 ":mocks", 93 ":types", 94 "../../../rtc_base:checks", 95 "../../../rtc_base:gunit_helpers", 96 "../../../test:test_support", 97 ] 98 sources = [ 99 "mock_dcsctp_socket_test.cc", 100 "types_test.cc", 101 ] 102 } 103} 104