blob: 604417bd7e979b6272154aefac06c05718beb6d8 [file] [log] [blame]
// WARNING: This file is machine generated by fidlgen.
#pragma once
#include <lib/fidl/internal.h>
#include <lib/fidl/llcpp/array.h>
#include <lib/fidl/llcpp/buffer_allocator.h>
#include <lib/fidl/llcpp/buffer_then_heap_allocator.h>
#include <lib/fidl/llcpp/coding.h>
#include <lib/fidl/llcpp/envelope.h>
#include <lib/fidl/llcpp/errors.h>
#include <lib/fidl/llcpp/memory.h>
#include <lib/fidl/llcpp/message.h>
#include <lib/fidl/llcpp/message_storage.h>
#include <lib/fidl/llcpp/string_view.h>
#include <lib/fidl/llcpp/tracking_ptr.h>
#include <lib/fidl/llcpp/traits.h>
#include <lib/fidl/llcpp/vector_view.h>
#include <lib/fit/function.h>
#include <lib/fit/optional.h>
#include <variant>
#ifdef __Fuchsia__
#include <lib/fidl/llcpp/client.h>
#include <lib/fidl/llcpp/connect_service.h>
#include <lib/fidl/llcpp/result.h>
#include <lib/fidl/llcpp/server.h>
#include <lib/fidl/llcpp/service_handler_interface.h>
#include <lib/fidl/llcpp/sync_call.h>
#include <lib/fidl/llcpp/transaction.h>
#include <lib/fidl/txn_header.h>
#endif // __Fuchsia__
#include <zircon/fidl.h>
namespace llcpp {
namespace fidl {
namespace test {
namespace padding {
struct Padding7ByteMiddle;
struct Padding7ByteEnd;
struct Padding6ByteMiddle;
struct Padding6ByteEnd;
struct Padding5ByteMiddle;
struct Padding5ByteEnd;
struct Padding4ByteMiddle;
struct Padding4ByteEnd;
struct Padding4ByteAlignmentLength12;
struct Padding3ByteMiddle;
struct Padding3ByteEnd;
struct Padding2ByteMiddle;
struct Padding2ByteEnd;
struct Padding2ByteAlignmentLength6;
struct Padding1ByteMiddle;
struct Padding1ByteEnd;
extern "C" const fidl_type_t fidl_test_padding_Padding7ByteMiddleTable;
struct Padding7ByteMiddle {
static constexpr const fidl_type_t* Type =
&fidl_test_padding_Padding7ByteMiddleTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 16;
[[maybe_unused]] static constexpr uint32_t MaxOutOfLine = 0;
static constexpr bool HasPointer = false;
uint8_t a = {};
uint64_t b = {};
class UnownedEncodedMessage final {
public:
UnownedEncodedMessage(uint8_t* bytes, uint32_t byte_size,
Padding7ByteMiddle* value)
: message_(bytes, byte_size, sizeof(Padding7ByteMiddle), nullptr, 0,
0) {
message_.LinearizeAndEncode<Padding7ByteMiddle>(value);
}
UnownedEncodedMessage(const UnownedEncodedMessage&) = delete;
UnownedEncodedMessage(UnownedEncodedMessage&&) = delete;
UnownedEncodedMessage* operator=(const UnownedEncodedMessage&) = delete;
UnownedEncodedMessage* operator=(UnownedEncodedMessage&&) = delete;
zx_status_t status() const { return message_.status(); }
#ifdef __Fuchsia__
const char* status_string() const { return message_.status_string(); }
#endif
bool ok() const { return message_.status() == ZX_OK; }
const char* error() const { return message_.error(); }
::fidl::OutgoingMessage& GetOutgoingMessage() { return message_; }
private:
::fidl::OutgoingMessage message_;
};
class OwnedEncodedMessage final {
public:
explicit OwnedEncodedMessage(Padding7ByteMiddle* value)
: message_(bytes_, sizeof(bytes_), value) {}
OwnedEncodedMessage(const OwnedEncodedMessage&) = delete;
OwnedEncodedMessage(OwnedEncodedMessage&&) = delete;
OwnedEncodedMessage* operator=(const OwnedEncodedMessage&) = delete;
OwnedEncodedMessage* operator=(OwnedEncodedMessage&&) = delete;
zx_status_t status() const { return message_.status(); }
#ifdef __Fuchsia__
const char* status_string() const { return message_.status_string(); }
#endif
bool ok() const { return message_.ok(); }
const char* error() const { return message_.error(); }
::fidl::OutgoingMessage& GetOutgoingMessage() {
return message_.GetOutgoingMessage();
}
private:
FIDL_ALIGNDECL
uint8_t bytes_[FIDL_ALIGN(PrimarySize + MaxOutOfLine)];
UnownedEncodedMessage message_;
};
class DecodedMessage final : public ::fidl::internal::IncomingMessage {
public:
DecodedMessage(uint8_t* bytes, uint32_t byte_actual,
zx_handle_info_t* handles = nullptr,
uint32_t handle_actual = 0)
: ::fidl::internal::IncomingMessage(bytes, byte_actual, handles,
handle_actual) {
Decode<struct Padding7ByteMiddle>();
}
DecodedMessage(fidl_incoming_msg_t* msg)
: ::fidl::internal::IncomingMessage(msg) {
Decode<struct Padding7ByteMiddle>();
}
DecodedMessage(const DecodedMessage&) = delete;
DecodedMessage(DecodedMessage&&) = delete;
DecodedMessage* operator=(const DecodedMessage&) = delete;
DecodedMessage* operator=(DecodedMessage&&) = delete;
struct Padding7ByteMiddle* PrimaryObject() {
ZX_DEBUG_ASSERT(ok());
return reinterpret_cast<struct Padding7ByteMiddle*>(bytes());
}
// Release the ownership of the decoded message. That means that the handles
// won't be closed When the object is destroyed. After calling this method,
// the DecodedMessage object should not be used anymore.
void ReleasePrimaryObject() { ResetBytes(); }
// These methods should only be used for testing purpose.
// They create an DecodedMessage using the bytes of an outgoing message and
// copying the handles.
static DecodedMessage FromOutgoingWithRawHandleCopy(
UnownedEncodedMessage* encoded_message) {
return DecodedMessage(encoded_message->GetOutgoingMessage());
}
static DecodedMessage FromOutgoingWithRawHandleCopy(
OwnedEncodedMessage* encoded_message) {
return DecodedMessage(encoded_message->GetOutgoingMessage());
}
private:
DecodedMessage(::fidl::OutgoingMessage& outgoing_message) {
Init(outgoing_message, nullptr, 0);
if (ok()) {
Decode<struct Padding7ByteMiddle>();
}
}
};
};
extern "C" const fidl_type_t fidl_test_padding_Padding7ByteEndTable;
struct Padding7ByteEnd {
static constexpr const fidl_type_t* Type =
&fidl_test_padding_Padding7ByteEndTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 16;
[[maybe_unused]] static constexpr uint32_t MaxOutOfLine = 0;
static constexpr bool HasPointer = false;
uint64_t a = {};
uint8_t b = {};
class UnownedEncodedMessage final {
public:
UnownedEncodedMessage(uint8_t* bytes, uint32_t byte_size,
Padding7ByteEnd* value)
: message_(bytes, byte_size, sizeof(Padding7ByteEnd), nullptr, 0, 0) {
message_.LinearizeAndEncode<Padding7ByteEnd>(value);
}
UnownedEncodedMessage(const UnownedEncodedMessage&) = delete;
UnownedEncodedMessage(UnownedEncodedMessage&&) = delete;
UnownedEncodedMessage* operator=(const UnownedEncodedMessage&) = delete;
UnownedEncodedMessage* operator=(UnownedEncodedMessage&&) = delete;
zx_status_t status() const { return message_.status(); }
#ifdef __Fuchsia__
const char* status_string() const { return message_.status_string(); }
#endif
bool ok() const { return message_.status() == ZX_OK; }
const char* error() const { return message_.error(); }
::fidl::OutgoingMessage& GetOutgoingMessage() { return message_; }
private:
::fidl::OutgoingMessage message_;
};
class OwnedEncodedMessage final {
public:
explicit OwnedEncodedMessage(Padding7ByteEnd* value)
: message_(bytes_, sizeof(bytes_), value) {}
OwnedEncodedMessage(const OwnedEncodedMessage&) = delete;
OwnedEncodedMessage(OwnedEncodedMessage&&) = delete;
OwnedEncodedMessage* operator=(const OwnedEncodedMessage&) = delete;
OwnedEncodedMessage* operator=(OwnedEncodedMessage&&) = delete;
zx_status_t status() const { return message_.status(); }
#ifdef __Fuchsia__
const char* status_string() const { return message_.status_string(); }
#endif
bool ok() const { return message_.ok(); }
const char* error() const { return message_.error(); }
::fidl::OutgoingMessage& GetOutgoingMessage() {
return message_.GetOutgoingMessage();
}
private:
FIDL_ALIGNDECL
uint8_t bytes_[FIDL_ALIGN(PrimarySize + MaxOutOfLine)];
UnownedEncodedMessage message_;
};
class DecodedMessage final : public ::fidl::internal::IncomingMessage {
public:
DecodedMessage(uint8_t* bytes, uint32_t byte_actual,
zx_handle_info_t* handles = nullptr,
uint32_t handle_actual = 0)
: ::fidl::internal::IncomingMessage(bytes, byte_actual, handles,
handle_actual) {
Decode<struct Padding7ByteEnd>();
}
DecodedMessage(fidl_incoming_msg_t* msg)
: ::fidl::internal::IncomingMessage(msg) {
Decode<struct Padding7ByteEnd>();
}
DecodedMessage(const DecodedMessage&) = delete;
DecodedMessage(DecodedMessage&&) = delete;
DecodedMessage* operator=(const DecodedMessage&) = delete;
DecodedMessage* operator=(DecodedMessage&&) = delete;
struct Padding7ByteEnd* PrimaryObject() {
ZX_DEBUG_ASSERT(ok());
return reinterpret_cast<struct Padding7ByteEnd*>(bytes());
}
// Release the ownership of the decoded message. That means that the handles
// won't be closed When the object is destroyed. After calling this method,
// the DecodedMessage object should not be used anymore.
void ReleasePrimaryObject() { ResetBytes(); }
// These methods should only be used for testing purpose.
// They create an DecodedMessage using the bytes of an outgoing message and
// copying the handles.
static DecodedMessage FromOutgoingWithRawHandleCopy(
UnownedEncodedMessage* encoded_message) {
return DecodedMessage(encoded_message->GetOutgoingMessage());
}
static DecodedMessage FromOutgoingWithRawHandleCopy(
OwnedEncodedMessage* encoded_message) {
return DecodedMessage(encoded_message->GetOutgoingMessage());
}
private:
DecodedMessage(::fidl::OutgoingMessage& outgoing_message) {
Init(outgoing_message, nullptr, 0);
if (ok()) {
Decode<struct Padding7ByteEnd>();
}
}
};
};
extern "C" const fidl_type_t fidl_test_padding_Padding6ByteMiddleTable;
struct Padding6ByteMiddle {
static constexpr const fidl_type_t* Type =
&fidl_test_padding_Padding6ByteMiddleTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 16;
[[maybe_unused]] static constexpr uint32_t MaxOutOfLine = 0;
static constexpr bool HasPointer = false;
uint16_t a = {};
uint64_t b = {};
class UnownedEncodedMessage final {
public:
UnownedEncodedMessage(uint8_t* bytes, uint32_t byte_size,
Padding6ByteMiddle* value)
: message_(bytes, byte_size, sizeof(Padding6ByteMiddle), nullptr, 0,
0) {
message_.LinearizeAndEncode<Padding6ByteMiddle>(value);
}
UnownedEncodedMessage(const UnownedEncodedMessage&) = delete;
UnownedEncodedMessage(UnownedEncodedMessage&&) = delete;
UnownedEncodedMessage* operator=(const UnownedEncodedMessage&) = delete;
UnownedEncodedMessage* operator=(UnownedEncodedMessage&&) = delete;
zx_status_t status() const { return message_.status(); }
#ifdef __Fuchsia__
const char* status_string() const { return message_.status_string(); }
#endif
bool ok() const { return message_.status() == ZX_OK; }
const char* error() const { return message_.error(); }
::fidl::OutgoingMessage& GetOutgoingMessage() { return message_; }
private:
::fidl::OutgoingMessage message_;
};
class OwnedEncodedMessage final {
public:
explicit OwnedEncodedMessage(Padding6ByteMiddle* value)
: message_(bytes_, sizeof(bytes_), value) {}
OwnedEncodedMessage(const OwnedEncodedMessage&) = delete;
OwnedEncodedMessage(OwnedEncodedMessage&&) = delete;
OwnedEncodedMessage* operator=(const OwnedEncodedMessage&) = delete;
OwnedEncodedMessage* operator=(OwnedEncodedMessage&&) = delete;
zx_status_t status() const { return message_.status(); }
#ifdef __Fuchsia__
const char* status_string() const { return message_.status_string(); }
#endif
bool ok() const { return message_.ok(); }
const char* error() const { return message_.error(); }
::fidl::OutgoingMessage& GetOutgoingMessage() {
return message_.GetOutgoingMessage();
}
private:
FIDL_ALIGNDECL
uint8_t bytes_[FIDL_ALIGN(PrimarySize + MaxOutOfLine)];
UnownedEncodedMessage message_;
};
class DecodedMessage final : public ::fidl::internal::IncomingMessage {
public:
DecodedMessage(uint8_t* bytes, uint32_t byte_actual,
zx_handle_info_t* handles = nullptr,
uint32_t handle_actual = 0)
: ::fidl::internal::IncomingMessage(bytes, byte_actual, handles,
handle_actual) {
Decode<struct Padding6ByteMiddle>();
}
DecodedMessage(fidl_incoming_msg_t* msg)
: ::fidl::internal::IncomingMessage(msg) {
Decode<struct Padding6ByteMiddle>();
}
DecodedMessage(const DecodedMessage&) = delete;
DecodedMessage(DecodedMessage&&) = delete;
DecodedMessage* operator=(const DecodedMessage&) = delete;
DecodedMessage* operator=(DecodedMessage&&) = delete;
struct Padding6ByteMiddle* PrimaryObject() {
ZX_DEBUG_ASSERT(ok());
return reinterpret_cast<struct Padding6ByteMiddle*>(bytes());
}
// Release the ownership of the decoded message. That means that the handles
// won't be closed When the object is destroyed. After calling this method,
// the DecodedMessage object should not be used anymore.
void ReleasePrimaryObject() { ResetBytes(); }
// These methods should only be used for testing purpose.
// They create an DecodedMessage using the bytes of an outgoing message and
// copying the handles.
static DecodedMessage FromOutgoingWithRawHandleCopy(
UnownedEncodedMessage* encoded_message) {
return DecodedMessage(encoded_message->GetOutgoingMessage());
}
static DecodedMessage FromOutgoingWithRawHandleCopy(
OwnedEncodedMessage* encoded_message) {
return DecodedMessage(encoded_message->GetOutgoingMessage());
}
private:
DecodedMessage(::fidl::OutgoingMessage& outgoing_message) {
Init(outgoing_message, nullptr, 0);
if (ok()) {
Decode<struct Padding6ByteMiddle>();
}
}
};
};
extern "C" const fidl_type_t fidl_test_padding_Padding6ByteEndTable;
struct Padding6ByteEnd {
static constexpr const fidl_type_t* Type =
&fidl_test_padding_Padding6ByteEndTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 16;
[[maybe_unused]] static constexpr uint32_t MaxOutOfLine = 0;
static constexpr bool HasPointer = false;
uint64_t a = {};
uint16_t b = {};
class UnownedEncodedMessage final {
public:
UnownedEncodedMessage(uint8_t* bytes, uint32_t byte_size,
Padding6ByteEnd* value)
: message_(bytes, byte_size, sizeof(Padding6ByteEnd), nullptr, 0, 0) {
message_.LinearizeAndEncode<Padding6ByteEnd>(value);
}
UnownedEncodedMessage(const UnownedEncodedMessage&) = delete;
UnownedEncodedMessage(UnownedEncodedMessage&&) = delete;
UnownedEncodedMessage* operator=(const UnownedEncodedMessage&) = delete;
UnownedEncodedMessage* operator=(UnownedEncodedMessage&&) = delete;
zx_status_t status() const { return message_.status(); }
#ifdef __Fuchsia__
const char* status_string() const { return message_.status_string(); }
#endif
bool ok() const { return message_.status() == ZX_OK; }
const char* error() const { return message_.error(); }
::fidl::OutgoingMessage& GetOutgoingMessage() { return message_; }
private:
::fidl::OutgoingMessage message_;
};
class OwnedEncodedMessage final {
public:
explicit OwnedEncodedMessage(Padding6ByteEnd* value)
: message_(bytes_, sizeof(bytes_), value) {}
OwnedEncodedMessage(const OwnedEncodedMessage&) = delete;
OwnedEncodedMessage(OwnedEncodedMessage&&) = delete;
OwnedEncodedMessage* operator=(const OwnedEncodedMessage&) = delete;
OwnedEncodedMessage* operator=(OwnedEncodedMessage&&) = delete;
zx_status_t status() const { return message_.status(); }
#ifdef __Fuchsia__
const char* status_string() const { return message_.status_string(); }
#endif
bool ok() const { return message_.ok(); }
const char* error() const { return message_.error(); }
::fidl::OutgoingMessage& GetOutgoingMessage() {
return message_.GetOutgoingMessage();
}
private:
FIDL_ALIGNDECL
uint8_t bytes_[FIDL_ALIGN(PrimarySize + MaxOutOfLine)];
UnownedEncodedMessage message_;
};
class DecodedMessage final : public ::fidl::internal::IncomingMessage {
public:
DecodedMessage(uint8_t* bytes, uint32_t byte_actual,
zx_handle_info_t* handles = nullptr,
uint32_t handle_actual = 0)
: ::fidl::internal::IncomingMessage(bytes, byte_actual, handles,
handle_actual) {
Decode<struct Padding6ByteEnd>();
}
DecodedMessage(fidl_incoming_msg_t* msg)
: ::fidl::internal::IncomingMessage(msg) {
Decode<struct Padding6ByteEnd>();
}
DecodedMessage(const DecodedMessage&) = delete;
DecodedMessage(DecodedMessage&&) = delete;
DecodedMessage* operator=(const DecodedMessage&) = delete;
DecodedMessage* operator=(DecodedMessage&&) = delete;
struct Padding6ByteEnd* PrimaryObject() {
ZX_DEBUG_ASSERT(ok());
return reinterpret_cast<struct Padding6ByteEnd*>(bytes());
}
// Release the ownership of the decoded message. That means that the handles
// won't be closed When the object is destroyed. After calling this method,
// the DecodedMessage object should not be used anymore.
void ReleasePrimaryObject() { ResetBytes(); }
// These methods should only be used for testing purpose.
// They create an DecodedMessage using the bytes of an outgoing message and
// copying the handles.
static DecodedMessage FromOutgoingWithRawHandleCopy(
UnownedEncodedMessage* encoded_message) {
return DecodedMessage(encoded_message->GetOutgoingMessage());
}
static DecodedMessage FromOutgoingWithRawHandleCopy(
OwnedEncodedMessage* encoded_message) {
return DecodedMessage(encoded_message->GetOutgoingMessage());
}
private:
DecodedMessage(::fidl::OutgoingMessage& outgoing_message) {
Init(outgoing_message, nullptr, 0);
if (ok()) {
Decode<struct Padding6ByteEnd>();
}
}
};
};
extern "C" const fidl_type_t fidl_test_padding_Padding5ByteMiddleTable;
struct Padding5ByteMiddle {
static constexpr const fidl_type_t* Type =
&fidl_test_padding_Padding5ByteMiddleTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 16;
[[maybe_unused]] static constexpr uint32_t MaxOutOfLine = 0;
static constexpr bool HasPointer = false;
uint16_t a = {};
uint8_t b = {};
uint64_t c = {};
class UnownedEncodedMessage final {
public:
UnownedEncodedMessage(uint8_t* bytes, uint32_t byte_size,
Padding5ByteMiddle* value)
: message_(bytes, byte_size, sizeof(Padding5ByteMiddle), nullptr, 0,
0) {
message_.LinearizeAndEncode<Padding5ByteMiddle>(value);
}
UnownedEncodedMessage(const UnownedEncodedMessage&) = delete;
UnownedEncodedMessage(UnownedEncodedMessage&&) = delete;
UnownedEncodedMessage* operator=(const UnownedEncodedMessage&) = delete;
UnownedEncodedMessage* operator=(UnownedEncodedMessage&&) = delete;
zx_status_t status() const { return message_.status(); }
#ifdef __Fuchsia__
const char* status_string() const { return message_.status_string(); }
#endif
bool ok() const { return message_.status() == ZX_OK; }
const char* error() const { return message_.error(); }
::fidl::OutgoingMessage& GetOutgoingMessage() { return message_; }
private:
::fidl::OutgoingMessage message_;
};
class OwnedEncodedMessage final {
public:
explicit OwnedEncodedMessage(Padding5ByteMiddle* value)
: message_(bytes_, sizeof(bytes_), value) {}
OwnedEncodedMessage(const OwnedEncodedMessage&) = delete;
OwnedEncodedMessage(OwnedEncodedMessage&&) = delete;
OwnedEncodedMessage* operator=(const OwnedEncodedMessage&) = delete;
OwnedEncodedMessage* operator=(OwnedEncodedMessage&&) = delete;
zx_status_t status() const { return message_.status(); }
#ifdef __Fuchsia__
const char* status_string() const { return message_.status_string(); }
#endif
bool ok() const { return message_.ok(); }
const char* error() const { return message_.error(); }
::fidl::OutgoingMessage& GetOutgoingMessage() {
return message_.GetOutgoingMessage();
}
private:
FIDL_ALIGNDECL
uint8_t bytes_[FIDL_ALIGN(PrimarySize + MaxOutOfLine)];
UnownedEncodedMessage message_;
};
class DecodedMessage final : public ::fidl::internal::IncomingMessage {
public:
DecodedMessage(uint8_t* bytes, uint32_t byte_actual,
zx_handle_info_t* handles = nullptr,
uint32_t handle_actual = 0)
: ::fidl::internal::IncomingMessage(bytes, byte_actual, handles,
handle_actual) {
Decode<struct Padding5ByteMiddle>();
}
DecodedMessage(fidl_incoming_msg_t* msg)
: ::fidl::internal::IncomingMessage(msg) {
Decode<struct Padding5ByteMiddle>();
}
DecodedMessage(const DecodedMessage&) = delete;
DecodedMessage(DecodedMessage&&) = delete;
DecodedMessage* operator=(const DecodedMessage&) = delete;
DecodedMessage* operator=(DecodedMessage&&) = delete;
struct Padding5ByteMiddle* PrimaryObject() {
ZX_DEBUG_ASSERT(ok());
return reinterpret_cast<struct Padding5ByteMiddle*>(bytes());
}
// Release the ownership of the decoded message. That means that the handles
// won't be closed When the object is destroyed. After calling this method,
// the DecodedMessage object should not be used anymore.
void ReleasePrimaryObject() { ResetBytes(); }
// These methods should only be used for testing purpose.
// They create an DecodedMessage using the bytes of an outgoing message and
// copying the handles.
static DecodedMessage FromOutgoingWithRawHandleCopy(
UnownedEncodedMessage* encoded_message) {
return DecodedMessage(encoded_message->GetOutgoingMessage());
}
static DecodedMessage FromOutgoingWithRawHandleCopy(
OwnedEncodedMessage* encoded_message) {
return DecodedMessage(encoded_message->GetOutgoingMessage());
}
private:
DecodedMessage(::fidl::OutgoingMessage& outgoing_message) {
Init(outgoing_message, nullptr, 0);
if (ok()) {
Decode<struct Padding5ByteMiddle>();
}
}
};
};
extern "C" const fidl_type_t fidl_test_padding_Padding5ByteEndTable;
struct Padding5ByteEnd {
static constexpr const fidl_type_t* Type =
&fidl_test_padding_Padding5ByteEndTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 16;
[[maybe_unused]] static constexpr uint32_t MaxOutOfLine = 0;
static constexpr bool HasPointer = false;
uint64_t a = {};
uint16_t b = {};
uint8_t c = {};
class UnownedEncodedMessage final {
public:
UnownedEncodedMessage(uint8_t* bytes, uint32_t byte_size,
Padding5ByteEnd* value)
: message_(bytes, byte_size, sizeof(Padding5ByteEnd), nullptr, 0, 0) {
message_.LinearizeAndEncode<Padding5ByteEnd>(value);
}
UnownedEncodedMessage(const UnownedEncodedMessage&) = delete;
UnownedEncodedMessage(UnownedEncodedMessage&&) = delete;
UnownedEncodedMessage* operator=(const UnownedEncodedMessage&) = delete;
UnownedEncodedMessage* operator=(UnownedEncodedMessage&&) = delete;
zx_status_t status() const { return message_.status(); }
#ifdef __Fuchsia__
const char* status_string() const { return message_.status_string(); }
#endif
bool ok() const { return message_.status() == ZX_OK; }
const char* error() const { return message_.error(); }
::fidl::OutgoingMessage& GetOutgoingMessage() { return message_; }
private:
::fidl::OutgoingMessage message_;
};
class OwnedEncodedMessage final {
public:
explicit OwnedEncodedMessage(Padding5ByteEnd* value)
: message_(bytes_, sizeof(bytes_), value) {}
OwnedEncodedMessage(const OwnedEncodedMessage&) = delete;
OwnedEncodedMessage(OwnedEncodedMessage&&) = delete;
OwnedEncodedMessage* operator=(const OwnedEncodedMessage&) = delete;
OwnedEncodedMessage* operator=(OwnedEncodedMessage&&) = delete;
zx_status_t status() const { return message_.status(); }
#ifdef __Fuchsia__
const char* status_string() const { return message_.status_string(); }
#endif
bool ok() const { return message_.ok(); }
const char* error() const { return message_.error(); }
::fidl::OutgoingMessage& GetOutgoingMessage() {
return message_.GetOutgoingMessage();
}
private:
FIDL_ALIGNDECL
uint8_t bytes_[FIDL_ALIGN(PrimarySize + MaxOutOfLine)];
UnownedEncodedMessage message_;
};
class DecodedMessage final : public ::fidl::internal::IncomingMessage {
public:
DecodedMessage(uint8_t* bytes, uint32_t byte_actual,
zx_handle_info_t* handles = nullptr,
uint32_t handle_actual = 0)
: ::fidl::internal::IncomingMessage(bytes, byte_actual, handles,
handle_actual) {
Decode<struct Padding5ByteEnd>();
}
DecodedMessage(fidl_incoming_msg_t* msg)
: ::fidl::internal::IncomingMessage(msg) {
Decode<struct Padding5ByteEnd>();
}
DecodedMessage(const DecodedMessage&) = delete;
DecodedMessage(DecodedMessage&&) = delete;
DecodedMessage* operator=(const DecodedMessage&) = delete;
DecodedMessage* operator=(DecodedMessage&&) = delete;
struct Padding5ByteEnd* PrimaryObject() {
ZX_DEBUG_ASSERT(ok());
return reinterpret_cast<struct Padding5ByteEnd*>(bytes());
}
// Release the ownership of the decoded message. That means that the handles
// won't be closed When the object is destroyed. After calling this method,
// the DecodedMessage object should not be used anymore.
void ReleasePrimaryObject() { ResetBytes(); }
// These methods should only be used for testing purpose.
// They create an DecodedMessage using the bytes of an outgoing message and
// copying the handles.
static DecodedMessage FromOutgoingWithRawHandleCopy(
UnownedEncodedMessage* encoded_message) {
return DecodedMessage(encoded_message->GetOutgoingMessage());
}
static DecodedMessage FromOutgoingWithRawHandleCopy(
OwnedEncodedMessage* encoded_message) {
return DecodedMessage(encoded_message->GetOutgoingMessage());
}
private:
DecodedMessage(::fidl::OutgoingMessage& outgoing_message) {
Init(outgoing_message, nullptr, 0);
if (ok()) {
Decode<struct Padding5ByteEnd>();
}
}
};
};
extern "C" const fidl_type_t fidl_test_padding_Padding4ByteMiddleTable;
struct Padding4ByteMiddle {
static constexpr const fidl_type_t* Type =
&fidl_test_padding_Padding4ByteMiddleTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 16;
[[maybe_unused]] static constexpr uint32_t MaxOutOfLine = 0;
static constexpr bool HasPointer = false;
uint32_t a = {};
uint64_t b = {};
class UnownedEncodedMessage final {
public:
UnownedEncodedMessage(uint8_t* bytes, uint32_t byte_size,
Padding4ByteMiddle* value)
: message_(bytes, byte_size, sizeof(Padding4ByteMiddle), nullptr, 0,
0) {
message_.LinearizeAndEncode<Padding4ByteMiddle>(value);
}
UnownedEncodedMessage(const UnownedEncodedMessage&) = delete;
UnownedEncodedMessage(UnownedEncodedMessage&&) = delete;
UnownedEncodedMessage* operator=(const UnownedEncodedMessage&) = delete;
UnownedEncodedMessage* operator=(UnownedEncodedMessage&&) = delete;
zx_status_t status() const { return message_.status(); }
#ifdef __Fuchsia__
const char* status_string() const { return message_.status_string(); }
#endif
bool ok() const { return message_.status() == ZX_OK; }
const char* error() const { return message_.error(); }
::fidl::OutgoingMessage& GetOutgoingMessage() { return message_; }
private:
::fidl::OutgoingMessage message_;
};
class OwnedEncodedMessage final {
public:
explicit OwnedEncodedMessage(Padding4ByteMiddle* value)
: message_(bytes_, sizeof(bytes_), value) {}
OwnedEncodedMessage(const OwnedEncodedMessage&) = delete;
OwnedEncodedMessage(OwnedEncodedMessage&&) = delete;
OwnedEncodedMessage* operator=(const OwnedEncodedMessage&) = delete;
OwnedEncodedMessage* operator=(OwnedEncodedMessage&&) = delete;
zx_status_t status() const { return message_.status(); }
#ifdef __Fuchsia__
const char* status_string() const { return message_.status_string(); }
#endif
bool ok() const { return message_.ok(); }
const char* error() const { return message_.error(); }
::fidl::OutgoingMessage& GetOutgoingMessage() {
return message_.GetOutgoingMessage();
}
private:
FIDL_ALIGNDECL
uint8_t bytes_[FIDL_ALIGN(PrimarySize + MaxOutOfLine)];
UnownedEncodedMessage message_;
};
class DecodedMessage final : public ::fidl::internal::IncomingMessage {
public:
DecodedMessage(uint8_t* bytes, uint32_t byte_actual,
zx_handle_info_t* handles = nullptr,
uint32_t handle_actual = 0)
: ::fidl::internal::IncomingMessage(bytes, byte_actual, handles,
handle_actual) {
Decode<struct Padding4ByteMiddle>();
}
DecodedMessage(fidl_incoming_msg_t* msg)
: ::fidl::internal::IncomingMessage(msg) {
Decode<struct Padding4ByteMiddle>();
}
DecodedMessage(const DecodedMessage&) = delete;
DecodedMessage(DecodedMessage&&) = delete;
DecodedMessage* operator=(const DecodedMessage&) = delete;
DecodedMessage* operator=(DecodedMessage&&) = delete;
struct Padding4ByteMiddle* PrimaryObject() {
ZX_DEBUG_ASSERT(ok());
return reinterpret_cast<struct Padding4ByteMiddle*>(bytes());
}
// Release the ownership of the decoded message. That means that the handles
// won't be closed When the object is destroyed. After calling this method,
// the DecodedMessage object should not be used anymore.
void ReleasePrimaryObject() { ResetBytes(); }
// These methods should only be used for testing purpose.
// They create an DecodedMessage using the bytes of an outgoing message and
// copying the handles.
static DecodedMessage FromOutgoingWithRawHandleCopy(
UnownedEncodedMessage* encoded_message) {
return DecodedMessage(encoded_message->GetOutgoingMessage());
}
static DecodedMessage FromOutgoingWithRawHandleCopy(
OwnedEncodedMessage* encoded_message) {
return DecodedMessage(encoded_message->GetOutgoingMessage());
}
private:
DecodedMessage(::fidl::OutgoingMessage& outgoing_message) {
Init(outgoing_message, nullptr, 0);
if (ok()) {
Decode<struct Padding4ByteMiddle>();
}
}
};
};
extern "C" const fidl_type_t fidl_test_padding_Padding4ByteEndTable;
struct Padding4ByteEnd {
static constexpr const fidl_type_t* Type =
&fidl_test_padding_Padding4ByteEndTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 16;
[[maybe_unused]] static constexpr uint32_t MaxOutOfLine = 0;
static constexpr bool HasPointer = false;
uint64_t a = {};
uint32_t b = {};
class UnownedEncodedMessage final {
public:
UnownedEncodedMessage(uint8_t* bytes, uint32_t byte_size,
Padding4ByteEnd* value)
: message_(bytes, byte_size, sizeof(Padding4ByteEnd), nullptr, 0, 0) {
message_.LinearizeAndEncode<Padding4ByteEnd>(value);
}
UnownedEncodedMessage(const UnownedEncodedMessage&) = delete;
UnownedEncodedMessage(UnownedEncodedMessage&&) = delete;
UnownedEncodedMessage* operator=(const UnownedEncodedMessage&) = delete;
UnownedEncodedMessage* operator=(UnownedEncodedMessage&&) = delete;
zx_status_t status() const { return message_.status(); }
#ifdef __Fuchsia__
const char* status_string() const { return message_.status_string(); }
#endif
bool ok() const { return message_.status() == ZX_OK; }
const char* error() const { return message_.error(); }
::fidl::OutgoingMessage& GetOutgoingMessage() { return message_; }
private:
::fidl::OutgoingMessage message_;
};
class OwnedEncodedMessage final {
public:
explicit OwnedEncodedMessage(Padding4ByteEnd* value)
: message_(bytes_, sizeof(bytes_), value) {}
OwnedEncodedMessage(const OwnedEncodedMessage&) = delete;
OwnedEncodedMessage(OwnedEncodedMessage&&) = delete;
OwnedEncodedMessage* operator=(const OwnedEncodedMessage&) = delete;
OwnedEncodedMessage* operator=(OwnedEncodedMessage&&) = delete;
zx_status_t status() const { return message_.status(); }
#ifdef __Fuchsia__
const char* status_string() const { return message_.status_string(); }
#endif
bool ok() const { return message_.ok(); }
const char* error() const { return message_.error(); }
::fidl::OutgoingMessage& GetOutgoingMessage() {
return message_.GetOutgoingMessage();
}
private:
FIDL_ALIGNDECL
uint8_t bytes_[FIDL_ALIGN(PrimarySize + MaxOutOfLine)];
UnownedEncodedMessage message_;
};
class DecodedMessage final : public ::fidl::internal::IncomingMessage {
public:
DecodedMessage(uint8_t* bytes, uint32_t byte_actual,
zx_handle_info_t* handles = nullptr,
uint32_t handle_actual = 0)
: ::fidl::internal::IncomingMessage(bytes, byte_actual, handles,
handle_actual) {
Decode<struct Padding4ByteEnd>();
}
DecodedMessage(fidl_incoming_msg_t* msg)
: ::fidl::internal::IncomingMessage(msg) {
Decode<struct Padding4ByteEnd>();
}
DecodedMessage(const DecodedMessage&) = delete;
DecodedMessage(DecodedMessage&&) = delete;
DecodedMessage* operator=(const DecodedMessage&) = delete;
DecodedMessage* operator=(DecodedMessage&&) = delete;
struct Padding4ByteEnd* PrimaryObject() {
ZX_DEBUG_ASSERT(ok());
return reinterpret_cast<struct Padding4ByteEnd*>(bytes());
}
// Release the ownership of the decoded message. That means that the handles
// won't be closed When the object is destroyed. After calling this method,
// the DecodedMessage object should not be used anymore.
void ReleasePrimaryObject() { ResetBytes(); }
// These methods should only be used for testing purpose.
// They create an DecodedMessage using the bytes of an outgoing message and
// copying the handles.
static DecodedMessage FromOutgoingWithRawHandleCopy(
UnownedEncodedMessage* encoded_message) {
return DecodedMessage(encoded_message->GetOutgoingMessage());
}
static DecodedMessage FromOutgoingWithRawHandleCopy(
OwnedEncodedMessage* encoded_message) {
return DecodedMessage(encoded_message->GetOutgoingMessage());
}
private:
DecodedMessage(::fidl::OutgoingMessage& outgoing_message) {
Init(outgoing_message, nullptr, 0);
if (ok()) {
Decode<struct Padding4ByteEnd>();
}
}
};
};
extern "C" const fidl_type_t
fidl_test_padding_Padding4ByteAlignmentLength12Table;
struct Padding4ByteAlignmentLength12 {
static constexpr const fidl_type_t* Type =
&fidl_test_padding_Padding4ByteAlignmentLength12Table;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 12;
[[maybe_unused]] static constexpr uint32_t MaxOutOfLine = 0;
static constexpr bool HasPointer = false;
uint32_t a = {};
uint8_t b = {};
uint16_t c = {};
uint16_t d = {};
class UnownedEncodedMessage final {
public:
UnownedEncodedMessage(uint8_t* bytes, uint32_t byte_size,
Padding4ByteAlignmentLength12* value)
: message_(bytes, byte_size, sizeof(Padding4ByteAlignmentLength12),
nullptr, 0, 0) {
message_.LinearizeAndEncode<Padding4ByteAlignmentLength12>(value);
}
UnownedEncodedMessage(const UnownedEncodedMessage&) = delete;
UnownedEncodedMessage(UnownedEncodedMessage&&) = delete;
UnownedEncodedMessage* operator=(const UnownedEncodedMessage&) = delete;
UnownedEncodedMessage* operator=(UnownedEncodedMessage&&) = delete;
zx_status_t status() const { return message_.status(); }
#ifdef __Fuchsia__
const char* status_string() const { return message_.status_string(); }
#endif
bool ok() const { return message_.status() == ZX_OK; }
const char* error() const { return message_.error(); }
::fidl::OutgoingMessage& GetOutgoingMessage() { return message_; }
private:
::fidl::OutgoingMessage message_;
};
class OwnedEncodedMessage final {
public:
explicit OwnedEncodedMessage(Padding4ByteAlignmentLength12* value)
: message_(bytes_, sizeof(bytes_), value) {}
OwnedEncodedMessage(const OwnedEncodedMessage&) = delete;
OwnedEncodedMessage(OwnedEncodedMessage&&) = delete;
OwnedEncodedMessage* operator=(const OwnedEncodedMessage&) = delete;
OwnedEncodedMessage* operator=(OwnedEncodedMessage&&) = delete;
zx_status_t status() const { return message_.status(); }
#ifdef __Fuchsia__
const char* status_string() const { return message_.status_string(); }
#endif
bool ok() const { return message_.ok(); }
const char* error() const { return message_.error(); }
::fidl::OutgoingMessage& GetOutgoingMessage() {
return message_.GetOutgoingMessage();
}
private:
FIDL_ALIGNDECL
uint8_t bytes_[FIDL_ALIGN(PrimarySize + MaxOutOfLine)];
UnownedEncodedMessage message_;
};
class DecodedMessage final : public ::fidl::internal::IncomingMessage {
public:
DecodedMessage(uint8_t* bytes, uint32_t byte_actual,
zx_handle_info_t* handles = nullptr,
uint32_t handle_actual = 0)
: ::fidl::internal::IncomingMessage(bytes, byte_actual, handles,
handle_actual) {
Decode<struct Padding4ByteAlignmentLength12>();
}
DecodedMessage(fidl_incoming_msg_t* msg)
: ::fidl::internal::IncomingMessage(msg) {
Decode<struct Padding4ByteAlignmentLength12>();
}
DecodedMessage(const DecodedMessage&) = delete;
DecodedMessage(DecodedMessage&&) = delete;
DecodedMessage* operator=(const DecodedMessage&) = delete;
DecodedMessage* operator=(DecodedMessage&&) = delete;
struct Padding4ByteAlignmentLength12* PrimaryObject() {
ZX_DEBUG_ASSERT(ok());
return reinterpret_cast<struct Padding4ByteAlignmentLength12*>(bytes());
}
// Release the ownership of the decoded message. That means that the handles
// won't be closed When the object is destroyed. After calling this method,
// the DecodedMessage object should not be used anymore.
void ReleasePrimaryObject() { ResetBytes(); }
// These methods should only be used for testing purpose.
// They create an DecodedMessage using the bytes of an outgoing message and
// copying the handles.
static DecodedMessage FromOutgoingWithRawHandleCopy(
UnownedEncodedMessage* encoded_message) {
return DecodedMessage(encoded_message->GetOutgoingMessage());
}
static DecodedMessage FromOutgoingWithRawHandleCopy(
OwnedEncodedMessage* encoded_message) {
return DecodedMessage(encoded_message->GetOutgoingMessage());
}
private:
DecodedMessage(::fidl::OutgoingMessage& outgoing_message) {
Init(outgoing_message, nullptr, 0);
if (ok()) {
Decode<struct Padding4ByteAlignmentLength12>();
}
}
};
};
extern "C" const fidl_type_t fidl_test_padding_Padding3ByteMiddleTable;
struct Padding3ByteMiddle {
static constexpr const fidl_type_t* Type =
&fidl_test_padding_Padding3ByteMiddleTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 8;
[[maybe_unused]] static constexpr uint32_t MaxOutOfLine = 0;
static constexpr bool HasPointer = false;
uint8_t a = {};
uint32_t b = {};
class UnownedEncodedMessage final {
public:
UnownedEncodedMessage(uint8_t* bytes, uint32_t byte_size,
Padding3ByteMiddle* value)
: message_(bytes, byte_size, sizeof(Padding3ByteMiddle), nullptr, 0,
0) {
message_.LinearizeAndEncode<Padding3ByteMiddle>(value);
}
UnownedEncodedMessage(const UnownedEncodedMessage&) = delete;
UnownedEncodedMessage(UnownedEncodedMessage&&) = delete;
UnownedEncodedMessage* operator=(const UnownedEncodedMessage&) = delete;
UnownedEncodedMessage* operator=(UnownedEncodedMessage&&) = delete;
zx_status_t status() const { return message_.status(); }
#ifdef __Fuchsia__
const char* status_string() const { return message_.status_string(); }
#endif
bool ok() const { return message_.status() == ZX_OK; }
const char* error() const { return message_.error(); }
::fidl::OutgoingMessage& GetOutgoingMessage() { return message_; }
private:
::fidl::OutgoingMessage message_;
};
class OwnedEncodedMessage final {
public:
explicit OwnedEncodedMessage(Padding3ByteMiddle* value)
: message_(bytes_, sizeof(bytes_), value) {}
OwnedEncodedMessage(const OwnedEncodedMessage&) = delete;
OwnedEncodedMessage(OwnedEncodedMessage&&) = delete;
OwnedEncodedMessage* operator=(const OwnedEncodedMessage&) = delete;
OwnedEncodedMessage* operator=(OwnedEncodedMessage&&) = delete;
zx_status_t status() const { return message_.status(); }
#ifdef __Fuchsia__
const char* status_string() const { return message_.status_string(); }
#endif
bool ok() const { return message_.ok(); }
const char* error() const { return message_.error(); }
::fidl::OutgoingMessage& GetOutgoingMessage() {
return message_.GetOutgoingMessage();
}
private:
FIDL_ALIGNDECL
uint8_t bytes_[FIDL_ALIGN(PrimarySize + MaxOutOfLine)];
UnownedEncodedMessage message_;
};
class DecodedMessage final : public ::fidl::internal::IncomingMessage {
public:
DecodedMessage(uint8_t* bytes, uint32_t byte_actual,
zx_handle_info_t* handles = nullptr,
uint32_t handle_actual = 0)
: ::fidl::internal::IncomingMessage(bytes, byte_actual, handles,
handle_actual) {
Decode<struct Padding3ByteMiddle>();
}
DecodedMessage(fidl_incoming_msg_t* msg)
: ::fidl::internal::IncomingMessage(msg) {
Decode<struct Padding3ByteMiddle>();
}
DecodedMessage(const DecodedMessage&) = delete;
DecodedMessage(DecodedMessage&&) = delete;
DecodedMessage* operator=(const DecodedMessage&) = delete;
DecodedMessage* operator=(DecodedMessage&&) = delete;
struct Padding3ByteMiddle* PrimaryObject() {
ZX_DEBUG_ASSERT(ok());
return reinterpret_cast<struct Padding3ByteMiddle*>(bytes());
}
// Release the ownership of the decoded message. That means that the handles
// won't be closed When the object is destroyed. After calling this method,
// the DecodedMessage object should not be used anymore.
void ReleasePrimaryObject() { ResetBytes(); }
// These methods should only be used for testing purpose.
// They create an DecodedMessage using the bytes of an outgoing message and
// copying the handles.
static DecodedMessage FromOutgoingWithRawHandleCopy(
UnownedEncodedMessage* encoded_message) {
return DecodedMessage(encoded_message->GetOutgoingMessage());
}
static DecodedMessage FromOutgoingWithRawHandleCopy(
OwnedEncodedMessage* encoded_message) {
return DecodedMessage(encoded_message->GetOutgoingMessage());
}
private:
DecodedMessage(::fidl::OutgoingMessage& outgoing_message) {
Init(outgoing_message, nullptr, 0);
if (ok()) {
Decode<struct Padding3ByteMiddle>();
}
}
};
};
extern "C" const fidl_type_t fidl_test_padding_Padding3ByteEndTable;
struct Padding3ByteEnd {
static constexpr const fidl_type_t* Type =
&fidl_test_padding_Padding3ByteEndTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 8;
[[maybe_unused]] static constexpr uint32_t MaxOutOfLine = 0;
static constexpr bool HasPointer = false;
uint32_t a = {};
uint8_t b = {};
class UnownedEncodedMessage final {
public:
UnownedEncodedMessage(uint8_t* bytes, uint32_t byte_size,
Padding3ByteEnd* value)
: message_(bytes, byte_size, sizeof(Padding3ByteEnd), nullptr, 0, 0) {
message_.LinearizeAndEncode<Padding3ByteEnd>(value);
}
UnownedEncodedMessage(const UnownedEncodedMessage&) = delete;
UnownedEncodedMessage(UnownedEncodedMessage&&) = delete;
UnownedEncodedMessage* operator=(const UnownedEncodedMessage&) = delete;
UnownedEncodedMessage* operator=(UnownedEncodedMessage&&) = delete;
zx_status_t status() const { return message_.status(); }
#ifdef __Fuchsia__
const char* status_string() const { return message_.status_string(); }
#endif
bool ok() const { return message_.status() == ZX_OK; }
const char* error() const { return message_.error(); }
::fidl::OutgoingMessage& GetOutgoingMessage() { return message_; }
private:
::fidl::OutgoingMessage message_;
};
class OwnedEncodedMessage final {
public:
explicit OwnedEncodedMessage(Padding3ByteEnd* value)
: message_(bytes_, sizeof(bytes_), value) {}
OwnedEncodedMessage(const OwnedEncodedMessage&) = delete;
OwnedEncodedMessage(OwnedEncodedMessage&&) = delete;
OwnedEncodedMessage* operator=(const OwnedEncodedMessage&) = delete;
OwnedEncodedMessage* operator=(OwnedEncodedMessage&&) = delete;
zx_status_t status() const { return message_.status(); }
#ifdef __Fuchsia__
const char* status_string() const { return message_.status_string(); }
#endif
bool ok() const { return message_.ok(); }
const char* error() const { return message_.error(); }
::fidl::OutgoingMessage& GetOutgoingMessage() {
return message_.GetOutgoingMessage();
}
private:
FIDL_ALIGNDECL
uint8_t bytes_[FIDL_ALIGN(PrimarySize + MaxOutOfLine)];
UnownedEncodedMessage message_;
};
class DecodedMessage final : public ::fidl::internal::IncomingMessage {
public:
DecodedMessage(uint8_t* bytes, uint32_t byte_actual,
zx_handle_info_t* handles = nullptr,
uint32_t handle_actual = 0)
: ::fidl::internal::IncomingMessage(bytes, byte_actual, handles,
handle_actual) {
Decode<struct Padding3ByteEnd>();
}
DecodedMessage(fidl_incoming_msg_t* msg)
: ::fidl::internal::IncomingMessage(msg) {
Decode<struct Padding3ByteEnd>();
}
DecodedMessage(const DecodedMessage&) = delete;
DecodedMessage(DecodedMessage&&) = delete;
DecodedMessage* operator=(const DecodedMessage&) = delete;
DecodedMessage* operator=(DecodedMessage&&) = delete;
struct Padding3ByteEnd* PrimaryObject() {
ZX_DEBUG_ASSERT(ok());
return reinterpret_cast<struct Padding3ByteEnd*>(bytes());
}
// Release the ownership of the decoded message. That means that the handles
// won't be closed When the object is destroyed. After calling this method,
// the DecodedMessage object should not be used anymore.
void ReleasePrimaryObject() { ResetBytes(); }
// These methods should only be used for testing purpose.
// They create an DecodedMessage using the bytes of an outgoing message and
// copying the handles.
static DecodedMessage FromOutgoingWithRawHandleCopy(
UnownedEncodedMessage* encoded_message) {
return DecodedMessage(encoded_message->GetOutgoingMessage());
}
static DecodedMessage FromOutgoingWithRawHandleCopy(
OwnedEncodedMessage* encoded_message) {
return DecodedMessage(encoded_message->GetOutgoingMessage());
}
private:
DecodedMessage(::fidl::OutgoingMessage& outgoing_message) {
Init(outgoing_message, nullptr, 0);
if (ok()) {
Decode<struct Padding3ByteEnd>();
}
}
};
};
extern "C" const fidl_type_t fidl_test_padding_Padding2ByteMiddleTable;
struct Padding2ByteMiddle {
static constexpr const fidl_type_t* Type =
&fidl_test_padding_Padding2ByteMiddleTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 8;
[[maybe_unused]] static constexpr uint32_t MaxOutOfLine = 0;
static constexpr bool HasPointer = false;
uint16_t a = {};
uint32_t b = {};
class UnownedEncodedMessage final {
public:
UnownedEncodedMessage(uint8_t* bytes, uint32_t byte_size,
Padding2ByteMiddle* value)
: message_(bytes, byte_size, sizeof(Padding2ByteMiddle), nullptr, 0,
0) {
message_.LinearizeAndEncode<Padding2ByteMiddle>(value);
}
UnownedEncodedMessage(const UnownedEncodedMessage&) = delete;
UnownedEncodedMessage(UnownedEncodedMessage&&) = delete;
UnownedEncodedMessage* operator=(const UnownedEncodedMessage&) = delete;
UnownedEncodedMessage* operator=(UnownedEncodedMessage&&) = delete;
zx_status_t status() const { return message_.status(); }
#ifdef __Fuchsia__
const char* status_string() const { return message_.status_string(); }
#endif
bool ok() const { return message_.status() == ZX_OK; }
const char* error() const { return message_.error(); }
::fidl::OutgoingMessage& GetOutgoingMessage() { return message_; }
private:
::fidl::OutgoingMessage message_;
};
class OwnedEncodedMessage final {
public:
explicit OwnedEncodedMessage(Padding2ByteMiddle* value)
: message_(bytes_, sizeof(bytes_), value) {}
OwnedEncodedMessage(const OwnedEncodedMessage&) = delete;
OwnedEncodedMessage(OwnedEncodedMessage&&) = delete;
OwnedEncodedMessage* operator=(const OwnedEncodedMessage&) = delete;
OwnedEncodedMessage* operator=(OwnedEncodedMessage&&) = delete;
zx_status_t status() const { return message_.status(); }
#ifdef __Fuchsia__
const char* status_string() const { return message_.status_string(); }
#endif
bool ok() const { return message_.ok(); }
const char* error() const { return message_.error(); }
::fidl::OutgoingMessage& GetOutgoingMessage() {
return message_.GetOutgoingMessage();
}
private:
FIDL_ALIGNDECL
uint8_t bytes_[FIDL_ALIGN(PrimarySize + MaxOutOfLine)];
UnownedEncodedMessage message_;
};
class DecodedMessage final : public ::fidl::internal::IncomingMessage {
public:
DecodedMessage(uint8_t* bytes, uint32_t byte_actual,
zx_handle_info_t* handles = nullptr,
uint32_t handle_actual = 0)
: ::fidl::internal::IncomingMessage(bytes, byte_actual, handles,
handle_actual) {
Decode<struct Padding2ByteMiddle>();
}
DecodedMessage(fidl_incoming_msg_t* msg)
: ::fidl::internal::IncomingMessage(msg) {
Decode<struct Padding2ByteMiddle>();
}
DecodedMessage(const DecodedMessage&) = delete;
DecodedMessage(DecodedMessage&&) = delete;
DecodedMessage* operator=(const DecodedMessage&) = delete;
DecodedMessage* operator=(DecodedMessage&&) = delete;
struct Padding2ByteMiddle* PrimaryObject() {
ZX_DEBUG_ASSERT(ok());
return reinterpret_cast<struct Padding2ByteMiddle*>(bytes());
}
// Release the ownership of the decoded message. That means that the handles
// won't be closed When the object is destroyed. After calling this method,
// the DecodedMessage object should not be used anymore.
void ReleasePrimaryObject() { ResetBytes(); }
// These methods should only be used for testing purpose.
// They create an DecodedMessage using the bytes of an outgoing message and
// copying the handles.
static DecodedMessage FromOutgoingWithRawHandleCopy(
UnownedEncodedMessage* encoded_message) {
return DecodedMessage(encoded_message->GetOutgoingMessage());
}
static DecodedMessage FromOutgoingWithRawHandleCopy(
OwnedEncodedMessage* encoded_message) {
return DecodedMessage(encoded_message->GetOutgoingMessage());
}
private:
DecodedMessage(::fidl::OutgoingMessage& outgoing_message) {
Init(outgoing_message, nullptr, 0);
if (ok()) {
Decode<struct Padding2ByteMiddle>();
}
}
};
};
extern "C" const fidl_type_t fidl_test_padding_Padding2ByteEndTable;
struct Padding2ByteEnd {
static constexpr const fidl_type_t* Type =
&fidl_test_padding_Padding2ByteEndTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 8;
[[maybe_unused]] static constexpr uint32_t MaxOutOfLine = 0;
static constexpr bool HasPointer = false;
uint32_t a = {};
uint16_t b = {};
class UnownedEncodedMessage final {
public:
UnownedEncodedMessage(uint8_t* bytes, uint32_t byte_size,
Padding2ByteEnd* value)
: message_(bytes, byte_size, sizeof(Padding2ByteEnd), nullptr, 0, 0) {
message_.LinearizeAndEncode<Padding2ByteEnd>(value);
}
UnownedEncodedMessage(const UnownedEncodedMessage&) = delete;
UnownedEncodedMessage(UnownedEncodedMessage&&) = delete;
UnownedEncodedMessage* operator=(const UnownedEncodedMessage&) = delete;
UnownedEncodedMessage* operator=(UnownedEncodedMessage&&) = delete;
zx_status_t status() const { return message_.status(); }
#ifdef __Fuchsia__
const char* status_string() const { return message_.status_string(); }
#endif
bool ok() const { return message_.status() == ZX_OK; }
const char* error() const { return message_.error(); }
::fidl::OutgoingMessage& GetOutgoingMessage() { return message_; }
private:
::fidl::OutgoingMessage message_;
};
class OwnedEncodedMessage final {
public:
explicit OwnedEncodedMessage(Padding2ByteEnd* value)
: message_(bytes_, sizeof(bytes_), value) {}
OwnedEncodedMessage(const OwnedEncodedMessage&) = delete;
OwnedEncodedMessage(OwnedEncodedMessage&&) = delete;
OwnedEncodedMessage* operator=(const OwnedEncodedMessage&) = delete;
OwnedEncodedMessage* operator=(OwnedEncodedMessage&&) = delete;
zx_status_t status() const { return message_.status(); }
#ifdef __Fuchsia__
const char* status_string() const { return message_.status_string(); }
#endif
bool ok() const { return message_.ok(); }
const char* error() const { return message_.error(); }
::fidl::OutgoingMessage& GetOutgoingMessage() {
return message_.GetOutgoingMessage();
}
private:
FIDL_ALIGNDECL
uint8_t bytes_[FIDL_ALIGN(PrimarySize + MaxOutOfLine)];
UnownedEncodedMessage message_;
};
class DecodedMessage final : public ::fidl::internal::IncomingMessage {
public:
DecodedMessage(uint8_t* bytes, uint32_t byte_actual,
zx_handle_info_t* handles = nullptr,
uint32_t handle_actual = 0)
: ::fidl::internal::IncomingMessage(bytes, byte_actual, handles,
handle_actual) {
Decode<struct Padding2ByteEnd>();
}
DecodedMessage(fidl_incoming_msg_t* msg)
: ::fidl::internal::IncomingMessage(msg) {
Decode<struct Padding2ByteEnd>();
}
DecodedMessage(const DecodedMessage&) = delete;
DecodedMessage(DecodedMessage&&) = delete;
DecodedMessage* operator=(const DecodedMessage&) = delete;
DecodedMessage* operator=(DecodedMessage&&) = delete;
struct Padding2ByteEnd* PrimaryObject() {
ZX_DEBUG_ASSERT(ok());
return reinterpret_cast<struct Padding2ByteEnd*>(bytes());
}
// Release the ownership of the decoded message. That means that the handles
// won't be closed When the object is destroyed. After calling this method,
// the DecodedMessage object should not be used anymore.
void ReleasePrimaryObject() { ResetBytes(); }
// These methods should only be used for testing purpose.
// They create an DecodedMessage using the bytes of an outgoing message and
// copying the handles.
static DecodedMessage FromOutgoingWithRawHandleCopy(
UnownedEncodedMessage* encoded_message) {
return DecodedMessage(encoded_message->GetOutgoingMessage());
}
static DecodedMessage FromOutgoingWithRawHandleCopy(
OwnedEncodedMessage* encoded_message) {
return DecodedMessage(encoded_message->GetOutgoingMessage());
}
private:
DecodedMessage(::fidl::OutgoingMessage& outgoing_message) {
Init(outgoing_message, nullptr, 0);
if (ok()) {
Decode<struct Padding2ByteEnd>();
}
}
};
};
extern "C" const fidl_type_t
fidl_test_padding_Padding2ByteAlignmentLength6Table;
struct Padding2ByteAlignmentLength6 {
static constexpr const fidl_type_t* Type =
&fidl_test_padding_Padding2ByteAlignmentLength6Table;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 6;
[[maybe_unused]] static constexpr uint32_t MaxOutOfLine = 0;
static constexpr bool HasPointer = false;
uint8_t a = {};
uint16_t b = {};
uint8_t c = {};
class UnownedEncodedMessage final {
public:
UnownedEncodedMessage(uint8_t* bytes, uint32_t byte_size,
Padding2ByteAlignmentLength6* value)
: message_(bytes, byte_size, sizeof(Padding2ByteAlignmentLength6),
nullptr, 0, 0) {
message_.LinearizeAndEncode<Padding2ByteAlignmentLength6>(value);
}
UnownedEncodedMessage(const UnownedEncodedMessage&) = delete;
UnownedEncodedMessage(UnownedEncodedMessage&&) = delete;
UnownedEncodedMessage* operator=(const UnownedEncodedMessage&) = delete;
UnownedEncodedMessage* operator=(UnownedEncodedMessage&&) = delete;
zx_status_t status() const { return message_.status(); }
#ifdef __Fuchsia__
const char* status_string() const { return message_.status_string(); }
#endif
bool ok() const { return message_.status() == ZX_OK; }
const char* error() const { return message_.error(); }
::fidl::OutgoingMessage& GetOutgoingMessage() { return message_; }
private:
::fidl::OutgoingMessage message_;
};
class OwnedEncodedMessage final {
public:
explicit OwnedEncodedMessage(Padding2ByteAlignmentLength6* value)
: message_(bytes_, sizeof(bytes_), value) {}
OwnedEncodedMessage(const OwnedEncodedMessage&) = delete;
OwnedEncodedMessage(OwnedEncodedMessage&&) = delete;
OwnedEncodedMessage* operator=(const OwnedEncodedMessage&) = delete;
OwnedEncodedMessage* operator=(OwnedEncodedMessage&&) = delete;
zx_status_t status() const { return message_.status(); }
#ifdef __Fuchsia__
const char* status_string() const { return message_.status_string(); }
#endif
bool ok() const { return message_.ok(); }
const char* error() const { return message_.error(); }
::fidl::OutgoingMessage& GetOutgoingMessage() {
return message_.GetOutgoingMessage();
}
private:
FIDL_ALIGNDECL
uint8_t bytes_[FIDL_ALIGN(PrimarySize + MaxOutOfLine)];
UnownedEncodedMessage message_;
};
class DecodedMessage final : public ::fidl::internal::IncomingMessage {
public:
DecodedMessage(uint8_t* bytes, uint32_t byte_actual,
zx_handle_info_t* handles = nullptr,
uint32_t handle_actual = 0)
: ::fidl::internal::IncomingMessage(bytes, byte_actual, handles,
handle_actual) {
Decode<struct Padding2ByteAlignmentLength6>();
}
DecodedMessage(fidl_incoming_msg_t* msg)
: ::fidl::internal::IncomingMessage(msg) {
Decode<struct Padding2ByteAlignmentLength6>();
}
DecodedMessage(const DecodedMessage&) = delete;
DecodedMessage(DecodedMessage&&) = delete;
DecodedMessage* operator=(const DecodedMessage&) = delete;
DecodedMessage* operator=(DecodedMessage&&) = delete;
struct Padding2ByteAlignmentLength6* PrimaryObject() {
ZX_DEBUG_ASSERT(ok());
return reinterpret_cast<struct Padding2ByteAlignmentLength6*>(bytes());
}
// Release the ownership of the decoded message. That means that the handles
// won't be closed When the object is destroyed. After calling this method,
// the DecodedMessage object should not be used anymore.
void ReleasePrimaryObject() { ResetBytes(); }
// These methods should only be used for testing purpose.
// They create an DecodedMessage using the bytes of an outgoing message and
// copying the handles.
static DecodedMessage FromOutgoingWithRawHandleCopy(
UnownedEncodedMessage* encoded_message) {
return DecodedMessage(encoded_message->GetOutgoingMessage());
}
static DecodedMessage FromOutgoingWithRawHandleCopy(
OwnedEncodedMessage* encoded_message) {
return DecodedMessage(encoded_message->GetOutgoingMessage());
}
private:
DecodedMessage(::fidl::OutgoingMessage& outgoing_message) {
Init(outgoing_message, nullptr, 0);
if (ok()) {
Decode<struct Padding2ByteAlignmentLength6>();
}
}
};
};
extern "C" const fidl_type_t fidl_test_padding_Padding1ByteMiddleTable;
struct Padding1ByteMiddle {
static constexpr const fidl_type_t* Type =
&fidl_test_padding_Padding1ByteMiddleTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 4;
[[maybe_unused]] static constexpr uint32_t MaxOutOfLine = 0;
static constexpr bool HasPointer = false;
uint8_t a = {};
uint16_t b = {};
class UnownedEncodedMessage final {
public:
UnownedEncodedMessage(uint8_t* bytes, uint32_t byte_size,
Padding1ByteMiddle* value)
: message_(bytes, byte_size, sizeof(Padding1ByteMiddle), nullptr, 0,
0) {
message_.LinearizeAndEncode<Padding1ByteMiddle>(value);
}
UnownedEncodedMessage(const UnownedEncodedMessage&) = delete;
UnownedEncodedMessage(UnownedEncodedMessage&&) = delete;
UnownedEncodedMessage* operator=(const UnownedEncodedMessage&) = delete;
UnownedEncodedMessage* operator=(UnownedEncodedMessage&&) = delete;
zx_status_t status() const { return message_.status(); }
#ifdef __Fuchsia__
const char* status_string() const { return message_.status_string(); }
#endif
bool ok() const { return message_.status() == ZX_OK; }
const char* error() const { return message_.error(); }
::fidl::OutgoingMessage& GetOutgoingMessage() { return message_; }
private:
::fidl::OutgoingMessage message_;
};
class OwnedEncodedMessage final {
public:
explicit OwnedEncodedMessage(Padding1ByteMiddle* value)
: message_(bytes_, sizeof(bytes_), value) {}
OwnedEncodedMessage(const OwnedEncodedMessage&) = delete;
OwnedEncodedMessage(OwnedEncodedMessage&&) = delete;
OwnedEncodedMessage* operator=(const OwnedEncodedMessage&) = delete;
OwnedEncodedMessage* operator=(OwnedEncodedMessage&&) = delete;
zx_status_t status() const { return message_.status(); }
#ifdef __Fuchsia__
const char* status_string() const { return message_.status_string(); }
#endif
bool ok() const { return message_.ok(); }
const char* error() const { return message_.error(); }
::fidl::OutgoingMessage& GetOutgoingMessage() {
return message_.GetOutgoingMessage();
}
private:
FIDL_ALIGNDECL
uint8_t bytes_[FIDL_ALIGN(PrimarySize + MaxOutOfLine)];
UnownedEncodedMessage message_;
};
class DecodedMessage final : public ::fidl::internal::IncomingMessage {
public:
DecodedMessage(uint8_t* bytes, uint32_t byte_actual,
zx_handle_info_t* handles = nullptr,
uint32_t handle_actual = 0)
: ::fidl::internal::IncomingMessage(bytes, byte_actual, handles,
handle_actual) {
Decode<struct Padding1ByteMiddle>();
}
DecodedMessage(fidl_incoming_msg_t* msg)
: ::fidl::internal::IncomingMessage(msg) {
Decode<struct Padding1ByteMiddle>();
}
DecodedMessage(const DecodedMessage&) = delete;
DecodedMessage(DecodedMessage&&) = delete;
DecodedMessage* operator=(const DecodedMessage&) = delete;
DecodedMessage* operator=(DecodedMessage&&) = delete;
struct Padding1ByteMiddle* PrimaryObject() {
ZX_DEBUG_ASSERT(ok());
return reinterpret_cast<struct Padding1ByteMiddle*>(bytes());
}
// Release the ownership of the decoded message. That means that the handles
// won't be closed When the object is destroyed. After calling this method,
// the DecodedMessage object should not be used anymore.
void ReleasePrimaryObject() { ResetBytes(); }
// These methods should only be used for testing purpose.
// They create an DecodedMessage using the bytes of an outgoing message and
// copying the handles.
static DecodedMessage FromOutgoingWithRawHandleCopy(
UnownedEncodedMessage* encoded_message) {
return DecodedMessage(encoded_message->GetOutgoingMessage());
}
static DecodedMessage FromOutgoingWithRawHandleCopy(
OwnedEncodedMessage* encoded_message) {
return DecodedMessage(encoded_message->GetOutgoingMessage());
}
private:
DecodedMessage(::fidl::OutgoingMessage& outgoing_message) {
Init(outgoing_message, nullptr, 0);
if (ok()) {
Decode<struct Padding1ByteMiddle>();
}
}
};
};
extern "C" const fidl_type_t fidl_test_padding_Padding1ByteEndTable;
struct Padding1ByteEnd {
static constexpr const fidl_type_t* Type =
&fidl_test_padding_Padding1ByteEndTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 4;
[[maybe_unused]] static constexpr uint32_t MaxOutOfLine = 0;
static constexpr bool HasPointer = false;
uint16_t a = {};
uint8_t b = {};
class UnownedEncodedMessage final {
public:
UnownedEncodedMessage(uint8_t* bytes, uint32_t byte_size,
Padding1ByteEnd* value)
: message_(bytes, byte_size, sizeof(Padding1ByteEnd), nullptr, 0, 0) {
message_.LinearizeAndEncode<Padding1ByteEnd>(value);
}
UnownedEncodedMessage(const UnownedEncodedMessage&) = delete;
UnownedEncodedMessage(UnownedEncodedMessage&&) = delete;
UnownedEncodedMessage* operator=(const UnownedEncodedMessage&) = delete;
UnownedEncodedMessage* operator=(UnownedEncodedMessage&&) = delete;
zx_status_t status() const { return message_.status(); }
#ifdef __Fuchsia__
const char* status_string() const { return message_.status_string(); }
#endif
bool ok() const { return message_.status() == ZX_OK; }
const char* error() const { return message_.error(); }
::fidl::OutgoingMessage& GetOutgoingMessage() { return message_; }
private:
::fidl::OutgoingMessage message_;
};
class OwnedEncodedMessage final {
public:
explicit OwnedEncodedMessage(Padding1ByteEnd* value)
: message_(bytes_, sizeof(bytes_), value) {}
OwnedEncodedMessage(const OwnedEncodedMessage&) = delete;
OwnedEncodedMessage(OwnedEncodedMessage&&) = delete;
OwnedEncodedMessage* operator=(const OwnedEncodedMessage&) = delete;
OwnedEncodedMessage* operator=(OwnedEncodedMessage&&) = delete;
zx_status_t status() const { return message_.status(); }
#ifdef __Fuchsia__
const char* status_string() const { return message_.status_string(); }
#endif
bool ok() const { return message_.ok(); }
const char* error() const { return message_.error(); }
::fidl::OutgoingMessage& GetOutgoingMessage() {
return message_.GetOutgoingMessage();
}
private:
FIDL_ALIGNDECL
uint8_t bytes_[FIDL_ALIGN(PrimarySize + MaxOutOfLine)];
UnownedEncodedMessage message_;
};
class DecodedMessage final : public ::fidl::internal::IncomingMessage {
public:
DecodedMessage(uint8_t* bytes, uint32_t byte_actual,
zx_handle_info_t* handles = nullptr,
uint32_t handle_actual = 0)
: ::fidl::internal::IncomingMessage(bytes, byte_actual, handles,
handle_actual) {
Decode<struct Padding1ByteEnd>();
}
DecodedMessage(fidl_incoming_msg_t* msg)
: ::fidl::internal::IncomingMessage(msg) {
Decode<struct Padding1ByteEnd>();
}
DecodedMessage(const DecodedMessage&) = delete;
DecodedMessage(DecodedMessage&&) = delete;
DecodedMessage* operator=(const DecodedMessage&) = delete;
DecodedMessage* operator=(DecodedMessage&&) = delete;
struct Padding1ByteEnd* PrimaryObject() {
ZX_DEBUG_ASSERT(ok());
return reinterpret_cast<struct Padding1ByteEnd*>(bytes());
}
// Release the ownership of the decoded message. That means that the handles
// won't be closed When the object is destroyed. After calling this method,
// the DecodedMessage object should not be used anymore.
void ReleasePrimaryObject() { ResetBytes(); }
// These methods should only be used for testing purpose.
// They create an DecodedMessage using the bytes of an outgoing message and
// copying the handles.
static DecodedMessage FromOutgoingWithRawHandleCopy(
UnownedEncodedMessage* encoded_message) {
return DecodedMessage(encoded_message->GetOutgoingMessage());
}
static DecodedMessage FromOutgoingWithRawHandleCopy(
OwnedEncodedMessage* encoded_message) {
return DecodedMessage(encoded_message->GetOutgoingMessage());
}
private:
DecodedMessage(::fidl::OutgoingMessage& outgoing_message) {
Init(outgoing_message, nullptr, 0);
if (ok()) {
Decode<struct Padding1ByteEnd>();
}
}
};
};
} // namespace padding
} // namespace test
} // namespace fidl
} // namespace llcpp
namespace fidl {
template <>
struct IsFidlType<::llcpp::fidl::test::padding::Padding7ByteMiddle>
: public std::true_type {};
template <>
struct IsStruct<::llcpp::fidl::test::padding::Padding7ByteMiddle>
: public std::true_type {};
static_assert(std::is_standard_layout_v<
::llcpp::fidl::test::padding::Padding7ByteMiddle>);
static_assert(offsetof(::llcpp::fidl::test::padding::Padding7ByteMiddle, a) ==
0);
static_assert(offsetof(::llcpp::fidl::test::padding::Padding7ByteMiddle, b) ==
8);
static_assert(sizeof(::llcpp::fidl::test::padding::Padding7ByteMiddle) ==
::llcpp::fidl::test::padding::Padding7ByteMiddle::PrimarySize);
template <>
struct IsFidlType<::llcpp::fidl::test::padding::Padding7ByteEnd>
: public std::true_type {};
template <>
struct IsStruct<::llcpp::fidl::test::padding::Padding7ByteEnd>
: public std::true_type {};
static_assert(
std::is_standard_layout_v<::llcpp::fidl::test::padding::Padding7ByteEnd>);
static_assert(offsetof(::llcpp::fidl::test::padding::Padding7ByteEnd, a) == 0);
static_assert(offsetof(::llcpp::fidl::test::padding::Padding7ByteEnd, b) == 8);
static_assert(sizeof(::llcpp::fidl::test::padding::Padding7ByteEnd) ==
::llcpp::fidl::test::padding::Padding7ByteEnd::PrimarySize);
template <>
struct IsFidlType<::llcpp::fidl::test::padding::Padding6ByteMiddle>
: public std::true_type {};
template <>
struct IsStruct<::llcpp::fidl::test::padding::Padding6ByteMiddle>
: public std::true_type {};
static_assert(std::is_standard_layout_v<
::llcpp::fidl::test::padding::Padding6ByteMiddle>);
static_assert(offsetof(::llcpp::fidl::test::padding::Padding6ByteMiddle, a) ==
0);
static_assert(offsetof(::llcpp::fidl::test::padding::Padding6ByteMiddle, b) ==
8);
static_assert(sizeof(::llcpp::fidl::test::padding::Padding6ByteMiddle) ==
::llcpp::fidl::test::padding::Padding6ByteMiddle::PrimarySize);
template <>
struct IsFidlType<::llcpp::fidl::test::padding::Padding6ByteEnd>
: public std::true_type {};
template <>
struct IsStruct<::llcpp::fidl::test::padding::Padding6ByteEnd>
: public std::true_type {};
static_assert(
std::is_standard_layout_v<::llcpp::fidl::test::padding::Padding6ByteEnd>);
static_assert(offsetof(::llcpp::fidl::test::padding::Padding6ByteEnd, a) == 0);
static_assert(offsetof(::llcpp::fidl::test::padding::Padding6ByteEnd, b) == 8);
static_assert(sizeof(::llcpp::fidl::test::padding::Padding6ByteEnd) ==
::llcpp::fidl::test::padding::Padding6ByteEnd::PrimarySize);
template <>
struct IsFidlType<::llcpp::fidl::test::padding::Padding5ByteMiddle>
: public std::true_type {};
template <>
struct IsStruct<::llcpp::fidl::test::padding::Padding5ByteMiddle>
: public std::true_type {};
static_assert(std::is_standard_layout_v<
::llcpp::fidl::test::padding::Padding5ByteMiddle>);
static_assert(offsetof(::llcpp::fidl::test::padding::Padding5ByteMiddle, a) ==
0);
static_assert(offsetof(::llcpp::fidl::test::padding::Padding5ByteMiddle, b) ==
2);
static_assert(offsetof(::llcpp::fidl::test::padding::Padding5ByteMiddle, c) ==
8);
static_assert(sizeof(::llcpp::fidl::test::padding::Padding5ByteMiddle) ==
::llcpp::fidl::test::padding::Padding5ByteMiddle::PrimarySize);
template <>
struct IsFidlType<::llcpp::fidl::test::padding::Padding5ByteEnd>
: public std::true_type {};
template <>
struct IsStruct<::llcpp::fidl::test::padding::Padding5ByteEnd>
: public std::true_type {};
static_assert(
std::is_standard_layout_v<::llcpp::fidl::test::padding::Padding5ByteEnd>);
static_assert(offsetof(::llcpp::fidl::test::padding::Padding5ByteEnd, a) == 0);
static_assert(offsetof(::llcpp::fidl::test::padding::Padding5ByteEnd, b) == 8);
static_assert(offsetof(::llcpp::fidl::test::padding::Padding5ByteEnd, c) == 10);
static_assert(sizeof(::llcpp::fidl::test::padding::Padding5ByteEnd) ==
::llcpp::fidl::test::padding::Padding5ByteEnd::PrimarySize);
template <>
struct IsFidlType<::llcpp::fidl::test::padding::Padding4ByteMiddle>
: public std::true_type {};
template <>
struct IsStruct<::llcpp::fidl::test::padding::Padding4ByteMiddle>
: public std::true_type {};
static_assert(std::is_standard_layout_v<
::llcpp::fidl::test::padding::Padding4ByteMiddle>);
static_assert(offsetof(::llcpp::fidl::test::padding::Padding4ByteMiddle, a) ==
0);
static_assert(offsetof(::llcpp::fidl::test::padding::Padding4ByteMiddle, b) ==
8);
static_assert(sizeof(::llcpp::fidl::test::padding::Padding4ByteMiddle) ==
::llcpp::fidl::test::padding::Padding4ByteMiddle::PrimarySize);
template <>
struct IsFidlType<::llcpp::fidl::test::padding::Padding4ByteEnd>
: public std::true_type {};
template <>
struct IsStruct<::llcpp::fidl::test::padding::Padding4ByteEnd>
: public std::true_type {};
static_assert(
std::is_standard_layout_v<::llcpp::fidl::test::padding::Padding4ByteEnd>);
static_assert(offsetof(::llcpp::fidl::test::padding::Padding4ByteEnd, a) == 0);
static_assert(offsetof(::llcpp::fidl::test::padding::Padding4ByteEnd, b) == 8);
static_assert(sizeof(::llcpp::fidl::test::padding::Padding4ByteEnd) ==
::llcpp::fidl::test::padding::Padding4ByteEnd::PrimarySize);
template <>
struct IsFidlType<::llcpp::fidl::test::padding::Padding4ByteAlignmentLength12>
: public std::true_type {};
template <>
struct IsStruct<::llcpp::fidl::test::padding::Padding4ByteAlignmentLength12>
: public std::true_type {};
static_assert(std::is_standard_layout_v<
::llcpp::fidl::test::padding::Padding4ByteAlignmentLength12>);
static_assert(
offsetof(::llcpp::fidl::test::padding::Padding4ByteAlignmentLength12, a) ==
0);
static_assert(
offsetof(::llcpp::fidl::test::padding::Padding4ByteAlignmentLength12, b) ==
4);
static_assert(
offsetof(::llcpp::fidl::test::padding::Padding4ByteAlignmentLength12, c) ==
6);
static_assert(
offsetof(::llcpp::fidl::test::padding::Padding4ByteAlignmentLength12, d) ==
8);
static_assert(
sizeof(::llcpp::fidl::test::padding::Padding4ByteAlignmentLength12) ==
::llcpp::fidl::test::padding::Padding4ByteAlignmentLength12::PrimarySize);
template <>
struct IsFidlType<::llcpp::fidl::test::padding::Padding3ByteMiddle>
: public std::true_type {};
template <>
struct IsStruct<::llcpp::fidl::test::padding::Padding3ByteMiddle>
: public std::true_type {};
static_assert(std::is_standard_layout_v<
::llcpp::fidl::test::padding::Padding3ByteMiddle>);
static_assert(offsetof(::llcpp::fidl::test::padding::Padding3ByteMiddle, a) ==
0);
static_assert(offsetof(::llcpp::fidl::test::padding::Padding3ByteMiddle, b) ==
4);
static_assert(sizeof(::llcpp::fidl::test::padding::Padding3ByteMiddle) ==
::llcpp::fidl::test::padding::Padding3ByteMiddle::PrimarySize);
template <>
struct IsFidlType<::llcpp::fidl::test::padding::Padding3ByteEnd>
: public std::true_type {};
template <>
struct IsStruct<::llcpp::fidl::test::padding::Padding3ByteEnd>
: public std::true_type {};
static_assert(
std::is_standard_layout_v<::llcpp::fidl::test::padding::Padding3ByteEnd>);
static_assert(offsetof(::llcpp::fidl::test::padding::Padding3ByteEnd, a) == 0);
static_assert(offsetof(::llcpp::fidl::test::padding::Padding3ByteEnd, b) == 4);
static_assert(sizeof(::llcpp::fidl::test::padding::Padding3ByteEnd) ==
::llcpp::fidl::test::padding::Padding3ByteEnd::PrimarySize);
template <>
struct IsFidlType<::llcpp::fidl::test::padding::Padding2ByteMiddle>
: public std::true_type {};
template <>
struct IsStruct<::llcpp::fidl::test::padding::Padding2ByteMiddle>
: public std::true_type {};
static_assert(std::is_standard_layout_v<
::llcpp::fidl::test::padding::Padding2ByteMiddle>);
static_assert(offsetof(::llcpp::fidl::test::padding::Padding2ByteMiddle, a) ==
0);
static_assert(offsetof(::llcpp::fidl::test::padding::Padding2ByteMiddle, b) ==
4);
static_assert(sizeof(::llcpp::fidl::test::padding::Padding2ByteMiddle) ==
::llcpp::fidl::test::padding::Padding2ByteMiddle::PrimarySize);
template <>
struct IsFidlType<::llcpp::fidl::test::padding::Padding2ByteEnd>
: public std::true_type {};
template <>
struct IsStruct<::llcpp::fidl::test::padding::Padding2ByteEnd>
: public std::true_type {};
static_assert(
std::is_standard_layout_v<::llcpp::fidl::test::padding::Padding2ByteEnd>);
static_assert(offsetof(::llcpp::fidl::test::padding::Padding2ByteEnd, a) == 0);
static_assert(offsetof(::llcpp::fidl::test::padding::Padding2ByteEnd, b) == 4);
static_assert(sizeof(::llcpp::fidl::test::padding::Padding2ByteEnd) ==
::llcpp::fidl::test::padding::Padding2ByteEnd::PrimarySize);
template <>
struct IsFidlType<::llcpp::fidl::test::padding::Padding2ByteAlignmentLength6>
: public std::true_type {};
template <>
struct IsStruct<::llcpp::fidl::test::padding::Padding2ByteAlignmentLength6>
: public std::true_type {};
static_assert(std::is_standard_layout_v<
::llcpp::fidl::test::padding::Padding2ByteAlignmentLength6>);
static_assert(
offsetof(::llcpp::fidl::test::padding::Padding2ByteAlignmentLength6, a) ==
0);
static_assert(
offsetof(::llcpp::fidl::test::padding::Padding2ByteAlignmentLength6, b) ==
2);
static_assert(
offsetof(::llcpp::fidl::test::padding::Padding2ByteAlignmentLength6, c) ==
4);
static_assert(
sizeof(::llcpp::fidl::test::padding::Padding2ByteAlignmentLength6) ==
::llcpp::fidl::test::padding::Padding2ByteAlignmentLength6::PrimarySize);
template <>
struct IsFidlType<::llcpp::fidl::test::padding::Padding1ByteMiddle>
: public std::true_type {};
template <>
struct IsStruct<::llcpp::fidl::test::padding::Padding1ByteMiddle>
: public std::true_type {};
static_assert(std::is_standard_layout_v<
::llcpp::fidl::test::padding::Padding1ByteMiddle>);
static_assert(offsetof(::llcpp::fidl::test::padding::Padding1ByteMiddle, a) ==
0);
static_assert(offsetof(::llcpp::fidl::test::padding::Padding1ByteMiddle, b) ==
2);
static_assert(sizeof(::llcpp::fidl::test::padding::Padding1ByteMiddle) ==
::llcpp::fidl::test::padding::Padding1ByteMiddle::PrimarySize);
template <>
struct IsFidlType<::llcpp::fidl::test::padding::Padding1ByteEnd>
: public std::true_type {};
template <>
struct IsStruct<::llcpp::fidl::test::padding::Padding1ByteEnd>
: public std::true_type {};
static_assert(
std::is_standard_layout_v<::llcpp::fidl::test::padding::Padding1ByteEnd>);
static_assert(offsetof(::llcpp::fidl::test::padding::Padding1ByteEnd, a) == 0);
static_assert(offsetof(::llcpp::fidl::test::padding::Padding1ByteEnd, b) == 2);
static_assert(sizeof(::llcpp::fidl::test::padding::Padding1ByteEnd) ==
::llcpp::fidl::test::padding::Padding1ByteEnd::PrimarySize);
} // namespace fidl
namespace llcpp {
namespace fidl {
namespace test {
namespace padding {} // namespace padding
} // namespace test
} // namespace fidl
} // namespace llcpp