chromium/out/Default/gen/extensions/common/api/socket.cc

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

// GENERATED FROM THE API DEFINITION IN
//   extensions/common/api/socket.idl
// by tools/json_schema_compiler.
// DO NOT EDIT.

#include "extensions/common/api/socket.h"

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

#include "base/check.h"
#include "base/check_op.h"
#include "base/notreached.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "tools/json_schema_compiler/util.h"
#include <string_view>


UTF8ToUTF16;

namespace extensions {
namespace api {
namespace socket {
//
// Types
//

const char* ToString(SocketType enum_param) {}

SocketType ParseSocketType(std::string_view enum_string) {}

std::u16string GetSocketTypeParseError(std::string_view enum_string) {}


CreateOptions::CreateOptions()
 {}

CreateOptions::~CreateOptions() = default;
CreateOptions::CreateOptions(CreateOptions&& rhs) noexcept = default;
CreateOptions& CreateOptions::operator=(CreateOptions&& rhs) noexcept = default;
CreateOptions CreateOptions::Clone() const {}

// static
bool CreateOptions::Populate(
    const base::Value::Dict& dict, CreateOptions& out) {}

// static
bool CreateOptions::Populate(
    const base::Value& value, CreateOptions& out) {}

// static
std::optional<CreateOptions> CreateOptions::FromValue(const base::Value::Dict& value) {}

// static
std::optional<CreateOptions> CreateOptions::FromValue(const base::Value& value) {}

base::Value::Dict CreateOptions::ToValue() const {}


CreateInfo::CreateInfo()
:{}

CreateInfo::~CreateInfo() = default;
CreateInfo::CreateInfo(CreateInfo&& rhs) noexcept = default;
CreateInfo& CreateInfo::operator=(CreateInfo&& rhs) noexcept = default;
CreateInfo CreateInfo::Clone() const {}

// static
bool CreateInfo::Populate(
    const base::Value::Dict& dict, CreateInfo& out) {}

// static
bool CreateInfo::Populate(
    const base::Value& value, CreateInfo& out) {}

// static
std::optional<CreateInfo> CreateInfo::FromValue(const base::Value::Dict& value) {}

// static
std::optional<CreateInfo> CreateInfo::FromValue(const base::Value& value) {}

base::Value::Dict CreateInfo::ToValue() const {}


AcceptInfo::AcceptInfo()
:{}

AcceptInfo::~AcceptInfo() = default;
AcceptInfo::AcceptInfo(AcceptInfo&& rhs) noexcept = default;
AcceptInfo& AcceptInfo::operator=(AcceptInfo&& rhs) noexcept = default;
AcceptInfo AcceptInfo::Clone() const {}

// static
bool AcceptInfo::Populate(
    const base::Value::Dict& dict, AcceptInfo& out) {}

// static
bool AcceptInfo::Populate(
    const base::Value& value, AcceptInfo& out) {}

// static
std::optional<AcceptInfo> AcceptInfo::FromValue(const base::Value::Dict& value) {}

// static
std::optional<AcceptInfo> AcceptInfo::FromValue(const base::Value& value) {}

base::Value::Dict AcceptInfo::ToValue() const {}


ReadInfo::ReadInfo()
:{}

ReadInfo::~ReadInfo() = default;
ReadInfo::ReadInfo(ReadInfo&& rhs) noexcept = default;
ReadInfo& ReadInfo::operator=(ReadInfo&& rhs) noexcept = default;
ReadInfo ReadInfo::Clone() const {}

// static
bool ReadInfo::Populate(
    const base::Value::Dict& dict, ReadInfo& out) {}

// static
bool ReadInfo::Populate(
    const base::Value& value, ReadInfo& out) {}

// static
std::optional<ReadInfo> ReadInfo::FromValue(const base::Value::Dict& value) {}

// static
std::optional<ReadInfo> ReadInfo::FromValue(const base::Value& value) {}

base::Value::Dict ReadInfo::ToValue() const {}


WriteInfo::WriteInfo()
:{}

WriteInfo::~WriteInfo() = default;
WriteInfo::WriteInfo(WriteInfo&& rhs) noexcept = default;
WriteInfo& WriteInfo::operator=(WriteInfo&& rhs) noexcept = default;
WriteInfo WriteInfo::Clone() const {}

// static
bool WriteInfo::Populate(
    const base::Value::Dict& dict, WriteInfo& out) {}

// static
bool WriteInfo::Populate(
    const base::Value& value, WriteInfo& out) {}

// static
std::optional<WriteInfo> WriteInfo::FromValue(const base::Value::Dict& value) {}

// static
std::optional<WriteInfo> WriteInfo::FromValue(const base::Value& value) {}

base::Value::Dict WriteInfo::ToValue() const {}


RecvFromInfo::RecvFromInfo()
:{}

RecvFromInfo::~RecvFromInfo() = default;
RecvFromInfo::RecvFromInfo(RecvFromInfo&& rhs) noexcept = default;
RecvFromInfo& RecvFromInfo::operator=(RecvFromInfo&& rhs) noexcept = default;
RecvFromInfo RecvFromInfo::Clone() const {}

// static
bool RecvFromInfo::Populate(
    const base::Value::Dict& dict, RecvFromInfo& out) {}

// static
bool RecvFromInfo::Populate(
    const base::Value& value, RecvFromInfo& out) {}

// static
std::optional<RecvFromInfo> RecvFromInfo::FromValue(const base::Value::Dict& value) {}

// static
std::optional<RecvFromInfo> RecvFromInfo::FromValue(const base::Value& value) {}

base::Value::Dict RecvFromInfo::ToValue() const {}


SocketInfo::SocketInfo()
:{}

SocketInfo::~SocketInfo() = default;
SocketInfo::SocketInfo(SocketInfo&& rhs) noexcept = default;
SocketInfo& SocketInfo::operator=(SocketInfo&& rhs) noexcept = default;
SocketInfo SocketInfo::Clone() const {}

// static
bool SocketInfo::Populate(
    const base::Value::Dict& dict, SocketInfo& out) {}

// static
bool SocketInfo::Populate(
    const base::Value& value, SocketInfo& out) {}

// static
std::optional<SocketInfo> SocketInfo::FromValue(const base::Value::Dict& value) {}

// static
std::optional<SocketInfo> SocketInfo::FromValue(const base::Value& value) {}

base::Value::Dict SocketInfo::ToValue() const {}


NetworkInterface::NetworkInterface()
:{}

NetworkInterface::~NetworkInterface() = default;
NetworkInterface::NetworkInterface(NetworkInterface&& rhs) noexcept = default;
NetworkInterface& NetworkInterface::operator=(NetworkInterface&& rhs) noexcept = default;
NetworkInterface NetworkInterface::Clone() const {}

// static
bool NetworkInterface::Populate(
    const base::Value::Dict& dict, NetworkInterface& out) {}

// static
bool NetworkInterface::Populate(
    const base::Value& value, NetworkInterface& out) {}

// static
std::optional<NetworkInterface> NetworkInterface::FromValue(const base::Value::Dict& value) {}

// static
std::optional<NetworkInterface> NetworkInterface::FromValue(const base::Value& value) {}

base::Value::Dict NetworkInterface::ToValue() const {}


TLSVersionConstraints::TLSVersionConstraints()
 {}

TLSVersionConstraints::~TLSVersionConstraints() = default;
TLSVersionConstraints::TLSVersionConstraints(TLSVersionConstraints&& rhs) noexcept = default;
TLSVersionConstraints& TLSVersionConstraints::operator=(TLSVersionConstraints&& rhs) noexcept = default;
TLSVersionConstraints TLSVersionConstraints::Clone() const {}

// static
bool TLSVersionConstraints::Populate(
    const base::Value::Dict& dict, TLSVersionConstraints& out) {}

// static
bool TLSVersionConstraints::Populate(
    const base::Value& value, TLSVersionConstraints& out) {}

// static
std::optional<TLSVersionConstraints> TLSVersionConstraints::FromValue(const base::Value::Dict& value) {}

// static
std::optional<TLSVersionConstraints> TLSVersionConstraints::FromValue(const base::Value& value) {}

base::Value::Dict TLSVersionConstraints::ToValue() const {}


SecureOptions::SecureOptions()
 {}

SecureOptions::~SecureOptions() = default;
SecureOptions::SecureOptions(SecureOptions&& rhs) noexcept = default;
SecureOptions& SecureOptions::operator=(SecureOptions&& rhs) noexcept = default;
SecureOptions SecureOptions::Clone() const {}

// static
bool SecureOptions::Populate(
    const base::Value::Dict& dict, SecureOptions& out) {}

// static
bool SecureOptions::Populate(
    const base::Value& value, SecureOptions& out) {}

// static
std::optional<SecureOptions> SecureOptions::FromValue(const base::Value::Dict& value) {}

// static
std::optional<SecureOptions> SecureOptions::FromValue(const base::Value& value) {}

base::Value::Dict SecureOptions::ToValue() const {}



//
// Functions
//

namespace Create {

Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;

// static
std::optional<Params> Params::Create(const base::Value::List& args) {}


base::Value::List Results::Create(const CreateInfo& create_info) {}
}  // namespace Create

namespace Destroy {

Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;

// static
std::optional<Params> Params::Create(const base::Value::List& args) {}


}  // namespace Destroy

namespace Connect {

Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;

// static
std::optional<Params> Params::Create(const base::Value::List& args) {}


base::Value::List Results::Create(int result) {}
}  // namespace Connect

namespace Bind {

Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;

// static
std::optional<Params> Params::Create(const base::Value::List& args) {}


base::Value::List Results::Create(int result) {}
}  // namespace Bind

namespace Disconnect {

Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;

// static
std::optional<Params> Params::Create(const base::Value::List& args) {}


}  // namespace Disconnect

namespace Read {

Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;

// static
std::optional<Params> Params::Create(const base::Value::List& args) {}


base::Value::List Results::Create(const ReadInfo& read_info) {}
}  // namespace Read

namespace Write {

Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;

// static
std::optional<Params> Params::Create(const base::Value::List& args) {}


base::Value::List Results::Create(const WriteInfo& write_info) {}
}  // namespace Write

namespace RecvFrom {

Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;

// static
std::optional<Params> Params::Create(const base::Value::List& args) {}


base::Value::List Results::Create(const RecvFromInfo& recv_from_info) {}
}  // namespace RecvFrom

namespace SendTo {

Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;

// static
std::optional<Params> Params::Create(const base::Value::List& args) {}


base::Value::List Results::Create(const WriteInfo& write_info) {}
}  // namespace SendTo

namespace Listen {

Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;

// static
std::optional<Params> Params::Create(const base::Value::List& args) {}


base::Value::List Results::Create(int result) {}
}  // namespace Listen

namespace Accept {

Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;

// static
std::optional<Params> Params::Create(const base::Value::List& args) {}


base::Value::List Results::Create(const AcceptInfo& accept_info) {}
}  // namespace Accept

namespace SetKeepAlive {

Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;

// static
std::optional<Params> Params::Create(const base::Value::List& args) {}


base::Value::List Results::Create(bool result) {}
}  // namespace SetKeepAlive

namespace SetNoDelay {

Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;

// static
std::optional<Params> Params::Create(const base::Value::List& args) {}


base::Value::List Results::Create(bool result) {}
}  // namespace SetNoDelay

namespace GetInfo {

Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;

// static
std::optional<Params> Params::Create(const base::Value::List& args) {}


base::Value::List Results::Create(const SocketInfo& result) {}
}  // namespace GetInfo

namespace GetNetworkList {

base::Value::List Results::Create(const std::vector<NetworkInterface>& result) {}
}  // namespace GetNetworkList

namespace JoinGroup {

Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;

// static
std::optional<Params> Params::Create(const base::Value::List& args) {}


base::Value::List Results::Create(int result) {}
}  // namespace JoinGroup

namespace LeaveGroup {

Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;

// static
std::optional<Params> Params::Create(const base::Value::List& args) {}


base::Value::List Results::Create(int result) {}
}  // namespace LeaveGroup

namespace SetMulticastTimeToLive {

Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;

// static
std::optional<Params> Params::Create(const base::Value::List& args) {}


base::Value::List Results::Create(int result) {}
}  // namespace SetMulticastTimeToLive

namespace SetMulticastLoopbackMode {

Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;

// static
std::optional<Params> Params::Create(const base::Value::List& args) {}


base::Value::List Results::Create(int result) {}
}  // namespace SetMulticastLoopbackMode

namespace GetJoinedGroups {

Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;

// static
std::optional<Params> Params::Create(const base::Value::List& args) {}


base::Value::List Results::Create(const std::vector<std::string>& groups) {}
}  // namespace GetJoinedGroups

namespace Secure {

Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;

// static
std::optional<Params> Params::Create(const base::Value::List& args) {}


base::Value::List Results::Create(int result) {}
}  // namespace Secure

}  // namespace socket
}  // namespace api
}  // namespace extensions