| // WARNING: This file is machine generated by fidlgen. |
| |
| // fidl_experiment = output_index_json |
| |
| #pragma once |
| |
| #include <fdf/cpp/fidl.h> |
| |
| #include "lib/fidl/cpp/internal/header.h" |
| namespace test { |
| namespace handles { |
| |
| // |
| // Domain objects declarations |
| // |
| |
| #ifdef __Fuchsia__ |
| |
| class SomeProtocol; |
| using SomeProtocolHandle = ::fidl::InterfaceHandle<SomeProtocol>; |
| |
| #endif // __Fuchsia__ |
| |
| class Handles; |
| |
| #ifdef __Fuchsia__ |
| |
| class SomeProtocol_RequestEncoder { |
| public: |
| }; |
| |
| class SomeProtocol_ResponseEncoder { |
| public: |
| }; |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| using aliased_plain_handle = ::zx::handle; |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| using aliased_subtype_handle = ::zx::vmo; |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| using aliased_rights_handle = ::zx::vmo; |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| class Handles final { |
| public: |
| static const fidl_type_t* FidlType; |
| |
| ::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::msi msi_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::stream stream_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::InterfaceHandle<::test::handles::SomeProtocol> some_protocol; |
| |
| ::fidl::InterfaceRequest<::test::handles::SomeProtocol> request_some_protocol; |
| |
| static inline ::std::unique_ptr<Handles> New() { return ::std::make_unique<Handles>(); } |
| |
| void Encode(::fidl::Encoder* _encoder, size_t _offset, |
| cpp17::optional<::fidl::HandleInformation> maybe_handle_info = cpp17::nullopt); |
| static void Decode(::fidl::Decoder* _decoder, Handles* value, size_t _offset); |
| zx_status_t Clone(Handles* result) const; |
| }; |
| |
| inline zx_status_t Clone(const ::test::handles::Handles& _value, |
| ::test::handles::Handles* _result) { |
| return _value.Clone(_result); |
| } |
| |
| using HandlesPtr = ::std::unique_ptr<Handles>; |
| |
| #endif // __Fuchsia__ |
| |
| } // namespace handles |
| } // namespace test |
| namespace fidl { |
| |
| #ifdef __Fuchsia__ |
| |
| template <> |
| struct CodingTraits<::test::handles::Handles> |
| : public EncodableCodingTraits<::test::handles::Handles, 136> {}; |
| |
| template <> |
| struct IsMemcpyCompatible<::test::handles::Handles> : public internal::BoolConstant< |
| !HasPadding<::test::handles::Handles>::value && IsMemcpyCompatible<::zx::handle>::value && IsMemcpyCompatible<::zx::bti>::value && IsMemcpyCompatible<::zx::channel>::value && IsMemcpyCompatible<::zx::clock>::value && IsMemcpyCompatible<::zx::debuglog>::value && IsMemcpyCompatible<::zx::event>::value && IsMemcpyCompatible<::zx::eventpair>::value && IsMemcpyCompatible<::zx::exception>::value && IsMemcpyCompatible<::zx::fifo>::value && IsMemcpyCompatible<::zx::guest>::value && IsMemcpyCompatible<::zx::interrupt>::value && IsMemcpyCompatible<::zx::iommu>::value && IsMemcpyCompatible<::zx::job>::value && IsMemcpyCompatible<::zx::msi>::value && IsMemcpyCompatible<::zx::pager>::value && IsMemcpyCompatible<::zx::pmt>::value && IsMemcpyCompatible<::zx::port>::value && IsMemcpyCompatible<::zx::process>::value && IsMemcpyCompatible<::zx::profile>::value && IsMemcpyCompatible<::zx::resource>::value && IsMemcpyCompatible<::zx::socket>::value && IsMemcpyCompatible<::zx::stream>::value && IsMemcpyCompatible<::zx::suspend_token>::value && IsMemcpyCompatible<::zx::thread>::value && IsMemcpyCompatible<::zx::timer>::value && IsMemcpyCompatible<::zx::vcpu>::value && IsMemcpyCompatible<::zx::vmar>::value && IsMemcpyCompatible<::zx::vmo>::value && IsMemcpyCompatible<::fidl::InterfaceHandle<::test::handles::SomeProtocol>>::value && IsMemcpyCompatible<::fidl::InterfaceRequest<::test::handles::SomeProtocol>>::value> {}; |
| |
| inline zx_status_t Clone(const ::test::handles::Handles& value, |
| ::test::handles::Handles* result) { |
| return ::test::handles::Clone(value, result); |
| } |
| |
| template <> |
| struct Equality<::test::handles::Handles> { |
| bool operator()(const ::test::handles::Handles& _lhs, const ::test::handles::Handles& _rhs) const { |
| if (!::fidl::Equals(_lhs.plain_handle, _rhs.plain_handle)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.bti_handle, _rhs.bti_handle)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.channel_handle, _rhs.channel_handle)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.clock_handle, _rhs.clock_handle)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.debuglog_handle, _rhs.debuglog_handle)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.event_handle, _rhs.event_handle)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.eventpair_handle, _rhs.eventpair_handle)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.exception_handle, _rhs.exception_handle)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.fifo_handle, _rhs.fifo_handle)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.guest_handle, _rhs.guest_handle)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.interrupt_handle, _rhs.interrupt_handle)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.iommu_handle, _rhs.iommu_handle)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.job_handle, _rhs.job_handle)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.msi_handle, _rhs.msi_handle)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.pager_handle, _rhs.pager_handle)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.pmt_handle, _rhs.pmt_handle)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.port_handle, _rhs.port_handle)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.process_handle, _rhs.process_handle)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.profile_handle, _rhs.profile_handle)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.resource_handle, _rhs.resource_handle)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.socket_handle, _rhs.socket_handle)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.stream_handle, _rhs.stream_handle)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.suspendtoken_handle, _rhs.suspendtoken_handle)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.thread_handle, _rhs.thread_handle)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.timer_handle, _rhs.timer_handle)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.vcpu_handle, _rhs.vcpu_handle)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.vmar_handle, _rhs.vmar_handle)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.vmo_handle, _rhs.vmo_handle)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.rights_handle, _rhs.rights_handle)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.aliased_plain_handle_field, _rhs.aliased_plain_handle_field)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.aliased_subtype_handle_field, _rhs.aliased_subtype_handle_field)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.aliased_rights_handle_field, _rhs.aliased_rights_handle_field)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.some_protocol, _rhs.some_protocol)) { |
| return false; |
| } |
| if (!::fidl::Equals(_lhs.request_some_protocol, _rhs.request_some_protocol)) { |
| return false; |
| } |
| return true; |
| } |
| }; |
| |
| #endif // __Fuchsia__ |
| |
| // |
| // Proxies and stubs declarations |
| // |
| } // namespace fidl |
| namespace test { |
| namespace handles { |
| |
| #ifdef __Fuchsia__ |
| |
| using SomeProtocolPtr = ::fidl::InterfacePtr<SomeProtocol>; |
| class SomeProtocol_Proxy; |
| class SomeProtocol_Stub; |
| class SomeProtocol_EventSender; |
| class SomeProtocol_Sync; |
| using SomeProtocolSyncPtr = ::fidl::SynchronousInterfacePtr<SomeProtocol>; |
| class SomeProtocol_SyncProxy; |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| class SomeProtocol { |
| public: |
| using Proxy_ = ::test::handles::SomeProtocol_Proxy; |
| using Stub_ = ::test::handles::SomeProtocol_Stub; |
| using EventSender_ = ::test::handles::SomeProtocol_EventSender; |
| using Sync_ = ::test::handles::SomeProtocol_Sync; |
| virtual ~SomeProtocol(); |
| }; |
| |
| class SomeProtocol_RequestDecoder { |
| public: |
| SomeProtocol_RequestDecoder() = default; |
| virtual ~SomeProtocol_RequestDecoder() = default; |
| static const fidl_type_t* GetType(uint64_t ordinal, bool* out_needs_response, bool* is_known); |
| }; |
| |
| class SomeProtocol_ResponseDecoder { |
| public: |
| SomeProtocol_ResponseDecoder() = default; |
| virtual ~SomeProtocol_ResponseDecoder() = default; |
| static const fidl_type_t* GetType(uint64_t ordinal); |
| }; |
| |
| class SomeProtocol_EventSender { |
| public: |
| virtual ~SomeProtocol_EventSender(); |
| }; |
| |
| class SomeProtocol_Sync { |
| public: |
| using Proxy_ = ::test::handles::SomeProtocol_SyncProxy; |
| virtual ~SomeProtocol_Sync(); |
| }; |
| |
| class SomeProtocol_Proxy final : public ::fidl::internal::Proxy, public SomeProtocol { |
| public: |
| explicit SomeProtocol_Proxy(::fidl::internal::ProxyController* controller); |
| ~SomeProtocol_Proxy() override; |
| |
| zx_status_t Dispatch_(::fidl::HLCPPIncomingMessage message) override; |
| |
| private: |
| SomeProtocol_Proxy(const ::test::handles::SomeProtocol_Proxy&) = delete; |
| SomeProtocol_Proxy& operator=(const ::test::handles::SomeProtocol_Proxy&) = delete; |
| |
| ::fidl::internal::ProxyController* controller_; |
| }; |
| |
| class SomeProtocol_Stub final : public ::fidl::internal::Stub, public ::test::handles::SomeProtocol_EventSender { |
| public: |
| typedef class ::test::handles::SomeProtocol SomeProtocol_clazz; |
| explicit SomeProtocol_Stub(::test::handles::SomeProtocol_Stub::SomeProtocol_clazz* impl); |
| ~SomeProtocol_Stub() override; |
| |
| zx_status_t Dispatch_(::fidl::HLCPPIncomingMessage message, |
| ::fidl::internal::PendingResponse response) override; |
| |
| private: |
| ::test::handles::SomeProtocol_Stub::SomeProtocol_clazz* impl_; |
| }; |
| |
| class SomeProtocol_SyncProxy : public ::test::handles::SomeProtocol_Sync { |
| public: |
| explicit SomeProtocol_SyncProxy(::zx::channel channel); |
| ~SomeProtocol_SyncProxy() override; |
| |
| private: |
| ::fidl::internal::SynchronousProxy proxy_; |
| friend class ::fidl::SynchronousInterfacePtr<SomeProtocol>; |
| }; |
| |
| #endif // __Fuchsia__ |
| |
| } // namespace handles |
| } // namespace test |