| // WARNING: This file is machine generated by fidlgen_llcpp. |
| |
| #pragma once |
| |
| #include <fidl/test.exampleusing/cpp/natural_messaging.h> |
| #include <fidl/test.placementofattributes/cpp/markers.h> |
| #include <fidl/test.placementofattributes/cpp/natural_types.h> |
| #include <fidl/test.placementofattributes/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 |
| namespace test_placementofattributes { |
| __LOCAL extern "C" const fidl_type_t test_placementofattributes_ExampleProtocolMethodRequestTable; |
| |
| #ifdef __Fuchsia__ |
| } // namespace test_placementofattributes |
| template <> |
| class ::fidl::internal::NaturalClientImpl<::test_placementofattributes::ExampleProtocol> final : public ::fidl::internal::NaturalClientBase { |
| public: |
| using NaturalClientBase::NaturalClientBase; |
| ::fitx::result<::fidl::Error> Method(::fidl::Request<::test_placementofattributes::ExampleProtocol::Method> request) const; |
| }; |
| namespace test_placementofattributes { |
| #endif // __Fuchsia__ |
| |
| } // namespace test_placementofattributes |
| #ifdef __Fuchsia__ |
| |
| template <> |
| class ::fidl::internal::NaturalSyncClientImpl<::test_placementofattributes::ExampleProtocol> final |
| : public ::fidl::internal::SyncEndpointManagedVeneer<::fidl::internal::NaturalSyncClientImpl<::test_placementofattributes::ExampleProtocol>> { |
| public: |
| ::fitx::result<::fidl::Error> Method(::fidl::Request<::test_placementofattributes::ExampleProtocol::Method> request); |
| |
| private: |
| ::fidl::UnownedClientEnd<::test_placementofattributes::ExampleProtocol> _client_end() const { |
| return ::fidl::UnownedClientEnd<::test_placementofattributes::ExampleProtocol>( |
| _transport().get<::fidl::internal::ChannelTransport>()); |
| } |
| }; |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| template <> |
| class ::fidl::internal::NaturalEventHandlerInterface<::test_placementofattributes::ExampleProtocol> : public ::fidl::internal::BaseEventHandlerInterface { |
| public: |
| NaturalEventHandlerInterface() = default; |
| virtual ~NaturalEventHandlerInterface() = default; |
| }; |
| |
| template <> |
| class ::fidl::AsyncEventHandler<::test_placementofattributes::ExampleProtocol> |
| : public ::fidl::internal::NaturalEventHandlerInterface<::test_placementofattributes::ExampleProtocol>, public ::fidl::internal::AsyncEventHandler { |
| public: |
| AsyncEventHandler() = default; |
| }; |
| |
| template <> |
| class ::fidl::SyncEventHandler<::test_placementofattributes::ExampleProtocol> |
| : public ::fidl::internal::NaturalEventHandlerInterface<::test_placementofattributes::ExampleProtocol>, 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_placementofattributes::ExampleProtocol> client_end); |
| }; |
| |
| template <> |
| class ::fidl::internal::NaturalEventDispatcher<::test_placementofattributes::ExampleProtocol> final : public ::fidl::internal::IncomingEventDispatcher<::fidl::internal::NaturalEventHandlerInterface<::test_placementofattributes::ExampleProtocol>> { |
| public: |
| explicit NaturalEventDispatcher(::fidl::internal::NaturalEventHandlerInterface<::test_placementofattributes::ExampleProtocol>* event_handler) |
| : IncomingEventDispatcher(event_handler) {} |
| }; |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| template <> |
| class ::fidl::internal::NaturalWeakEventSender<::test_placementofattributes::ExampleProtocol> : public ::fidl::internal::WeakEventSenderBase { |
| public: |
| using WeakEventSenderBase::WeakEventSenderBase; |
| }; |
| |
| template <> |
| class ::fidl::internal::NaturalEventSender<::test_placementofattributes::ExampleProtocol> |
| : public ::fidl::internal::SyncEndpointManagedVeneer<::fidl::internal::NaturalEventSender<::test_placementofattributes::ExampleProtocol>> { |
| public: |
| using SyncEndpointManagedVeneer::SyncEndpointManagedVeneer; |
| }; |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| template <> |
| class ::fidl::Request<::test_placementofattributes::ExampleProtocol::Method> final : public ::test_placementofattributes::ExampleProtocolMethodRequest { |
| public: |
| using ::test_placementofattributes::ExampleProtocolMethodRequest::ExampleProtocolMethodRequest; |
| Request(::test_placementofattributes::ExampleProtocolMethodRequest v) : ::test_placementofattributes::ExampleProtocolMethodRequest(std::move(v)) {} |
| }; |
| |
| template <> |
| struct ::fidl::internal::MessageTraits<::fidl::Request<::test_placementofattributes::ExampleProtocol::Method>> final { |
| public: |
| static constexpr bool kHasPayload = true; |
| using Payload = ::test_placementofattributes::ExampleProtocolMethodRequest; |
| }; |
| #endif // __Fuchsia__ |
| |
| template <> |
| class ::fidl::Server<::test_placementofattributes::ExampleProtocol> : public ::fidl::internal::IncomingMessageDispatcher { |
| public: |
| Server() = default; |
| virtual ~Server() = default; |
| |
| // The FIDL protocol type that is implemented by this server. |
| using _EnclosingProtocol = ::test_placementofattributes::ExampleProtocol; |
| |
| using MethodRequest = ::fidl::Request<::test_placementofattributes::ExampleProtocol::Method>; |
| using MethodCompleter = ::fidl::internal::NaturalCompleter<::test_placementofattributes::ExampleProtocol::Method>; |
| |
| virtual void Method(MethodRequest& request, MethodCompleter::Sync& completer) = 0; |
| |
| private: |
| void dispatch_message( |
| ::fidl::IncomingMessage&& msg, ::fidl::Transaction* txn, |
| ::fidl::internal::MessageStorageViewBase* storage_view) final; |
| }; |
| |
| #ifdef __Fuchsia__ |
| |
| template <> |
| struct ::fidl::internal::NaturalServerDispatcher<::test_placementofattributes::ExampleProtocol> final { |
| NaturalServerDispatcher() = delete; |
| static void Dispatch(::fidl::Server<::test_placementofattributes::ExampleProtocol>* impl, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, |
| ::fidl::Transaction* txn); |
| |
| private: |
| static const ::fidl::internal::MethodEntry entries_[]; |
| static const ::fidl::internal::MethodEntry* entries_end_; |
| }; |
| #endif // __Fuchsia__ |