blob: af444e63b4034f078a86d3e673c73bf1efcd9e58 [file] [log] [blame]
// camera/mojo/cros_camera_service.mojom.h is auto generated by mojom_bindings_generator.py, do not edit
// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CAMERA_MOJO_CROS_CAMERA_SERVICE_MOJOM_H_
#define CAMERA_MOJO_CROS_CAMERA_SERVICE_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 "camera/mojo/cros_camera_service.mojom-features.h"
#include "camera/mojo/cros_camera_service.mojom-shared.h"
#include "camera/mojo/cros_camera_service.mojom-forward.h"
#include "camera/mojo/camera_common.mojom-forward.h"
#include "camera/mojo/effects/effects_pipeline.mojom-forward.h"
#include "camera/mojo/gpu/jpeg_encode_accelerator.mojom-forward.h"
#include "camera/mojo/gpu/mjpeg_decode_accelerator.mojom-forward.h"
#include "camera/mojo/unguessable_token.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 cros::mojom {
class CameraHalDispatcherProxy;
template <typename ImplRefTraits>
class CameraHalDispatcherStub;
class CameraHalDispatcherRequestValidator;
class CameraHalDispatcherResponseValidator;
class CameraHalDispatcher
: public CameraHalDispatcherInterfaceBase {
public:
using IPCStableHashFunction = uint32_t(*)();
static const char Name_[];
static IPCStableHashFunction MessageToMethodInfo_(mojo::Message& message);
static const char* MessageToMethodName_(mojo::Message& message);
static constexpr uint32_t Version_ = 4;
static constexpr bool PassesAssociatedKinds_ = false;
static constexpr bool HasUninterruptableMethods_ = false;
using Base_ = CameraHalDispatcherInterfaceBase;
using Proxy_ = CameraHalDispatcherProxy;
template <typename ImplRefTraits>
using Stub_ = CameraHalDispatcherStub<ImplRefTraits>;
using RequestValidator_ = CameraHalDispatcherRequestValidator;
using ResponseValidator_ = CameraHalDispatcherResponseValidator;
enum MethodMinVersions : uint32_t {
kRegisterClientWithTokenMinVersion = 4,
};
// crbug.com/1340245 - this causes binary size bloat on Fuchsia, and we're OK
// with not having this data in traces there.
#if !BUILDFLAG(IS_FUCHSIA)
struct RegisterClientWithToken_Sym {
NOINLINE static uint32_t IPCStableHash();
};
#endif // !BUILDFLAG(IS_FUCHSIA)
virtual ~CameraHalDispatcher() = default;
using RegisterClientWithTokenCallback = base::OnceCallback<void(int32_t)>;
virtual void RegisterClientWithToken(::mojo::PendingRemote<CameraHalClient> client, CameraClientType type, ::mojo_base::mojom::UnguessableTokenPtr auth_token, RegisterClientWithTokenCallback callback) = 0;
};
class CameraHalClientProxy;
template <typename ImplRefTraits>
class CameraHalClientStub;
class CameraHalClientRequestValidator;
class CameraHalClient
: public CameraHalClientInterfaceBase {
public:
using IPCStableHashFunction = uint32_t(*)();
static const char Name_[];
static IPCStableHashFunction MessageToMethodInfo_(mojo::Message& message);
static const char* MessageToMethodName_(mojo::Message& message);
static constexpr uint32_t Version_ = 0;
static constexpr bool PassesAssociatedKinds_ = false;
static constexpr bool HasUninterruptableMethods_ = false;
using Base_ = CameraHalClientInterfaceBase;
using Proxy_ = CameraHalClientProxy;
template <typename ImplRefTraits>
using Stub_ = CameraHalClientStub<ImplRefTraits>;
using RequestValidator_ = CameraHalClientRequestValidator;
using ResponseValidator_ = mojo::PassThroughFilter;
enum MethodMinVersions : uint32_t {
kSetUpChannelMinVersion = 0,
};
// crbug.com/1340245 - this causes binary size bloat on Fuchsia, and we're OK
// with not having this data in traces there.
#if !BUILDFLAG(IS_FUCHSIA)
struct SetUpChannel_Sym {
NOINLINE static uint32_t IPCStableHash();
};
#endif // !BUILDFLAG(IS_FUCHSIA)
virtual ~CameraHalClient() = default;
virtual void SetUpChannel(::mojo::PendingRemote<::cros::mojom::CameraModule> camera_module) = 0;
};
class CrosCameraServiceObserverProxy;
template <typename ImplRefTraits>
class CrosCameraServiceObserverStub;
class CrosCameraServiceObserverRequestValidator;
class CrosCameraServiceObserver
: public CrosCameraServiceObserverInterfaceBase {
public:
using IPCStableHashFunction = uint32_t(*)();
static const char Name_[];
static IPCStableHashFunction MessageToMethodInfo_(mojo::Message& message);
static const char* MessageToMethodName_(mojo::Message& message);
static constexpr uint32_t Version_ = 14;
static constexpr bool PassesAssociatedKinds_ = false;
static constexpr bool HasUninterruptableMethods_ = false;
using Base_ = CrosCameraServiceObserverInterfaceBase;
using Proxy_ = CrosCameraServiceObserverProxy;
template <typename ImplRefTraits>
using Stub_ = CrosCameraServiceObserverStub<ImplRefTraits>;
using RequestValidator_ = CrosCameraServiceObserverRequestValidator;
using ResponseValidator_ = mojo::PassThroughFilter;
enum MethodMinVersions : uint32_t {
kCameraDeviceActivityChangeMinVersion = 0,
kCameraPrivacySwitchStateChangeMinVersion = 0,
kCameraSWPrivacySwitchStateChangeMinVersion = 0,
kCameraEffectChangeMinVersion = 14,
};
// crbug.com/1340245 - this causes binary size bloat on Fuchsia, and we're OK
// with not having this data in traces there.
#if !BUILDFLAG(IS_FUCHSIA)
struct CameraDeviceActivityChange_Sym {
NOINLINE static uint32_t IPCStableHash();
};
struct CameraPrivacySwitchStateChange_Sym {
NOINLINE static uint32_t IPCStableHash();
};
struct CameraSWPrivacySwitchStateChange_Sym {
NOINLINE static uint32_t IPCStableHash();
};
struct CameraEffectChange_Sym {
NOINLINE static uint32_t IPCStableHash();
};
#endif // !BUILDFLAG(IS_FUCHSIA)
virtual ~CrosCameraServiceObserver() = default;
virtual void CameraDeviceActivityChange(int32_t camera_id, bool opened, CameraClientType type) = 0;
virtual void CameraPrivacySwitchStateChange(CameraPrivacySwitchState state, int32_t camera_id) = 0;
virtual void CameraSWPrivacySwitchStateChange(CameraPrivacySwitchState state) = 0;
virtual void CameraEffectChange(::cros::mojom::EffectsConfigPtr config) = 0;
};
class CrosCameraServiceProxy;
template <typename ImplRefTraits>
class CrosCameraServiceStub;
class CrosCameraServiceRequestValidator;
class CrosCameraServiceResponseValidator;
class CrosCameraService
: public CrosCameraServiceInterfaceBase {
public:
using IPCStableHashFunction = uint32_t(*)();
static const char Name_[];
static IPCStableHashFunction MessageToMethodInfo_(mojo::Message& message);
static const char* MessageToMethodName_(mojo::Message& message);
static constexpr uint32_t Version_ = 0;
static constexpr bool PassesAssociatedKinds_ = false;
static constexpr bool HasUninterruptableMethods_ = false;
using Base_ = CrosCameraServiceInterfaceBase;
using Proxy_ = CrosCameraServiceProxy;
template <typename ImplRefTraits>
using Stub_ = CrosCameraServiceStub<ImplRefTraits>;
using RequestValidator_ = CrosCameraServiceRequestValidator;
using ResponseValidator_ = CrosCameraServiceResponseValidator;
enum MethodMinVersions : uint32_t {
kGetCameraModuleMinVersion = 0,
kSetTracingEnabledMinVersion = 0,
kSetAutoFramingStateMinVersion = 0,
kGetCameraSWPrivacySwitchStateMinVersion = 0,
kSetCameraSWPrivacySwitchStateMinVersion = 0,
kGetAutoFramingSupportedMinVersion = 0,
kSetCameraEffectMinVersion = 0,
kAddCrosCameraServiceObserverMinVersion = 0,
};
// crbug.com/1340245 - this causes binary size bloat on Fuchsia, and we're OK
// with not having this data in traces there.
#if !BUILDFLAG(IS_FUCHSIA)
struct GetCameraModule_Sym {
NOINLINE static uint32_t IPCStableHash();
};
struct SetTracingEnabled_Sym {
NOINLINE static uint32_t IPCStableHash();
};
struct SetAutoFramingState_Sym {
NOINLINE static uint32_t IPCStableHash();
};
struct GetCameraSWPrivacySwitchState_Sym {
NOINLINE static uint32_t IPCStableHash();
};
struct SetCameraSWPrivacySwitchState_Sym {
NOINLINE static uint32_t IPCStableHash();
};
struct GetAutoFramingSupported_Sym {
NOINLINE static uint32_t IPCStableHash();
};
struct SetCameraEffect_Sym {
NOINLINE static uint32_t IPCStableHash();
};
struct AddCrosCameraServiceObserver_Sym {
NOINLINE static uint32_t IPCStableHash();
};
#endif // !BUILDFLAG(IS_FUCHSIA)
virtual ~CrosCameraService() = default;
using GetCameraModuleCallback = base::OnceCallback<void(::mojo::PendingRemote<::cros::mojom::CameraModule>)>;
virtual void GetCameraModule(CameraClientType type, GetCameraModuleCallback callback) = 0;
virtual void SetTracingEnabled(bool enabled) = 0;
virtual void SetAutoFramingState(CameraAutoFramingState state) = 0;
using GetCameraSWPrivacySwitchStateCallback = base::OnceCallback<void(CameraPrivacySwitchState)>;
virtual void GetCameraSWPrivacySwitchState(GetCameraSWPrivacySwitchStateCallback callback) = 0;
virtual void SetCameraSWPrivacySwitchState(CameraPrivacySwitchState state) = 0;
using GetAutoFramingSupportedCallback = base::OnceCallback<void(bool)>;
virtual void GetAutoFramingSupported(GetAutoFramingSupportedCallback callback) = 0;
using SetCameraEffectCallback = base::OnceCallback<void(SetEffectResult)>;
virtual void SetCameraEffect(::cros::mojom::EffectsConfigPtr config, SetCameraEffectCallback callback) = 0;
virtual void AddCrosCameraServiceObserver(::mojo::PendingRemote<CrosCameraServiceObserver> observer) = 0;
};
class CameraHalDispatcherProxy
: public CameraHalDispatcher {
public:
using InterfaceType = CameraHalDispatcher;
explicit CameraHalDispatcherProxy(mojo::MessageReceiverWithResponder* receiver);
void RegisterClientWithToken(::mojo::PendingRemote<CameraHalClient> client, CameraClientType type, ::mojo_base::mojom::UnguessableTokenPtr auth_token, RegisterClientWithTokenCallback callback) final;
private:
mojo::MessageReceiverWithResponder* receiver_;
};
class CameraHalClientProxy
: public CameraHalClient {
public:
using InterfaceType = CameraHalClient;
explicit CameraHalClientProxy(mojo::MessageReceiverWithResponder* receiver);
void SetUpChannel(::mojo::PendingRemote<::cros::mojom::CameraModule> camera_module) final;
private:
mojo::MessageReceiverWithResponder* receiver_;
};
class CrosCameraServiceObserverProxy
: public CrosCameraServiceObserver {
public:
using InterfaceType = CrosCameraServiceObserver;
explicit CrosCameraServiceObserverProxy(mojo::MessageReceiverWithResponder* receiver);
void CameraDeviceActivityChange(int32_t camera_id, bool opened, CameraClientType type) final;
void CameraPrivacySwitchStateChange(CameraPrivacySwitchState state, int32_t camera_id) final;
void CameraSWPrivacySwitchStateChange(CameraPrivacySwitchState state) final;
void CameraEffectChange(::cros::mojom::EffectsConfigPtr config) final;
private:
mojo::MessageReceiverWithResponder* receiver_;
};
class CrosCameraServiceProxy
: public CrosCameraService {
public:
using InterfaceType = CrosCameraService;
explicit CrosCameraServiceProxy(mojo::MessageReceiverWithResponder* receiver);
void GetCameraModule(CameraClientType type, GetCameraModuleCallback callback) final;
void SetTracingEnabled(bool enabled) final;
void SetAutoFramingState(CameraAutoFramingState state) final;
void GetCameraSWPrivacySwitchState(GetCameraSWPrivacySwitchStateCallback callback) final;
void SetCameraSWPrivacySwitchState(CameraPrivacySwitchState state) final;
void GetAutoFramingSupported(GetAutoFramingSupportedCallback callback) final;
void SetCameraEffect(::cros::mojom::EffectsConfigPtr config, SetCameraEffectCallback callback) final;
void AddCrosCameraServiceObserver(::mojo::PendingRemote<CrosCameraServiceObserver> observer) final;
private:
mojo::MessageReceiverWithResponder* receiver_;
};
class CameraHalDispatcherStubDispatch {
public:
static bool Accept(CameraHalDispatcher* impl, mojo::Message* message);
static bool AcceptWithResponder(
CameraHalDispatcher* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder);
};
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<CameraHalDispatcher>>
class CameraHalDispatcherStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
CameraHalDispatcherStub() = default;
~CameraHalDispatcherStub() override = default;
void set_sink(ImplPointerType sink) { sink_ = std::move(sink); }
ImplPointerType& sink() { return sink_; }
bool Accept(mojo::Message* message) override {
if (ImplRefTraits::IsNull(sink_))
return false;
return CameraHalDispatcherStubDispatch::Accept(
ImplRefTraits::GetRawPointer(&sink_), message);
}
bool AcceptWithResponder(
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override {
if (ImplRefTraits::IsNull(sink_))
return false;
return CameraHalDispatcherStubDispatch::AcceptWithResponder(
ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder));
}
private:
ImplPointerType sink_;
};
class CameraHalClientStubDispatch {
public:
static bool Accept(CameraHalClient* impl, mojo::Message* message);
static bool AcceptWithResponder(
CameraHalClient* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder);
};
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<CameraHalClient>>
class CameraHalClientStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
CameraHalClientStub() = default;
~CameraHalClientStub() override = default;
void set_sink(ImplPointerType sink) { sink_ = std::move(sink); }
ImplPointerType& sink() { return sink_; }
bool Accept(mojo::Message* message) override {
if (ImplRefTraits::IsNull(sink_))
return false;
return CameraHalClientStubDispatch::Accept(
ImplRefTraits::GetRawPointer(&sink_), message);
}
bool AcceptWithResponder(
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override {
if (ImplRefTraits::IsNull(sink_))
return false;
return CameraHalClientStubDispatch::AcceptWithResponder(
ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder));
}
private:
ImplPointerType sink_;
};
class CrosCameraServiceObserverStubDispatch {
public:
static bool Accept(CrosCameraServiceObserver* impl, mojo::Message* message);
static bool AcceptWithResponder(
CrosCameraServiceObserver* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder);
};
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<CrosCameraServiceObserver>>
class CrosCameraServiceObserverStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
CrosCameraServiceObserverStub() = default;
~CrosCameraServiceObserverStub() override = default;
void set_sink(ImplPointerType sink) { sink_ = std::move(sink); }
ImplPointerType& sink() { return sink_; }
bool Accept(mojo::Message* message) override {
if (ImplRefTraits::IsNull(sink_))
return false;
return CrosCameraServiceObserverStubDispatch::Accept(
ImplRefTraits::GetRawPointer(&sink_), message);
}
bool AcceptWithResponder(
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override {
if (ImplRefTraits::IsNull(sink_))
return false;
return CrosCameraServiceObserverStubDispatch::AcceptWithResponder(
ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder));
}
private:
ImplPointerType sink_;
};
class CrosCameraServiceStubDispatch {
public:
static bool Accept(CrosCameraService* impl, mojo::Message* message);
static bool AcceptWithResponder(
CrosCameraService* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder);
};
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<CrosCameraService>>
class CrosCameraServiceStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
CrosCameraServiceStub() = default;
~CrosCameraServiceStub() override = default;
void set_sink(ImplPointerType sink) { sink_ = std::move(sink); }
ImplPointerType& sink() { return sink_; }
bool Accept(mojo::Message* message) override {
if (ImplRefTraits::IsNull(sink_))
return false;
return CrosCameraServiceStubDispatch::Accept(
ImplRefTraits::GetRawPointer(&sink_), message);
}
bool AcceptWithResponder(
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override {
if (ImplRefTraits::IsNull(sink_))
return false;
return CrosCameraServiceStubDispatch::AcceptWithResponder(
ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder));
}
private:
ImplPointerType sink_;
};
class CameraHalDispatcherRequestValidator : public mojo::MessageReceiver {
public:
bool Accept(mojo::Message* message) override;
};
class CameraHalClientRequestValidator : public mojo::MessageReceiver {
public:
bool Accept(mojo::Message* message) override;
};
class CrosCameraServiceObserverRequestValidator : public mojo::MessageReceiver {
public:
bool Accept(mojo::Message* message) override;
};
class CrosCameraServiceRequestValidator : public mojo::MessageReceiver {
public:
bool Accept(mojo::Message* message) override;
};
class CameraHalDispatcherResponseValidator : public mojo::MessageReceiver {
public:
bool Accept(mojo::Message* message) override;
};
class CrosCameraServiceResponseValidator : public mojo::MessageReceiver {
public:
bool Accept(mojo::Message* message) override;
};
} // cros::mojom
namespace mojo {
} // namespace mojo
#endif // CAMERA_MOJO_CROS_CAMERA_SERVICE_MOJOM_H_