#include "extensions/common/api/bluetooth_private.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>
#include "extensions/common/api/bluetooth.h"
UTF8ToUTF16;
namespace extensions {
namespace api {
namespace bluetooth_private {
const char* ToString(PairingEventType enum_param) { … }
PairingEventType ParsePairingEventType(std::string_view enum_string) { … }
std::u16string GetPairingEventTypeParseError(std::string_view enum_string) { … }
const char* ToString(ConnectResultType enum_param) { … }
ConnectResultType ParseConnectResultType(std::string_view enum_string) { … }
std::u16string GetConnectResultTypeParseError(std::string_view enum_string) { … }
const char* ToString(PairingResponse enum_param) { … }
PairingResponse ParsePairingResponse(std::string_view enum_string) { … }
std::u16string GetPairingResponseParseError(std::string_view enum_string) { … }
const char* ToString(TransportType enum_param) { … }
TransportType ParseTransportType(std::string_view enum_string) { … }
std::u16string GetTransportTypeParseError(std::string_view enum_string) { … }
PairingEvent::PairingEvent()
: … { … }
PairingEvent::~PairingEvent() = default;
PairingEvent::PairingEvent(PairingEvent&& rhs) noexcept = default;
PairingEvent& PairingEvent::operator=(PairingEvent&& rhs) noexcept = default;
PairingEvent PairingEvent::Clone() const { … }
bool PairingEvent::Populate(
const base::Value::Dict& dict, PairingEvent& out) { … }
bool PairingEvent::Populate(
const base::Value& value, PairingEvent& out) { … }
std::optional<PairingEvent> PairingEvent::FromValue(const base::Value::Dict& value) { … }
std::optional<PairingEvent> PairingEvent::FromValue(const base::Value& value) { … }
base::Value::Dict PairingEvent::ToValue() const { … }
NewAdapterState::NewAdapterState()
{ … }
NewAdapterState::~NewAdapterState() = default;
NewAdapterState::NewAdapterState(NewAdapterState&& rhs) noexcept = default;
NewAdapterState& NewAdapterState::operator=(NewAdapterState&& rhs) noexcept = default;
NewAdapterState NewAdapterState::Clone() const { … }
bool NewAdapterState::Populate(
const base::Value::Dict& dict, NewAdapterState& out) { … }
bool NewAdapterState::Populate(
const base::Value& value, NewAdapterState& out) { … }
std::optional<NewAdapterState> NewAdapterState::FromValue(const base::Value::Dict& value) { … }
std::optional<NewAdapterState> NewAdapterState::FromValue(const base::Value& value) { … }
base::Value::Dict NewAdapterState::ToValue() const { … }
SetPairingResponseOptions::SetPairingResponseOptions()
: … { … }
SetPairingResponseOptions::~SetPairingResponseOptions() = default;
SetPairingResponseOptions::SetPairingResponseOptions(SetPairingResponseOptions&& rhs) noexcept = default;
SetPairingResponseOptions& SetPairingResponseOptions::operator=(SetPairingResponseOptions&& rhs) noexcept = default;
SetPairingResponseOptions SetPairingResponseOptions::Clone() const { … }
bool SetPairingResponseOptions::Populate(
const base::Value::Dict& dict, SetPairingResponseOptions& out) { … }
bool SetPairingResponseOptions::Populate(
const base::Value& value, SetPairingResponseOptions& out) { … }
std::optional<SetPairingResponseOptions> SetPairingResponseOptions::FromValue(const base::Value::Dict& value) { … }
std::optional<SetPairingResponseOptions> SetPairingResponseOptions::FromValue(const base::Value& value) { … }
base::Value::Dict SetPairingResponseOptions::ToValue() const { … }
DiscoveryFilter::Uuids::Uuids()
{ … }
DiscoveryFilter::Uuids::~Uuids() = default;
DiscoveryFilter::Uuids::Uuids(Uuids&& rhs) noexcept = default;
DiscoveryFilter::Uuids& DiscoveryFilter::Uuids::operator=(Uuids&& rhs) noexcept = default;
DiscoveryFilter::Uuids DiscoveryFilter::Uuids::Clone() const { … }
bool DiscoveryFilter::Uuids::Populate(
const base::Value& value, Uuids& out) { … }
std::optional<DiscoveryFilter::Uuids> DiscoveryFilter::Uuids::FromValue(const base::Value& value) { … }
base::Value DiscoveryFilter::Uuids::ToValue() const { … }
DiscoveryFilter::DiscoveryFilter()
: … { … }
DiscoveryFilter::~DiscoveryFilter() = default;
DiscoveryFilter::DiscoveryFilter(DiscoveryFilter&& rhs) noexcept = default;
DiscoveryFilter& DiscoveryFilter::operator=(DiscoveryFilter&& rhs) noexcept = default;
DiscoveryFilter DiscoveryFilter::Clone() const { … }
bool DiscoveryFilter::Populate(
const base::Value::Dict& dict, DiscoveryFilter& out) { … }
bool DiscoveryFilter::Populate(
const base::Value& value, DiscoveryFilter& out) { … }
std::optional<DiscoveryFilter> DiscoveryFilter::FromValue(const base::Value::Dict& value) { … }
std::optional<DiscoveryFilter> DiscoveryFilter::FromValue(const base::Value& value) { … }
base::Value::Dict DiscoveryFilter::ToValue() const { … }
namespace SetAdapterState {
Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;
std::optional<Params> Params::Create(const base::Value::List& args) { … }
base::Value::List Results::Create() { … }
}
namespace SetPairingResponse {
Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;
std::optional<Params> Params::Create(const base::Value::List& args) { … }
base::Value::List Results::Create() { … }
}
namespace DisconnectAll {
Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;
std::optional<Params> Params::Create(const base::Value::List& args) { … }
base::Value::List Results::Create() { … }
}
namespace ForgetDevice {
Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;
std::optional<Params> Params::Create(const base::Value::List& args) { … }
base::Value::List Results::Create() { … }
}
namespace SetDiscoveryFilter {
Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;
std::optional<Params> Params::Create(const base::Value::List& args) { … }
base::Value::List Results::Create() { … }
}
namespace Connect {
Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;
std::optional<Params> Params::Create(const base::Value::List& args) { … }
base::Value::List Results::Create(const ConnectResultType& result) { … }
}
namespace Pair {
Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;
std::optional<Params> Params::Create(const base::Value::List& args) { … }
base::Value::List Results::Create() { … }
}
namespace RecordPairing {
Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;
std::optional<Params> Params::Create(const base::Value::List& args) { … }
}
namespace RecordReconnection {
Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;
std::optional<Params> Params::Create(const base::Value::List& args) { … }
}
namespace RecordDeviceSelection {
Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;
std::optional<Params> Params::Create(const base::Value::List& args) { … }
}
namespace OnPairing {
const char kEventName[] = …;
base::Value::List Create(const PairingEvent& pairing_event) { … }
}
namespace OnDeviceAddressChanged {
const char kEventName[] = …;
base::Value::List Create(const extensions::api::bluetooth::Device& device, const std::string& old_address) { … }
}
}
}
}