| // WARNING: This file is machine generated by fidlgen. |
| |
| // fidl_experiment = output_index_json |
| |
| #pragma once |
| |
| #include <fidl/test.requestflexibleenvelope/cpp/markers.h> |
| #include <fidl/test.requestflexibleenvelope/cpp/natural_types.h> |
| #include <fidl/test.requestflexibleenvelope/cpp/wire_messaging.h> |
| #include <lib/fidl/cpp/channel.h> |
| #include <lib/fidl/cpp/client.h> |
| #include <lib/fidl/cpp/internal/thenable.h> |
| #include <lib/fidl/cpp/natural_types.h> |
| #include <lib/fidl/cpp/unified_messaging.h> |
| #include <lib/fidl/cpp/wire/unknown_interaction_handler.h> |
| |
| #pragma clang diagnostic push |
| #pragma clang diagnostic ignored "-Wshadow" |
| |
| namespace fidl { |
| |
| } // namespace fidl |
| |
| template <> |
| struct ::fidl::internal::NaturalMethodTypes<::test_requestflexibleenvelope::Protocol::RequestStrictResponseFlexible> { |
| using Request = ::test_requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleRequest; |
| |
| using Response = ::test_requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleResponse; |
| |
| using Completer = fidl::Completer<::fidl::internal::NaturalCompleterBase<::test_requestflexibleenvelope::Protocol::RequestStrictResponseFlexible>>; |
| using ResultCallback = |
| ::fit::callback<void(::fidl::Result<::test_requestflexibleenvelope::Protocol::RequestStrictResponseFlexible>&)>; |
| }; |
| |
| template <> |
| struct ::fidl::internal::NaturalMethodTypes<::test_requestflexibleenvelope::Protocol::RequestFlexibleResponseStrict> { |
| using Request = ::test_requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictRequest; |
| |
| using Response = ::test_requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictResponse; |
| |
| using Completer = fidl::Completer<::fidl::internal::NaturalCompleterBase<::test_requestflexibleenvelope::Protocol::RequestFlexibleResponseStrict>>; |
| using ResultCallback = |
| ::fit::callback<void(::fidl::Result<::test_requestflexibleenvelope::Protocol::RequestFlexibleResponseStrict>&)>; |
| }; |
| |
| #ifdef __Fuchsia__ |
| |
| template <> |
| class ::fidl::Response<::test_requestflexibleenvelope::Protocol::RequestStrictResponseFlexible> final : public ::test_requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleResponse { |
| public: |
| using ::test_requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleResponse::ProtocolRequestStrictResponseFlexibleResponse; |
| Response(::test_requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleResponse v) : ProtocolRequestStrictResponseFlexibleResponse(std::move(v)) {} |
| }; |
| |
| template <> |
| class ::fidl::Result<::test_requestflexibleenvelope::Protocol::RequestStrictResponseFlexible> final : public ::fit::result<::fidl::Error, ::test_requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleResponse> { |
| public: |
| using ::fit::result<::fidl::Error, ::test_requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleResponse>::result; |
| |
| protected: |
| Result() = default; |
| }; |
| |
| template <> |
| class ::fidl::Response<::test_requestflexibleenvelope::Protocol::RequestFlexibleResponseStrict> final : public ::test_requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictResponse { |
| public: |
| using ::test_requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictResponse::ProtocolRequestFlexibleResponseStrictResponse; |
| Response(::test_requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictResponse v) : ProtocolRequestFlexibleResponseStrictResponse(std::move(v)) {} |
| }; |
| |
| template <> |
| class ::fidl::Result<::test_requestflexibleenvelope::Protocol::RequestFlexibleResponseStrict> final : public ::fit::result<::fidl::Error, ::test_requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictResponse> { |
| public: |
| using ::fit::result<::fidl::Error, ::test_requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictResponse>::result; |
| |
| protected: |
| Result() = default; |
| }; |
| |
| template <> |
| class ::fidl::internal::NaturalClientImpl<::test_requestflexibleenvelope::Protocol> final : public ::fidl::internal::NaturalClientBase { |
| public: |
| using NaturalClientBase::NaturalClientBase; |
| ::fidl::internal::NaturalThenable<::test_requestflexibleenvelope::Protocol::RequestStrictResponseFlexible> RequestStrictResponseFlexible(const ::fidl::Request<::test_requestflexibleenvelope::Protocol::RequestStrictResponseFlexible>& request) const; |
| |
| ::fidl::internal::NaturalThenable<::test_requestflexibleenvelope::Protocol::RequestFlexibleResponseStrict> RequestFlexibleResponseStrict(const ::fidl::Request<::test_requestflexibleenvelope::Protocol::RequestFlexibleResponseStrict>& request) const; |
| }; |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| template <> |
| class ::fidl::internal::NaturalSyncClientImpl<::test_requestflexibleenvelope::Protocol> final |
| : public ::fidl::internal::SyncEndpointManagedVeneer<::fidl::internal::NaturalSyncClientImpl<::test_requestflexibleenvelope::Protocol>> { |
| public: |
| ::fidl::Result<::test_requestflexibleenvelope::Protocol::RequestStrictResponseFlexible> RequestStrictResponseFlexible(const ::fidl::Request<::test_requestflexibleenvelope::Protocol::RequestStrictResponseFlexible>& request); |
| |
| ::fidl::Result<::test_requestflexibleenvelope::Protocol::RequestFlexibleResponseStrict> RequestFlexibleResponseStrict(const ::fidl::Request<::test_requestflexibleenvelope::Protocol::RequestFlexibleResponseStrict>& request); |
| |
| private: |
| ::fidl::UnownedClientEnd<::test_requestflexibleenvelope::Protocol> _client_end() const { |
| return ::fidl::UnownedClientEnd<::test_requestflexibleenvelope::Protocol>( |
| _transport().get<::fidl::internal::ChannelTransport>()); |
| } |
| }; |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| template <> |
| class ::fidl::internal::NaturalEventHandlerInterface<::test_requestflexibleenvelope::Protocol> : public ::fidl::internal::BaseEventHandlerInterface { |
| public: |
| NaturalEventHandlerInterface() = default; |
| virtual ~NaturalEventHandlerInterface() = default; |
| }; |
| |
| template <> |
| class ::fidl::AsyncEventHandler<::test_requestflexibleenvelope::Protocol> |
| : public ::fidl::internal::NaturalEventHandlerInterface<::test_requestflexibleenvelope::Protocol>, public ::fidl::internal::AsyncEventHandler { |
| public: |
| AsyncEventHandler() = default; |
| }; |
| |
| template <> |
| class ::fidl::SyncEventHandler<::test_requestflexibleenvelope::Protocol> |
| : public ::fidl::internal::NaturalEventHandlerInterface<::test_requestflexibleenvelope::Protocol>, public ::fidl::internal::SyncEventHandler { |
| public: |
| SyncEventHandler() = default; |
| |
| // Handle all possible events defined in this protocol. |
| // Blocks to consume exactly one message from the channel, then call the corresponding virtual |
| // method. |
| ::fidl::Status HandleOneEvent( |
| ::fidl::UnownedClientEnd<::test_requestflexibleenvelope::Protocol> client_end); |
| }; |
| |
| template <> |
| class ::fidl::internal::NaturalEventDispatcher<::test_requestflexibleenvelope::Protocol> final : public ::fidl::internal::IncomingEventDispatcher<::fidl::internal::NaturalEventHandlerInterface<::test_requestflexibleenvelope::Protocol>> { |
| public: |
| explicit NaturalEventDispatcher(::fidl::internal::NaturalEventHandlerInterface<::test_requestflexibleenvelope::Protocol>* event_handler) |
| : IncomingEventDispatcher(event_handler) {} |
| }; |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| template <> |
| class ::fidl::internal::NaturalWeakEventSender<::test_requestflexibleenvelope::Protocol> : public ::fidl::internal::WeakEventSenderBase { |
| public: |
| using WeakEventSenderBase::WeakEventSenderBase; |
| }; |
| |
| template <> |
| class ::fidl::internal::NaturalEventSender<::test_requestflexibleenvelope::Protocol> |
| : public ::fidl::internal::SyncEndpointManagedVeneer<::fidl::internal::NaturalEventSender<::test_requestflexibleenvelope::Protocol>> { |
| public: |
| using SyncEndpointManagedVeneer::SyncEndpointManagedVeneer; |
| }; |
| |
| #endif // __Fuchsia__ |
| |
| template <> |
| class ::fidl::internal::NaturalCompleterBase<::test_requestflexibleenvelope::Protocol::RequestStrictResponseFlexible> : public ::fidl::CompleterBase { |
| public: |
| void Reply(const ::fidl::Response<::test_requestflexibleenvelope::Protocol::RequestStrictResponseFlexible>& response); |
| |
| protected: |
| using ::fidl::CompleterBase::CompleterBase; |
| }; |
| |
| template <> |
| class ::fidl::internal::NaturalCompleterBase<::test_requestflexibleenvelope::Protocol::RequestFlexibleResponseStrict> : public ::fidl::CompleterBase { |
| public: |
| void Reply(const ::fidl::Response<::test_requestflexibleenvelope::Protocol::RequestFlexibleResponseStrict>& response); |
| |
| protected: |
| using ::fidl::CompleterBase::CompleterBase; |
| }; |
| |
| template <> |
| class ::fidl::Server<::test_requestflexibleenvelope::Protocol> : public ::fidl::internal::IncomingMessageDispatcher { |
| public: |
| Server() = default; |
| virtual ~Server() = default; |
| |
| // The FIDL protocol type that is implemented by this server. |
| using _EnclosingProtocol = ::test_requestflexibleenvelope::Protocol; |
| |
| using Handler = fidl::ProtocolHandler<::test_requestflexibleenvelope::Protocol>; |
| |
| using RequestStrictResponseFlexibleRequest = ::fidl::Request<::test_requestflexibleenvelope::Protocol::RequestStrictResponseFlexible>; |
| using RequestStrictResponseFlexibleCompleter = ::fidl::internal::NaturalCompleter<::test_requestflexibleenvelope::Protocol::RequestStrictResponseFlexible>; |
| |
| virtual void RequestStrictResponseFlexible(RequestStrictResponseFlexibleRequest& request, |
| RequestStrictResponseFlexibleCompleter::Sync& completer) = 0; |
| |
| using RequestFlexibleResponseStrictRequest = ::fidl::Request<::test_requestflexibleenvelope::Protocol::RequestFlexibleResponseStrict>; |
| using RequestFlexibleResponseStrictCompleter = ::fidl::internal::NaturalCompleter<::test_requestflexibleenvelope::Protocol::RequestFlexibleResponseStrict>; |
| |
| virtual void RequestFlexibleResponseStrict(RequestFlexibleResponseStrictRequest& request, |
| RequestFlexibleResponseStrictCompleter::Sync& completer) = 0; |
| |
| // |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(async_dispatcher_t* dispatcher) { |
| return [impl = this, dispatcher = dispatcher](::fidl::ServerEnd<::test_requestflexibleenvelope::Protocol> request) { |
| (void)::fidl::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_requestflexibleenvelope::Protocol> final { |
| NaturalServerDispatcher() = delete; |
| static void Dispatch(::fidl::Server<::test_requestflexibleenvelope::Protocol>* 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 |