| // WARNING: This file is machine generated by fidlgen. |
| |
| // fidl_experiment = output_index_json |
| |
| #pragma once |
| |
| #include <fidl/test.handles/cpp/markers.h> |
| #include <fidl/test.handles/cpp/wire_types.h> |
| #include <lib/fidl_driver/cpp/wire_messaging.h> |
| |
| #ifdef __Fuchsia__ |
| |
| #include <lib/fidl/cpp/wire/connect_service.h> |
| #include <lib/fidl/cpp/wire/server.h> |
| #include <lib/fidl/cpp/wire/service_handler.h> |
| #include <lib/fidl/cpp/wire/sync_call.h> |
| #include <lib/fidl_driver/cpp/server.h> |
| #include <lib/fidl_driver/cpp/wire_client.h> |
| |
| #endif // __Fuchsia__ |
| |
| #include <fidl/fdf/cpp/driver/wire_messaging.h> |
| #pragma clang diagnostic push |
| #pragma clang diagnostic ignored "-Wshadow" |
| |
| namespace test_handles { |
| |
| class DriverProtocol; |
| |
| } // namespace test_handles |
| |
| #ifdef __Fuchsia__ |
| |
| template <> |
| struct ::fidl::internal::ProtocolDetails<::test_handles::DriverProtocol> { |
| }; |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| template <> |
| struct ::fidl::internal::WireServerDispatcher<::test_handles::DriverProtocol> final { |
| WireServerDispatcher() = delete; |
| static ::fidl::DispatchResult TryDispatch(::fdf::WireServer<::test_handles::DriverProtocol>* impl, ::fidl::IncomingHeaderAndMessage& msg, |
| internal::MessageStorageViewBase* storage_view, |
| ::fidl::Transaction* txn); |
| static void Dispatch(::fdf::WireServer<::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__ |
| |
| namespace fidl { |
| |
| #ifdef __Fuchsia__ |
| } // namespace fidl |
| |
| template <> |
| class ::fidl::internal::WireEventHandlerInterface<::test_handles::DriverProtocol> : public ::fidl::internal::BaseEventHandlerInterface { |
| public: |
| WireEventHandlerInterface() = default; |
| virtual ~WireEventHandlerInterface() = default; |
| }; |
| |
| template <> |
| class ::fdf::WireAsyncEventHandler<::test_handles::DriverProtocol> |
| : public ::fidl::internal::WireEventHandlerInterface<::test_handles::DriverProtocol>, public ::fidl::internal::AsyncEventHandler { |
| public: |
| WireAsyncEventHandler() = default; |
| }; |
| |
| template <> |
| class ::fidl::internal::WireEventDispatcher<::test_handles::DriverProtocol> final : public ::fidl::internal::IncomingEventDispatcher<::fidl::internal::WireEventHandlerInterface<::test_handles::DriverProtocol>> { |
| public: |
| explicit WireEventDispatcher(::fidl::internal::WireEventHandlerInterface<::test_handles::DriverProtocol>* event_handler) |
| : IncomingEventDispatcher(event_handler) {} |
| }; |
| |
| template <> |
| class ::fidl::internal::WireSyncBufferClientImpl<::test_handles::DriverProtocol> final : public ::fdf::internal::SyncEndpointBufferVeneer<::fidl::internal::WireSyncBufferClientImpl<::test_handles::DriverProtocol>> { |
| public: |
| private: |
| ::fdf::UnownedClientEnd<::test_handles::DriverProtocol> _client_end() const { |
| return ::fdf::UnownedClientEnd<::test_handles::DriverProtocol>( |
| _transport().get<::fidl::internal::DriverTransport>()); |
| } |
| }; |
| |
| // Pure-virtual interface to be implemented by a server. |
| // This interface uses typed channels (i.e. |::fdf::ClientEnd<::test_handles::DriverProtocol>| |
| // and |::fdf::ServerEnd<::test_handles::DriverProtocol>|). |
| template <> |
| class ::fdf::WireServer<::test_handles::DriverProtocol> : public ::fidl::internal::IncomingMessageDispatcher { |
| public: |
| WireServer() = default; |
| virtual ~WireServer() = 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; |
| }; |
| namespace fidl { |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| } // namespace fidl |
| |
| template <> |
| class ::fidl::internal::WireWeakOnewayBufferClientImpl<::test_handles::DriverProtocol> : public ::fdf::internal::BufferClientImplBase { |
| public: |
| using BufferClientImplBase::BufferClientImplBase; |
| }; |
| |
| template <> |
| class ::fidl::internal::WireWeakAsyncBufferClientImpl<::test_handles::DriverProtocol> final : public ::fidl::internal::WireWeakOnewayBufferClientImpl<::test_handles::DriverProtocol> { |
| public: |
| using WireWeakOnewayBufferClientImpl::WireWeakOnewayBufferClientImpl; |
| }; |
| |
| template <> |
| class ::fidl::internal::WireWeakOnewayClientImpl<::test_handles::DriverProtocol> : public ::fidl::internal::ClientImplBase { |
| public: |
| WireWeakOnewayClientImpl(fidl::internal::ClientBase* client_base, const fdf::Arena& arena) |
| : ClientImplBase(client_base), arena_(arena) {} |
| |
| protected: |
| const ::fdf::Arena& arena_; |
| }; |
| |
| template <> |
| class ::fidl::internal::WireWeakSyncClientImpl<::test_handles::DriverProtocol> final : public ::fidl::internal::WireWeakOnewayClientImpl<::test_handles::DriverProtocol> { |
| public: |
| using WireWeakOnewayClientImpl::WireWeakOnewayClientImpl; |
| }; |
| namespace fidl { |
| |
| #endif // __Fuchsia__ |
| |
| } // namespace fidl |
| |
| #ifdef __Fuchsia__ |
| template <> |
| class ::fidl::internal::WireWeakBufferEventSender<::test_handles::DriverProtocol> : public ::fdf::internal::WeakBufferEventSenderBase { |
| public: |
| using WeakBufferEventSenderBase::WeakBufferEventSenderBase; |
| }; |
| |
| template <> |
| class ::fidl::internal::WireBufferEventSender<::test_handles::DriverProtocol> |
| : public ::fdf::internal::SyncEndpointBufferVeneer<::fidl::internal::WireBufferEventSender<::test_handles::DriverProtocol>> { |
| public: |
| using SyncEndpointBufferVeneer::SyncEndpointBufferVeneer; |
| }; |
| |
| #endif // __Fuchsia__ |
| |
| #pragma clang diagnostic pop |