#ifndef SERVICES_DEVICE_PUBLIC_MOJOM_SMART_CARD_MOJOM_BLINK_H_
#define SERVICES_DEVICE_PUBLIC_MOJOM_SMART_CARD_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 "services/device/public/mojom/smart_card.mojom-features.h"
#include "services/device/public/mojom/smart_card.mojom-shared.h"
#include "services/device/public/mojom/smart_card.mojom-blink-forward.h"
#include "mojo/public/mojom/base/time.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/platform/web_common.h"
namespace device::mojom::blink {
class SmartCardTransactionProxy;
template <typename ImplRefTraits>
class SmartCardTransactionStub;
class SmartCardTransactionRequestValidator;
class SmartCardTransactionResponseValidator;
class BLINK_PLATFORM_EXPORT SmartCardTransaction
: public SmartCardTransactionInterfaceBase { … };
class SmartCardConnectionProxy;
template <typename ImplRefTraits>
class SmartCardConnectionStub;
class SmartCardConnectionRequestValidator;
class SmartCardConnectionResponseValidator;
class BLINK_PLATFORM_EXPORT SmartCardConnection
: public SmartCardConnectionInterfaceBase { … };
class SmartCardContextProxy;
template <typename ImplRefTraits>
class SmartCardContextStub;
class SmartCardContextRequestValidator;
class SmartCardContextResponseValidator;
class BLINK_PLATFORM_EXPORT SmartCardContext
: public SmartCardContextInterfaceBase { … };
class SmartCardContextFactoryProxy;
template <typename ImplRefTraits>
class SmartCardContextFactoryStub;
class SmartCardContextFactoryRequestValidator;
class SmartCardContextFactoryResponseValidator;
class BLINK_PLATFORM_EXPORT SmartCardContextFactory
: public SmartCardContextFactoryInterfaceBase { … };
class BLINK_PLATFORM_EXPORT SmartCardTransactionProxy
: public SmartCardTransaction { … };
class BLINK_PLATFORM_EXPORT SmartCardConnectionProxy
: public SmartCardConnection { … };
class BLINK_PLATFORM_EXPORT SmartCardContextProxy
: public SmartCardContext { … };
class BLINK_PLATFORM_EXPORT SmartCardContextFactoryProxy
: public SmartCardContextFactory { … };
class BLINK_PLATFORM_EXPORT SmartCardTransactionStubDispatch { … };
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<SmartCardTransaction>>
class SmartCardTransactionStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
SmartCardTransactionStub() = default;
~SmartCardTransactionStub() 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 SmartCardConnectionStubDispatch { … };
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<SmartCardConnection>>
class SmartCardConnectionStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
SmartCardConnectionStub() = default;
~SmartCardConnectionStub() 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 SmartCardContextStubDispatch { … };
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<SmartCardContext>>
class SmartCardContextStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
SmartCardContextStub() = default;
~SmartCardContextStub() 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 SmartCardContextFactoryStubDispatch { … };
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<SmartCardContextFactory>>
class SmartCardContextFactoryStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
SmartCardContextFactoryStub() = default;
~SmartCardContextFactoryStub() 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 SmartCardTransactionRequestValidator : public mojo::MessageReceiver { … };
class BLINK_PLATFORM_EXPORT SmartCardConnectionRequestValidator : public mojo::MessageReceiver { … };
class BLINK_PLATFORM_EXPORT SmartCardContextRequestValidator : public mojo::MessageReceiver { … };
class BLINK_PLATFORM_EXPORT SmartCardContextFactoryRequestValidator : public mojo::MessageReceiver { … };
class BLINK_PLATFORM_EXPORT SmartCardTransactionResponseValidator : public mojo::MessageReceiver { … };
class BLINK_PLATFORM_EXPORT SmartCardConnectionResponseValidator : public mojo::MessageReceiver { … };
class BLINK_PLATFORM_EXPORT SmartCardContextResponseValidator : public mojo::MessageReceiver { … };
class BLINK_PLATFORM_EXPORT SmartCardContextFactoryResponseValidator : public mojo::MessageReceiver { … };
class BLINK_PLATFORM_EXPORT SmartCardProtocols { … };
template <typename T, SmartCardProtocols::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, SmartCardProtocols::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) { … }
template <typename T, SmartCardProtocols::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) { … }
template <typename T, SmartCardProtocols::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) { … }
class BLINK_PLATFORM_EXPORT SmartCardResult { … };
class BLINK_PLATFORM_EXPORT SmartCardStatusChangeResult { … };
class BLINK_PLATFORM_EXPORT SmartCardListReadersResult { … };
class BLINK_PLATFORM_EXPORT SmartCardCreateContextResult { … };
class BLINK_PLATFORM_EXPORT SmartCardConnectResult { … };
class BLINK_PLATFORM_EXPORT SmartCardDataResult { … };
class BLINK_PLATFORM_EXPORT SmartCardStatusResult { … };
class BLINK_PLATFORM_EXPORT SmartCardTransactionResult { … };
class BLINK_PLATFORM_EXPORT SmartCardReaderStateFlags { … };
template <typename T, SmartCardReaderStateFlags::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, SmartCardReaderStateFlags::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) { … }
template <typename T, SmartCardReaderStateFlags::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) { … }
template <typename T, SmartCardReaderStateFlags::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) { … }
class BLINK_PLATFORM_EXPORT SmartCardReaderStateIn { … };
template <typename T, SmartCardReaderStateIn::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, SmartCardReaderStateIn::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) { … }
template <typename T, SmartCardReaderStateIn::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) { … }
template <typename T, SmartCardReaderStateIn::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) { … }
class BLINK_PLATFORM_EXPORT SmartCardReaderStateOut { … };
template <typename T, SmartCardReaderStateOut::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, SmartCardReaderStateOut::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) { … }
template <typename T, SmartCardReaderStateOut::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) { … }
template <typename T, SmartCardReaderStateOut::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) { … }
class BLINK_PLATFORM_EXPORT SmartCardStatus { … };
template <typename T, SmartCardStatus::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, SmartCardStatus::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) { … }
template <typename T, SmartCardStatus::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) { … }
template <typename T, SmartCardStatus::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) { … }
class BLINK_PLATFORM_EXPORT SmartCardConnectSuccess { … };
template <typename T, SmartCardConnectSuccess::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, SmartCardConnectSuccess::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) { … }
template <typename T, SmartCardConnectSuccess::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) { … }
template <typename T, SmartCardConnectSuccess::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) { … }
template <typename UnionPtrType>
SmartCardResultPtr SmartCardResult::Clone() const { … }
template <typename T,
typename std::enable_if<std::is_same<
T, SmartCardResult>::value>::type*>
bool SmartCardResult::Equals(const T& other) const { … }
template <typename UnionPtrType>
SmartCardStatusChangeResultPtr SmartCardStatusChangeResult::Clone() const { … }
template <typename T,
typename std::enable_if<std::is_same<
T, SmartCardStatusChangeResult>::value>::type*>
bool SmartCardStatusChangeResult::Equals(const T& other) const { … }
template <typename UnionPtrType>
SmartCardListReadersResultPtr SmartCardListReadersResult::Clone() const { … }
template <typename T,
typename std::enable_if<std::is_same<
T, SmartCardListReadersResult>::value>::type*>
bool SmartCardListReadersResult::Equals(const T& other) const { … }
template <typename UnionPtrType>
SmartCardCreateContextResultPtr SmartCardCreateContextResult::Clone() const { … }
template <typename T,
typename std::enable_if<std::is_same<
T, SmartCardCreateContextResult>::value>::type*>
bool SmartCardCreateContextResult::Equals(const T& other) const { … }
template <typename UnionPtrType>
SmartCardConnectResultPtr SmartCardConnectResult::Clone() const { … }
template <typename T,
typename std::enable_if<std::is_same<
T, SmartCardConnectResult>::value>::type*>
bool SmartCardConnectResult::Equals(const T& other) const { … }
template <typename UnionPtrType>
SmartCardDataResultPtr SmartCardDataResult::Clone() const { … }
template <typename T,
typename std::enable_if<std::is_same<
T, SmartCardDataResult>::value>::type*>
bool SmartCardDataResult::Equals(const T& other) const { … }
template <typename UnionPtrType>
SmartCardStatusResultPtr SmartCardStatusResult::Clone() const { … }
template <typename T,
typename std::enable_if<std::is_same<
T, SmartCardStatusResult>::value>::type*>
bool SmartCardStatusResult::Equals(const T& other) const { … }
template <typename UnionPtrType>
SmartCardTransactionResultPtr SmartCardTransactionResult::Clone() const { … }
template <typename T,
typename std::enable_if<std::is_same<
T, SmartCardTransactionResult>::value>::type*>
bool SmartCardTransactionResult::Equals(const T& other) const { … }
template <typename StructPtrType>
SmartCardReaderStateFlagsPtr SmartCardReaderStateFlags::Clone() const { … }
template <typename T, SmartCardReaderStateFlags::EnableIfSame<T>*>
bool SmartCardReaderStateFlags::Equals(const T& other_struct) const { … }
template <typename T, SmartCardReaderStateFlags::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) { … }
template <typename StructPtrType>
SmartCardReaderStateInPtr SmartCardReaderStateIn::Clone() const { … }
template <typename T, SmartCardReaderStateIn::EnableIfSame<T>*>
bool SmartCardReaderStateIn::Equals(const T& other_struct) const { … }
template <typename T, SmartCardReaderStateIn::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) { … }
template <typename StructPtrType>
SmartCardReaderStateOutPtr SmartCardReaderStateOut::Clone() const { … }
template <typename T, SmartCardReaderStateOut::EnableIfSame<T>*>
bool SmartCardReaderStateOut::Equals(const T& other_struct) const { … }
template <typename T, SmartCardReaderStateOut::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) { … }
template <typename StructPtrType>
SmartCardProtocolsPtr SmartCardProtocols::Clone() const { … }
template <typename T, SmartCardProtocols::EnableIfSame<T>*>
bool SmartCardProtocols::Equals(const T& other_struct) const { … }
template <typename T, SmartCardProtocols::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) { … }
template <typename StructPtrType>
SmartCardStatusPtr SmartCardStatus::Clone() const { … }
template <typename T, SmartCardStatus::EnableIfSame<T>*>
bool SmartCardStatus::Equals(const T& other_struct) const { … }
template <typename T, SmartCardStatus::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) { … }
template <typename StructPtrType>
SmartCardConnectSuccessPtr SmartCardConnectSuccess::Clone() const { … }
template <typename T, SmartCardConnectSuccess::EnableIfSame<T>*>
bool SmartCardConnectSuccess::Equals(const T& other_struct) const { … }
template <typename T, SmartCardConnectSuccess::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) { … }
}
namespace mojo {
template <>
struct BLINK_PLATFORM_EXPORT StructTraits<::device::mojom::blink::SmartCardReaderStateFlags::DataView,
::device::mojom::blink::SmartCardReaderStateFlagsPtr> { … };
template <>
struct BLINK_PLATFORM_EXPORT StructTraits<::device::mojom::blink::SmartCardReaderStateIn::DataView,
::device::mojom::blink::SmartCardReaderStateInPtr> { … };
template <>
struct BLINK_PLATFORM_EXPORT StructTraits<::device::mojom::blink::SmartCardReaderStateOut::DataView,
::device::mojom::blink::SmartCardReaderStateOutPtr> { … };
template <>
struct BLINK_PLATFORM_EXPORT StructTraits<::device::mojom::blink::SmartCardProtocols::DataView,
::device::mojom::blink::SmartCardProtocolsPtr> { … };
template <>
struct BLINK_PLATFORM_EXPORT StructTraits<::device::mojom::blink::SmartCardStatus::DataView,
::device::mojom::blink::SmartCardStatusPtr> { … };
template <>
struct BLINK_PLATFORM_EXPORT StructTraits<::device::mojom::blink::SmartCardConnectSuccess::DataView,
::device::mojom::blink::SmartCardConnectSuccessPtr> { … };
template <>
struct BLINK_PLATFORM_EXPORT UnionTraits<::device::mojom::blink::SmartCardResult::DataView,
::device::mojom::blink::SmartCardResultPtr> { … };
template <>
struct BLINK_PLATFORM_EXPORT UnionTraits<::device::mojom::blink::SmartCardStatusChangeResult::DataView,
::device::mojom::blink::SmartCardStatusChangeResultPtr> { … };
template <>
struct BLINK_PLATFORM_EXPORT UnionTraits<::device::mojom::blink::SmartCardListReadersResult::DataView,
::device::mojom::blink::SmartCardListReadersResultPtr> { … };
template <>
struct BLINK_PLATFORM_EXPORT UnionTraits<::device::mojom::blink::SmartCardCreateContextResult::DataView,
::device::mojom::blink::SmartCardCreateContextResultPtr> { … };
template <>
struct BLINK_PLATFORM_EXPORT UnionTraits<::device::mojom::blink::SmartCardConnectResult::DataView,
::device::mojom::blink::SmartCardConnectResultPtr> { … };
template <>
struct BLINK_PLATFORM_EXPORT UnionTraits<::device::mojom::blink::SmartCardDataResult::DataView,
::device::mojom::blink::SmartCardDataResultPtr> { … };
template <>
struct BLINK_PLATFORM_EXPORT UnionTraits<::device::mojom::blink::SmartCardStatusResult::DataView,
::device::mojom::blink::SmartCardStatusResultPtr> { … };
template <>
struct BLINK_PLATFORM_EXPORT UnionTraits<::device::mojom::blink::SmartCardTransactionResult::DataView,
::device::mojom::blink::SmartCardTransactionResultPtr> { … };
}
#endif