chromium/remoting/signaling/BUILD.gn

# Copyright 2015 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

static_library("signaling") {
  sources = [
    "delegating_signal_strategy.cc",
    "delegating_signal_strategy.h",
    "ftl_client_uuid_device_id_provider.cc",
    "ftl_client_uuid_device_id_provider.h",
    "ftl_device_id_provider.h",
    "ftl_host_device_id_provider.cc",
    "ftl_host_device_id_provider.h",
    "ftl_message_reception_channel.cc",
    "ftl_message_reception_channel.h",
    "ftl_messaging_client.cc",
    "ftl_messaging_client.h",
    "ftl_registration_manager.cc",
    "ftl_registration_manager.h",
    "ftl_services_context.cc",
    "ftl_services_context.h",
    "ftl_signal_strategy.cc",
    "ftl_signal_strategy.h",
    "ftl_support_host_device_id_provider.cc",
    "ftl_support_host_device_id_provider.h",
    "iq_sender.cc",
    "iq_sender.h",
    "message_reception_channel.h",
    "message_tracker.cc",
    "message_tracker.h",
    "messaging_client.h",
    "registration_manager.h",
    "remoting_log_to_server.cc",
    "remoting_log_to_server.h",
    "server_log_entry.cc",
    "server_log_entry.h",
    "signal_strategy.cc",
    "signal_strategy.h",
    "signaling_address.cc",
    "signaling_address.h",
    "signaling_id_util.cc",
    "signaling_id_util.h",
    "signaling_tracker.h",
    "xmpp_constants.cc",
    "xmpp_constants.h",
    "xmpp_log_to_server.cc",
    "xmpp_log_to_server.h",
  ]

  configs += [
    "//build/config/compiler:wexit_time_destructors",
    "//remoting/build/config:version",
  ]

  public_deps = [
    "//remoting/proto",
    "//remoting/proto/remoting/v1:telemetry_messages",
    "//third_party/libjingle_xmpp:rtc_xmllite",
    "//third_party/webrtc_overrides:webrtc_component",
  ]

  deps = [
    "//base",
    "//build:chromeos_buildflags",
    "//crypto",
    "//google_apis",
    "//net",
    "//remoting/base",
    "//remoting/base:authorization",
    "//remoting/base:logging",
    "//remoting/base:name_value_map",
    "//remoting/proto/ftl/v1:ftl_messages",
    "//services/network/public/cpp:cpp",
  ]
}

static_library("test_support") {
  testonly = true

  sources = [
    "fake_signal_strategy.cc",
    "fake_signal_strategy.h",
    "mock_signal_strategy.cc",
    "mock_signal_strategy.h",
    "mock_signaling_tracker.cc",
    "mock_signaling_tracker.h",
  ]

  public_deps = [
    ":signaling",
    "//remoting/base:test_support",
    "//remoting/proto/ftl/v1:ftl_messages",
    "//testing/gmock",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "ftl_message_reception_channel_unittest.cc",
    "ftl_messaging_client_unittest.cc",
    "ftl_registration_manager_unittest.cc",
    "ftl_signal_strategy_unittest.cc",
    "iq_sender_unittest.cc",
    "message_tracker_unittest.cc",
    "remoting_log_to_server_unittest.cc",
    "server_log_entry_unittest.cc",
    "server_log_entry_unittest.h",
    "signaling_address_unittest.cc",
    "signaling_id_util_unittest.cc",
    "xmpp_log_to_server_unittest.cc",
  ]

  deps = [
    ":test_support",
    "//net:test_support",
    "//remoting/base:base",
    "//services/network/public/cpp:cpp",
    "//testing/gmock",
    "//testing/gtest",
  ]
}