#include "extensions/common/api/bluetooth.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 bluetooth {
const char* ToString(VendorIdSource enum_param) { … }
VendorIdSource ParseVendorIdSource(std::string_view enum_string) { … }
std::u16string GetVendorIdSourceParseError(std::string_view enum_string) { … }
const char* ToString(DeviceType enum_param) { … }
DeviceType ParseDeviceType(std::string_view enum_string) { … }
std::u16string GetDeviceTypeParseError(std::string_view enum_string) { … }
const char* ToString(FilterType enum_param) { … }
FilterType ParseFilterType(std::string_view enum_string) { … }
std::u16string GetFilterTypeParseError(std::string_view enum_string) { … }
const char* ToString(Transport enum_param) { … }
Transport ParseTransport(std::string_view enum_string) { … }
std::u16string GetTransportParseError(std::string_view enum_string) { … }
AdapterState::AdapterState()
: … { … }
AdapterState::~AdapterState() = default;
AdapterState::AdapterState(AdapterState&& rhs) noexcept = default;
AdapterState& AdapterState::operator=(AdapterState&& rhs) noexcept = default;
AdapterState AdapterState::Clone() const { … }
bool AdapterState::Populate(
const base::Value::Dict& dict, AdapterState& out) { … }
bool AdapterState::Populate(
const base::Value& value, AdapterState& out) { … }
std::optional<AdapterState> AdapterState::FromValue(const base::Value::Dict& value) { … }
std::optional<AdapterState> AdapterState::FromValue(const base::Value& value) { … }
base::Value::Dict AdapterState::ToValue() const { … }
Device::Device()
: … { … }
Device::~Device() = default;
Device::Device(Device&& rhs) noexcept = default;
Device& Device::operator=(Device&& rhs) noexcept = default;
Device Device::Clone() const { … }
bool Device::Populate(
const base::Value::Dict& dict, Device& out) { … }
bool Device::Populate(
const base::Value& value, Device& out) { … }
std::optional<Device> Device::FromValue(const base::Value::Dict& value) { … }
std::optional<Device> Device::FromValue(const base::Value& value) { … }
base::Value::Dict Device::ToValue() const { … }
BluetoothFilter::BluetoothFilter()
: … { … }
BluetoothFilter::~BluetoothFilter() = default;
BluetoothFilter::BluetoothFilter(BluetoothFilter&& rhs) noexcept = default;
BluetoothFilter& BluetoothFilter::operator=(BluetoothFilter&& rhs) noexcept = default;
BluetoothFilter BluetoothFilter::Clone() const { … }
bool BluetoothFilter::Populate(
const base::Value::Dict& dict, BluetoothFilter& out) { … }
bool BluetoothFilter::Populate(
const base::Value& value, BluetoothFilter& out) { … }
std::optional<BluetoothFilter> BluetoothFilter::FromValue(const base::Value::Dict& value) { … }
std::optional<BluetoothFilter> BluetoothFilter::FromValue(const base::Value& value) { … }
base::Value::Dict BluetoothFilter::ToValue() const { … }
namespace GetAdapterState {
base::Value::List Results::Create(const AdapterState& adapter_info) { … }
}
namespace GetDevice {
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 Device& device_info) { … }
}
namespace GetDevices {
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 std::vector<Device>& device_infos) { … }
}
namespace StartDiscovery {
base::Value::List Results::Create() { … }
}
namespace StopDiscovery {
base::Value::List Results::Create() { … }
}
namespace OnAdapterStateChanged {
const char kEventName[] = …;
base::Value::List Create(const AdapterState& state) { … }
}
namespace OnDeviceAdded {
const char kEventName[] = …;
base::Value::List Create(const Device& device) { … }
}
namespace OnDeviceChanged {
const char kEventName[] = …;
base::Value::List Create(const Device& device) { … }
}
namespace OnDeviceRemoved {
const char kEventName[] = …;
base::Value::List Create(const Device& device) { … }
}
}
}
}