blob: f7f94b02020c947bbee19e5c8d199f2e79ec1e34 [file] [log] [blame]
// camera/mojo/camera3.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_CAMERA3_MOJOM_H_
#define CAMERA_MOJO_CAMERA3_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/camera3.mojom-features.h"
#include "camera/mojo/camera3.mojom-shared.h"
#include "camera/mojo/camera3.mojom-forward.h"
#include "camera/mojo/camera_features.mojom.h"
#include "camera/mojo/camera_metadata.mojom.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 Camera3CallbackOpsProxy;
template <typename ImplRefTraits>
class Camera3CallbackOpsStub;
class Camera3CallbackOpsRequestValidator;
class Camera3CallbackOpsResponseValidator;
class Camera3CallbackOps
: public Camera3CallbackOpsInterfaceBase {
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_ = 5;
static constexpr bool PassesAssociatedKinds_ = false;
static constexpr bool HasUninterruptableMethods_ = false;
using Base_ = Camera3CallbackOpsInterfaceBase;
using Proxy_ = Camera3CallbackOpsProxy;
template <typename ImplRefTraits>
using Stub_ = Camera3CallbackOpsStub<ImplRefTraits>;
using RequestValidator_ = Camera3CallbackOpsRequestValidator;
using ResponseValidator_ = Camera3CallbackOpsResponseValidator;
enum MethodMinVersions : uint32_t {
kProcessCaptureResultMinVersion = 0,
kNotifyMinVersion = 0,
kRequestStreamBuffersMinVersion = 5,
kReturnStreamBuffersMinVersion = 5,
};
// 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 ProcessCaptureResult_Sym {
NOINLINE static uint32_t IPCStableHash();
};
struct Notify_Sym {
NOINLINE static uint32_t IPCStableHash();
};
struct RequestStreamBuffers_Sym {
NOINLINE static uint32_t IPCStableHash();
};
struct ReturnStreamBuffers_Sym {
NOINLINE static uint32_t IPCStableHash();
};
#endif // !BUILDFLAG(IS_FUCHSIA)
virtual ~Camera3CallbackOps() = default;
virtual void ProcessCaptureResult(Camera3CaptureResultPtr result) = 0;
virtual void Notify(Camera3NotifyMsgPtr msg) = 0;
using RequestStreamBuffersCallback = base::OnceCallback<void(Camera3BufferRequestStatus, std::vector<Camera3StreamBufferRetPtr>)>;
virtual void RequestStreamBuffers(std::vector<Camera3BufferRequestPtr> buffer_reqs, RequestStreamBuffersCallback callback) = 0;
virtual void ReturnStreamBuffers(std::vector<Camera3StreamBufferPtr> buffers) = 0;
};
class Camera3DeviceOpsProxy;
template <typename ImplRefTraits>
class Camera3DeviceOpsStub;
class Camera3DeviceOpsRequestValidator;
class Camera3DeviceOpsResponseValidator;
class Camera3DeviceOps
: public Camera3DeviceOpsInterfaceBase {
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_ = 8;
static constexpr bool PassesAssociatedKinds_ = false;
static constexpr bool HasUninterruptableMethods_ = false;
using Base_ = Camera3DeviceOpsInterfaceBase;
using Proxy_ = Camera3DeviceOpsProxy;
template <typename ImplRefTraits>
using Stub_ = Camera3DeviceOpsStub<ImplRefTraits>;
using RequestValidator_ = Camera3DeviceOpsRequestValidator;
using ResponseValidator_ = Camera3DeviceOpsResponseValidator;
enum MethodMinVersions : uint32_t {
kInitializeMinVersion = 0,
kConfigureStreamsMinVersion = 0,
kConstructDefaultRequestSettingsMinVersion = 0,
kProcessCaptureRequestMinVersion = 0,
kDumpMinVersion = 0,
kFlushMinVersion = 0,
kRegisterBufferMinVersion = 0,
kCloseMinVersion = 0,
kConfigureStreamsAndGetAllocatedBuffersMinVersion = 3,
kSignalStreamFlushMinVersion = 5,
kOnNewBufferMinVersion = 8,
kOnBufferRetiredMinVersion = 8,
};
// 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 Initialize_Sym {
NOINLINE static uint32_t IPCStableHash();
};
struct ConfigureStreams_Sym {
NOINLINE static uint32_t IPCStableHash();
};
struct ConstructDefaultRequestSettings_Sym {
NOINLINE static uint32_t IPCStableHash();
};
struct ProcessCaptureRequest_Sym {
NOINLINE static uint32_t IPCStableHash();
};
struct Dump_Sym {
NOINLINE static uint32_t IPCStableHash();
};
struct Flush_Sym {
NOINLINE static uint32_t IPCStableHash();
};
struct RegisterBuffer_Sym {
NOINLINE static uint32_t IPCStableHash();
};
struct Close_Sym {
NOINLINE static uint32_t IPCStableHash();
};
struct ConfigureStreamsAndGetAllocatedBuffers_Sym {
NOINLINE static uint32_t IPCStableHash();
};
struct SignalStreamFlush_Sym {
NOINLINE static uint32_t IPCStableHash();
};
struct OnNewBuffer_Sym {
NOINLINE static uint32_t IPCStableHash();
};
struct OnBufferRetired_Sym {
NOINLINE static uint32_t IPCStableHash();
};
#endif // !BUILDFLAG(IS_FUCHSIA)
using BufferType = Camera3DeviceOps_BufferType;
virtual ~Camera3DeviceOps() = default;
using InitializeCallback = base::OnceCallback<void(int32_t)>;
virtual void Initialize(::mojo::PendingRemote<Camera3CallbackOps> callback_ops, InitializeCallback callback) = 0;
using ConfigureStreamsCallback = base::OnceCallback<void(int32_t, Camera3StreamConfigurationPtr)>;
virtual void ConfigureStreams(Camera3StreamConfigurationPtr config, ConfigureStreamsCallback callback) = 0;
using ConstructDefaultRequestSettingsCallback = base::OnceCallback<void(::cros::mojom::CameraMetadataPtr)>;
virtual void ConstructDefaultRequestSettings(Camera3RequestTemplate type, ConstructDefaultRequestSettingsCallback callback) = 0;
using ProcessCaptureRequestCallback = base::OnceCallback<void(int32_t)>;
virtual void ProcessCaptureRequest(Camera3CaptureRequestPtr request, ProcessCaptureRequestCallback callback) = 0;
virtual void Dump(::mojo::ScopedHandle fd) = 0;
using FlushCallback = base::OnceCallback<void(int32_t)>;
virtual void Flush(FlushCallback callback) = 0;
using RegisterBufferCallback = base::OnceCallback<void(int32_t)>;
virtual void RegisterBuffer(uint64_t buffer_id, Camera3DeviceOps::BufferType type, std::vector<::mojo::ScopedHandle> fds, uint32_t drm_format, HalPixelFormat hal_pixel_format, uint32_t width, uint32_t height, const std::vector<uint32_t>& strides, const std::vector<uint32_t>& offsets, RegisterBufferCallback callback) = 0;
using CloseCallback = base::OnceCallback<void(int32_t)>;
virtual void Close(CloseCallback callback) = 0;
using ConfigureStreamsAndGetAllocatedBuffersCallback = base::OnceCallback<void(int32_t, Camera3StreamConfigurationPtr, base::flat_map<uint64_t, std::vector<Camera3StreamBufferPtr>>)>;
virtual void ConfigureStreamsAndGetAllocatedBuffers(Camera3StreamConfigurationPtr config, ConfigureStreamsAndGetAllocatedBuffersCallback callback) = 0;
virtual void SignalStreamFlush(const std::vector<uint64_t>& stream_ids) = 0;
using OnNewBufferCallback = base::OnceCallback<void(int32_t)>;
virtual void OnNewBuffer(CameraBufferHandlePtr buffer, OnNewBufferCallback callback) = 0;
virtual void OnBufferRetired(uint64_t buffer_id) = 0;
};
class Camera3CallbackOpsProxy
: public Camera3CallbackOps {
public:
using InterfaceType = Camera3CallbackOps;
explicit Camera3CallbackOpsProxy(mojo::MessageReceiverWithResponder* receiver);
void ProcessCaptureResult(Camera3CaptureResultPtr result) final;
void Notify(Camera3NotifyMsgPtr msg) final;
void RequestStreamBuffers(std::vector<Camera3BufferRequestPtr> buffer_reqs, RequestStreamBuffersCallback callback) final;
void ReturnStreamBuffers(std::vector<Camera3StreamBufferPtr> buffers) final;
private:
mojo::MessageReceiverWithResponder* receiver_;
};
class Camera3DeviceOpsProxy
: public Camera3DeviceOps {
public:
using InterfaceType = Camera3DeviceOps;
explicit Camera3DeviceOpsProxy(mojo::MessageReceiverWithResponder* receiver);
void Initialize(::mojo::PendingRemote<Camera3CallbackOps> callback_ops, InitializeCallback callback) final;
void ConfigureStreams(Camera3StreamConfigurationPtr config, ConfigureStreamsCallback callback) final;
void ConstructDefaultRequestSettings(Camera3RequestTemplate type, ConstructDefaultRequestSettingsCallback callback) final;
void ProcessCaptureRequest(Camera3CaptureRequestPtr request, ProcessCaptureRequestCallback callback) final;
void Dump(::mojo::ScopedHandle fd) final;
void Flush(FlushCallback callback) final;
void RegisterBuffer(uint64_t buffer_id, Camera3DeviceOps::BufferType type, std::vector<::mojo::ScopedHandle> fds, uint32_t drm_format, HalPixelFormat hal_pixel_format, uint32_t width, uint32_t height, const std::vector<uint32_t>& strides, const std::vector<uint32_t>& offsets, RegisterBufferCallback callback) final;
void Close(CloseCallback callback) final;
void ConfigureStreamsAndGetAllocatedBuffers(Camera3StreamConfigurationPtr config, ConfigureStreamsAndGetAllocatedBuffersCallback callback) final;
void SignalStreamFlush(const std::vector<uint64_t>& stream_ids) final;
void OnNewBuffer(CameraBufferHandlePtr buffer, OnNewBufferCallback callback) final;
void OnBufferRetired(uint64_t buffer_id) final;
private:
mojo::MessageReceiverWithResponder* receiver_;
};
class Camera3CallbackOpsStubDispatch {
public:
static bool Accept(Camera3CallbackOps* impl, mojo::Message* message);
static bool AcceptWithResponder(
Camera3CallbackOps* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder);
};
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<Camera3CallbackOps>>
class Camera3CallbackOpsStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
Camera3CallbackOpsStub() = default;
~Camera3CallbackOpsStub() 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 Camera3CallbackOpsStubDispatch::Accept(
ImplRefTraits::GetRawPointer(&sink_), message);
}
bool AcceptWithResponder(
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override {
if (ImplRefTraits::IsNull(sink_))
return false;
return Camera3CallbackOpsStubDispatch::AcceptWithResponder(
ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder));
}
private:
ImplPointerType sink_;
};
class Camera3DeviceOpsStubDispatch {
public:
static bool Accept(Camera3DeviceOps* impl, mojo::Message* message);
static bool AcceptWithResponder(
Camera3DeviceOps* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder);
};
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<Camera3DeviceOps>>
class Camera3DeviceOpsStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
Camera3DeviceOpsStub() = default;
~Camera3DeviceOpsStub() 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 Camera3DeviceOpsStubDispatch::Accept(
ImplRefTraits::GetRawPointer(&sink_), message);
}
bool AcceptWithResponder(
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override {
if (ImplRefTraits::IsNull(sink_))
return false;
return Camera3DeviceOpsStubDispatch::AcceptWithResponder(
ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder));
}
private:
ImplPointerType sink_;
};
class Camera3CallbackOpsRequestValidator : public mojo::MessageReceiver {
public:
bool Accept(mojo::Message* message) override;
};
class Camera3DeviceOpsRequestValidator : public mojo::MessageReceiver {
public:
bool Accept(mojo::Message* message) override;
};
class Camera3CallbackOpsResponseValidator : public mojo::MessageReceiver {
public:
bool Accept(mojo::Message* message) override;
};
class Camera3DeviceOpsResponseValidator : public mojo::MessageReceiver {
public:
bool Accept(mojo::Message* message) override;
};
class CropRotateScaleInfo {
public:
template <typename T>
using EnableIfSame = std::enable_if_t<std::is_same<CropRotateScaleInfo, T>::value>;
using DataView = CropRotateScaleInfoDataView;
using Data_ = internal::CropRotateScaleInfo_Data;
template <typename... Args>
static CropRotateScaleInfoPtr New(Args&&... args) {
return CropRotateScaleInfoPtr(
std::in_place, std::forward<Args>(args)...);
}
template <typename U>
static CropRotateScaleInfoPtr From(const U& u) {
return mojo::TypeConverter<CropRotateScaleInfoPtr, U>::Convert(u);
}
template <typename U>
U To() const {
return mojo::TypeConverter<U, CropRotateScaleInfo>::Convert(*this);
}
CropRotateScaleInfo();
explicit CropRotateScaleInfo(
Camera3StreamRotation crop_rotate_scale_degrees);
~CropRotateScaleInfo();
// Clone() is a template so it is only instantiated if it is used. Thus, the
// bindings generator does not need to know whether Clone() or copy
// constructor/assignment are available for members.
template <typename StructPtrType = CropRotateScaleInfoPtr>
CropRotateScaleInfoPtr Clone() const;
// Equals() is a template so it is only instantiated if it is used. Thus, the
// bindings generator does not need to know whether Equals() or == operator
// are available for members.
template <typename T, CropRotateScaleInfo::EnableIfSame<T>* = nullptr>
bool Equals(const T& other) const;
template <typename T, CropRotateScaleInfo::EnableIfSame<T>* = nullptr>
bool operator==(const T& rhs) const { return Equals(rhs); }
template <typename T, CropRotateScaleInfo::EnableIfSame<T>* = nullptr>
bool operator!=(const T& rhs) const { return !operator==(rhs); }
size_t Hash(size_t seed) const;
template <typename UserType>
static std::vector<uint8_t> Serialize(UserType* input) {
return mojo::internal::SerializeImpl<
CropRotateScaleInfo::DataView, std::vector<uint8_t>>(input);
}
template <typename UserType>
static mojo::Message SerializeAsMessage(UserType* input) {
return mojo::internal::SerializeAsMessageImpl<
CropRotateScaleInfo::DataView>(input);
}
// The returned Message is serialized only if the message is moved
// cross-process or cross-language. Otherwise if the message is Deserialized
// as the same UserType |input| will just be moved to |output| in
// DeserializeFromMessage.
template <typename UserType>
static mojo::Message WrapAsMessage(UserType input) {
return mojo::Message(std::make_unique<
internal::CropRotateScaleInfo_UnserializedMessageContext<
UserType, CropRotateScaleInfo::DataView>>(0, 0, std::move(input)),
MOJO_CREATE_MESSAGE_FLAG_NONE);
}
template <typename UserType>
static bool Deserialize(const void* data,
size_t data_num_bytes,
UserType* output) {
mojo::Message message;
return mojo::internal::DeserializeImpl<CropRotateScaleInfo::DataView>(
message, data, data_num_bytes, output, Validate);
}
template <typename UserType>
static bool Deserialize(const std::vector<uint8_t>& input,
UserType* output) {
return CropRotateScaleInfo::Deserialize(
input.size() == 0 ? nullptr : &input.front(), input.size(), output);
}
template <typename UserType>
static bool DeserializeFromMessage(mojo::Message input,
UserType* output) {
auto context = input.TakeUnserializedContext<
internal::CropRotateScaleInfo_UnserializedMessageContext<
UserType, CropRotateScaleInfo::DataView>>();
if (context) {
*output = std::move(context->TakeData());
return true;
}
input.SerializeIfNecessary();
return mojo::internal::DeserializeImpl<CropRotateScaleInfo::DataView>(
input, input.payload(), input.payload_num_bytes(), output, Validate);
}
Camera3StreamRotation crop_rotate_scale_degrees;
// Serialise this struct into a trace.
void WriteIntoTrace(perfetto::TracedValue traced_context) const;
private:
static bool Validate(const void* data,
mojo::internal::ValidationContext* validation_context);
};
// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, CropRotateScaleInfo::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, CropRotateScaleInfo::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
return !(rhs < lhs);
}
template <typename T, CropRotateScaleInfo::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
return rhs < lhs;
}
template <typename T, CropRotateScaleInfo::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
return !(lhs < rhs);
}
class Camera3ErrorMsg {
public:
template <typename T>
using EnableIfSame = std::enable_if_t<std::is_same<Camera3ErrorMsg, T>::value>;
using DataView = Camera3ErrorMsgDataView;
using Data_ = internal::Camera3ErrorMsg_Data;
template <typename... Args>
static Camera3ErrorMsgPtr New(Args&&... args) {
return Camera3ErrorMsgPtr(
std::in_place, std::forward<Args>(args)...);
}
template <typename U>
static Camera3ErrorMsgPtr From(const U& u) {
return mojo::TypeConverter<Camera3ErrorMsgPtr, U>::Convert(u);
}
template <typename U>
U To() const {
return mojo::TypeConverter<U, Camera3ErrorMsg>::Convert(*this);
}
Camera3ErrorMsg();
Camera3ErrorMsg(
uint32_t frame_number,
uint64_t error_stream_id,
Camera3ErrorMsgCode error_code);
~Camera3ErrorMsg();
// Clone() is a template so it is only instantiated if it is used. Thus, the
// bindings generator does not need to know whether Clone() or copy
// constructor/assignment are available for members.
template <typename StructPtrType = Camera3ErrorMsgPtr>
Camera3ErrorMsgPtr Clone() const;
// Equals() is a template so it is only instantiated if it is used. Thus, the
// bindings generator does not need to know whether Equals() or == operator
// are available for members.
template <typename T, Camera3ErrorMsg::EnableIfSame<T>* = nullptr>
bool Equals(const T& other) const;
template <typename T, Camera3ErrorMsg::EnableIfSame<T>* = nullptr>
bool operator==(const T& rhs) const { return Equals(rhs); }
template <typename T, Camera3ErrorMsg::EnableIfSame<T>* = nullptr>
bool operator!=(const T& rhs) const { return !operator==(rhs); }
size_t Hash(size_t seed) const;
template <typename UserType>
static std::vector<uint8_t> Serialize(UserType* input) {
return mojo::internal::SerializeImpl<
Camera3ErrorMsg::DataView, std::vector<uint8_t>>(input);
}
template <typename UserType>
static mojo::Message SerializeAsMessage(UserType* input) {
return mojo::internal::SerializeAsMessageImpl<
Camera3ErrorMsg::DataView>(input);
}
// The returned Message is serialized only if the message is moved
// cross-process or cross-language. Otherwise if the message is Deserialized
// as the same UserType |input| will just be moved to |output| in
// DeserializeFromMessage.
template <typename UserType>
static mojo::Message WrapAsMessage(UserType input) {
return mojo::Message(std::make_unique<
internal::Camera3ErrorMsg_UnserializedMessageContext<
UserType, Camera3ErrorMsg::DataView>>(0, 0, std::move(input)),
MOJO_CREATE_MESSAGE_FLAG_NONE);
}
template <typename UserType>
static bool Deserialize(const void* data,
size_t data_num_bytes,
UserType* output) {
mojo::Message message;
return mojo::internal::DeserializeImpl<Camera3ErrorMsg::DataView>(
message, data, data_num_bytes, output, Validate);
}
template <typename UserType>
static bool Deserialize(const std::vector<uint8_t>& input,
UserType* output) {
return Camera3ErrorMsg::Deserialize(
input.size() == 0 ? nullptr : &input.front(), input.size(), output);
}
template <typename UserType>
static bool DeserializeFromMessage(mojo::Message input,
UserType* output) {
auto context = input.TakeUnserializedContext<
internal::Camera3ErrorMsg_UnserializedMessageContext<
UserType, Camera3ErrorMsg::DataView>>();
if (context) {
*output = std::move(context->TakeData());
return true;
}
input.SerializeIfNecessary();
return mojo::internal::DeserializeImpl<Camera3ErrorMsg::DataView>(
input, input.payload(), input.payload_num_bytes(), output, Validate);
}
uint32_t frame_number;
uint64_t error_stream_id;
Camera3ErrorMsgCode error_code;
// Serialise this struct into a trace.
void WriteIntoTrace(perfetto::TracedValue traced_context) const;
private:
static bool Validate(const void* data,
mojo::internal::ValidationContext* validation_context);
};
// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, Camera3ErrorMsg::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, Camera3ErrorMsg::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
return !(rhs < lhs);
}
template <typename T, Camera3ErrorMsg::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
return rhs < lhs;
}
template <typename T, Camera3ErrorMsg::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
return !(lhs < rhs);
}
class Camera3ShutterMsg {
public:
template <typename T>
using EnableIfSame = std::enable_if_t<std::is_same<Camera3ShutterMsg, T>::value>;
using DataView = Camera3ShutterMsgDataView;
using Data_ = internal::Camera3ShutterMsg_Data;
template <typename... Args>
static Camera3ShutterMsgPtr New(Args&&... args) {
return Camera3ShutterMsgPtr(
std::in_place, std::forward<Args>(args)...);
}
template <typename U>
static Camera3ShutterMsgPtr From(const U& u) {
return mojo::TypeConverter<Camera3ShutterMsgPtr, U>::Convert(u);
}
template <typename U>
U To() const {
return mojo::TypeConverter<U, Camera3ShutterMsg>::Convert(*this);
}
Camera3ShutterMsg();
Camera3ShutterMsg(
uint32_t frame_number,
uint64_t timestamp);
~Camera3ShutterMsg();
// Clone() is a template so it is only instantiated if it is used. Thus, the
// bindings generator does not need to know whether Clone() or copy
// constructor/assignment are available for members.
template <typename StructPtrType = Camera3ShutterMsgPtr>
Camera3ShutterMsgPtr Clone() const;
// Equals() is a template so it is only instantiated if it is used. Thus, the
// bindings generator does not need to know whether Equals() or == operator
// are available for members.
template <typename T, Camera3ShutterMsg::EnableIfSame<T>* = nullptr>
bool Equals(const T& other) const;
template <typename T, Camera3ShutterMsg::EnableIfSame<T>* = nullptr>
bool operator==(const T& rhs) const { return Equals(rhs); }
template <typename T, Camera3ShutterMsg::EnableIfSame<T>* = nullptr>
bool operator!=(const T& rhs) const { return !operator==(rhs); }
size_t Hash(size_t seed) const;
template <typename UserType>
static std::vector<uint8_t> Serialize(UserType* input) {
return mojo::internal::SerializeImpl<
Camera3ShutterMsg::DataView, std::vector<uint8_t>>(input);
}
template <typename UserType>
static mojo::Message SerializeAsMessage(UserType* input) {
return mojo::internal::SerializeAsMessageImpl<
Camera3ShutterMsg::DataView>(input);
}
// The returned Message is serialized only if the message is moved
// cross-process or cross-language. Otherwise if the message is Deserialized
// as the same UserType |input| will just be moved to |output| in
// DeserializeFromMessage.
template <typename UserType>
static mojo::Message WrapAsMessage(UserType input) {
return mojo::Message(std::make_unique<
internal::Camera3ShutterMsg_UnserializedMessageContext<
UserType, Camera3ShutterMsg::DataView>>(0, 0, std::move(input)),
MOJO_CREATE_MESSAGE_FLAG_NONE);
}
template <typename UserType>
static bool Deserialize(const void* data,
size_t data_num_bytes,
UserType* output) {
mojo::Message message;
return mojo::internal::DeserializeImpl<Camera3ShutterMsg::DataView>(
message, data, data_num_bytes, output, Validate);
}
template <typename UserType>
static bool Deserialize(const std::vector<uint8_t>& input,
UserType* output) {
return Camera3ShutterMsg::Deserialize(
input.size() == 0 ? nullptr : &input.front(), input.size(), output);
}
template <typename UserType>
static bool DeserializeFromMessage(mojo::Message input,
UserType* output) {
auto context = input.TakeUnserializedContext<
internal::Camera3ShutterMsg_UnserializedMessageContext<
UserType, Camera3ShutterMsg::DataView>>();
if (context) {
*output = std::move(context->TakeData());
return true;
}
input.SerializeIfNecessary();
return mojo::internal::DeserializeImpl<Camera3ShutterMsg::DataView>(
input, input.payload(), input.payload_num_bytes(), output, Validate);
}
uint32_t frame_number;
uint64_t timestamp;
// Serialise this struct into a trace.
void WriteIntoTrace(perfetto::TracedValue traced_context) const;
private:
static bool Validate(const void* data,
mojo::internal::ValidationContext* validation_context);
};
// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, Camera3ShutterMsg::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, Camera3ShutterMsg::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
return !(rhs < lhs);
}
template <typename T, Camera3ShutterMsg::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
return rhs < lhs;
}
template <typename T, Camera3ShutterMsg::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
return !(lhs < rhs);
}
class Camera3BufferRequest {
public:
template <typename T>
using EnableIfSame = std::enable_if_t<std::is_same<Camera3BufferRequest, T>::value>;
using DataView = Camera3BufferRequestDataView;
using Data_ = internal::Camera3BufferRequest_Data;
template <typename... Args>
static Camera3BufferRequestPtr New(Args&&... args) {
return Camera3BufferRequestPtr(
std::in_place, std::forward<Args>(args)...);
}
template <typename U>
static Camera3BufferRequestPtr From(const U& u) {
return mojo::TypeConverter<Camera3BufferRequestPtr, U>::Convert(u);
}
template <typename U>
U To() const {
return mojo::TypeConverter<U, Camera3BufferRequest>::Convert(*this);
}
Camera3BufferRequest();
Camera3BufferRequest(
uint64_t stream_id,
uint32_t num_buffers_requested);
~Camera3BufferRequest();
// Clone() is a template so it is only instantiated if it is used. Thus, the
// bindings generator does not need to know whether Clone() or copy
// constructor/assignment are available for members.
template <typename StructPtrType = Camera3BufferRequestPtr>
Camera3BufferRequestPtr Clone() const;
// Equals() is a template so it is only instantiated if it is used. Thus, the
// bindings generator does not need to know whether Equals() or == operator
// are available for members.
template <typename T, Camera3BufferRequest::EnableIfSame<T>* = nullptr>
bool Equals(const T& other) const;
template <typename T, Camera3BufferRequest::EnableIfSame<T>* = nullptr>
bool operator==(const T& rhs) const { return Equals(rhs); }
template <typename T, Camera3BufferRequest::EnableIfSame<T>* = nullptr>
bool operator!=(const T& rhs) const { return !operator==(rhs); }
size_t Hash(size_t seed) const;
template <typename UserType>
static std::vector<uint8_t> Serialize(UserType* input) {
return mojo::internal::SerializeImpl<
Camera3BufferRequest::DataView, std::vector<uint8_t>>(input);
}
template <typename UserType>
static mojo::Message SerializeAsMessage(UserType* input) {
return mojo::internal::SerializeAsMessageImpl<
Camera3BufferRequest::DataView>(input);
}
// The returned Message is serialized only if the message is moved
// cross-process or cross-language. Otherwise if the message is Deserialized
// as the same UserType |input| will just be moved to |output| in
// DeserializeFromMessage.
template <typename UserType>
static mojo::Message WrapAsMessage(UserType input) {
return mojo::Message(std::make_unique<
internal::Camera3BufferRequest_UnserializedMessageContext<
UserType, Camera3BufferRequest::DataView>>(0, 0, std::move(input)),
MOJO_CREATE_MESSAGE_FLAG_NONE);
}
template <typename UserType>
static bool Deserialize(const void* data,
size_t data_num_bytes,
UserType* output) {
mojo::Message message;
return mojo::internal::DeserializeImpl<Camera3BufferRequest::DataView>(
message, data, data_num_bytes, output, Validate);
}
template <typename UserType>
static bool Deserialize(const std::vector<uint8_t>& input,
UserType* output) {
return Camera3BufferRequest::Deserialize(
input.size() == 0 ? nullptr : &input.front(), input.size(), output);
}
template <typename UserType>
static bool DeserializeFromMessage(mojo::Message input,
UserType* output) {
auto context = input.TakeUnserializedContext<
internal::Camera3BufferRequest_UnserializedMessageContext<
UserType, Camera3BufferRequest::DataView>>();
if (context) {
*output = std::move(context->TakeData());
return true;
}
input.SerializeIfNecessary();
return mojo::internal::DeserializeImpl<Camera3BufferRequest::DataView>(
input, input.payload(), input.payload_num_bytes(), output, Validate);
}
uint64_t stream_id;
uint32_t num_buffers_requested;
// Serialise this struct into a trace.
void WriteIntoTrace(perfetto::TracedValue traced_context) const;
private:
static bool Validate(const void* data,
mojo::internal::ValidationContext* validation_context);
};
// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, Camera3BufferRequest::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, Camera3BufferRequest::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
return !(rhs < lhs);
}
template <typename T, Camera3BufferRequest::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
return rhs < lhs;
}
template <typename T, Camera3BufferRequest::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
return !(lhs < rhs);
}
class Camera3NotifyMsgMessage {
public:
using DataView = Camera3NotifyMsgMessageDataView;
using Data_ = internal::Camera3NotifyMsgMessage_Data;
using Tag = Data_::Camera3NotifyMsgMessage_Tag;
template <typename... Args>
static Camera3NotifyMsgMessagePtr New(Args&&... args) {
static_assert(
sizeof...(args) < 0,
"Do not use Union::New(); to create a union of a given subtype, use "
"New<SubType>(), not New() followed by set_<sub_type>(). To represent "
"an empty union, mark the field or parameter as nullable in the mojom "
"definition.");
return nullptr;
}
// Construct an instance holding |error|.
static Camera3NotifyMsgMessagePtr
NewError(
Camera3ErrorMsgPtr value) {
auto result = Camera3NotifyMsgMessagePtr(std::in_place);
result->set_error(std::move(value));
return result;
}
// Construct an instance holding |shutter|.
static Camera3NotifyMsgMessagePtr
NewShutter(
Camera3ShutterMsgPtr value) {
auto result = Camera3NotifyMsgMessagePtr(std::in_place);
result->set_shutter(std::move(value));
return result;
}
// Construct an instance holding |generic|.
static Camera3NotifyMsgMessagePtr
NewGeneric(
std::vector<uint8_t> value) {
auto result = Camera3NotifyMsgMessagePtr(std::in_place);
result->set_generic(std::move(value));
return result;
}
template <typename U>
static Camera3NotifyMsgMessagePtr From(const U& u) {
return mojo::TypeConverter<Camera3NotifyMsgMessagePtr, U>::Convert(u);
}
template <typename U>
U To() const {
return mojo::TypeConverter<U, Camera3NotifyMsgMessage>::Convert(*this);
}
Camera3NotifyMsgMessage();
~Camera3NotifyMsgMessage();
// Delete the copy constructor and copy assignment operators because `data_`
// contains raw pointers that must not be copied.
Camera3NotifyMsgMessage(const Camera3NotifyMsgMessage& other) = delete;
Camera3NotifyMsgMessage& operator=(const Camera3NotifyMsgMessage& other) = delete;
// Clone() is a template so it is only instantiated if it is used. Thus, the
// bindings generator does not need to know whether Clone() or copy
// constructor/assignment are available for members.
template <typename UnionPtrType = Camera3NotifyMsgMessagePtr>
Camera3NotifyMsgMessagePtr Clone() const;
// Equals() is a template so it is only instantiated if it is used. Thus, the
// bindings generator does not need to know whether Equals() or == operator
// are available for members.
template <typename T,
typename std::enable_if<std::is_same<
T, Camera3NotifyMsgMessage>::value>::type* = nullptr>
bool Equals(const T& other) const;
template <typename T,
typename std::enable_if<std::is_same<
T, Camera3NotifyMsgMessage>::value>::type* = nullptr>
bool operator==(const T& rhs) const { return Equals(rhs); }
Tag which() const {
return tag_;
}
bool is_error() const { return tag_ == Tag::kError; }
Camera3ErrorMsgPtr& get_error() const {
CHECK(tag_ == Tag::kError);
return *(data_.error);
}
void set_error(
Camera3ErrorMsgPtr error);
bool is_shutter() const { return tag_ == Tag::kShutter; }
Camera3ShutterMsgPtr& get_shutter() const {
CHECK(tag_ == Tag::kShutter);
return *(data_.shutter);
}
void set_shutter(
Camera3ShutterMsgPtr shutter);
bool is_generic() const { return tag_ == Tag::kGeneric; }
std::vector<uint8_t>& get_generic() const {
CHECK(tag_ == Tag::kGeneric);
return *(data_.generic);
}
void set_generic(
std::vector<uint8_t> generic);
template <typename UserType>
static mojo::Message SerializeAsMessage(UserType* input) {
return mojo::internal::SerializeAsMessageImpl<
Camera3NotifyMsgMessage::DataView>(input);
}
template <typename UserType>
static bool DeserializeFromMessage(mojo::Message input,
UserType* output) {
return mojo::internal::DeserializeImpl<Camera3NotifyMsgMessage::DataView>(
input, input.payload(), input.payload_num_bytes(), output, Validate);
}
private:
union Union_ {
Union_() = default;
~Union_() = default;
Camera3ErrorMsgPtr* error;
Camera3ShutterMsgPtr* shutter;
std::vector<uint8_t>* generic;
};
static bool Validate(const void* data,
mojo::internal::ValidationContext* validation_context);
void DestroyActive();
Tag tag_;
Union_ data_;
};
class Camera3Stream {
public:
template <typename T>
using EnableIfSame = std::enable_if_t<std::is_same<Camera3Stream, T>::value>;
using DataView = Camera3StreamDataView;
using Data_ = internal::Camera3Stream_Data;
template <typename... Args>
static Camera3StreamPtr New(Args&&... args) {
return Camera3StreamPtr(
std::in_place, std::forward<Args>(args)...);
}
template <typename U>
static Camera3StreamPtr From(const U& u) {
return mojo::TypeConverter<Camera3StreamPtr, U>::Convert(u);
}
template <typename U>
U To() const {
return mojo::TypeConverter<U, Camera3Stream>::Convert(*this);
}
Camera3Stream();
Camera3Stream(
uint64_t id,
Camera3StreamType stream_type,
uint32_t width,
uint32_t height,
HalPixelFormat format,
uint32_t usage,
uint32_t max_buffers,
uint32_t data_space,
Camera3StreamRotation rotation);
Camera3Stream(
uint64_t id,
Camera3StreamType stream_type,
uint32_t width,
uint32_t height,
HalPixelFormat format,
uint32_t usage,
uint32_t max_buffers,
uint32_t data_space,
Camera3StreamRotation rotation,
CropRotateScaleInfoPtr crop_rotate_scale_info);
Camera3Stream(
uint64_t id,
Camera3StreamType stream_type,
uint32_t width,
uint32_t height,
HalPixelFormat format,
uint32_t usage,
uint32_t max_buffers,
uint32_t data_space,
Camera3StreamRotation rotation,
CropRotateScaleInfoPtr crop_rotate_scale_info,
const std::optional<std::string>& physical_camera_id);
Camera3Stream(
uint64_t id,
Camera3StreamType stream_type,
uint32_t width,
uint32_t height,
HalPixelFormat format,
uint32_t usage,
uint32_t max_buffers,
uint32_t data_space,
Camera3StreamRotation rotation,
CropRotateScaleInfoPtr crop_rotate_scale_info,
const std::optional<std::string>& physical_camera_id,
std::optional<std::vector<::cros::mojom::Camera3StreamEffectPtr>> effects);
Camera3Stream(const Camera3Stream&) = delete;
Camera3Stream& operator=(const Camera3Stream&) = delete;
~Camera3Stream();
// Clone() is a template so it is only instantiated if it is used. Thus, the
// bindings generator does not need to know whether Clone() or copy
// constructor/assignment are available for members.
template <typename StructPtrType = Camera3StreamPtr>
Camera3StreamPtr Clone() const;
// Equals() is a template so it is only instantiated if it is used. Thus, the
// bindings generator does not need to know whether Equals() or == operator
// are available for members.
template <typename T, Camera3Stream::EnableIfSame<T>* = nullptr>
bool Equals(const T& other) const;
template <typename T, Camera3Stream::EnableIfSame<T>* = nullptr>
bool operator==(const T& rhs) const { return Equals(rhs); }
template <typename T, Camera3Stream::EnableIfSame<T>* = nullptr>
bool operator!=(const T& rhs) const { return !operator==(rhs); }
template <typename UserType>
static std::vector<uint8_t> Serialize(UserType* input) {
return mojo::internal::SerializeImpl<
Camera3Stream::DataView, std::vector<uint8_t>>(input);
}
template <typename UserType>
static mojo::Message SerializeAsMessage(UserType* input) {
return mojo::internal::SerializeAsMessageImpl<
Camera3Stream::DataView>(input);
}
// The returned Message is serialized only if the message is moved
// cross-process or cross-language. Otherwise if the message is Deserialized
// as the same UserType |input| will just be moved to |output| in
// DeserializeFromMessage.
template <typename UserType>
static mojo::Message WrapAsMessage(UserType input) {
return mojo::Message(std::make_unique<
internal::Camera3Stream_UnserializedMessageContext<
UserType, Camera3Stream::DataView>>(0, 0, std::move(input)),
MOJO_CREATE_MESSAGE_FLAG_NONE);
}
template <typename UserType>
static bool Deserialize(const void* data,
size_t data_num_bytes,
UserType* output) {
mojo::Message message;
return mojo::internal::DeserializeImpl<Camera3Stream::DataView>(
message, data, data_num_bytes, output, Validate);
}
template <typename UserType>
static bool Deserialize(const std::vector<uint8_t>& input,
UserType* output) {
return Camera3Stream::Deserialize(
input.size() == 0 ? nullptr : &input.front(), input.size(), output);
}
template <typename UserType>
static bool DeserializeFromMessage(mojo::Message input,
UserType* output) {
auto context = input.TakeUnserializedContext<
internal::Camera3Stream_UnserializedMessageContext<
UserType, Camera3Stream::DataView>>();
if (context) {
*output = std::move(context->TakeData());
return true;
}
input.SerializeIfNecessary();
return mojo::internal::DeserializeImpl<Camera3Stream::DataView>(
input, input.payload(), input.payload_num_bytes(), output, Validate);
}
uint64_t id;
Camera3StreamType stream_type;
uint32_t width;
uint32_t height;
HalPixelFormat format;
uint32_t usage;
uint32_t max_buffers;
uint32_t data_space;
Camera3StreamRotation rotation;
CropRotateScaleInfoPtr crop_rotate_scale_info;
std::optional<std::string> physical_camera_id;
std::optional<std::vector<::cros::mojom::Camera3StreamEffectPtr>> effects;
// Serialise this struct into a trace.
void WriteIntoTrace(perfetto::TracedValue traced_context) const;
private:
static bool Validate(const void* data,
mojo::internal::ValidationContext* validation_context);
};
// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, Camera3Stream::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, Camera3Stream::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
return !(rhs < lhs);
}
template <typename T, Camera3Stream::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
return rhs < lhs;
}
template <typename T, Camera3Stream::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
return !(lhs < rhs);
}
class Camera3StreamConfiguration {
public:
template <typename T>
using EnableIfSame = std::enable_if_t<std::is_same<Camera3StreamConfiguration, T>::value>;
using DataView = Camera3StreamConfigurationDataView;
using Data_ = internal::Camera3StreamConfiguration_Data;
template <typename... Args>
static Camera3StreamConfigurationPtr New(Args&&... args) {
return Camera3StreamConfigurationPtr(
std::in_place, std::forward<Args>(args)...);
}
template <typename U>
static Camera3StreamConfigurationPtr From(const U& u) {
return mojo::TypeConverter<Camera3StreamConfigurationPtr, U>::Convert(u);
}
template <typename U>
U To() const {
return mojo::TypeConverter<U, Camera3StreamConfiguration>::Convert(*this);
}
Camera3StreamConfiguration();
Camera3StreamConfiguration(
std::vector<Camera3StreamPtr> streams,
Camera3StreamConfigurationMode operation_mode);
Camera3StreamConfiguration(
std::vector<Camera3StreamPtr> streams,
Camera3StreamConfigurationMode operation_mode,
::cros::mojom::CameraMetadataPtr session_parameters);
Camera3StreamConfiguration(const Camera3StreamConfiguration&) = delete;
Camera3StreamConfiguration& operator=(const Camera3StreamConfiguration&) = delete;
~Camera3StreamConfiguration();
// Clone() is a template so it is only instantiated if it is used. Thus, the
// bindings generator does not need to know whether Clone() or copy
// constructor/assignment are available for members.
template <typename StructPtrType = Camera3StreamConfigurationPtr>
Camera3StreamConfigurationPtr Clone() const;
// Equals() is a template so it is only instantiated if it is used. Thus, the
// bindings generator does not need to know whether Equals() or == operator
// are available for members.
template <typename T, Camera3StreamConfiguration::EnableIfSame<T>* = nullptr>
bool Equals(const T& other) const;
template <typename T, Camera3StreamConfiguration::EnableIfSame<T>* = nullptr>
bool operator==(const T& rhs) const { return Equals(rhs); }
template <typename T, Camera3StreamConfiguration::EnableIfSame<T>* = nullptr>
bool operator!=(const T& rhs) const { return !operator==(rhs); }
template <typename UserType>
static std::vector<uint8_t> Serialize(UserType* input) {
return mojo::internal::SerializeImpl<
Camera3StreamConfiguration::DataView, std::vector<uint8_t>>(input);
}
template <typename UserType>
static mojo::Message SerializeAsMessage(UserType* input) {
return mojo::internal::SerializeAsMessageImpl<
Camera3StreamConfiguration::DataView>(input);
}
// The returned Message is serialized only if the message is moved
// cross-process or cross-language. Otherwise if the message is Deserialized
// as the same UserType |input| will just be moved to |output| in
// DeserializeFromMessage.
template <typename UserType>
static mojo::Message WrapAsMessage(UserType input) {
return mojo::Message(std::make_unique<
internal::Camera3StreamConfiguration_UnserializedMessageContext<
UserType, Camera3StreamConfiguration::DataView>>(0, 0, std::move(input)),
MOJO_CREATE_MESSAGE_FLAG_NONE);
}
template <typename UserType>
static bool Deserialize(const void* data,
size_t data_num_bytes,
UserType* output) {
mojo::Message message;
return mojo::internal::DeserializeImpl<Camera3StreamConfiguration::DataView>(
message, data, data_num_bytes, output, Validate);
}
template <typename UserType>
static bool Deserialize(const std::vector<uint8_t>& input,
UserType* output) {
return Camera3StreamConfiguration::Deserialize(
input.size() == 0 ? nullptr : &input.front(), input.size(), output);
}
template <typename UserType>
static bool DeserializeFromMessage(mojo::Message input,
UserType* output) {
auto context = input.TakeUnserializedContext<
internal::Camera3StreamConfiguration_UnserializedMessageContext<
UserType, Camera3StreamConfiguration::DataView>>();
if (context) {
*output = std::move(context->TakeData());
return true;
}
input.SerializeIfNecessary();
return mojo::internal::DeserializeImpl<Camera3StreamConfiguration::DataView>(
input, input.payload(), input.payload_num_bytes(), output, Validate);
}
std::vector<Camera3StreamPtr> streams;
Camera3StreamConfigurationMode operation_mode;
::cros::mojom::CameraMetadataPtr session_parameters;
// Serialise this struct into a trace.
void WriteIntoTrace(perfetto::TracedValue traced_context) const;
private:
static bool Validate(const void* data,
mojo::internal::ValidationContext* validation_context);
};
// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, Camera3StreamConfiguration::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, Camera3StreamConfiguration::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
return !(rhs < lhs);
}
template <typename T, Camera3StreamConfiguration::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
return rhs < lhs;
}
template <typename T, Camera3StreamConfiguration::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
return !(lhs < rhs);
}
class CameraBufferHandle {
public:
template <typename T>
using EnableIfSame = std::enable_if_t<std::is_same<CameraBufferHandle, T>::value>;
using DataView = CameraBufferHandleDataView;
using Data_ = internal::CameraBufferHandle_Data;
template <typename... Args>
static CameraBufferHandlePtr New(Args&&... args) {
return CameraBufferHandlePtr(
std::in_place, std::forward<Args>(args)...);
}
template <typename U>
static CameraBufferHandlePtr From(const U& u) {
return mojo::TypeConverter<CameraBufferHandlePtr, U>::Convert(u);
}
template <typename U>
U To() const {
return mojo::TypeConverter<U, CameraBufferHandle>::Convert(*this);
}
CameraBufferHandle();
CameraBufferHandle(
uint64_t buffer_id,
std::vector<::mojo::ScopedHandle> fds,
uint32_t drm_format,
HalPixelFormat hal_pixel_format,
uint32_t width,
uint32_t height,
std::vector<uint32_t> strides,
std::vector<uint32_t> offsets);
CameraBufferHandle(
uint64_t buffer_id,
std::vector<::mojo::ScopedHandle> fds,
uint32_t drm_format,
HalPixelFormat hal_pixel_format,
uint32_t width,
uint32_t height,
std::vector<uint32_t> strides,
std::vector<uint32_t> offsets,
std::optional<std::vector<uint32_t>> sizes);
CameraBufferHandle(
uint64_t buffer_id,
std::vector<::mojo::ScopedHandle> fds,
uint32_t drm_format,
HalPixelFormat hal_pixel_format,
uint32_t width,
uint32_t height,
std::vector<uint32_t> strides,
std::vector<uint32_t> offsets,
std::optional<std::vector<uint32_t>> sizes,
bool has_modifier,
uint64_t modifier);
CameraBufferHandle(const CameraBufferHandle&) = delete;
CameraBufferHandle& operator=(const CameraBufferHandle&) = delete;
~CameraBufferHandle();
// Clone() is a template so it is only instantiated if it is used. Thus, the
// bindings generator does not need to know whether Clone() or copy
// constructor/assignment are available for members.
template <typename StructPtrType = CameraBufferHandlePtr>
CameraBufferHandlePtr Clone() const;
// Equals() is a template so it is only instantiated if it is used. Thus, the
// bindings generator does not need to know whether Equals() or == operator
// are available for members.
template <typename T, CameraBufferHandle::EnableIfSame<T>* = nullptr>
bool Equals(const T& other) const;
template <typename T, CameraBufferHandle::EnableIfSame<T>* = nullptr>
bool operator==(const T& rhs) const { return Equals(rhs); }
template <typename T, CameraBufferHandle::EnableIfSame<T>* = nullptr>
bool operator!=(const T& rhs) const { return !operator==(rhs); }
template <typename UserType>
static mojo::Message SerializeAsMessage(UserType* input) {
return mojo::internal::SerializeAsMessageImpl<
CameraBufferHandle::DataView>(input);
}
// The returned Message is serialized only if the message is moved
// cross-process or cross-language. Otherwise if the message is Deserialized
// as the same UserType |input| will just be moved to |output| in
// DeserializeFromMessage.
template <typename UserType>
static mojo::Message WrapAsMessage(UserType input) {
return mojo::Message(std::make_unique<
internal::CameraBufferHandle_UnserializedMessageContext<
UserType, CameraBufferHandle::DataView>>(0, 0, std::move(input)),
MOJO_CREATE_MESSAGE_FLAG_NONE);
}
template <typename UserType>
static bool Deserialize(const void* data,
size_t data_num_bytes,
UserType* output) {
mojo::Message message;
return mojo::internal::DeserializeImpl<CameraBufferHandle::DataView>(
message, data, data_num_bytes, output, Validate);
}
template <typename UserType>
static bool Deserialize(const std::vector<uint8_t>& input,
UserType* output) {
return CameraBufferHandle::Deserialize(
input.size() == 0 ? nullptr : &input.front(), input.size(), output);
}
template <typename UserType>
static bool DeserializeFromMessage(mojo::Message input,
UserType* output) {
auto context = input.TakeUnserializedContext<
internal::CameraBufferHandle_UnserializedMessageContext<
UserType, CameraBufferHandle::DataView>>();
if (context) {
*output = std::move(context->TakeData());
return true;
}
input.SerializeIfNecessary();
return mojo::internal::DeserializeImpl<CameraBufferHandle::DataView>(
input, input.payload(), input.payload_num_bytes(), output, Validate);
}
uint64_t buffer_id;
std::vector<::mojo::ScopedHandle> fds;
uint32_t drm_format;
HalPixelFormat hal_pixel_format;
uint32_t width;
uint32_t height;
std::vector<uint32_t> strides;
std::vector<uint32_t> offsets;
std::optional<std::vector<uint32_t>> sizes;
bool has_modifier;
uint64_t modifier;
// Serialise this struct into a trace.
void WriteIntoTrace(perfetto::TracedValue traced_context) const;
private:
static bool Validate(const void* data,
mojo::internal::ValidationContext* validation_context);
};
// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, CameraBufferHandle::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, CameraBufferHandle::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
return !(rhs < lhs);
}
template <typename T, CameraBufferHandle::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
return rhs < lhs;
}
template <typename T, CameraBufferHandle::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
return !(lhs < rhs);
}
class Camera3StreamBuffer {
public:
template <typename T>
using EnableIfSame = std::enable_if_t<std::is_same<Camera3StreamBuffer, T>::value>;
using DataView = Camera3StreamBufferDataView;
using Data_ = internal::Camera3StreamBuffer_Data;
template <typename... Args>
static Camera3StreamBufferPtr New(Args&&... args) {
return Camera3StreamBufferPtr(
std::in_place, std::forward<Args>(args)...);
}
template <typename U>
static Camera3StreamBufferPtr From(const U& u) {
return mojo::TypeConverter<Camera3StreamBufferPtr, U>::Convert(u);
}
template <typename U>
U To() const {
return mojo::TypeConverter<U, Camera3StreamBuffer>::Convert(*this);
}
Camera3StreamBuffer();
Camera3StreamBuffer(
uint64_t stream_id,
uint64_t buffer_id,
Camera3BufferStatus status,
::mojo::ScopedHandle acquire_fence,
::mojo::ScopedHandle release_fence);
Camera3StreamBuffer(
uint64_t stream_id,
uint64_t buffer_id,
Camera3BufferStatus status,
::mojo::ScopedHandle acquire_fence,
::mojo::ScopedHandle release_fence,
CameraBufferHandlePtr buffer_handle);
Camera3StreamBuffer(const Camera3StreamBuffer&) = delete;
Camera3StreamBuffer& operator=(const Camera3StreamBuffer&) = delete;
~Camera3StreamBuffer();
// Clone() is a template so it is only instantiated if it is used. Thus, the
// bindings generator does not need to know whether Clone() or copy
// constructor/assignment are available for members.
template <typename StructPtrType = Camera3StreamBufferPtr>
Camera3StreamBufferPtr Clone() const;
// Equals() is a template so it is only instantiated if it is used. Thus, the
// bindings generator does not need to know whether Equals() or == operator
// are available for members.
template <typename T, Camera3StreamBuffer::EnableIfSame<T>* = nullptr>
bool Equals(const T& other) const;
template <typename T, Camera3StreamBuffer::EnableIfSame<T>* = nullptr>
bool operator==(const T& rhs) const { return Equals(rhs); }
template <typename T, Camera3StreamBuffer::EnableIfSame<T>* = nullptr>
bool operator!=(const T& rhs) const { return !operator==(rhs); }
template <typename UserType>
static mojo::Message SerializeAsMessage(UserType* input) {
return mojo::internal::SerializeAsMessageImpl<
Camera3StreamBuffer::DataView>(input);
}
// The returned Message is serialized only if the message is moved
// cross-process or cross-language. Otherwise if the message is Deserialized
// as the same UserType |input| will just be moved to |output| in
// DeserializeFromMessage.
template <typename UserType>
static mojo::Message WrapAsMessage(UserType input) {
return mojo::Message(std::make_unique<
internal::Camera3StreamBuffer_UnserializedMessageContext<
UserType, Camera3StreamBuffer::DataView>>(0, 0, std::move(input)),
MOJO_CREATE_MESSAGE_FLAG_NONE);
}
template <typename UserType>
static bool Deserialize(const void* data,
size_t data_num_bytes,
UserType* output) {
mojo::Message message;
return mojo::internal::DeserializeImpl<Camera3StreamBuffer::DataView>(
message, data, data_num_bytes, output, Validate);
}
template <typename UserType>
static bool Deserialize(const std::vector<uint8_t>& input,
UserType* output) {
return Camera3StreamBuffer::Deserialize(
input.size() == 0 ? nullptr : &input.front(), input.size(), output);
}
template <typename UserType>
static bool DeserializeFromMessage(mojo::Message input,
UserType* output) {
auto context = input.TakeUnserializedContext<
internal::Camera3StreamBuffer_UnserializedMessageContext<
UserType, Camera3StreamBuffer::DataView>>();
if (context) {
*output = std::move(context->TakeData());
return true;
}
input.SerializeIfNecessary();
return mojo::internal::DeserializeImpl<Camera3StreamBuffer::DataView>(
input, input.payload(), input.payload_num_bytes(), output, Validate);
}
uint64_t stream_id;
uint64_t buffer_id;
Camera3BufferStatus status;
::mojo::ScopedHandle acquire_fence;
::mojo::ScopedHandle release_fence;
CameraBufferHandlePtr buffer_handle;
// Serialise this struct into a trace.
void WriteIntoTrace(perfetto::TracedValue traced_context) const;
private:
static bool Validate(const void* data,
mojo::internal::ValidationContext* validation_context);
};
// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, Camera3StreamBuffer::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, Camera3StreamBuffer::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
return !(rhs < lhs);
}
template <typename T, Camera3StreamBuffer::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
return rhs < lhs;
}
template <typename T, Camera3StreamBuffer::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
return !(lhs < rhs);
}
class Camera3NotifyMsg {
public:
template <typename T>
using EnableIfSame = std::enable_if_t<std::is_same<Camera3NotifyMsg, T>::value>;
using DataView = Camera3NotifyMsgDataView;
using Data_ = internal::Camera3NotifyMsg_Data;
template <typename... Args>
static Camera3NotifyMsgPtr New(Args&&... args) {
return Camera3NotifyMsgPtr(
std::in_place, std::forward<Args>(args)...);
}
template <typename U>
static Camera3NotifyMsgPtr From(const U& u) {
return mojo::TypeConverter<Camera3NotifyMsgPtr, U>::Convert(u);
}
template <typename U>
U To() const {
return mojo::TypeConverter<U, Camera3NotifyMsg>::Convert(*this);
}
Camera3NotifyMsg();
Camera3NotifyMsg(
Camera3MsgType type,
Camera3NotifyMsgMessagePtr message);
Camera3NotifyMsg(const Camera3NotifyMsg&) = delete;
Camera3NotifyMsg& operator=(const Camera3NotifyMsg&) = delete;
~Camera3NotifyMsg();
// Clone() is a template so it is only instantiated if it is used. Thus, the
// bindings generator does not need to know whether Clone() or copy
// constructor/assignment are available for members.
template <typename StructPtrType = Camera3NotifyMsgPtr>
Camera3NotifyMsgPtr Clone() const;
// Equals() is a template so it is only instantiated if it is used. Thus, the
// bindings generator does not need to know whether Equals() or == operator
// are available for members.
template <typename T, Camera3NotifyMsg::EnableIfSame<T>* = nullptr>
bool Equals(const T& other) const;
template <typename T, Camera3NotifyMsg::EnableIfSame<T>* = nullptr>
bool operator==(const T& rhs) const { return Equals(rhs); }
template <typename T, Camera3NotifyMsg::EnableIfSame<T>* = nullptr>
bool operator!=(const T& rhs) const { return !operator==(rhs); }
template <typename UserType>
static std::vector<uint8_t> Serialize(UserType* input) {
return mojo::internal::SerializeImpl<
Camera3NotifyMsg::DataView, std::vector<uint8_t>>(input);
}
template <typename UserType>
static mojo::Message SerializeAsMessage(UserType* input) {
return mojo::internal::SerializeAsMessageImpl<
Camera3NotifyMsg::DataView>(input);
}
// The returned Message is serialized only if the message is moved
// cross-process or cross-language. Otherwise if the message is Deserialized
// as the same UserType |input| will just be moved to |output| in
// DeserializeFromMessage.
template <typename UserType>
static mojo::Message WrapAsMessage(UserType input) {
return mojo::Message(std::make_unique<
internal::Camera3NotifyMsg_UnserializedMessageContext<
UserType, Camera3NotifyMsg::DataView>>(0, 0, std::move(input)),
MOJO_CREATE_MESSAGE_FLAG_NONE);
}
template <typename UserType>
static bool Deserialize(const void* data,
size_t data_num_bytes,
UserType* output) {
mojo::Message message;
return mojo::internal::DeserializeImpl<Camera3NotifyMsg::DataView>(
message, data, data_num_bytes, output, Validate);
}
template <typename UserType>
static bool Deserialize(const std::vector<uint8_t>& input,
UserType* output) {
return Camera3NotifyMsg::Deserialize(
input.size() == 0 ? nullptr : &input.front(), input.size(), output);
}
template <typename UserType>
static bool DeserializeFromMessage(mojo::Message input,
UserType* output) {
auto context = input.TakeUnserializedContext<
internal::Camera3NotifyMsg_UnserializedMessageContext<
UserType, Camera3NotifyMsg::DataView>>();
if (context) {
*output = std::move(context->TakeData());
return true;
}
input.SerializeIfNecessary();
return mojo::internal::DeserializeImpl<Camera3NotifyMsg::DataView>(
input, input.payload(), input.payload_num_bytes(), output, Validate);
}
Camera3MsgType type;
Camera3NotifyMsgMessagePtr message;
// Serialise this struct into a trace.
void WriteIntoTrace(perfetto::TracedValue traced_context) const;
private:
static bool Validate(const void* data,
mojo::internal::ValidationContext* validation_context);
};
// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, Camera3NotifyMsg::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, Camera3NotifyMsg::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
return !(rhs < lhs);
}
template <typename T, Camera3NotifyMsg::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
return rhs < lhs;
}
template <typename T, Camera3NotifyMsg::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
return !(lhs < rhs);
}
class Camera3StreamBufferRet {
public:
template <typename T>
using EnableIfSame = std::enable_if_t<std::is_same<Camera3StreamBufferRet, T>::value>;
using DataView = Camera3StreamBufferRetDataView;
using Data_ = internal::Camera3StreamBufferRet_Data;
template <typename... Args>
static Camera3StreamBufferRetPtr New(Args&&... args) {
return Camera3StreamBufferRetPtr(
std::in_place, std::forward<Args>(args)...);
}
template <typename U>
static Camera3StreamBufferRetPtr From(const U& u) {
return mojo::TypeConverter<Camera3StreamBufferRetPtr, U>::Convert(u);
}
template <typename U>
U To() const {
return mojo::TypeConverter<U, Camera3StreamBufferRet>::Convert(*this);
}
Camera3StreamBufferRet();
Camera3StreamBufferRet(
uint64_t stream_id,
Camera3StreamBufferReqStatus status,
std::optional<std::vector<Camera3StreamBufferPtr>> output_buffers);
Camera3StreamBufferRet(const Camera3StreamBufferRet&) = delete;
Camera3StreamBufferRet& operator=(const Camera3StreamBufferRet&) = delete;
~Camera3StreamBufferRet();
// Clone() is a template so it is only instantiated if it is used. Thus, the
// bindings generator does not need to know whether Clone() or copy
// constructor/assignment are available for members.
template <typename StructPtrType = Camera3StreamBufferRetPtr>
Camera3StreamBufferRetPtr Clone() const;
// Equals() is a template so it is only instantiated if it is used. Thus, the
// bindings generator does not need to know whether Equals() or == operator
// are available for members.
template <typename T, Camera3StreamBufferRet::EnableIfSame<T>* = nullptr>
bool Equals(const T& other) const;
template <typename T, Camera3StreamBufferRet::EnableIfSame<T>* = nullptr>
bool operator==(const T& rhs) const { return Equals(rhs); }
template <typename T, Camera3StreamBufferRet::EnableIfSame<T>* = nullptr>
bool operator!=(const T& rhs) const { return !operator==(rhs); }
template <typename UserType>
static mojo::Message SerializeAsMessage(UserType* input) {
return mojo::internal::SerializeAsMessageImpl<
Camera3StreamBufferRet::DataView>(input);
}
// The returned Message is serialized only if the message is moved
// cross-process or cross-language. Otherwise if the message is Deserialized
// as the same UserType |input| will just be moved to |output| in
// DeserializeFromMessage.
template <typename UserType>
static mojo::Message WrapAsMessage(UserType input) {
return mojo::Message(std::make_unique<
internal::Camera3StreamBufferRet_UnserializedMessageContext<
UserType, Camera3StreamBufferRet::DataView>>(0, 0, std::move(input)),
MOJO_CREATE_MESSAGE_FLAG_NONE);
}
template <typename UserType>
static bool Deserialize(const void* data,
size_t data_num_bytes,
UserType* output) {
mojo::Message message;
return mojo::internal::DeserializeImpl<Camera3StreamBufferRet::DataView>(
message, data, data_num_bytes, output, Validate);
}
template <typename UserType>
static bool Deserialize(const std::vector<uint8_t>& input,
UserType* output) {
return Camera3StreamBufferRet::Deserialize(
input.size() == 0 ? nullptr : &input.front(), input.size(), output);
}
template <typename UserType>
static bool DeserializeFromMessage(mojo::Message input,
UserType* output) {
auto context = input.TakeUnserializedContext<
internal::Camera3StreamBufferRet_UnserializedMessageContext<
UserType, Camera3StreamBufferRet::DataView>>();
if (context) {
*output = std::move(context->TakeData());
return true;
}
input.SerializeIfNecessary();
return mojo::internal::DeserializeImpl<Camera3StreamBufferRet::DataView>(
input, input.payload(), input.payload_num_bytes(), output, Validate);
}
uint64_t stream_id;
Camera3StreamBufferReqStatus status;
std::optional<std::vector<Camera3StreamBufferPtr>> output_buffers;
// Serialise this struct into a trace.
void WriteIntoTrace(perfetto::TracedValue traced_context) const;
private:
static bool Validate(const void* data,
mojo::internal::ValidationContext* validation_context);
};
// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, Camera3StreamBufferRet::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, Camera3StreamBufferRet::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
return !(rhs < lhs);
}
template <typename T, Camera3StreamBufferRet::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
return rhs < lhs;
}
template <typename T, Camera3StreamBufferRet::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
return !(lhs < rhs);
}
class Camera3PhyscamMetadata {
public:
template <typename T>
using EnableIfSame = std::enable_if_t<std::is_same<Camera3PhyscamMetadata, T>::value>;
using DataView = Camera3PhyscamMetadataDataView;
using Data_ = internal::Camera3PhyscamMetadata_Data;
template <typename... Args>
static Camera3PhyscamMetadataPtr New(Args&&... args) {
return Camera3PhyscamMetadataPtr(
std::in_place, std::forward<Args>(args)...);
}
template <typename U>
static Camera3PhyscamMetadataPtr From(const U& u) {
return mojo::TypeConverter<Camera3PhyscamMetadataPtr, U>::Convert(u);
}
template <typename U>
U To() const {
return mojo::TypeConverter<U, Camera3PhyscamMetadata>::Convert(*this);
}
Camera3PhyscamMetadata();
Camera3PhyscamMetadata(
int32_t id,
::cros::mojom::CameraMetadataPtr metadata);
Camera3PhyscamMetadata(const Camera3PhyscamMetadata&) = delete;
Camera3PhyscamMetadata& operator=(const Camera3PhyscamMetadata&) = delete;
~Camera3PhyscamMetadata();
// Clone() is a template so it is only instantiated if it is used. Thus, the
// bindings generator does not need to know whether Clone() or copy
// constructor/assignment are available for members.
template <typename StructPtrType = Camera3PhyscamMetadataPtr>
Camera3PhyscamMetadataPtr Clone() const;
// Equals() is a template so it is only instantiated if it is used. Thus, the
// bindings generator does not need to know whether Equals() or == operator
// are available for members.
template <typename T, Camera3PhyscamMetadata::EnableIfSame<T>* = nullptr>
bool Equals(const T& other) const;
template <typename T, Camera3PhyscamMetadata::EnableIfSame<T>* = nullptr>
bool operator==(const T& rhs) const { return Equals(rhs); }
template <typename T, Camera3PhyscamMetadata::EnableIfSame<T>* = nullptr>
bool operator!=(const T& rhs) const { return !operator==(rhs); }
template <typename UserType>
static std::vector<uint8_t> Serialize(UserType* input) {
return mojo::internal::SerializeImpl<
Camera3PhyscamMetadata::DataView, std::vector<uint8_t>>(input);
}
template <typename UserType>
static mojo::Message SerializeAsMessage(UserType* input) {
return mojo::internal::SerializeAsMessageImpl<
Camera3PhyscamMetadata::DataView>(input);
}
// The returned Message is serialized only if the message is moved
// cross-process or cross-language. Otherwise if the message is Deserialized
// as the same UserType |input| will just be moved to |output| in
// DeserializeFromMessage.
template <typename UserType>
static mojo::Message WrapAsMessage(UserType input) {
return mojo::Message(std::make_unique<
internal::Camera3PhyscamMetadata_UnserializedMessageContext<
UserType, Camera3PhyscamMetadata::DataView>>(0, 0, std::move(input)),
MOJO_CREATE_MESSAGE_FLAG_NONE);
}
template <typename UserType>
static bool Deserialize(const void* data,
size_t data_num_bytes,
UserType* output) {
mojo::Message message;
return mojo::internal::DeserializeImpl<Camera3PhyscamMetadata::DataView>(
message, data, data_num_bytes, output, Validate);
}
template <typename UserType>
static bool Deserialize(const std::vector<uint8_t>& input,
UserType* output) {
return Camera3PhyscamMetadata::Deserialize(
input.size() == 0 ? nullptr : &input.front(), input.size(), output);
}
template <typename UserType>
static bool DeserializeFromMessage(mojo::Message input,
UserType* output) {
auto context = input.TakeUnserializedContext<
internal::Camera3PhyscamMetadata_UnserializedMessageContext<
UserType, Camera3PhyscamMetadata::DataView>>();
if (context) {
*output = std::move(context->TakeData());
return true;
}
input.SerializeIfNecessary();
return mojo::internal::DeserializeImpl<Camera3PhyscamMetadata::DataView>(
input, input.payload(), input.payload_num_bytes(), output, Validate);
}
int32_t id;
::cros::mojom::CameraMetadataPtr metadata;
// Serialise this struct into a trace.
void WriteIntoTrace(perfetto::TracedValue traced_context) const;
private:
static bool Validate(const void* data,
mojo::internal::ValidationContext* validation_context);
};
// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, Camera3PhyscamMetadata::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, Camera3PhyscamMetadata::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
return !(rhs < lhs);
}
template <typename T, Camera3PhyscamMetadata::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
return rhs < lhs;
}
template <typename T, Camera3PhyscamMetadata::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
return !(lhs < rhs);
}
class Camera3CaptureRequest {
public:
template <typename T>
using EnableIfSame = std::enable_if_t<std::is_same<Camera3CaptureRequest, T>::value>;
using DataView = Camera3CaptureRequestDataView;
using Data_ = internal::Camera3CaptureRequest_Data;
template <typename... Args>
static Camera3CaptureRequestPtr New(Args&&... args) {
return Camera3CaptureRequestPtr(
std::in_place, std::forward<Args>(args)...);
}
template <typename U>
static Camera3CaptureRequestPtr From(const U& u) {
return mojo::TypeConverter<Camera3CaptureRequestPtr, U>::Convert(u);
}
template <typename U>
U To() const {
return mojo::TypeConverter<U, Camera3CaptureRequest>::Convert(*this);
}
Camera3CaptureRequest();
Camera3CaptureRequest(
uint32_t frame_number,
::cros::mojom::CameraMetadataPtr settings,
Camera3StreamBufferPtr input_buffer,
std::vector<Camera3StreamBufferPtr> output_buffers);
Camera3CaptureRequest(
uint32_t frame_number,
::cros::mojom::CameraMetadataPtr settings,
Camera3StreamBufferPtr input_buffer,
std::vector<Camera3StreamBufferPtr> output_buffers,
std::optional<std::vector<Camera3PhyscamMetadataPtr>> physcam_settings);
Camera3CaptureRequest(const Camera3CaptureRequest&) = delete;
Camera3CaptureRequest& operator=(const Camera3CaptureRequest&) = delete;
~Camera3CaptureRequest();
// Clone() is a template so it is only instantiated if it is used. Thus, the
// bindings generator does not need to know whether Clone() or copy
// constructor/assignment are available for members.
template <typename StructPtrType = Camera3CaptureRequestPtr>
Camera3CaptureRequestPtr Clone() const;
// Equals() is a template so it is only instantiated if it is used. Thus, the
// bindings generator does not need to know whether Equals() or == operator
// are available for members.
template <typename T, Camera3CaptureRequest::EnableIfSame<T>* = nullptr>
bool Equals(const T& other) const;
template <typename T, Camera3CaptureRequest::EnableIfSame<T>* = nullptr>
bool operator==(const T& rhs) const { return Equals(rhs); }
template <typename T, Camera3CaptureRequest::EnableIfSame<T>* = nullptr>
bool operator!=(const T& rhs) const { return !operator==(rhs); }
template <typename UserType>
static mojo::Message SerializeAsMessage(UserType* input) {
return mojo::internal::SerializeAsMessageImpl<
Camera3CaptureRequest::DataView>(input);
}
// The returned Message is serialized only if the message is moved
// cross-process or cross-language. Otherwise if the message is Deserialized
// as the same UserType |input| will just be moved to |output| in
// DeserializeFromMessage.
template <typename UserType>
static mojo::Message WrapAsMessage(UserType input) {
return mojo::Message(std::make_unique<
internal::Camera3CaptureRequest_UnserializedMessageContext<
UserType, Camera3CaptureRequest::DataView>>(0, 0, std::move(input)),
MOJO_CREATE_MESSAGE_FLAG_NONE);
}
template <typename UserType>
static bool Deserialize(const void* data,
size_t data_num_bytes,
UserType* output) {
mojo::Message message;
return mojo::internal::DeserializeImpl<Camera3CaptureRequest::DataView>(
message, data, data_num_bytes, output, Validate);
}
template <typename UserType>
static bool Deserialize(const std::vector<uint8_t>& input,
UserType* output) {
return Camera3CaptureRequest::Deserialize(
input.size() == 0 ? nullptr : &input.front(), input.size(), output);
}
template <typename UserType>
static bool DeserializeFromMessage(mojo::Message input,
UserType* output) {
auto context = input.TakeUnserializedContext<
internal::Camera3CaptureRequest_UnserializedMessageContext<
UserType, Camera3CaptureRequest::DataView>>();
if (context) {
*output = std::move(context->TakeData());
return true;
}
input.SerializeIfNecessary();
return mojo::internal::DeserializeImpl<Camera3CaptureRequest::DataView>(
input, input.payload(), input.payload_num_bytes(), output, Validate);
}
uint32_t frame_number;
::cros::mojom::CameraMetadataPtr settings;
Camera3StreamBufferPtr input_buffer;
std::vector<Camera3StreamBufferPtr> output_buffers;
std::optional<std::vector<Camera3PhyscamMetadataPtr>> physcam_settings;
// Serialise this struct into a trace.
void WriteIntoTrace(perfetto::TracedValue traced_context) const;
private:
static bool Validate(const void* data,
mojo::internal::ValidationContext* validation_context);
};
// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, Camera3CaptureRequest::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, Camera3CaptureRequest::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
return !(rhs < lhs);
}
template <typename T, Camera3CaptureRequest::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
return rhs < lhs;
}
template <typename T, Camera3CaptureRequest::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
return !(lhs < rhs);
}
class Camera3CaptureResult {
public:
template <typename T>
using EnableIfSame = std::enable_if_t<std::is_same<Camera3CaptureResult, T>::value>;
using DataView = Camera3CaptureResultDataView;
using Data_ = internal::Camera3CaptureResult_Data;
template <typename... Args>
static Camera3CaptureResultPtr New(Args&&... args) {
return Camera3CaptureResultPtr(
std::in_place, std::forward<Args>(args)...);
}
template <typename U>
static Camera3CaptureResultPtr From(const U& u) {
return mojo::TypeConverter<Camera3CaptureResultPtr, U>::Convert(u);
}
template <typename U>
U To() const {
return mojo::TypeConverter<U, Camera3CaptureResult>::Convert(*this);
}
Camera3CaptureResult();
Camera3CaptureResult(
uint32_t frame_number,
::cros::mojom::CameraMetadataPtr result,
std::optional<std::vector<Camera3StreamBufferPtr>> output_buffers,
Camera3StreamBufferPtr input_buffer,
uint32_t partial_result);
Camera3CaptureResult(
uint32_t frame_number,
::cros::mojom::CameraMetadataPtr result,
std::optional<std::vector<Camera3StreamBufferPtr>> output_buffers,
Camera3StreamBufferPtr input_buffer,
uint32_t partial_result,
std::optional<std::vector<Camera3PhyscamMetadataPtr>> physcam_metadata);
Camera3CaptureResult(const Camera3CaptureResult&) = delete;
Camera3CaptureResult& operator=(const Camera3CaptureResult&) = delete;
~Camera3CaptureResult();
// Clone() is a template so it is only instantiated if it is used. Thus, the
// bindings generator does not need to know whether Clone() or copy
// constructor/assignment are available for members.
template <typename StructPtrType = Camera3CaptureResultPtr>
Camera3CaptureResultPtr Clone() const;
// Equals() is a template so it is only instantiated if it is used. Thus, the
// bindings generator does not need to know whether Equals() or == operator
// are available for members.
template <typename T, Camera3CaptureResult::EnableIfSame<T>* = nullptr>
bool Equals(const T& other) const;
template <typename T, Camera3CaptureResult::EnableIfSame<T>* = nullptr>
bool operator==(const T& rhs) const { return Equals(rhs); }
template <typename T, Camera3CaptureResult::EnableIfSame<T>* = nullptr>
bool operator!=(const T& rhs) const { return !operator==(rhs); }
template <typename UserType>
static mojo::Message SerializeAsMessage(UserType* input) {
return mojo::internal::SerializeAsMessageImpl<
Camera3CaptureResult::DataView>(input);
}
// The returned Message is serialized only if the message is moved
// cross-process or cross-language. Otherwise if the message is Deserialized
// as the same UserType |input| will just be moved to |output| in
// DeserializeFromMessage.
template <typename UserType>
static mojo::Message WrapAsMessage(UserType input) {
return mojo::Message(std::make_unique<
internal::Camera3CaptureResult_UnserializedMessageContext<
UserType, Camera3CaptureResult::DataView>>(0, 0, std::move(input)),
MOJO_CREATE_MESSAGE_FLAG_NONE);
}
template <typename UserType>
static bool Deserialize(const void* data,
size_t data_num_bytes,
UserType* output) {
mojo::Message message;
return mojo::internal::DeserializeImpl<Camera3CaptureResult::DataView>(
message, data, data_num_bytes, output, Validate);
}
template <typename UserType>
static bool Deserialize(const std::vector<uint8_t>& input,
UserType* output) {
return Camera3CaptureResult::Deserialize(
input.size() == 0 ? nullptr : &input.front(), input.size(), output);
}
template <typename UserType>
static bool DeserializeFromMessage(mojo::Message input,
UserType* output) {
auto context = input.TakeUnserializedContext<
internal::Camera3CaptureResult_UnserializedMessageContext<
UserType, Camera3CaptureResult::DataView>>();
if (context) {
*output = std::move(context->TakeData());
return true;
}
input.SerializeIfNecessary();
return mojo::internal::DeserializeImpl<Camera3CaptureResult::DataView>(
input, input.payload(), input.payload_num_bytes(), output, Validate);
}
uint32_t frame_number;
::cros::mojom::CameraMetadataPtr result;
std::optional<std::vector<Camera3StreamBufferPtr>> output_buffers;
Camera3StreamBufferPtr input_buffer;
uint32_t partial_result;
std::optional<std::vector<Camera3PhyscamMetadataPtr>> physcam_metadata;
// Serialise this struct into a trace.
void WriteIntoTrace(perfetto::TracedValue traced_context) const;
private:
static bool Validate(const void* data,
mojo::internal::ValidationContext* validation_context);
};
// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, Camera3CaptureResult::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, Camera3CaptureResult::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
return !(rhs < lhs);
}
template <typename T, Camera3CaptureResult::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
return rhs < lhs;
}
template <typename T, Camera3CaptureResult::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
return !(lhs < rhs);
}
template <typename UnionPtrType>
Camera3NotifyMsgMessagePtr Camera3NotifyMsgMessage::Clone() const {
switch (tag_) {
case Tag::kError:
return NewError(
mojo::Clone(*data_.error));
case Tag::kShutter:
return NewShutter(
mojo::Clone(*data_.shutter));
case Tag::kGeneric:
return NewGeneric(
mojo::Clone(*data_.generic));
}
return nullptr;
}
template <typename T,
typename std::enable_if<std::is_same<
T, Camera3NotifyMsgMessage>::value>::type*>
bool Camera3NotifyMsgMessage::Equals(const T& other) const {
if (tag_ != other.which())
return false;
switch (tag_) {
case Tag::kError:
return mojo::Equals(*(data_.error), *(other.data_.error));
case Tag::kShutter:
return mojo::Equals(*(data_.shutter), *(other.data_.shutter));
case Tag::kGeneric:
return mojo::Equals(*(data_.generic), *(other.data_.generic));
}
return false;
}
template <typename StructPtrType>
CropRotateScaleInfoPtr CropRotateScaleInfo::Clone() const {
return New(
mojo::Clone(crop_rotate_scale_degrees)
);
}
template <typename T, CropRotateScaleInfo::EnableIfSame<T>*>
bool CropRotateScaleInfo::Equals(const T& other_struct) const {
if (!mojo::Equals(this->crop_rotate_scale_degrees, other_struct.crop_rotate_scale_degrees))
return false;
return true;
}
template <typename T, CropRotateScaleInfo::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
if (lhs.crop_rotate_scale_degrees < rhs.crop_rotate_scale_degrees)
return true;
if (rhs.crop_rotate_scale_degrees < lhs.crop_rotate_scale_degrees)
return false;
return false;
}
template <typename StructPtrType>
Camera3StreamPtr Camera3Stream::Clone() const {
return New(
mojo::Clone(id),
mojo::Clone(stream_type),
mojo::Clone(width),
mojo::Clone(height),
mojo::Clone(format),
mojo::Clone(usage),
mojo::Clone(max_buffers),
mojo::Clone(data_space),
mojo::Clone(rotation),
mojo::Clone(crop_rotate_scale_info),
mojo::Clone(physical_camera_id),
mojo::Clone(effects)
);
}
template <typename T, Camera3Stream::EnableIfSame<T>*>
bool Camera3Stream::Equals(const T& other_struct) const {
if (!mojo::Equals(this->id, other_struct.id))
return false;
if (!mojo::Equals(this->stream_type, other_struct.stream_type))
return false;
if (!mojo::Equals(this->width, other_struct.width))
return false;
if (!mojo::Equals(this->height, other_struct.height))
return false;
if (!mojo::Equals(this->format, other_struct.format))
return false;
if (!mojo::Equals(this->usage, other_struct.usage))
return false;
if (!mojo::Equals(this->max_buffers, other_struct.max_buffers))
return false;
if (!mojo::Equals(this->data_space, other_struct.data_space))
return false;
if (!mojo::Equals(this->rotation, other_struct.rotation))
return false;
if (!mojo::Equals(this->crop_rotate_scale_info, other_struct.crop_rotate_scale_info))
return false;
if (!mojo::Equals(this->physical_camera_id, other_struct.physical_camera_id))
return false;
if (!mojo::Equals(this->effects, other_struct.effects))
return false;
return true;
}
template <typename T, Camera3Stream::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
if (lhs.id < rhs.id)
return true;
if (rhs.id < lhs.id)
return false;
if (lhs.stream_type < rhs.stream_type)
return true;
if (rhs.stream_type < lhs.stream_type)
return false;
if (lhs.width < rhs.width)
return true;
if (rhs.width < lhs.width)
return false;
if (lhs.height < rhs.height)
return true;
if (rhs.height < lhs.height)
return false;
if (lhs.format < rhs.format)
return true;
if (rhs.format < lhs.format)
return false;
if (lhs.usage < rhs.usage)
return true;
if (rhs.usage < lhs.usage)
return false;
if (lhs.max_buffers < rhs.max_buffers)
return true;
if (rhs.max_buffers < lhs.max_buffers)
return false;
if (lhs.data_space < rhs.data_space)
return true;
if (rhs.data_space < lhs.data_space)
return false;
if (lhs.rotation < rhs.rotation)
return true;
if (rhs.rotation < lhs.rotation)
return false;
if (lhs.crop_rotate_scale_info < rhs.crop_rotate_scale_info)
return true;
if (rhs.crop_rotate_scale_info < lhs.crop_rotate_scale_info)
return false;
if (lhs.physical_camera_id < rhs.physical_camera_id)
return true;
if (rhs.physical_camera_id < lhs.physical_camera_id)
return false;
if (lhs.effects < rhs.effects)
return true;
if (rhs.effects < lhs.effects)
return false;
return false;
}
template <typename StructPtrType>
Camera3StreamConfigurationPtr Camera3StreamConfiguration::Clone() const {
return New(
mojo::Clone(streams),
mojo::Clone(operation_mode),
mojo::Clone(session_parameters)
);
}
template <typename T, Camera3StreamConfiguration::EnableIfSame<T>*>
bool Camera3StreamConfiguration::Equals(const T& other_struct) const {
if (!mojo::Equals(this->streams, other_struct.streams))
return false;
if (!mojo::Equals(this->operation_mode, other_struct.operation_mode))
return false;
if (!mojo::Equals(this->session_parameters, other_struct.session_parameters))
return false;
return true;
}
template <typename T, Camera3StreamConfiguration::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
if (lhs.streams < rhs.streams)
return true;
if (rhs.streams < lhs.streams)
return false;
if (lhs.operation_mode < rhs.operation_mode)
return true;
if (rhs.operation_mode < lhs.operation_mode)
return false;
if (lhs.session_parameters < rhs.session_parameters)
return true;
if (rhs.session_parameters < lhs.session_parameters)
return false;
return false;
}
template <typename StructPtrType>
CameraBufferHandlePtr CameraBufferHandle::Clone() const {
return New(
mojo::Clone(buffer_id),
mojo::Clone(fds),
mojo::Clone(drm_format),
mojo::Clone(hal_pixel_format),
mojo::Clone(width),
mojo::Clone(height),
mojo::Clone(strides),
mojo::Clone(offsets),
mojo::Clone(sizes),
mojo::Clone(has_modifier),
mojo::Clone(modifier)
);
}
template <typename T, CameraBufferHandle::EnableIfSame<T>*>
bool CameraBufferHandle::Equals(const T& other_struct) const {
if (!mojo::Equals(this->buffer_id, other_struct.buffer_id))
return false;
if (!mojo::Equals(this->fds, other_struct.fds))
return false;
if (!mojo::Equals(this->drm_format, other_struct.drm_format))
return false;
if (!mojo::Equals(this->hal_pixel_format, other_struct.hal_pixel_format))
return false;
if (!mojo::Equals(this->width, other_struct.width))
return false;
if (!mojo::Equals(this->height, other_struct.height))
return false;
if (!mojo::Equals(this->strides, other_struct.strides))
return false;
if (!mojo::Equals(this->offsets, other_struct.offsets))
return false;
if (!mojo::Equals(this->sizes, other_struct.sizes))
return false;
if (!mojo::Equals(this->has_modifier, other_struct.has_modifier))
return false;
if (!mojo::Equals(this->modifier, other_struct.modifier))
return false;
return true;
}
template <typename T, CameraBufferHandle::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
if (lhs.buffer_id < rhs.buffer_id)
return true;
if (rhs.buffer_id < lhs.buffer_id)
return false;
if (lhs.fds < rhs.fds)
return true;
if (rhs.fds < lhs.fds)
return false;
if (lhs.drm_format < rhs.drm_format)
return true;
if (rhs.drm_format < lhs.drm_format)
return false;
if (lhs.hal_pixel_format < rhs.hal_pixel_format)
return true;
if (rhs.hal_pixel_format < lhs.hal_pixel_format)
return false;
if (lhs.width < rhs.width)
return true;
if (rhs.width < lhs.width)
return false;
if (lhs.height < rhs.height)
return true;
if (rhs.height < lhs.height)
return false;
if (lhs.strides < rhs.strides)
return true;
if (rhs.strides < lhs.strides)
return false;
if (lhs.offsets < rhs.offsets)
return true;
if (rhs.offsets < lhs.offsets)
return false;
if (lhs.sizes < rhs.sizes)
return true;
if (rhs.sizes < lhs.sizes)
return false;
if (lhs.has_modifier < rhs.has_modifier)
return true;
if (rhs.has_modifier < lhs.has_modifier)
return false;
if (lhs.modifier < rhs.modifier)
return true;
if (rhs.modifier < lhs.modifier)
return false;
return false;
}
template <typename StructPtrType>
Camera3StreamBufferPtr Camera3StreamBuffer::Clone() const {
return New(
mojo::Clone(stream_id),
mojo::Clone(buffer_id),
mojo::Clone(status),
mojo::Clone(acquire_fence),
mojo::Clone(release_fence),
mojo::Clone(buffer_handle)
);
}
template <typename T, Camera3StreamBuffer::EnableIfSame<T>*>
bool Camera3StreamBuffer::Equals(const T& other_struct) const {
if (!mojo::Equals(this->stream_id, other_struct.stream_id))
return false;
if (!mojo::Equals(this->buffer_id, other_struct.buffer_id))
return false;
if (!mojo::Equals(this->status, other_struct.status))
return false;
if (!mojo::Equals(this->acquire_fence, other_struct.acquire_fence))
return false;
if (!mojo::Equals(this->release_fence, other_struct.release_fence))
return false;
if (!mojo::Equals(this->buffer_handle, other_struct.buffer_handle))
return false;
return true;
}
template <typename T, Camera3StreamBuffer::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
if (lhs.stream_id < rhs.stream_id)
return true;
if (rhs.stream_id < lhs.stream_id)
return false;
if (lhs.buffer_id < rhs.buffer_id)
return true;
if (rhs.buffer_id < lhs.buffer_id)
return false;
if (lhs.status < rhs.status)
return true;
if (rhs.status < lhs.status)
return false;
if (lhs.acquire_fence < rhs.acquire_fence)
return true;
if (rhs.acquire_fence < lhs.acquire_fence)
return false;
if (lhs.release_fence < rhs.release_fence)
return true;
if (rhs.release_fence < lhs.release_fence)
return false;
if (lhs.buffer_handle < rhs.buffer_handle)
return true;
if (rhs.buffer_handle < lhs.buffer_handle)
return false;
return false;
}
template <typename StructPtrType>
Camera3ErrorMsgPtr Camera3ErrorMsg::Clone() const {
return New(
mojo::Clone(frame_number),
mojo::Clone(error_stream_id),
mojo::Clone(error_code)
);
}
template <typename T, Camera3ErrorMsg::EnableIfSame<T>*>
bool Camera3ErrorMsg::Equals(const T& other_struct) const {
if (!mojo::Equals(this->frame_number, other_struct.frame_number))
return false;
if (!mojo::Equals(this->error_stream_id, other_struct.error_stream_id))
return false;
if (!mojo::Equals(this->error_code, other_struct.error_code))
return false;
return true;
}
template <typename T, Camera3ErrorMsg::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
if (lhs.frame_number < rhs.frame_number)
return true;
if (rhs.frame_number < lhs.frame_number)
return false;
if (lhs.error_stream_id < rhs.error_stream_id)
return true;
if (rhs.error_stream_id < lhs.error_stream_id)
return false;
if (lhs.error_code < rhs.error_code)
return true;
if (rhs.error_code < lhs.error_code)
return false;
return false;
}
template <typename StructPtrType>
Camera3ShutterMsgPtr Camera3ShutterMsg::Clone() const {
return New(
mojo::Clone(frame_number),
mojo::Clone(timestamp)
);
}
template <typename T, Camera3ShutterMsg::EnableIfSame<T>*>
bool Camera3ShutterMsg::Equals(const T& other_struct) const {
if (!mojo::Equals(this->frame_number, other_struct.frame_number))
return false;
if (!mojo::Equals(this->timestamp, other_struct.timestamp))
return false;
return true;
}
template <typename T, Camera3ShutterMsg::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
if (lhs.frame_number < rhs.frame_number)
return true;
if (rhs.frame_number < lhs.frame_number)
return false;
if (lhs.timestamp < rhs.timestamp)
return true;
if (rhs.timestamp < lhs.timestamp)
return false;
return false;
}
template <typename StructPtrType>
Camera3NotifyMsgPtr Camera3NotifyMsg::Clone() const {
return New(
mojo::Clone(type),
mojo::Clone(message)
);
}
template <typename T, Camera3NotifyMsg::EnableIfSame<T>*>
bool Camera3NotifyMsg::Equals(const T& other_struct) const {
if (!mojo::Equals(this->type, other_struct.type))
return false;
if (!mojo::Equals(this->message, other_struct.message))
return false;
return true;
}
template <typename T, Camera3NotifyMsg::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
if (lhs.type < rhs.type)
return true;
if (rhs.type < lhs.type)
return false;
if (lhs.message < rhs.message)
return true;
if (rhs.message < lhs.message)
return false;
return false;
}
template <typename StructPtrType>
Camera3BufferRequestPtr Camera3BufferRequest::Clone() const {
return New(
mojo::Clone(stream_id),
mojo::Clone(num_buffers_requested)
);
}
template <typename T, Camera3BufferRequest::EnableIfSame<T>*>
bool Camera3BufferRequest::Equals(const T& other_struct) const {
if (!mojo::Equals(this->stream_id, other_struct.stream_id))
return false;
if (!mojo::Equals(this->num_buffers_requested, other_struct.num_buffers_requested))
return false;
return true;
}
template <typename T, Camera3BufferRequest::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
if (lhs.stream_id < rhs.stream_id)
return true;
if (rhs.stream_id < lhs.stream_id)
return false;
if (lhs.num_buffers_requested < rhs.num_buffers_requested)
return true;
if (rhs.num_buffers_requested < lhs.num_buffers_requested)
return false;
return false;
}
template <typename StructPtrType>
Camera3StreamBufferRetPtr Camera3StreamBufferRet::Clone() const {
return New(
mojo::Clone(stream_id),
mojo::Clone(status),
mojo::Clone(output_buffers)
);
}
template <typename T, Camera3StreamBufferRet::EnableIfSame<T>*>
bool Camera3StreamBufferRet::Equals(const T& other_struct) const {
if (!mojo::Equals(this->stream_id, other_struct.stream_id))
return false;
if (!mojo::Equals(this->status, other_struct.status))
return false;
if (!mojo::Equals(this->output_buffers, other_struct.output_buffers))
return false;
return true;
}
template <typename T, Camera3StreamBufferRet::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
if (lhs.stream_id < rhs.stream_id)
return true;
if (rhs.stream_id < lhs.stream_id)
return false;
if (lhs.status < rhs.status)
return true;
if (rhs.status < lhs.status)
return false;
if (lhs.output_buffers < rhs.output_buffers)
return true;
if (rhs.output_buffers < lhs.output_buffers)
return false;
return false;
}
template <typename StructPtrType>
Camera3PhyscamMetadataPtr Camera3PhyscamMetadata::Clone() const {
return New(
mojo::Clone(id),
mojo::Clone(metadata)
);
}
template <typename T, Camera3PhyscamMetadata::EnableIfSame<T>*>
bool Camera3PhyscamMetadata::Equals(const T& other_struct) const {
if (!mojo::Equals(this->id, other_struct.id))
return false;
if (!mojo::Equals(this->metadata, other_struct.metadata))
return false;
return true;
}
template <typename T, Camera3PhyscamMetadata::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
if (lhs.id < rhs.id)
return true;
if (rhs.id < lhs.id)
return false;
if (lhs.metadata < rhs.metadata)
return true;
if (rhs.metadata < lhs.metadata)
return false;
return false;
}
template <typename StructPtrType>
Camera3CaptureRequestPtr Camera3CaptureRequest::Clone() const {
return New(
mojo::Clone(frame_number),
mojo::Clone(settings),
mojo::Clone(input_buffer),
mojo::Clone(output_buffers),
mojo::Clone(physcam_settings)
);
}
template <typename T, Camera3CaptureRequest::EnableIfSame<T>*>
bool Camera3CaptureRequest::Equals(const T& other_struct) const {
if (!mojo::Equals(this->frame_number, other_struct.frame_number))
return false;
if (!mojo::Equals(this->settings, other_struct.settings))
return false;
if (!mojo::Equals(this->input_buffer, other_struct.input_buffer))
return false;
if (!mojo::Equals(this->output_buffers, other_struct.output_buffers))
return false;
if (!mojo::Equals(this->physcam_settings, other_struct.physcam_settings))
return false;
return true;
}
template <typename T, Camera3CaptureRequest::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
if (lhs.frame_number < rhs.frame_number)
return true;
if (rhs.frame_number < lhs.frame_number)
return false;
if (lhs.settings < rhs.settings)
return true;
if (rhs.settings < lhs.settings)
return false;
if (lhs.input_buffer < rhs.input_buffer)
return true;
if (rhs.input_buffer < lhs.input_buffer)
return false;
if (lhs.output_buffers < rhs.output_buffers)
return true;
if (rhs.output_buffers < lhs.output_buffers)
return false;
if (lhs.physcam_settings < rhs.physcam_settings)
return true;
if (rhs.physcam_settings < lhs.physcam_settings)
return false;
return false;
}
template <typename StructPtrType>
Camera3CaptureResultPtr Camera3CaptureResult::Clone() const {
return New(
mojo::Clone(frame_number),
mojo::Clone(result),
mojo::Clone(output_buffers),
mojo::Clone(input_buffer),
mojo::Clone(partial_result),
mojo::Clone(physcam_metadata)
);
}
template <typename T, Camera3CaptureResult::EnableIfSame<T>*>
bool Camera3CaptureResult::Equals(const T& other_struct) const {
if (!mojo::Equals(this->frame_number, other_struct.frame_number))
return false;
if (!mojo::Equals(this->result, other_struct.result))
return false;
if (!mojo::Equals(this->output_buffers, other_struct.output_buffers))
return false;
if (!mojo::Equals(this->input_buffer, other_struct.input_buffer))
return false;
if (!mojo::Equals(this->partial_result, other_struct.partial_result))
return false;
if (!mojo::Equals(this->physcam_metadata, other_struct.physcam_metadata))
return false;
return true;
}
template <typename T, Camera3CaptureResult::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
if (lhs.frame_number < rhs.frame_number)
return true;
if (rhs.frame_number < lhs.frame_number)
return false;
if (lhs.result < rhs.result)
return true;
if (rhs.result < lhs.result)
return false;
if (lhs.output_buffers < rhs.output_buffers)
return true;
if (rhs.output_buffers < lhs.output_buffers)
return false;
if (lhs.input_buffer < rhs.input_buffer)
return true;
if (rhs.input_buffer < lhs.input_buffer)
return false;
if (lhs.partial_result < rhs.partial_result)
return true;
if (rhs.partial_result < lhs.partial_result)
return false;
if (lhs.physcam_metadata < rhs.physcam_metadata)
return true;
if (rhs.physcam_metadata < lhs.physcam_metadata)
return false;
return false;
}
} // cros::mojom
namespace mojo {
template <>
struct StructTraits<::cros::mojom::CropRotateScaleInfo::DataView,
::cros::mojom::CropRotateScaleInfoPtr> {
static bool IsNull(const ::cros::mojom::CropRotateScaleInfoPtr& input) { return !input; }
static void SetToNull(::cros::mojom::CropRotateScaleInfoPtr* output) { output->reset(); }
static decltype(::cros::mojom::CropRotateScaleInfo::crop_rotate_scale_degrees) crop_rotate_scale_degrees(
const ::cros::mojom::CropRotateScaleInfoPtr& input) {
return input->crop_rotate_scale_degrees;
}
static bool Read(::cros::mojom::CropRotateScaleInfo::DataView input, ::cros::mojom::CropRotateScaleInfoPtr* output);
};
template <>
struct StructTraits<::cros::mojom::Camera3Stream::DataView,
::cros::mojom::Camera3StreamPtr> {
static bool IsNull(const ::cros::mojom::Camera3StreamPtr& input) { return !input; }
static void SetToNull(::cros::mojom::Camera3StreamPtr* output) { output->reset(); }
static decltype(::cros::mojom::Camera3Stream::id) id(
const ::cros::mojom::Camera3StreamPtr& input) {
return input->id;
}
static decltype(::cros::mojom::Camera3Stream::stream_type) stream_type(
const ::cros::mojom::Camera3StreamPtr& input) {
return input->stream_type;
}
static decltype(::cros::mojom::Camera3Stream::width) width(
const ::cros::mojom::Camera3StreamPtr& input) {
return input->width;
}
static decltype(::cros::mojom::Camera3Stream::height) height(
const ::cros::mojom::Camera3StreamPtr& input) {
return input->height;
}
static decltype(::cros::mojom::Camera3Stream::format) format(
const ::cros::mojom::Camera3StreamPtr& input) {
return input->format;
}
static decltype(::cros::mojom::Camera3Stream::usage) usage(
const ::cros::mojom::Camera3StreamPtr& input) {
return input->usage;
}
static decltype(::cros::mojom::Camera3Stream::max_buffers) max_buffers(
const ::cros::mojom::Camera3StreamPtr& input) {
return input->max_buffers;
}
static decltype(::cros::mojom::Camera3Stream::data_space) data_space(
const ::cros::mojom::Camera3StreamPtr& input) {
return input->data_space;
}
static decltype(::cros::mojom::Camera3Stream::rotation) rotation(
const ::cros::mojom::Camera3StreamPtr& input) {
return input->rotation;
}
static const decltype(::cros::mojom::Camera3Stream::crop_rotate_scale_info)& crop_rotate_scale_info(
const ::cros::mojom::Camera3StreamPtr& input) {
return input->crop_rotate_scale_info;
}
static const decltype(::cros::mojom::Camera3Stream::physical_camera_id)& physical_camera_id(
const ::cros::mojom::Camera3StreamPtr& input) {
return input->physical_camera_id;
}
static const decltype(::cros::mojom::Camera3Stream::effects)& effects(
const ::cros::mojom::Camera3StreamPtr& input) {
return input->effects;
}
static bool Read(::cros::mojom::Camera3Stream::DataView input, ::cros::mojom::Camera3StreamPtr* output);
};
template <>
struct StructTraits<::cros::mojom::Camera3StreamConfiguration::DataView,
::cros::mojom::Camera3StreamConfigurationPtr> {
static bool IsNull(const ::cros::mojom::Camera3StreamConfigurationPtr& input) { return !input; }
static void SetToNull(::cros::mojom::Camera3StreamConfigurationPtr* output) { output->reset(); }
static const decltype(::cros::mojom::Camera3StreamConfiguration::streams)& streams(
const ::cros::mojom::Camera3StreamConfigurationPtr& input) {
return input->streams;
}
static decltype(::cros::mojom::Camera3StreamConfiguration::operation_mode) operation_mode(
const ::cros::mojom::Camera3StreamConfigurationPtr& input) {
return input->operation_mode;
}
static const decltype(::cros::mojom::Camera3StreamConfiguration::session_parameters)& session_parameters(
const ::cros::mojom::Camera3StreamConfigurationPtr& input) {
return input->session_parameters;
}
static bool Read(::cros::mojom::Camera3StreamConfiguration::DataView input, ::cros::mojom::Camera3StreamConfigurationPtr* output);
};
template <>
struct StructTraits<::cros::mojom::CameraBufferHandle::DataView,
::cros::mojom::CameraBufferHandlePtr> {
static bool IsNull(const ::cros::mojom::CameraBufferHandlePtr& input) { return !input; }
static void SetToNull(::cros::mojom::CameraBufferHandlePtr* output) { output->reset(); }
static decltype(::cros::mojom::CameraBufferHandle::buffer_id) buffer_id(
const ::cros::mojom::CameraBufferHandlePtr& input) {
return input->buffer_id;
}
static decltype(::cros::mojom::CameraBufferHandle::fds)& fds(
::cros::mojom::CameraBufferHandlePtr& input) {
return input->fds;
}
static decltype(::cros::mojom::CameraBufferHandle::drm_format) drm_format(
const ::cros::mojom::CameraBufferHandlePtr& input) {
return input->drm_format;
}
static decltype(::cros::mojom::CameraBufferHandle::hal_pixel_format) hal_pixel_format(
const ::cros::mojom::CameraBufferHandlePtr& input) {
return input->hal_pixel_format;
}
static decltype(::cros::mojom::CameraBufferHandle::width) width(
const ::cros::mojom::CameraBufferHandlePtr& input) {
return input->width;
}
static decltype(::cros::mojom::CameraBufferHandle::height) height(
const ::cros::mojom::CameraBufferHandlePtr& input) {
return input->height;
}
static const decltype(::cros::mojom::CameraBufferHandle::strides)& strides(
const ::cros::mojom::CameraBufferHandlePtr& input) {
return input->strides;
}
static const decltype(::cros::mojom::CameraBufferHandle::offsets)& offsets(
const ::cros::mojom::CameraBufferHandlePtr& input) {
return input->offsets;
}
static const decltype(::cros::mojom::CameraBufferHandle::sizes)& sizes(
const ::cros::mojom::CameraBufferHandlePtr& input) {
return input->sizes;
}
static decltype(::cros::mojom::CameraBufferHandle::has_modifier) has_modifier(
const ::cros::mojom::CameraBufferHandlePtr& input) {
return input->has_modifier;
}
static decltype(::cros::mojom::CameraBufferHandle::modifier) modifier(
const ::cros::mojom::CameraBufferHandlePtr& input) {
return input->modifier;
}
static bool Read(::cros::mojom::CameraBufferHandle::DataView input, ::cros::mojom::CameraBufferHandlePtr* output);
};
template <>
struct StructTraits<::cros::mojom::Camera3StreamBuffer::DataView,
::cros::mojom::Camera3StreamBufferPtr> {
static bool IsNull(const ::cros::mojom::Camera3StreamBufferPtr& input) { return !input; }
static void SetToNull(::cros::mojom::Camera3StreamBufferPtr* output) { output->reset(); }
static decltype(::cros::mojom::Camera3StreamBuffer::stream_id) stream_id(
const ::cros::mojom::Camera3StreamBufferPtr& input) {
return input->stream_id;
}
static decltype(::cros::mojom::Camera3StreamBuffer::buffer_id) buffer_id(
const ::cros::mojom::Camera3StreamBufferPtr& input) {
return input->buffer_id;
}
static decltype(::cros::mojom::Camera3StreamBuffer::status) status(
const ::cros::mojom::Camera3StreamBufferPtr& input) {
return input->status;
}
static decltype(::cros::mojom::Camera3StreamBuffer::acquire_fence)& acquire_fence(
::cros::mojom::Camera3StreamBufferPtr& input) {
return input->acquire_fence;
}
static decltype(::cros::mojom::Camera3StreamBuffer::release_fence)& release_fence(
::cros::mojom::Camera3StreamBufferPtr& input) {
return input->release_fence;
}
static decltype(::cros::mojom::Camera3StreamBuffer::buffer_handle)& buffer_handle(
::cros::mojom::Camera3StreamBufferPtr& input) {
return input->buffer_handle;
}
static bool Read(::cros::mojom::Camera3StreamBuffer::DataView input, ::cros::mojom::Camera3StreamBufferPtr* output);
};
template <>
struct StructTraits<::cros::mojom::Camera3ErrorMsg::DataView,
::cros::mojom::Camera3ErrorMsgPtr> {
static bool IsNull(const ::cros::mojom::Camera3ErrorMsgPtr& input) { return !input; }
static void SetToNull(::cros::mojom::Camera3ErrorMsgPtr* output) { output->reset(); }
static decltype(::cros::mojom::Camera3ErrorMsg::frame_number) frame_number(
const ::cros::mojom::Camera3ErrorMsgPtr& input) {
return input->frame_number;
}
static decltype(::cros::mojom::Camera3ErrorMsg::error_stream_id) error_stream_id(
const ::cros::mojom::Camera3ErrorMsgPtr& input) {
return input->error_stream_id;
}
static decltype(::cros::mojom::Camera3ErrorMsg::error_code) error_code(
const ::cros::mojom::Camera3ErrorMsgPtr& input) {
return input->error_code;
}
static bool Read(::cros::mojom::Camera3ErrorMsg::DataView input, ::cros::mojom::Camera3ErrorMsgPtr* output);
};
template <>
struct StructTraits<::cros::mojom::Camera3ShutterMsg::DataView,
::cros::mojom::Camera3ShutterMsgPtr> {
static bool IsNull(const ::cros::mojom::Camera3ShutterMsgPtr& input) { return !input; }
static void SetToNull(::cros::mojom::Camera3ShutterMsgPtr* output) { output->reset(); }
static decltype(::cros::mojom::Camera3ShutterMsg::frame_number) frame_number(
const ::cros::mojom::Camera3ShutterMsgPtr& input) {
return input->frame_number;
}
static decltype(::cros::mojom::Camera3ShutterMsg::timestamp) timestamp(
const ::cros::mojom::Camera3ShutterMsgPtr& input) {
return input->timestamp;
}
static bool Read(::cros::mojom::Camera3ShutterMsg::DataView input, ::cros::mojom::Camera3ShutterMsgPtr* output);
};
template <>
struct StructTraits<::cros::mojom::Camera3NotifyMsg::DataView,
::cros::mojom::Camera3NotifyMsgPtr> {
static bool IsNull(const ::cros::mojom::Camera3NotifyMsgPtr& input) { return !input; }
static void SetToNull(::cros::mojom::Camera3NotifyMsgPtr* output) { output->reset(); }
static decltype(::cros::mojom::Camera3NotifyMsg::type) type(
const ::cros::mojom::Camera3NotifyMsgPtr& input) {
return input->type;
}
static const decltype(::cros::mojom::Camera3NotifyMsg::message)& message(
const ::cros::mojom::Camera3NotifyMsgPtr& input) {
return input->message;
}
static bool Read(::cros::mojom::Camera3NotifyMsg::DataView input, ::cros::mojom::Camera3NotifyMsgPtr* output);
};
template <>
struct StructTraits<::cros::mojom::Camera3BufferRequest::DataView,
::cros::mojom::Camera3BufferRequestPtr> {
static bool IsNull(const ::cros::mojom::Camera3BufferRequestPtr& input) { return !input; }
static void SetToNull(::cros::mojom::Camera3BufferRequestPtr* output) { output->reset(); }
static decltype(::cros::mojom::Camera3BufferRequest::stream_id) stream_id(
const ::cros::mojom::Camera3BufferRequestPtr& input) {
return input->stream_id;
}
static decltype(::cros::mojom::Camera3BufferRequest::num_buffers_requested) num_buffers_requested(
const ::cros::mojom::Camera3BufferRequestPtr& input) {
return input->num_buffers_requested;
}
static bool Read(::cros::mojom::Camera3BufferRequest::DataView input, ::cros::mojom::Camera3BufferRequestPtr* output);
};
template <>
struct StructTraits<::cros::mojom::Camera3StreamBufferRet::DataView,
::cros::mojom::Camera3StreamBufferRetPtr> {
static bool IsNull(const ::cros::mojom::Camera3StreamBufferRetPtr& input) { return !input; }
static void SetToNull(::cros::mojom::Camera3StreamBufferRetPtr* output) { output->reset(); }
static decltype(::cros::mojom::Camera3StreamBufferRet::stream_id) stream_id(
const ::cros::mojom::Camera3StreamBufferRetPtr& input) {
return input->stream_id;
}
static decltype(::cros::mojom::Camera3StreamBufferRet::status) status(
const ::cros::mojom::Camera3StreamBufferRetPtr& input) {
return input->status;
}
static decltype(::cros::mojom::Camera3StreamBufferRet::output_buffers)& output_buffers(
::cros::mojom::Camera3StreamBufferRetPtr& input) {
return input->output_buffers;
}
static bool Read(::cros::mojom::Camera3StreamBufferRet::DataView input, ::cros::mojom::Camera3StreamBufferRetPtr* output);
};
template <>
struct StructTraits<::cros::mojom::Camera3PhyscamMetadata::DataView,
::cros::mojom::Camera3PhyscamMetadataPtr> {
static bool IsNull(const ::cros::mojom::Camera3PhyscamMetadataPtr& input) { return !input; }
static void SetToNull(::cros::mojom::Camera3PhyscamMetadataPtr* output) { output->reset(); }
static decltype(::cros::mojom::Camera3PhyscamMetadata::id) id(
const ::cros::mojom::Camera3PhyscamMetadataPtr& input) {
return input->id;
}
static const decltype(::cros::mojom::Camera3PhyscamMetadata::metadata)& metadata(
const ::cros::mojom::Camera3PhyscamMetadataPtr& input) {
return input->metadata;
}
static bool Read(::cros::mojom::Camera3PhyscamMetadata::DataView input, ::cros::mojom::Camera3PhyscamMetadataPtr* output);
};
template <>
struct StructTraits<::cros::mojom::Camera3CaptureRequest::DataView,
::cros::mojom::Camera3CaptureRequestPtr> {
static bool IsNull(const ::cros::mojom::Camera3CaptureRequestPtr& input) { return !input; }
static void SetToNull(::cros::mojom::Camera3CaptureRequestPtr* output) { output->reset(); }
static decltype(::cros::mojom::Camera3CaptureRequest::frame_number) frame_number(
const ::cros::mojom::Camera3CaptureRequestPtr& input) {
return input->frame_number;
}
static const decltype(::cros::mojom::Camera3CaptureRequest::settings)& settings(
const ::cros::mojom::Camera3CaptureRequestPtr& input) {
return input->settings;
}
static decltype(::cros::mojom::Camera3CaptureRequest::input_buffer)& input_buffer(
::cros::mojom::Camera3CaptureRequestPtr& input) {
return input->input_buffer;
}
static decltype(::cros::mojom::Camera3CaptureRequest::output_buffers)& output_buffers(
::cros::mojom::Camera3CaptureRequestPtr& input) {
return input->output_buffers;
}
static const decltype(::cros::mojom::Camera3CaptureRequest::physcam_settings)& physcam_settings(
const ::cros::mojom::Camera3CaptureRequestPtr& input) {
return input->physcam_settings;
}
static bool Read(::cros::mojom::Camera3CaptureRequest::DataView input, ::cros::mojom::Camera3CaptureRequestPtr* output);
};
template <>
struct StructTraits<::cros::mojom::Camera3CaptureResult::DataView,
::cros::mojom::Camera3CaptureResultPtr> {
static bool IsNull(const ::cros::mojom::Camera3CaptureResultPtr& input) { return !input; }
static void SetToNull(::cros::mojom::Camera3CaptureResultPtr* output) { output->reset(); }
static decltype(::cros::mojom::Camera3CaptureResult::frame_number) frame_number(
const ::cros::mojom::Camera3CaptureResultPtr& input) {
return input->frame_number;
}
static const decltype(::cros::mojom::Camera3CaptureResult::result)& result(
const ::cros::mojom::Camera3CaptureResultPtr& input) {
return input->result;
}
static decltype(::cros::mojom::Camera3CaptureResult::output_buffers)& output_buffers(
::cros::mojom::Camera3CaptureResultPtr& input) {
return input->output_buffers;
}
static decltype(::cros::mojom::Camera3CaptureResult::input_buffer)& input_buffer(
::cros::mojom::Camera3CaptureResultPtr& input) {
return input->input_buffer;
}
static decltype(::cros::mojom::Camera3CaptureResult::partial_result) partial_result(
const ::cros::mojom::Camera3CaptureResultPtr& input) {
return input->partial_result;
}
static const decltype(::cros::mojom::Camera3CaptureResult::physcam_metadata)& physcam_metadata(
const ::cros::mojom::Camera3CaptureResultPtr& input) {
return input->physcam_metadata;
}
static bool Read(::cros::mojom::Camera3CaptureResult::DataView input, ::cros::mojom::Camera3CaptureResultPtr* output);
};
template <>
struct UnionTraits<::cros::mojom::Camera3NotifyMsgMessage::DataView,
::cros::mojom::Camera3NotifyMsgMessagePtr> {
static bool IsNull(const ::cros::mojom::Camera3NotifyMsgMessagePtr& input) { return !input; }
static void SetToNull(::cros::mojom::Camera3NotifyMsgMessagePtr* output) { output->reset(); }
static ::cros::mojom::Camera3NotifyMsgMessage::Tag GetTag(const ::cros::mojom::Camera3NotifyMsgMessagePtr& input) {
return input->which();
}
static const ::cros::mojom::Camera3ErrorMsgPtr& error(const ::cros::mojom::Camera3NotifyMsgMessagePtr& input) {
return input->get_error();
}
static const ::cros::mojom::Camera3ShutterMsgPtr& shutter(const ::cros::mojom::Camera3NotifyMsgMessagePtr& input) {
return input->get_shutter();
}
static const std::vector<uint8_t>& generic(const ::cros::mojom::Camera3NotifyMsgMessagePtr& input) {
return input->get_generic();
}
static bool Read(::cros::mojom::Camera3NotifyMsgMessage::DataView input, ::cros::mojom::Camera3NotifyMsgMessagePtr* output);
};
} // namespace mojo
#endif // CAMERA_MOJO_CAMERA3_MOJOM_H_