#ifndef NET_BASE_CONNECTION_ENDPOINT_METADATA_H_
#define NET_BASE_CONNECTION_ENDPOINT_METADATA_H_
#include <stdint.h>
#include <string>
#include <tuple>
#include <vector>
#include "base/values.h"
#include "net/base/net_export.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
namespace net {
struct NET_EXPORT_PRIVATE ConnectionEndpointMetadata {
using EchConfigList = std::vector<uint8_t>;
ConnectionEndpointMetadata();
ConnectionEndpointMetadata(std::vector<std::string> supported_protocol_alpns,
EchConfigList ech_config_list,
std::string target_name);
~ConnectionEndpointMetadata();
ConnectionEndpointMetadata(const ConnectionEndpointMetadata&);
ConnectionEndpointMetadata& operator=(const ConnectionEndpointMetadata&) =
default;
ConnectionEndpointMetadata(ConnectionEndpointMetadata&&);
ConnectionEndpointMetadata& operator=(ConnectionEndpointMetadata&&) = default;
bool operator==(const ConnectionEndpointMetadata& other) const {
return std::tie(supported_protocol_alpns, ech_config_list, target_name) ==
std::tie(other.supported_protocol_alpns, other.ech_config_list,
target_name);
}
base::Value ToValue() const;
static absl::optional<ConnectionEndpointMetadata> FromValue(
const base::Value& value);
std::vector<std::string> supported_protocol_alpns;
EchConfigList ech_config_list;
std::string target_name;
};
}
#endif