chromium/services/network/public/cpp/host_resolver_mojom_traits.h

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

#ifndef SERVICES_NETWORK_PUBLIC_CPP_HOST_RESOLVER_MOJOM_TRAITS_H_
#define SERVICES_NETWORK_PUBLIC_CPP_HOST_RESOLVER_MOJOM_TRAITS_H_

#include <optional>
#include <string>
#include <string_view>
#include <utility>
#include <vector>

#include "base/component_export.h"
#include "base/time/time.h"
#include "mojo/public/cpp/bindings/array_traits.h"
#include "mojo/public/cpp/bindings/enum_traits.h"
#include "mojo/public/cpp/bindings/struct_ptr.h"
#include "mojo/public/cpp/bindings/struct_traits.h"
#include "net/base/address_family.h"
#include "net/base/ip_address.h"
#include "net/base/ip_endpoint.h"
#include "net/dns/public/dns_config_overrides.h"
#include "net/dns/public/dns_over_https_config.h"
#include "net/dns/public/dns_over_https_server_config.h"
#include "net/dns/public/dns_query_type.h"
#include "net/dns/public/host_resolver_source.h"
#include "net/dns/public/mdns_listener_update_type.h"
#include "net/dns/public/secure_dns_mode.h"
#include "net/dns/public/secure_dns_policy.h"
#include "services/network/public/mojom/host_resolver.mojom-shared.h"

namespace mojo {

template <>
class COMPONENT_EXPORT(NETWORK_CPP_HOST_RESOLVER)
    StructTraits<network::mojom::DnsOverHttpsServerConfigDataView,
                 net::DnsOverHttpsServerConfig> {};

template <>
class COMPONENT_EXPORT(NETWORK_CPP_HOST_RESOLVER)
    StructTraits<network::mojom::DnsOverHttpsConfigDataView,
                 net::DnsOverHttpsConfig> {};

template <>
struct COMPONENT_EXPORT(NETWORK_CPP_HOST_RESOLVER)
    StructTraits<network::mojom::DnsConfigOverridesDataView,
                 net::DnsConfigOverrides> {};

template <>
struct COMPONENT_EXPORT(NETWORK_CPP_HOST_RESOLVER)
    EnumTraits<network::mojom::DnsQueryType, net::DnsQueryType> {};

template <>
struct COMPONENT_EXPORT(NETWORK_CPP_HOST_RESOLVER)
    EnumTraits<network::mojom::ResolveHostParameters_Source,
               net::HostResolverSource> {};

template <>
struct COMPONENT_EXPORT(NETWORK_CPP_HOST_RESOLVER)
    EnumTraits<network::mojom::MdnsListenClient_UpdateType,
               net::MdnsListenerUpdateType> {};

template <>
struct COMPONENT_EXPORT(NETWORK_CPP_HOST_RESOLVER)
    EnumTraits<network::mojom::SecureDnsMode, net::SecureDnsMode> {};

template <>
struct COMPONENT_EXPORT(NETWORK_CPP_HOST_RESOLVER)
    EnumTraits<network::mojom::SecureDnsPolicy, net::SecureDnsPolicy> {};

}  // namespace mojo

#endif  // SERVICES_NETWORK_PUBLIC_CPP_HOST_RESOLVER_MOJOM_TRAITS_H_