load("@rules_cc//cc:cc_library.bzl", "cc_library")
load("@//:build_variables.bzl", "COPTS")

package(
    default_visibility = [
        "@//:android_cuttlefish",
    ],
)

cc_library(
    name = "libopenscreen",
    srcs = [
        "discovery/dnssd/impl/constants.h",
        "discovery/dnssd/impl/conversion_layer.cc",
        "discovery/dnssd/impl/conversion_layer.h",
        "discovery/dnssd/impl/dns_data_graph.cc",
        "discovery/dnssd/impl/dns_data_graph.h",
        "discovery/dnssd/impl/instance_key.cc",
        "discovery/dnssd/impl/instance_key.h",
        "discovery/dnssd/impl/network_interface_config.cc",
        "discovery/dnssd/impl/network_interface_config.h",
        "discovery/dnssd/impl/publisher_impl.cc",
        "discovery/dnssd/impl/publisher_impl.h",
        "discovery/dnssd/impl/querier_impl.cc",
        "discovery/dnssd/impl/querier_impl.h",
        "discovery/dnssd/impl/service_dispatcher.cc",
        "discovery/dnssd/impl/service_dispatcher.h",
        "discovery/dnssd/impl/service_instance.cc",
        "discovery/dnssd/impl/service_instance.h",
        "discovery/dnssd/impl/service_key.cc",
        "discovery/dnssd/impl/service_key.h",
        "discovery/dnssd/public/dns_sd_instance.cc",
        "discovery/dnssd/public/dns_sd_instance_endpoint.cc",
        "discovery/dnssd/public/dns_sd_txt_record.cc",
        "discovery/mdns/mdns_domain_confirmed_provider.h",
        "discovery/mdns/mdns_probe.cc",
        "discovery/mdns/mdns_probe.h",
        "discovery/mdns/mdns_probe_manager.cc",
        "discovery/mdns/mdns_probe_manager.h",
        "discovery/mdns/mdns_publisher.cc",
        "discovery/mdns/mdns_publisher.h",
        "discovery/mdns/mdns_querier.cc",
        "discovery/mdns/mdns_querier.h",
        "discovery/mdns/mdns_random.h",
        "discovery/mdns/mdns_reader.cc",
        "discovery/mdns/mdns_reader.h",
        "discovery/mdns/mdns_receiver.cc",
        "discovery/mdns/mdns_receiver.h",
        "discovery/mdns/mdns_record_changed_callback.h",
        "discovery/mdns/mdns_records.cc",
        "discovery/mdns/mdns_records.h",
        "discovery/mdns/mdns_responder.cc",
        "discovery/mdns/mdns_responder.h",
        "discovery/mdns/mdns_sender.cc",
        "discovery/mdns/mdns_sender.h",
        "discovery/mdns/mdns_service_impl.cc",
        "discovery/mdns/mdns_service_impl.h",
        "discovery/mdns/mdns_trackers.cc",
        "discovery/mdns/mdns_trackers.h",
        "discovery/mdns/mdns_writer.cc",
        "discovery/mdns/mdns_writer.h",
        "discovery/mdns/public/mdns_service.cc",
        "platform/api/udp_socket.cc",
        "platform/base/error.cc",
        "platform/base/interface_info.cc",
        "platform/base/ip_address.cc",
        "platform/base/udp_packet.cc",
        "platform/impl/scoped_pipe.h",
        "platform/impl/time.cc",
        "platform/impl/network_interface.cc",
        "platform/impl/network_interface.h",
        "platform/impl/network_interface_linux.cc",
        "third_party/abseil/src/absl/algorithm/algorithm.h",
        "third_party/abseil/src/absl/base/attributes.h",
        "third_party/abseil/src/absl/base/casts.h",
        "third_party/abseil/src/absl/base/config.h",
        "third_party/abseil/src/absl/base/dynamic_annotations.h",
        "third_party/abseil/src/absl/base/log_severity.h",
        "third_party/abseil/src/absl/base/macros.h",
        "third_party/abseil/src/absl/base/optimization.h",
        "third_party/abseil/src/absl/base/options.h",
        "third_party/abseil/src/absl/base/policy_checks.h",
        "third_party/abseil/src/absl/base/port.h",
        "third_party/abseil/src/absl/base/internal/atomic_hook.h",
        "third_party/abseil/src/absl/base/internal/bits.h",
        "third_party/abseil/src/absl/base/internal/dynamic_annotations.h",
        "third_party/abseil/src/absl/base/internal/endian.h",
        "third_party/abseil/src/absl/base/internal/identity.h",
        "third_party/abseil/src/absl/base/internal/inline_variable.h",
        "third_party/abseil/src/absl/base/internal/invoke.h",
        "third_party/abseil/src/absl/base/internal/raw_logging.cc",
        "third_party/abseil/src/absl/base/internal/raw_logging.h",
        "third_party/abseil/src/absl/base/internal/throw_delegate.cc",
        "third_party/abseil/src/absl/base/internal/throw_delegate.h",
        "third_party/abseil/src/absl/base/internal/unaligned_access.h",
        "third_party/abseil/src/absl/container/fixed_array.h",
        "third_party/abseil/src/absl/container/internal/compressed_tuple.h",
        "third_party/abseil/src/absl/hash/hash.h",
        "third_party/abseil/src/absl/hash/internal/city.cc",
        "third_party/abseil/src/absl/hash/internal/city.h",
        "third_party/abseil/src/absl/hash/internal/hash.cc",
        "third_party/abseil/src/absl/hash/internal/hash.h",
        "third_party/abseil/src/absl/memory/memory.h",
        "third_party/abseil/src/absl/meta/type_traits.h",
        "third_party/abseil/src/absl/numeric/int128.cc",
        "third_party/abseil/src/absl/numeric/int128.h",
        "third_party/abseil/src/absl/numeric/int128_have_intrinsic.inc",
        "third_party/abseil/src/absl/strings/ascii.cc",
        "third_party/abseil/src/absl/strings/ascii.h",
        "third_party/abseil/src/absl/strings/charconv.cc",
        "third_party/abseil/src/absl/strings/charconv.h",
        "third_party/abseil/src/absl/strings/escaping.cc",
        "third_party/abseil/src/absl/strings/escaping.h",
        "third_party/abseil/src/absl/strings/internal/char_map.h",
        "third_party/abseil/src/absl/strings/internal/charconv_bigint.cc",
        "third_party/abseil/src/absl/strings/internal/charconv_bigint.h",
        "third_party/abseil/src/absl/strings/internal/charconv_parse.cc",
        "third_party/abseil/src/absl/strings/internal/charconv_parse.h",
        "third_party/abseil/src/absl/strings/internal/escaping.cc",
        "third_party/abseil/src/absl/strings/internal/escaping.h",
        "third_party/abseil/src/absl/strings/internal/memutil.cc",
        "third_party/abseil/src/absl/strings/internal/memutil.h",
        "third_party/abseil/src/absl/strings/internal/ostringstream.h",
        "third_party/abseil/src/absl/strings/internal/resize_uninitialized.h",
        "third_party/abseil/src/absl/strings/internal/str_join_internal.h",
        "third_party/abseil/src/absl/strings/internal/str_split_internal.h",
        "third_party/abseil/src/absl/strings/internal/utf8.cc",
        "third_party/abseil/src/absl/strings/internal/utf8.h",
        "third_party/abseil/src/absl/strings/match.cc",
        "third_party/abseil/src/absl/strings/match.h",
        "third_party/abseil/src/absl/strings/numbers.cc",
        "third_party/abseil/src/absl/strings/numbers.h",
        "third_party/abseil/src/absl/strings/str_cat.cc",
        "third_party/abseil/src/absl/strings/str_cat.h",
        "third_party/abseil/src/absl/strings/str_join.h",
        "third_party/abseil/src/absl/strings/str_replace.cc",
        "third_party/abseil/src/absl/strings/str_replace.h",
        "third_party/abseil/src/absl/strings/str_split.cc",
        "third_party/abseil/src/absl/strings/str_split.h",
        "third_party/abseil/src/absl/strings/string_view.cc",
        "third_party/abseil/src/absl/strings/string_view.h",
        "third_party/abseil/src/absl/strings/strip.h",
        "third_party/abseil/src/absl/strings/substitute.cc",
        "third_party/abseil/src/absl/strings/substitute.h",
        "third_party/abseil/src/absl/types/bad_optional_access.cc",
        "third_party/abseil/src/absl/types/bad_optional_access.h",
        "third_party/abseil/src/absl/types/bad_variant_access.cc",
        "third_party/abseil/src/absl/types/bad_variant_access.h",
        "third_party/abseil/src/absl/types/internal/span.h",
        "third_party/abseil/src/absl/types/optional.h",
        "third_party/abseil/src/absl/types/span.h",
        "third_party/abseil/src/absl/types/variant.h",
        "third_party/abseil/src/absl/utility/utility.h",
        "util/alarm.cc",
        "util/big_endian.cc",
      ],
    includes = [
        ".",
        "third_party/abseil/src",
    ],
    hdrs = [
        "discovery/common/config.h",
        "discovery/common/reporting_client.h",
        "discovery/dnssd/public/dns_sd_instance.h",
        "discovery/dnssd/public/dns_sd_instance_endpoint.h",
        "discovery/dnssd/public/dns_sd_publisher.h",
        "discovery/dnssd/public/dns_sd_querier.h",
        "discovery/dnssd/public/dns_sd_service.h",
        "discovery/dnssd/public/dns_sd_txt_record.h",
        "discovery/mdns/public/mdns_constants.h",
        "discovery/mdns/public/mdns_service.h",
        "discovery/public/dns_sd_service_factory.h",
        "discovery/public/dns_sd_service_watcher.h",
        "platform/api/logging.h",
        "platform/api/network_interface.h",
        "platform/api/serial_delete_ptr.h",
        "platform/api/task_runner.h",
        "platform/api/time.h",
        "platform/api/udp_socket.h",
        "platform/base/error.h",
        "platform/base/interface_info.h",
        "platform/base/ip_address.h",
        "platform/base/macros.h",
        "platform/base/trace_logging_types.h",
        "platform/base/trivial_clock_traits.h",
        "platform/base/udp_packet.h",
        "util/alarm.h",
        "util/big_endian.h",
        "util/chrono_helpers.h",
        "util/hashing.h",
        "util/osp_logging.h",
        "util/std_util.h",
        "util/stringprintf.h",
        "util/trace_logging.h",
    ],
    cxxopts = COPTS + [
        "-fno-exceptions",
        "-Wno-vla-cxx-extension",
    ],
)
