#ifndef THIRD_PARTY_BLINK_PUBLIC_MOJOM_BLUETOOTH_WEB_BLUETOOTH_MOJOM_BLINK_H_
#define THIRD_PARTY_BLINK_PUBLIC_MOJOM_BLUETOOTH_WEB_BLUETOOTH_MOJOM_BLINK_H_
#include <stdint.h>
#include <limits>
#include <optional>
#include <type_traits>
#include <utility>
#include "base/types/cxx23_to_underlying.h"
#include "mojo/public/cpp/bindings/clone_traits.h"
#include "mojo/public/cpp/bindings/equals_traits.h"
#include "mojo/public/cpp/bindings/lib/serialization.h"
#include "mojo/public/cpp/bindings/struct_ptr.h"
#include "mojo/public/cpp/bindings/struct_traits.h"
#include "mojo/public/cpp/bindings/union_traits.h"
#include "third_party/perfetto/include/perfetto/tracing/traced_value_forward.h"
#include "third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom-features.h"
#include "third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom-shared.h"
#include "third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom-blink-forward.h"
#include "device/bluetooth/public/mojom/uuid.mojom-blink.h"
#include "mojo/public/cpp/bindings/lib/wtf_clone_equals_util.h"
#include "mojo/public/cpp/bindings/lib/wtf_hash_util.h"
#include "third_party/blink/renderer/platform/wtf/hash_functions.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
#include "mojo/public/cpp/bindings/lib/control_message_handler.h"
#include "mojo/public/cpp/bindings/lib/message_size_estimator.h"
#include "mojo/public/cpp/bindings/raw_ptr_impl_ref_traits.h"
#include "third_party/blink/public/common/bluetooth/web_bluetooth_device_id_mojom_traits.h"
#include "third_party/blink/public/platform/web_common.h"
namespace blink::mojom::blink {
class WebBluetoothServiceProxy;
template <typename ImplRefTraits>
class WebBluetoothServiceStub;
class WebBluetoothServiceRequestValidator;
class WebBluetoothServiceResponseValidator;
class BLINK_PLATFORM_EXPORT WebBluetoothService
: public WebBluetoothServiceInterfaceBase { … };
class WebBluetoothServerClientProxy;
template <typename ImplRefTraits>
class WebBluetoothServerClientStub;
class WebBluetoothServerClientRequestValidator;
class BLINK_PLATFORM_EXPORT WebBluetoothServerClient
: public WebBluetoothServerClientInterfaceBase { … };
class WebBluetoothCharacteristicClientProxy;
template <typename ImplRefTraits>
class WebBluetoothCharacteristicClientStub;
class WebBluetoothCharacteristicClientRequestValidator;
class BLINK_PLATFORM_EXPORT WebBluetoothCharacteristicClient
: public WebBluetoothCharacteristicClientInterfaceBase { … };
class WebBluetoothAdvertisementClientProxy;
template <typename ImplRefTraits>
class WebBluetoothAdvertisementClientStub;
class WebBluetoothAdvertisementClientRequestValidator;
class BLINK_PLATFORM_EXPORT WebBluetoothAdvertisementClient
: public WebBluetoothAdvertisementClientInterfaceBase { … };
class BLINK_PLATFORM_EXPORT WebBluetoothServiceProxy
: public WebBluetoothService { … };
class BLINK_PLATFORM_EXPORT WebBluetoothServerClientProxy
: public WebBluetoothServerClient { … };
class BLINK_PLATFORM_EXPORT WebBluetoothCharacteristicClientProxy
: public WebBluetoothCharacteristicClient { … };
class BLINK_PLATFORM_EXPORT WebBluetoothAdvertisementClientProxy
: public WebBluetoothAdvertisementClient { … };
class BLINK_PLATFORM_EXPORT WebBluetoothServiceStubDispatch { … };
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<WebBluetoothService>>
class WebBluetoothServiceStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
WebBluetoothServiceStub() = default;
~WebBluetoothServiceStub() override = default;
void set_sink(ImplPointerType sink) { … }
ImplPointerType& sink() { … }
bool Accept(mojo::Message* message) override { … }
bool AcceptWithResponder(
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override { … }
private:
ImplPointerType sink_;
};
class BLINK_PLATFORM_EXPORT WebBluetoothServerClientStubDispatch { … };
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<WebBluetoothServerClient>>
class WebBluetoothServerClientStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
WebBluetoothServerClientStub() = default;
~WebBluetoothServerClientStub() override = default;
void set_sink(ImplPointerType sink) { … }
ImplPointerType& sink() { … }
bool Accept(mojo::Message* message) override { … }
bool AcceptWithResponder(
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override { … }
private:
ImplPointerType sink_;
};
class BLINK_PLATFORM_EXPORT WebBluetoothCharacteristicClientStubDispatch { … };
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<WebBluetoothCharacteristicClient>>
class WebBluetoothCharacteristicClientStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
WebBluetoothCharacteristicClientStub() = default;
~WebBluetoothCharacteristicClientStub() override = default;
void set_sink(ImplPointerType sink) { … }
ImplPointerType& sink() { … }
bool Accept(mojo::Message* message) override { … }
bool AcceptWithResponder(
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override { … }
private:
ImplPointerType sink_;
};
class BLINK_PLATFORM_EXPORT WebBluetoothAdvertisementClientStubDispatch { … };
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<WebBluetoothAdvertisementClient>>
class WebBluetoothAdvertisementClientStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
WebBluetoothAdvertisementClientStub() = default;
~WebBluetoothAdvertisementClientStub() override = default;
void set_sink(ImplPointerType sink) { … }
ImplPointerType& sink() { … }
bool Accept(mojo::Message* message) override { … }
bool AcceptWithResponder(
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override { … }
private:
ImplPointerType sink_;
};
class BLINK_PLATFORM_EXPORT WebBluetoothServiceRequestValidator : public mojo::MessageReceiver { … };
class BLINK_PLATFORM_EXPORT WebBluetoothServerClientRequestValidator : public mojo::MessageReceiver { … };
class BLINK_PLATFORM_EXPORT WebBluetoothCharacteristicClientRequestValidator : public mojo::MessageReceiver { … };
class BLINK_PLATFORM_EXPORT WebBluetoothAdvertisementClientRequestValidator : public mojo::MessageReceiver { … };
class BLINK_PLATFORM_EXPORT WebBluetoothServiceResponseValidator : public mojo::MessageReceiver { … };
class BLINK_PLATFORM_EXPORT WebBluetoothCompany { … };
template <typename T, WebBluetoothCompany::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, WebBluetoothCompany::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) { … }
template <typename T, WebBluetoothCompany::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) { … }
template <typename T, WebBluetoothCompany::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) { … }
class BLINK_PLATFORM_EXPORT WebBluetoothDataFilter { … };
template <typename T, WebBluetoothDataFilter::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, WebBluetoothDataFilter::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) { … }
template <typename T, WebBluetoothDataFilter::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) { … }
template <typename T, WebBluetoothDataFilter::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) { … }
class BLINK_PLATFORM_EXPORT WebBluetoothLeScanFilter { … };
template <typename T, WebBluetoothLeScanFilter::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, WebBluetoothLeScanFilter::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) { … }
template <typename T, WebBluetoothLeScanFilter::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) { … }
template <typename T, WebBluetoothLeScanFilter::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) { … }
class BLINK_PLATFORM_EXPORT WebBluetoothRequestDeviceOptions { … };
template <typename T, WebBluetoothRequestDeviceOptions::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, WebBluetoothRequestDeviceOptions::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) { … }
template <typename T, WebBluetoothRequestDeviceOptions::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) { … }
template <typename T, WebBluetoothRequestDeviceOptions::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) { … }
class BLINK_PLATFORM_EXPORT WebBluetoothRequestLEScanOptions { … };
template <typename T, WebBluetoothRequestLEScanOptions::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, WebBluetoothRequestLEScanOptions::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) { … }
template <typename T, WebBluetoothRequestLEScanOptions::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) { … }
template <typename T, WebBluetoothRequestLEScanOptions::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) { … }
class BLINK_PLATFORM_EXPORT WebBluetoothDeviceId { … };
template <typename T, WebBluetoothDeviceId::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, WebBluetoothDeviceId::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) { … }
template <typename T, WebBluetoothDeviceId::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) { … }
template <typename T, WebBluetoothDeviceId::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) { … }
class BLINK_PLATFORM_EXPORT WebBluetoothDevice { … };
template <typename T, WebBluetoothDevice::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, WebBluetoothDevice::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) { … }
template <typename T, WebBluetoothDevice::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) { … }
template <typename T, WebBluetoothDevice::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) { … }
class BLINK_PLATFORM_EXPORT WebBluetoothRemoteGATTService { … };
template <typename T, WebBluetoothRemoteGATTService::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, WebBluetoothRemoteGATTService::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) { … }
template <typename T, WebBluetoothRemoteGATTService::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) { … }
template <typename T, WebBluetoothRemoteGATTService::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) { … }
class BLINK_PLATFORM_EXPORT WebBluetoothRemoteGATTCharacteristic { … };
template <typename T, WebBluetoothRemoteGATTCharacteristic::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, WebBluetoothRemoteGATTCharacteristic::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) { … }
template <typename T, WebBluetoothRemoteGATTCharacteristic::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) { … }
template <typename T, WebBluetoothRemoteGATTCharacteristic::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) { … }
class BLINK_PLATFORM_EXPORT WebBluetoothAdvertisingEvent { … };
template <typename T, WebBluetoothAdvertisingEvent::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, WebBluetoothAdvertisingEvent::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) { … }
template <typename T, WebBluetoothAdvertisingEvent::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) { … }
template <typename T, WebBluetoothAdvertisingEvent::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) { … }
class BLINK_PLATFORM_EXPORT WebBluetoothRemoteGATTDescriptor { … };
template <typename T, WebBluetoothRemoteGATTDescriptor::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, WebBluetoothRemoteGATTDescriptor::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) { … }
template <typename T, WebBluetoothRemoteGATTDescriptor::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) { … }
template <typename T, WebBluetoothRemoteGATTDescriptor::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) { … }
template <typename StructPtrType>
WebBluetoothLeScanFilterPtr WebBluetoothLeScanFilter::Clone() const { … }
template <typename T, WebBluetoothLeScanFilter::EnableIfSame<T>*>
bool WebBluetoothLeScanFilter::Equals(const T& other_struct) const { … }
template <typename T, WebBluetoothLeScanFilter::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) { … }
template <typename StructPtrType>
WebBluetoothCompanyPtr WebBluetoothCompany::Clone() const { … }
template <typename T, WebBluetoothCompany::EnableIfSame<T>*>
bool WebBluetoothCompany::Equals(const T& other_struct) const { … }
template <typename T, WebBluetoothCompany::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) { … }
template <typename StructPtrType>
WebBluetoothDataFilterPtr WebBluetoothDataFilter::Clone() const { … }
template <typename T, WebBluetoothDataFilter::EnableIfSame<T>*>
bool WebBluetoothDataFilter::Equals(const T& other_struct) const { … }
template <typename T, WebBluetoothDataFilter::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) { … }
template <typename StructPtrType>
WebBluetoothRequestDeviceOptionsPtr WebBluetoothRequestDeviceOptions::Clone() const { … }
template <typename T, WebBluetoothRequestDeviceOptions::EnableIfSame<T>*>
bool WebBluetoothRequestDeviceOptions::Equals(const T& other_struct) const { … }
template <typename T, WebBluetoothRequestDeviceOptions::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) { … }
template <typename StructPtrType>
WebBluetoothRequestLEScanOptionsPtr WebBluetoothRequestLEScanOptions::Clone() const { … }
template <typename T, WebBluetoothRequestLEScanOptions::EnableIfSame<T>*>
bool WebBluetoothRequestLEScanOptions::Equals(const T& other_struct) const { … }
template <typename T, WebBluetoothRequestLEScanOptions::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) { … }
template <typename StructPtrType>
WebBluetoothDeviceIdPtr WebBluetoothDeviceId::Clone() const { … }
template <typename T, WebBluetoothDeviceId::EnableIfSame<T>*>
bool WebBluetoothDeviceId::Equals(const T& other_struct) const { … }
template <typename T, WebBluetoothDeviceId::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) { … }
template <typename StructPtrType>
WebBluetoothDevicePtr WebBluetoothDevice::Clone() const { … }
template <typename T, WebBluetoothDevice::EnableIfSame<T>*>
bool WebBluetoothDevice::Equals(const T& other_struct) const { … }
template <typename T, WebBluetoothDevice::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) { … }
template <typename StructPtrType>
WebBluetoothRemoteGATTServicePtr WebBluetoothRemoteGATTService::Clone() const { … }
template <typename T, WebBluetoothRemoteGATTService::EnableIfSame<T>*>
bool WebBluetoothRemoteGATTService::Equals(const T& other_struct) const { … }
template <typename T, WebBluetoothRemoteGATTService::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) { … }
template <typename StructPtrType>
WebBluetoothRemoteGATTCharacteristicPtr WebBluetoothRemoteGATTCharacteristic::Clone() const { … }
template <typename T, WebBluetoothRemoteGATTCharacteristic::EnableIfSame<T>*>
bool WebBluetoothRemoteGATTCharacteristic::Equals(const T& other_struct) const { … }
template <typename T, WebBluetoothRemoteGATTCharacteristic::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) { … }
template <typename StructPtrType>
WebBluetoothAdvertisingEventPtr WebBluetoothAdvertisingEvent::Clone() const { … }
template <typename T, WebBluetoothAdvertisingEvent::EnableIfSame<T>*>
bool WebBluetoothAdvertisingEvent::Equals(const T& other_struct) const { … }
template <typename T, WebBluetoothAdvertisingEvent::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) { … }
template <typename StructPtrType>
WebBluetoothRemoteGATTDescriptorPtr WebBluetoothRemoteGATTDescriptor::Clone() const { … }
template <typename T, WebBluetoothRemoteGATTDescriptor::EnableIfSame<T>*>
bool WebBluetoothRemoteGATTDescriptor::Equals(const T& other_struct) const { … }
template <typename T, WebBluetoothRemoteGATTDescriptor::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) { … }
}
namespace mojo {
template <>
struct BLINK_PLATFORM_EXPORT StructTraits<::blink::mojom::blink::WebBluetoothLeScanFilter::DataView,
::blink::mojom::blink::WebBluetoothLeScanFilterPtr> { … };
template <>
struct BLINK_PLATFORM_EXPORT StructTraits<::blink::mojom::blink::WebBluetoothCompany::DataView,
::blink::mojom::blink::WebBluetoothCompanyPtr> { … };
template <>
struct BLINK_PLATFORM_EXPORT StructTraits<::blink::mojom::blink::WebBluetoothDataFilter::DataView,
::blink::mojom::blink::WebBluetoothDataFilterPtr> { … };
template <>
struct BLINK_PLATFORM_EXPORT StructTraits<::blink::mojom::blink::WebBluetoothRequestDeviceOptions::DataView,
::blink::mojom::blink::WebBluetoothRequestDeviceOptionsPtr> { … };
template <>
struct BLINK_PLATFORM_EXPORT StructTraits<::blink::mojom::blink::WebBluetoothRequestLEScanOptions::DataView,
::blink::mojom::blink::WebBluetoothRequestLEScanOptionsPtr> { … };
template <>
struct BLINK_PLATFORM_EXPORT StructTraits<::blink::mojom::blink::WebBluetoothDeviceId::DataView,
::blink::mojom::blink::WebBluetoothDeviceIdPtr> { … };
template <>
struct BLINK_PLATFORM_EXPORT StructTraits<::blink::mojom::blink::WebBluetoothDevice::DataView,
::blink::mojom::blink::WebBluetoothDevicePtr> { … };
template <>
struct BLINK_PLATFORM_EXPORT StructTraits<::blink::mojom::blink::WebBluetoothRemoteGATTService::DataView,
::blink::mojom::blink::WebBluetoothRemoteGATTServicePtr> { … };
template <>
struct BLINK_PLATFORM_EXPORT StructTraits<::blink::mojom::blink::WebBluetoothRemoteGATTCharacteristic::DataView,
::blink::mojom::blink::WebBluetoothRemoteGATTCharacteristicPtr> { … };
template <>
struct BLINK_PLATFORM_EXPORT StructTraits<::blink::mojom::blink::WebBluetoothAdvertisingEvent::DataView,
::blink::mojom::blink::WebBluetoothAdvertisingEventPtr> { … };
template <>
struct BLINK_PLATFORM_EXPORT StructTraits<::blink::mojom::blink::WebBluetoothRemoteGATTDescriptor::DataView,
::blink::mojom::blink::WebBluetoothRemoteGATTDescriptorPtr> { … };
}
#endif