blob: e2dbb97c5cd826896bb4d7ed8d03e9be1613fb06 [file] [log] [blame]
// camera/mojo/cros_camera_enum.mojom-shared.h is auto generated by mojom_bindings_generator.py, do not edit
// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CAMERA_MOJO_CROS_CAMERA_ENUM_MOJOM_SHARED_H_
#define CAMERA_MOJO_CROS_CAMERA_ENUM_MOJOM_SHARED_H_
#include <stdint.h>
#include <functional>
#include <iosfwd>
#include <type_traits>
#include <utility>
#include "third_party/perfetto/include/perfetto/tracing/traced_value_forward.h"
#include "camera/mojo/cros_camera_enum.mojom-shared-internal.h"
namespace cros::mojom {
} // cros::mojom
namespace mojo {
namespace internal {
} // namespace internal
} // namespace mojo
namespace cros::mojom {
enum class CameraSensorSyncTimestamp : int32_t {
BACKWARD = 0,
NEAREST = 1,
NONE = 2,
kMinValue = 0,
kMaxValue = 2,
};
std::ostream& operator<<(std::ostream& os, CameraSensorSyncTimestamp value);
inline bool IsKnownEnumValue(CameraSensorSyncTimestamp value) {
return internal::CameraSensorSyncTimestamp_Data::IsKnownValue(
static_cast<int32_t>(value));
}
} // cros::mojom
namespace std {
template <>
struct hash<::cros::mojom::CameraSensorSyncTimestamp>
: public mojo::internal::EnumHashImpl<::cros::mojom::CameraSensorSyncTimestamp> {};
} // namespace std
namespace mojo {
namespace internal {
template <typename MaybeConstUserType>
struct Serializer<::cros::mojom::CameraSensorSyncTimestamp, MaybeConstUserType> {
using UserType = typename std::remove_const<MaybeConstUserType>::type;
using Traits = EnumTraits<::cros::mojom::CameraSensorSyncTimestamp, UserType>;
static void Serialize(UserType input, int32_t* output) {
*output = static_cast<int32_t>(Traits::ToMojom(input));
}
static bool Deserialize(int32_t input, UserType* output) {
return Traits::FromMojom(::mojo::internal::ToKnownEnumValueHelper(
static_cast<::cros::mojom::CameraSensorSyncTimestamp>(input)), output);
}
};
} // namespace internal
} // namespace mojo
namespace cros::mojom {
} // cros::mojom
// Declare TraceFormatTraits for enums, which should be defined in ::perfetto
// namespace.
namespace perfetto {
template <>
struct TraceFormatTraits<::cros::mojom::CameraSensorSyncTimestamp> {
static void WriteIntoTrace(perfetto::TracedValue context, ::cros::mojom::CameraSensorSyncTimestamp value);
};
} // namespace perfetto
#endif // CAMERA_MOJO_CROS_CAMERA_ENUM_MOJOM_SHARED_H_