#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_INTERNAL_H_
#define MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_INTERNAL_H_
#include <stdint.h>
#include <functional>
#include <optional>
#include <type_traits>
#include <utility>
#include "base/logging.h"
#include "mojo/public/cpp/bindings/enum_traits.h"
#include "mojo/public/cpp/bindings/interface_id.h"
#include "mojo/public/cpp/bindings/lib/template_util.h"
#include "mojo/public/cpp/platform/platform_handle.h"
#include "mojo/public/cpp/system/handle.h"
namespace mojo {
template <typename T>
class ArrayDataView;
template <typename T>
class AssociatedInterfacePtrInfoDataView;
template <typename T>
class AssociatedInterfaceRequestDataView;
template <typename T>
class InterfacePtrDataView;
template <typename T>
class InterfaceRequestDataView;
template <typename K, typename V>
class MapDataView;
class StringDataView;
namespace internal {
const uint32_t kEncodedInvalidHandleValue = …;
const uint32_t kUnionDataSize = …;
template <typename T>
class Array_Data;
template <typename K, typename V>
class Map_Data;
String_Data;
inline size_t Align(size_t size) { … }
inline bool IsAligned(const void* ptr) { … }
inline void EncodePointer(const void* ptr, uint64_t* offset) { … }
inline const void* DecodePointer(const uint64_t* offset) { … }
#pragma pack(push, 1)
struct StructHeader { … };
static_assert …;
struct ArrayHeader { … };
static_assert …;
template <typename T>
struct Pointer { … };
static_assert …;
GenericPointer;
struct Handle_Data { … };
static_assert …;
struct Interface_Data { … };
static_assert …;
struct AssociatedEndpointHandle_Data { … };
static_assert …;
struct AssociatedInterface_Data { … };
static_assert …;
#pragma pack(pop)
template <typename T>
T FetchAndReset(T* ptr) { … }
template <typename T, typename SFINAE = void>
struct IsUnionDataType : std::false_type { … };
IsUnionDataType<T, typename T::MojomUnionDataType>;
enum class MojomTypeCategory : uint32_t { … };
inline constexpr MojomTypeCategory operator&(MojomTypeCategory x,
MojomTypeCategory y) { … }
inline constexpr MojomTypeCategory operator|(MojomTypeCategory x,
MojomTypeCategory y) { … }
template <typename T>
struct MojomTypeTraits { … };
MojomTypeTraits<std::optional<T>>;
MojomTypeTraits<ArrayDataView<T>>;
MojomTypeTraits<AssociatedInterfacePtrInfoDataView<T>>;
MojomTypeTraits<AssociatedInterfaceRequestDataView<T>>;
template <>
struct MojomTypeTraits<bool> { … };
MojomTypeTraits<T>;
MojomTypeTraits<std::optional<T>>;
MojomTypeTraits<ScopedHandleBase<T>>;
template <>
struct MojomTypeTraits<PlatformHandle> { … };
MojomTypeTraits<InterfacePtrDataView<T>>;
MojomTypeTraits<InterfaceRequestDataView<T>>;
MojomTypeTraits<MapDataView<K, V>>;
template <>
struct MojomTypeTraits<StringDataView> { … };
template <typename T, MojomTypeCategory categories>
struct BelongsTo { … };
template <typename T>
struct EnumHashImpl { … };
template <typename MojomType, typename T>
T ConvertEnumValue(MojomType input) { … }
template <typename MojomType, typename SFINAE = void>
struct EnumKnownValueTraits { … };
EnumKnownValueTraits<MojomType, std::void_t<decltype(ToKnownEnumValue(std::declval<MojomType>()))>>;
template <typename MojomType>
MojomType ToKnownEnumValueHelper(MojomType in) { … }
}
}
#endif