| // WARNING: This file is machine generated by fidlgen_llcpp. |
| |
| #pragma once |
| |
| #include <fidl/test.nullable/cpp/markers.h> |
| #include <fidl/test.nullable/cpp/natural_types.h> |
| #include <fidl/test.nullable/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> |
| |
| namespace fidl {} // namespace fidl |
| template <> |
| struct ::fidl::internal::NaturalMethodTypes< |
| ::test_nullable::SimpleProtocol::Add> { |
| using Completer = fidl::Completer<::fidl::internal::NaturalCompleterBase< |
| ::test_nullable::SimpleProtocol::Add>>; |
| |
| using ResultCallback = ::fit::callback<void( |
| ::fidl::Result<::test_nullable::SimpleProtocol::Add>&)>; |
| |
| static constexpr bool HasApplicationError = false; |
| |
| static constexpr bool IsAbsentBody = false; |
| }; |
| namespace test_nullable { |
| __LOCAL extern "C" const fidl_type_t |
| test_nullable_SimpleProtocolAddRequestTable; |
| __LOCAL extern "C" const fidl_type_t |
| test_nullable_SimpleProtocolAddTopResponseTable; |
| |
| #ifdef __Fuchsia__ |
| } // namespace test_nullable |
| |
| template <> |
| class ::fidl::Response<::test_nullable::SimpleProtocol::Add> final |
| : public ::test_nullable::SimpleProtocolAddTopResponse { |
| public: |
| using ::test_nullable::SimpleProtocolAddTopResponse:: |
| SimpleProtocolAddTopResponse; |
| Response(::test_nullable::SimpleProtocolAddTopResponse v) |
| : SimpleProtocolAddTopResponse(std::move(v)) {} |
| }; |
| |
| template <> |
| struct ::fidl::internal::MessageTraits< |
| ::fidl::Response<::test_nullable::SimpleProtocol::Add>> |
| final { |
| public: |
| static constexpr bool kHasPayload = true; |
| using Payload = ::test_nullable::SimpleProtocolAddTopResponse; |
| }; |
| namespace test_nullable {} // namespace test_nullable |
| template <> |
| class ::fidl::Result<::test_nullable::SimpleProtocol::Add> final |
| : public ::fitx::result<::fidl::Error, |
| ::test_nullable::SimpleProtocolAddTopResponse> { |
| public: |
| using ::fitx::result<::fidl::Error, |
| ::test_nullable::SimpleProtocolAddTopResponse>::result; |
| |
| protected: |
| Result() = default; |
| }; |
| |
| template <> |
| class ::fidl::internal::NaturalClientImpl<::test_nullable::SimpleProtocol> final |
| : public ::fidl::internal::NaturalClientBase { |
| public: |
| using NaturalClientBase::NaturalClientBase; |
| ::fidl::internal::NaturalThenable<::test_nullable::SimpleProtocol::Add> Add( |
| ::fidl::Request<::test_nullable::SimpleProtocol::Add> request) const; |
| }; |
| namespace test_nullable { |
| #endif // __Fuchsia__ |
| |
| } // namespace test_nullable |
| #ifdef __Fuchsia__ |
| |
| template <> |
| class ::fidl::internal::NaturalEventHandlerInterface< |
| ::test_nullable::SimpleProtocol> { |
| public: |
| NaturalEventHandlerInterface() = default; |
| virtual ~NaturalEventHandlerInterface() = default; |
| }; |
| |
| template <> |
| class ::fidl::AsyncEventHandler<::test_nullable::SimpleProtocol> |
| : public ::fidl::internal::NaturalEventHandlerInterface< |
| ::test_nullable::SimpleProtocol>, |
| public ::fidl::internal::AsyncEventHandler { |
| public: |
| AsyncEventHandler() = default; |
| }; |
| |
| template <> |
| class ::fidl::internal::NaturalEventDispatcher<::test_nullable::SimpleProtocol> |
| final : public ::fidl::internal::IncomingEventDispatcher< |
| ::fidl::AsyncEventHandler<::test_nullable::SimpleProtocol>> { |
| public: |
| explicit NaturalEventDispatcher( |
| ::fidl::AsyncEventHandler<::test_nullable::SimpleProtocol>* 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::internal::NaturalWeakEventSender<::test_nullable::SimpleProtocol> |
| : public ::fidl::internal::WeakEventSenderBase { |
| public: |
| using WeakEventSenderBase::WeakEventSenderBase; |
| }; |
| |
| template <> |
| class ::fidl::internal::NaturalEventSender<::test_nullable::SimpleProtocol> |
| : public ::fidl::internal::SyncEndpointManagedVeneer< |
| ::fidl::internal::NaturalEventSender< |
| ::test_nullable::SimpleProtocol>> { |
| public: |
| using SyncEndpointManagedVeneer::SyncEndpointManagedVeneer; |
| }; |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| template <> |
| class ::fidl::Request<::test_nullable::SimpleProtocol::Add> final |
| : public ::test_nullable::SimpleProtocolAddRequest { |
| public: |
| using ::test_nullable::SimpleProtocolAddRequest::SimpleProtocolAddRequest; |
| Request(::test_nullable::SimpleProtocolAddRequest v) |
| : ::test_nullable::SimpleProtocolAddRequest(std::move(v)) {} |
| }; |
| |
| template <> |
| struct ::fidl::internal::MessageTraits< |
| ::fidl::Request<::test_nullable::SimpleProtocol::Add>> |
| final { |
| public: |
| static constexpr bool kHasPayload = true; |
| using Payload = ::test_nullable::SimpleProtocolAddRequest; |
| }; |
| #endif // __Fuchsia__ |
| |
| template <> |
| class ::fidl::internal::NaturalCompleterBase< |
| ::test_nullable::SimpleProtocol::Add> : public ::fidl::CompleterBase { |
| public: |
| void Reply(::fidl::Response<::test_nullable::SimpleProtocol::Add>&& response); |
| |
| protected: |
| using ::fidl::CompleterBase::CompleterBase; |
| }; |
| |
| template <> |
| class ::fidl::Server<::test_nullable::SimpleProtocol> |
| : public ::fidl::internal::IncomingMessageDispatcher { |
| public: |
| Server() = default; |
| virtual ~Server() = default; |
| |
| // The FIDL protocol type that is implemented by this server. |
| using _EnclosingProtocol = ::test_nullable::SimpleProtocol; |
| |
| using AddRequest = ::fidl::Request<::test_nullable::SimpleProtocol::Add>; |
| using AddCompleter = |
| ::fidl::internal::NaturalCompleter<::test_nullable::SimpleProtocol::Add>; |
| |
| virtual void Add(AddRequest& request, AddCompleter::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_nullable::SimpleProtocol> |
| final { |
| NaturalServerDispatcher() = delete; |
| static void Dispatch(::fidl::Server<::test_nullable::SimpleProtocol>* 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__ |