| // WARNING: This file is machine generated by fidlgen. |
| |
| #pragma once |
| |
| #include <lib/fidl/llcpp/array.h> |
| #include <lib/fidl/llcpp/coding.h> |
| #include <lib/fidl/llcpp/envelope.h> |
| #include <lib/fidl/llcpp/message.h> |
| #include <lib/fidl/llcpp/message_storage.h> |
| #include <lib/fidl/llcpp/object_view.h> |
| #include <lib/fidl/llcpp/string_view.h> |
| #include <lib/fidl/llcpp/traits.h> |
| #include <lib/fidl/llcpp/wire_types.h> |
| #include <lib/stdcompat/optional.h> |
| |
| #include <cinttypes> |
| #ifdef __Fuchsia__ |
| #include <lib/fidl_driver/cpp/wire_types.h> |
| #include <lib/zx/bti.h> |
| #include <lib/zx/channel.h> |
| #include <lib/zx/clock.h> |
| #include <lib/zx/debuglog.h> |
| #include <lib/zx/event.h> |
| #include <lib/zx/eventpair.h> |
| #include <lib/zx/exception.h> |
| #include <lib/zx/fifo.h> |
| #include <lib/zx/guest.h> |
| #include <lib/zx/handle.h> |
| #include <lib/zx/interrupt.h> |
| #include <lib/zx/iommu.h> |
| #include <lib/zx/job.h> |
| #include <lib/zx/pager.h> |
| #include <lib/zx/pmt.h> |
| #include <lib/zx/port.h> |
| #include <lib/zx/process.h> |
| #include <lib/zx/profile.h> |
| #include <lib/zx/resource.h> |
| #include <lib/zx/socket.h> |
| #include <lib/zx/suspend_token.h> |
| #include <lib/zx/thread.h> |
| #include <lib/zx/timer.h> |
| #include <lib/zx/vcpu.h> |
| #include <lib/zx/vmar.h> |
| #include <lib/zx/vmo.h> |
| |
| #endif // __Fuchsia__ |
| |
| #include <fidl/fdf/cpp/wire_types.h> |
| #include <fidl/test.handles/cpp/common_types.h> |
| #include <fidl/test.handles/cpp/markers.h> |
| |
| namespace test_handles { |
| namespace wire { |
| struct Handles; |
| |
| struct FdfHandles; |
| |
| #ifdef __Fuchsia__ |
| |
| extern "C" const fidl_type_t test_handles_HandlesTable; |
| |
| struct Handles { |
| ::zx::handle plain_handle = {}; |
| |
| ::zx::bti bti_handle = {}; |
| |
| ::zx::channel channel_handle = {}; |
| |
| ::zx::clock clock_handle = {}; |
| |
| ::zx::debuglog debuglog_handle = {}; |
| |
| ::zx::event event_handle = {}; |
| |
| ::zx::eventpair eventpair_handle = {}; |
| |
| ::zx::exception exception_handle = {}; |
| |
| ::zx::fifo fifo_handle = {}; |
| |
| ::zx::guest guest_handle = {}; |
| |
| ::zx::interrupt interrupt_handle = {}; |
| |
| ::zx::iommu iommu_handle = {}; |
| |
| ::zx::job job_handle = {}; |
| |
| ::zx::pager pager_handle = {}; |
| |
| ::zx::pmt pmt_handle = {}; |
| |
| ::zx::port port_handle = {}; |
| |
| ::zx::process process_handle = {}; |
| |
| ::zx::profile profile_handle = {}; |
| |
| ::zx::resource resource_handle = {}; |
| |
| ::zx::socket socket_handle = {}; |
| |
| ::zx::suspend_token suspendtoken_handle = {}; |
| |
| ::zx::thread thread_handle = {}; |
| |
| ::zx::timer timer_handle = {}; |
| |
| ::zx::vcpu vcpu_handle = {}; |
| |
| ::zx::vmar vmar_handle = {}; |
| |
| ::zx::vmo vmo_handle = {}; |
| |
| ::zx::vmo rights_handle = {}; |
| |
| ::zx::handle aliased_plain_handle_field = {}; |
| |
| ::zx::vmo aliased_subtype_handle_field = {}; |
| |
| ::zx::vmo aliased_rights_handle_field = {}; |
| |
| ::fidl::ClientEnd<::test_handles::SomeProtocol> some_protocol = {}; |
| |
| ::fidl::ServerEnd<::test_handles::SomeProtocol> request_some_protocol = {}; |
| |
| void _CloseHandles(); |
| }; |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| extern "C" const fidl_type_t test_handles_FdfHandlesTable; |
| |
| struct FdfHandles { |
| ::fdf::Channel fdf_channel_handle = {}; |
| |
| ::fdf::ClientEnd<::test_handles::DriverProtocol> client_end_driver = {}; |
| |
| ::fdf::ServerEnd<::test_handles::DriverProtocol> server_end_driver = {}; |
| |
| void _CloseHandles(); |
| }; |
| #endif // __Fuchsia__ |
| |
| } // namespace wire |
| } // namespace test_handles |
| namespace fidl { |
| |
| #ifdef __Fuchsia__ |
| template <> |
| struct IsResource<::test_handles::wire::Handles> : public std::true_type {}; |
| |
| template <> |
| struct TypeTraits<::test_handles::wire::Handles> { |
| static constexpr const fidl_type_t* kType = |
| &::test_handles::wire::test_handles_HandlesTable; |
| static constexpr uint32_t kMaxNumHandles = 32; |
| static constexpr uint32_t kPrimarySize = 128; |
| static constexpr uint32_t kPrimarySizeV1 = 128; |
| [[maybe_unused]] static constexpr uint32_t kMaxOutOfLine = 0; |
| static constexpr uint32_t kMaxOutOfLineV1 = 0; |
| static constexpr bool kHasPointer = false; |
| }; |
| |
| template <> |
| struct IsFidlType<::test_handles::wire::Handles> : public std::true_type {}; |
| template <> |
| struct IsStruct<::test_handles::wire::Handles> : public std::true_type {}; |
| static_assert(std::is_standard_layout_v<::test_handles::wire::Handles>); |
| static_assert(offsetof(::test_handles::wire::Handles, plain_handle) == 0); |
| static_assert(offsetof(::test_handles::wire::Handles, bti_handle) == 4); |
| static_assert(offsetof(::test_handles::wire::Handles, channel_handle) == 8); |
| static_assert(offsetof(::test_handles::wire::Handles, clock_handle) == 12); |
| static_assert(offsetof(::test_handles::wire::Handles, debuglog_handle) == 16); |
| static_assert(offsetof(::test_handles::wire::Handles, event_handle) == 20); |
| static_assert(offsetof(::test_handles::wire::Handles, eventpair_handle) == 24); |
| static_assert(offsetof(::test_handles::wire::Handles, exception_handle) == 28); |
| static_assert(offsetof(::test_handles::wire::Handles, fifo_handle) == 32); |
| static_assert(offsetof(::test_handles::wire::Handles, guest_handle) == 36); |
| static_assert(offsetof(::test_handles::wire::Handles, interrupt_handle) == 40); |
| static_assert(offsetof(::test_handles::wire::Handles, iommu_handle) == 44); |
| static_assert(offsetof(::test_handles::wire::Handles, job_handle) == 48); |
| static_assert(offsetof(::test_handles::wire::Handles, pager_handle) == 52); |
| static_assert(offsetof(::test_handles::wire::Handles, pmt_handle) == 56); |
| static_assert(offsetof(::test_handles::wire::Handles, port_handle) == 60); |
| static_assert(offsetof(::test_handles::wire::Handles, process_handle) == 64); |
| static_assert(offsetof(::test_handles::wire::Handles, profile_handle) == 68); |
| static_assert(offsetof(::test_handles::wire::Handles, resource_handle) == 72); |
| static_assert(offsetof(::test_handles::wire::Handles, socket_handle) == 76); |
| static_assert(offsetof(::test_handles::wire::Handles, suspendtoken_handle) == |
| 80); |
| static_assert(offsetof(::test_handles::wire::Handles, thread_handle) == 84); |
| static_assert(offsetof(::test_handles::wire::Handles, timer_handle) == 88); |
| static_assert(offsetof(::test_handles::wire::Handles, vcpu_handle) == 92); |
| static_assert(offsetof(::test_handles::wire::Handles, vmar_handle) == 96); |
| static_assert(offsetof(::test_handles::wire::Handles, vmo_handle) == 100); |
| static_assert(offsetof(::test_handles::wire::Handles, rights_handle) == 104); |
| static_assert(offsetof(::test_handles::wire::Handles, |
| aliased_plain_handle_field) == 108); |
| static_assert(offsetof(::test_handles::wire::Handles, |
| aliased_subtype_handle_field) == 112); |
| static_assert(offsetof(::test_handles::wire::Handles, |
| aliased_rights_handle_field) == 116); |
| static_assert(offsetof(::test_handles::wire::Handles, some_protocol) == 120); |
| static_assert(offsetof(::test_handles::wire::Handles, request_some_protocol) == |
| 124); |
| static_assert(sizeof(::test_handles::wire::Handles) == |
| TypeTraits<::test_handles::wire::Handles>::kPrimarySize); |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| template <> |
| struct IsResource<::test_handles::wire::FdfHandles> : public std::true_type {}; |
| |
| template <> |
| struct TypeTraits<::test_handles::wire::FdfHandles> { |
| static constexpr const fidl_type_t* kType = |
| &::test_handles::wire::test_handles_FdfHandlesTable; |
| static constexpr uint32_t kMaxNumHandles = 3; |
| static constexpr uint32_t kPrimarySize = 12; |
| static constexpr uint32_t kPrimarySizeV1 = 12; |
| [[maybe_unused]] static constexpr uint32_t kMaxOutOfLine = 0; |
| static constexpr uint32_t kMaxOutOfLineV1 = 0; |
| static constexpr bool kHasPointer = false; |
| }; |
| |
| template <> |
| struct IsFidlType<::test_handles::wire::FdfHandles> : public std::true_type {}; |
| template <> |
| struct IsStruct<::test_handles::wire::FdfHandles> : public std::true_type {}; |
| static_assert(std::is_standard_layout_v<::test_handles::wire::FdfHandles>); |
| static_assert(offsetof(::test_handles::wire::FdfHandles, fdf_channel_handle) == |
| 0); |
| static_assert(offsetof(::test_handles::wire::FdfHandles, client_end_driver) == |
| 4); |
| static_assert(offsetof(::test_handles::wire::FdfHandles, server_end_driver) == |
| 8); |
| static_assert(sizeof(::test_handles::wire::FdfHandles) == |
| TypeTraits<::test_handles::wire::FdfHandles>::kPrimarySize); |
| #endif // __Fuchsia__ |
| |
| } // namespace fidl |