| // WARNING: This file is machine generated by fidlgen. |
| |
| // fidl_experiment = output_index_json |
| |
| #pragma once |
| |
| #include <fidl/test.handles/cpp/driver/wire_messaging.h> |
| #include <fidl/test.handles/cpp/markers.h> |
| #include <fidl/test.handles/cpp/natural_types.h> |
| #include <lib/fidl_driver/cpp/natural_messaging.h> |
| |
| #pragma clang diagnostic push |
| #pragma clang diagnostic ignored "-Wshadow" |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| template <> |
| class ::fidl::internal::NaturalClientImpl<::test_handles::DriverProtocol> final : public ::fidl::internal::NaturalClientBase { |
| public: |
| using NaturalClientBase::NaturalClientBase; |
| }; |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| template <> |
| class ::fidl::internal::NaturalEventHandlerInterface<::test_handles::DriverProtocol> : public ::fidl::internal::BaseEventHandlerInterface { |
| public: |
| NaturalEventHandlerInterface() = default; |
| virtual ~NaturalEventHandlerInterface() = default; |
| }; |
| |
| template <> |
| class ::fdf::AsyncEventHandler<::test_handles::DriverProtocol> |
| : public ::fidl::internal::NaturalEventHandlerInterface<::test_handles::DriverProtocol>, public ::fidl::internal::AsyncEventHandler { |
| public: |
| AsyncEventHandler() = default; |
| }; |
| |
| template <> |
| class ::fidl::internal::NaturalEventDispatcher<::test_handles::DriverProtocol> final : public ::fidl::internal::IncomingEventDispatcher<::fidl::internal::NaturalEventHandlerInterface<::test_handles::DriverProtocol>> { |
| public: |
| explicit NaturalEventDispatcher(::fidl::internal::NaturalEventHandlerInterface<::test_handles::DriverProtocol>* event_handler) |
| : IncomingEventDispatcher(event_handler) {} |
| }; |
| |
| #endif // __Fuchsia__ |
| |
| template <> |
| class ::fdf::Server<::test_handles::DriverProtocol> : public ::fidl::internal::IncomingMessageDispatcher { |
| public: |
| Server() = default; |
| virtual ~Server() = default; |
| |
| // The FIDL protocol type that is implemented by this server. |
| using _EnclosingProtocol = ::test_handles::DriverProtocol; |
| |
| using Handler = fidl::ProtocolHandler<::test_handles::DriverProtocol>; |
| |
| // |bind_handler| returns a handler that binds incoming connections to this |
| // server implementation. |
| // |
| // The returned handler borrows the server instance. |
| // The server must outlive the provided |dispatcher|. Only after |
| // the dispatcher is shutdown will it be safe to destroy the servers. |
| // The server should not be moved. |
| Handler bind_handler(fdf_dispatcher_t* dispatcher) { |
| return [impl = this, dispatcher = dispatcher](::fdf::ServerEnd<::test_handles::DriverProtocol> request) { |
| (void)::fdf::BindServer(dispatcher, std::move(request), impl); |
| }; |
| } |
| |
| private: |
| void dispatch_message( |
| ::fidl::IncomingHeaderAndMessage&& msg, ::fidl::Transaction* txn, |
| ::fidl::internal::MessageStorageViewBase* storage_view) final; |
| }; |
| #ifdef __Fuchsia__ |
| |
| template <> |
| struct ::fidl::internal::NaturalServerDispatcher<::test_handles::DriverProtocol> final { |
| NaturalServerDispatcher() = delete; |
| static void Dispatch(::fdf::Server<::test_handles::DriverProtocol>* impl, ::fidl::IncomingHeaderAndMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, |
| ::fidl::Transaction* txn); |
| |
| private: |
| static const ::fidl::internal::MethodEntry entries_[]; |
| static const ::fidl::internal::MethodEntry* entries_end_; |
| static constexpr const ::fidl::internal::UnknownMethodHandlerEntry& unknown_method_handler_entry_ = |
| ::fidl::internal::UnknownMethodHandlerEntry::kClosedProtocolHandlerEntry; |
| }; |
| |
| #endif // __Fuchsia__ |
| |
| #pragma clang diagnostic pop |