chromium/out/Default/gen/extensions/common/api/serial.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/serial.idl
// by tools/json_schema_compiler.
// DO NOT EDIT.

#include "extensions/common/api/serial.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 serial {
//
// Types
//

DeviceInfo::DeviceInfo()
 {}

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

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

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

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

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

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


const char* ToString(DataBits enum_param) {}

DataBits ParseDataBits(std::string_view enum_string) {}

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


const char* ToString(ParityBit enum_param) {}

ParityBit ParseParityBit(std::string_view enum_string) {}

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


const char* ToString(StopBits enum_param) {}

StopBits ParseStopBits(std::string_view enum_string) {}

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


ConnectionOptions::ConnectionOptions()
:{}

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

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

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

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

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

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


ConnectionInfo::ConnectionInfo()
:{}

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

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

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

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

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

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


const char* ToString(SendError enum_param) {}

SendError ParseSendError(std::string_view enum_string) {}

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


SendInfo::SendInfo()
:{}

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

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

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

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

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

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


HostControlSignals::HostControlSignals()
 {}

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

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

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

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

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

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


DeviceControlSignals::DeviceControlSignals()
:{}

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

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

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

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

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

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


ReceiveInfo::ReceiveInfo()
:{}

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

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

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

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

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

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


const char* ToString(ReceiveError enum_param) {}

ReceiveError ParseReceiveError(std::string_view enum_string) {}

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


ReceiveErrorInfo::ReceiveErrorInfo()
:{}

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

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

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

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

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

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



//
// Functions
//

namespace GetDevices {

base::Value::List Results::Create(const std::vector<DeviceInfo>& ports) {}
}  // namespace GetDevices

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(const ConnectionInfo& connection_info) {}
}  // namespace Connect

namespace Update {

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 Update

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) {}


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

namespace SetPaused {

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() {}
}  // namespace SetPaused

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 ConnectionInfo& connection_info) {}
}  // namespace GetInfo

namespace GetConnections {

base::Value::List Results::Create(const std::vector<ConnectionInfo>& connection_infos) {}
}  // namespace GetConnections

namespace Send {

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 SendInfo& send_info) {}
}  // namespace Send

namespace Flush {

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 Flush

namespace GetControlSignals {

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 DeviceControlSignals& signals) {}
}  // namespace GetControlSignals

namespace SetControlSignals {

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 SetControlSignals

namespace SetBreak {

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 SetBreak

namespace ClearBreak {

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 ClearBreak

//
// Events
//

namespace OnReceive {

const char kEventName[] =;

base::Value::List Create(const ReceiveInfo& info) {}

}  // namespace OnReceive

namespace OnReceiveError {

const char kEventName[] =;

base::Value::List Create(const ReceiveErrorInfo& info) {}

}  // namespace OnReceiveError

}  // namespace serial
}  // namespace api
}  // namespace extensions