| // WARNING: This file is machine generated by fidlgen. |
| |
| #pragma once |
| |
| #include <fidl/test.driverhandle/cpp/driver/wire_messaging.h> |
| #include <fidl/test.driverhandle/cpp/markers.h> |
| #include <fidl/test.driverhandle/cpp/natural_types.h> |
| #include <lib/fidl_driver/cpp/natural_messaging.h> |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| namespace test_driverhandle { |
| __LOCAL extern "C" const fidl_type_t |
| test_driverhandle_HandlesInProtocolSendHandlesRequestTable; |
| |
| #ifdef __Fuchsia__ |
| } // namespace test_driverhandle |
| template <> |
| class ::fidl::internal::NaturalClientImpl< |
| ::test_driverhandle::HandlesInProtocol> |
| final : public ::fidl::internal::NaturalClientBase { |
| public: |
| using NaturalClientBase::NaturalClientBase; |
| ::fitx::result<::fidl::Error> SendHandles( |
| ::fidl::Request<::test_driverhandle::HandlesInProtocol::SendHandles> |
| request) const; |
| }; |
| namespace test_driverhandle { |
| #endif // __Fuchsia__ |
| } // namespace test_driverhandle |
| #ifdef __Fuchsia__ |
| |
| template <> |
| class ::fidl::internal::NaturalEventHandlerInterface< |
| ::test_driverhandle::HandlesInProtocol> { |
| public: |
| NaturalEventHandlerInterface() = default; |
| virtual ~NaturalEventHandlerInterface() = default; |
| }; |
| |
| template <> |
| class ::fdf::AsyncEventHandler<::test_driverhandle::HandlesInProtocol> |
| : public ::fidl::internal::NaturalEventHandlerInterface< |
| ::test_driverhandle::HandlesInProtocol>, |
| public ::fidl::internal::AsyncEventHandler { |
| public: |
| AsyncEventHandler() = default; |
| }; |
| |
| template <> |
| class ::fidl::internal::NaturalEventDispatcher< |
| ::test_driverhandle::HandlesInProtocol> |
| final |
| : public ::fidl::internal::IncomingEventDispatcher< |
| ::fdf::AsyncEventHandler<::test_driverhandle::HandlesInProtocol>> { |
| public: |
| explicit NaturalEventDispatcher( |
| ::fdf::AsyncEventHandler<::test_driverhandle::HandlesInProtocol>* |
| event_handler) |
| : IncomingEventDispatcher(event_handler) {} |
| |
| private: |
| std::optional<::fidl::UnbindInfo> DispatchEvent( |
| ::fidl::IncomingMessage& msg, |
| internal::IncomingTransportContext transport_context) override; |
| }; |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| template <> |
| class ::fidl::Request<::test_driverhandle::HandlesInProtocol::SendHandles> final |
| : public ::test_driverhandle::HandlesInProtocolSendHandlesRequest { |
| public: |
| using ::test_driverhandle::HandlesInProtocolSendHandlesRequest:: |
| HandlesInProtocolSendHandlesRequest; |
| Request(::test_driverhandle::HandlesInProtocolSendHandlesRequest v) |
| : ::test_driverhandle::HandlesInProtocolSendHandlesRequest(std::move(v)) { |
| } |
| }; |
| |
| template <> |
| struct ::fidl::internal::MessageTraits< |
| ::fidl::Request<::test_driverhandle::HandlesInProtocol::SendHandles>> |
| final { |
| public: |
| static constexpr bool kHasPayload = true; |
| using Payload = ::test_driverhandle::HandlesInProtocolSendHandlesRequest; |
| }; |
| #endif // __Fuchsia__ |
| |
| template <> |
| class ::fdf::Server<::test_driverhandle::HandlesInProtocol> |
| : public ::fidl::internal::IncomingMessageDispatcher { |
| public: |
| Server() = default; |
| virtual ~Server() = default; |
| |
| // The FIDL protocol type that is implemented by this server. |
| using _EnclosingProtocol = ::test_driverhandle::HandlesInProtocol; |
| |
| using SendHandlesRequest = |
| ::fidl::Request<::test_driverhandle::HandlesInProtocol::SendHandles>; |
| using SendHandlesCompleter = ::fidl::internal::NaturalCompleter< |
| ::test_driverhandle::HandlesInProtocol::SendHandles>; |
| |
| virtual void SendHandles(SendHandlesRequest& request, |
| SendHandlesCompleter::Sync& completer) = 0; |
| |
| private: |
| void dispatch_message( |
| ::fidl::IncomingMessage&& msg, ::fidl::Transaction* txn, |
| ::fidl::internal::IncomingTransportContext transport_context) final; |
| }; |
| #ifdef __Fuchsia__ |
| |
| template <> |
| struct ::fidl::internal::NaturalServerDispatcher< |
| ::test_driverhandle::HandlesInProtocol> |
| final { |
| NaturalServerDispatcher() = delete; |
| static void Dispatch( |
| ::fdf::Server<::test_driverhandle::HandlesInProtocol>* impl, |
| ::fidl::IncomingMessage&& msg, |
| internal::IncomingTransportContext transport_context, |
| ::fidl::Transaction* txn); |
| |
| private: |
| static const ::fidl::internal::MethodEntry entries_[]; |
| static const ::fidl::internal::MethodEntry* entries_end_; |
| }; |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| template <> |
| class ::fidl::internal::NaturalClientImpl<::test_driverhandle::DriverProtocol> |
| final : public ::fidl::internal::NaturalClientBase { |
| public: |
| using NaturalClientBase::NaturalClientBase; |
| }; |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| template <> |
| class ::fidl::internal::NaturalEventHandlerInterface< |
| ::test_driverhandle::DriverProtocol> { |
| public: |
| NaturalEventHandlerInterface() = default; |
| virtual ~NaturalEventHandlerInterface() = default; |
| }; |
| |
| template <> |
| class ::fdf::AsyncEventHandler<::test_driverhandle::DriverProtocol> |
| : public ::fidl::internal::NaturalEventHandlerInterface< |
| ::test_driverhandle::DriverProtocol>, |
| public ::fidl::internal::AsyncEventHandler { |
| public: |
| AsyncEventHandler() = default; |
| }; |
| |
| template <> |
| class ::fidl::internal::NaturalEventDispatcher< |
| ::test_driverhandle::DriverProtocol> |
| final : public ::fidl::internal::IncomingEventDispatcher< |
| ::fdf::AsyncEventHandler<::test_driverhandle::DriverProtocol>> { |
| public: |
| explicit NaturalEventDispatcher( |
| ::fdf::AsyncEventHandler<::test_driverhandle::DriverProtocol>* |
| event_handler) |
| : IncomingEventDispatcher(event_handler) {} |
| |
| private: |
| std::optional<::fidl::UnbindInfo> DispatchEvent( |
| ::fidl::IncomingMessage& msg, |
| internal::IncomingTransportContext transport_context) override; |
| }; |
| #endif // __Fuchsia__ |
| |
| template <> |
| class ::fdf::Server<::test_driverhandle::DriverProtocol> |
| : public ::fidl::internal::IncomingMessageDispatcher { |
| public: |
| Server() = default; |
| virtual ~Server() = default; |
| |
| // The FIDL protocol type that is implemented by this server. |
| using _EnclosingProtocol = ::test_driverhandle::DriverProtocol; |
| |
| private: |
| void dispatch_message( |
| ::fidl::IncomingMessage&& msg, ::fidl::Transaction* txn, |
| ::fidl::internal::IncomingTransportContext transport_context) final; |
| }; |
| #ifdef __Fuchsia__ |
| |
| template <> |
| struct ::fidl::internal::NaturalServerDispatcher< |
| ::test_driverhandle::DriverProtocol> |
| final { |
| NaturalServerDispatcher() = delete; |
| static void Dispatch(::fdf::Server<::test_driverhandle::DriverProtocol>* impl, |
| ::fidl::IncomingMessage&& msg, |
| internal::IncomingTransportContext transport_context, |
| ::fidl::Transaction* txn); |
| |
| private: |
| static const ::fidl::internal::MethodEntry entries_[]; |
| static const ::fidl::internal::MethodEntry* entries_end_; |
| }; |
| #endif // __Fuchsia__ |