#ifndef MEDIA_MOJO_MOJOM_SPEECH_RECOGNIZER_MOJOM_H_
#define MEDIA_MOJO_MOJOM_SPEECH_RECOGNIZER_MOJOM_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 "media/mojo/mojom/speech_recognizer.mojom-features.h"
#include "media/mojo/mojom/speech_recognizer.mojom-shared.h"
#include "media/mojo/mojom/speech_recognizer.mojom-forward.h"
#include "media/mojo/mojom/speech_recognition_audio_forwarder.mojom-forward.h"
#include "media/mojo/mojom/speech_recognition_error.mojom-forward.h"
#include "media/mojo/mojom/speech_recognition_grammar.mojom.h"
#include "media/mojo/mojom/speech_recognition_result.mojom-forward.h"
#include <string>
#include <vector>
#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"
namespace media::mojom {
class SpeechRecognizerProxy;
template <typename ImplRefTraits>
class SpeechRecognizerStub;
class SpeechRecognizerRequestValidator;
class SpeechRecognizer
: public SpeechRecognizerInterfaceBase { … };
class OnDeviceSpeechRecognitionProxy;
template <typename ImplRefTraits>
class OnDeviceSpeechRecognitionStub;
class OnDeviceSpeechRecognitionRequestValidator;
class OnDeviceSpeechRecognitionResponseValidator;
class OnDeviceSpeechRecognition
: public OnDeviceSpeechRecognitionInterfaceBase { … };
class SpeechRecognitionSessionProxy;
template <typename ImplRefTraits>
class SpeechRecognitionSessionStub;
class SpeechRecognitionSessionRequestValidator;
class SpeechRecognitionSession
: public SpeechRecognitionSessionInterfaceBase { … };
class SpeechRecognitionSessionClientProxy;
template <typename ImplRefTraits>
class SpeechRecognitionSessionClientStub;
class SpeechRecognitionSessionClientRequestValidator;
class SpeechRecognitionSessionClient
: public SpeechRecognitionSessionClientInterfaceBase { … };
class SpeechRecognizerProxy
: public SpeechRecognizer { … };
class OnDeviceSpeechRecognitionProxy
: public OnDeviceSpeechRecognition { … };
class SpeechRecognitionSessionProxy
: public SpeechRecognitionSession { … };
class SpeechRecognitionSessionClientProxy
: public SpeechRecognitionSessionClient { … };
class SpeechRecognizerStubDispatch { … };
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<SpeechRecognizer>>
class SpeechRecognizerStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
SpeechRecognizerStub() = default;
~SpeechRecognizerStub() 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 OnDeviceSpeechRecognitionStubDispatch { … };
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<OnDeviceSpeechRecognition>>
class OnDeviceSpeechRecognitionStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
OnDeviceSpeechRecognitionStub() = default;
~OnDeviceSpeechRecognitionStub() 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 SpeechRecognitionSessionStubDispatch { … };
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<SpeechRecognitionSession>>
class SpeechRecognitionSessionStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
SpeechRecognitionSessionStub() = default;
~SpeechRecognitionSessionStub() 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 SpeechRecognitionSessionClientStubDispatch { … };
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<SpeechRecognitionSessionClient>>
class SpeechRecognitionSessionClientStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
SpeechRecognitionSessionClientStub() = default;
~SpeechRecognitionSessionClientStub() 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 SpeechRecognizerRequestValidator : public mojo::MessageReceiver { … };
class OnDeviceSpeechRecognitionRequestValidator : public mojo::MessageReceiver { … };
class SpeechRecognitionSessionRequestValidator : public mojo::MessageReceiver { … };
class SpeechRecognitionSessionClientRequestValidator : public mojo::MessageReceiver { … };
class OnDeviceSpeechRecognitionResponseValidator : public mojo::MessageReceiver { … };
class StartSpeechRecognitionRequestParams { … };
template <typename T, StartSpeechRecognitionRequestParams::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, StartSpeechRecognitionRequestParams::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) { … }
template <typename T, StartSpeechRecognitionRequestParams::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) { … }
template <typename T, StartSpeechRecognitionRequestParams::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) { … }
template <typename StructPtrType>
StartSpeechRecognitionRequestParamsPtr StartSpeechRecognitionRequestParams::Clone() const { … }
template <typename T, StartSpeechRecognitionRequestParams::EnableIfSame<T>*>
bool StartSpeechRecognitionRequestParams::Equals(const T& other_struct) const { … }
template <typename T, StartSpeechRecognitionRequestParams::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) { … }
}
namespace mojo {
template <>
struct StructTraits<::media::mojom::StartSpeechRecognitionRequestParams::DataView,
::media::mojom::StartSpeechRecognitionRequestParamsPtr> { … };
}
#endif