| // WARNING: This file is machine generated by fidlgen_llcpp. |
| |
| #include <fidl/test.protocols/cpp/natural_messaging.h> |
| |
| namespace test_protocols { |
| [[maybe_unused]] constexpr inline uint64_t kWithAndWithoutRequestResponse_NoRequestNoResponse_Ordinal = 5413654872775949227lu; |
| |
| [[maybe_unused]] constexpr inline ::fidl::MessageDynamicFlags kWithAndWithoutRequestResponse_NoRequestNoResponse_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod; |
| |
| [[maybe_unused]] constexpr inline uint64_t kWithAndWithoutRequestResponse_NoRequestEmptyResponse_Ordinal = 1631193469798418024lu; |
| |
| [[maybe_unused]] constexpr inline ::fidl::MessageDynamicFlags kWithAndWithoutRequestResponse_NoRequestEmptyResponse_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod; |
| |
| [[maybe_unused]] constexpr inline uint64_t kWithAndWithoutRequestResponse_NoRequestWithResponse_Ordinal = 9037369643591427517lu; |
| |
| [[maybe_unused]] constexpr inline ::fidl::MessageDynamicFlags kWithAndWithoutRequestResponse_NoRequestWithResponse_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod; |
| |
| [[maybe_unused]] constexpr inline uint64_t kWithAndWithoutRequestResponse_WithRequestNoResponse_Ordinal = 7326057319832554103lu; |
| |
| [[maybe_unused]] constexpr inline ::fidl::MessageDynamicFlags kWithAndWithoutRequestResponse_WithRequestNoResponse_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod; |
| |
| [[maybe_unused]] constexpr inline uint64_t kWithAndWithoutRequestResponse_WithRequestEmptyResponse_Ordinal = 2877322062572412767lu; |
| |
| [[maybe_unused]] constexpr inline ::fidl::MessageDynamicFlags kWithAndWithoutRequestResponse_WithRequestEmptyResponse_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod; |
| |
| [[maybe_unused]] constexpr inline uint64_t kWithAndWithoutRequestResponse_WithRequestWithResponse_Ordinal = 6417226585456833969lu; |
| |
| [[maybe_unused]] constexpr inline ::fidl::MessageDynamicFlags kWithAndWithoutRequestResponse_WithRequestWithResponse_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod; |
| |
| [[maybe_unused]] constexpr inline uint64_t kWithAndWithoutRequestResponse_OnEmptyResponse_Ordinal = 5397663296507358806lu; |
| |
| [[maybe_unused]] constexpr inline ::fidl::MessageDynamicFlags kWithAndWithoutRequestResponse_OnEmptyResponse_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod; |
| |
| [[maybe_unused]] constexpr inline uint64_t kWithAndWithoutRequestResponse_OnWithResponse_Ordinal = 5811598563493228968lu; |
| |
| [[maybe_unused]] constexpr inline ::fidl::MessageDynamicFlags kWithAndWithoutRequestResponse_OnWithResponse_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod; |
| |
| #ifdef __Fuchsia__ |
| } // namespace test_protocols |
| ::fidl::internal::NaturalThenable<::test_protocols::WithAndWithoutRequestResponse::NoRequestEmptyResponse> |
| fidl::internal::NaturalClientImpl<::test_protocols::WithAndWithoutRequestResponse>::NoRequestEmptyResponse() const { |
| return ::fidl::internal::NaturalThenable<::test_protocols::WithAndWithoutRequestResponse::NoRequestEmptyResponse>( |
| &client_base(), {}, &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithAndWithoutRequestResponse_NoRequestEmptyResponse_Ordinal, ::test_protocols::kWithAndWithoutRequestResponse_NoRequestEmptyResponse_DynamicFlags, |
| [](NaturalMessageEncoder& encoder) mutable { |
| return ZX_OK; |
| }, |
| []( |
| ::fidl::internal::ThenableBase* base, |
| ::fidl::internal::NaturalMessageEncoder& encoder, |
| ::fidl::internal::ResponseContext* response_context) { |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| return base->SendTwoWay(msg, response_context); |
| }); |
| } |
| |
| ::fidl::internal::NaturalThenable<::test_protocols::WithAndWithoutRequestResponse::NoRequestWithResponse> |
| fidl::internal::NaturalClientImpl<::test_protocols::WithAndWithoutRequestResponse>::NoRequestWithResponse() const { |
| return ::fidl::internal::NaturalThenable<::test_protocols::WithAndWithoutRequestResponse::NoRequestWithResponse>( |
| &client_base(), {}, &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithAndWithoutRequestResponse_NoRequestWithResponse_Ordinal, ::test_protocols::kWithAndWithoutRequestResponse_NoRequestWithResponse_DynamicFlags, |
| [](NaturalMessageEncoder& encoder) mutable { |
| return ZX_OK; |
| }, |
| []( |
| ::fidl::internal::ThenableBase* base, |
| ::fidl::internal::NaturalMessageEncoder& encoder, |
| ::fidl::internal::ResponseContext* response_context) { |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| return base->SendTwoWay(msg, response_context); |
| }); |
| } |
| |
| ::fidl::internal::NaturalThenable<::test_protocols::WithAndWithoutRequestResponse::WithRequestEmptyResponse> |
| fidl::internal::NaturalClientImpl<::test_protocols::WithAndWithoutRequestResponse>::WithRequestEmptyResponse(::fidl::Request<::test_protocols::WithAndWithoutRequestResponse::WithRequestEmptyResponse> request) const { |
| return ::fidl::internal::NaturalThenable<::test_protocols::WithAndWithoutRequestResponse::WithRequestEmptyResponse>( |
| &client_base(), {}, &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithAndWithoutRequestResponse_WithRequestEmptyResponse_Ordinal, ::test_protocols::kWithAndWithoutRequestResponse_WithRequestEmptyResponse_DynamicFlags, |
| [request = std::move(request)](NaturalMessageEncoder& encoder) mutable { |
| encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::WithAndWithoutRequestResponse::WithRequestEmptyResponse>>::IntoDomainObject(std::move(request))); |
| return ZX_OK; |
| }, |
| []( |
| ::fidl::internal::ThenableBase* base, |
| ::fidl::internal::NaturalMessageEncoder& encoder, |
| ::fidl::internal::ResponseContext* response_context) { |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| return base->SendTwoWay(msg, response_context); |
| }); |
| } |
| |
| ::fidl::internal::NaturalThenable<::test_protocols::WithAndWithoutRequestResponse::WithRequestWithResponse> |
| fidl::internal::NaturalClientImpl<::test_protocols::WithAndWithoutRequestResponse>::WithRequestWithResponse(::fidl::Request<::test_protocols::WithAndWithoutRequestResponse::WithRequestWithResponse> request) const { |
| return ::fidl::internal::NaturalThenable<::test_protocols::WithAndWithoutRequestResponse::WithRequestWithResponse>( |
| &client_base(), {}, &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithAndWithoutRequestResponse_WithRequestWithResponse_Ordinal, ::test_protocols::kWithAndWithoutRequestResponse_WithRequestWithResponse_DynamicFlags, |
| [request = std::move(request)](NaturalMessageEncoder& encoder) mutable { |
| encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::WithAndWithoutRequestResponse::WithRequestWithResponse>>::IntoDomainObject(std::move(request))); |
| return ZX_OK; |
| }, |
| []( |
| ::fidl::internal::ThenableBase* base, |
| ::fidl::internal::NaturalMessageEncoder& encoder, |
| ::fidl::internal::ResponseContext* response_context) { |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| return base->SendTwoWay(msg, response_context); |
| }); |
| } |
| |
| ::fitx::result<::fidl::Error> |
| fidl::internal::NaturalClientImpl<::test_protocols::WithAndWithoutRequestResponse>::NoRequestNoResponse() const { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithAndWithoutRequestResponse_NoRequestNoResponse_Ordinal, ::test_protocols::kWithAndWithoutRequestResponse_NoRequestNoResponse_DynamicFlags}; |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| ::fidl::Status status = client_base().SendOneWay(_encoded_message); |
| return ::fidl::internal::ToFitxResult(status); |
| } |
| |
| ::fitx::result<::fidl::Error> |
| fidl::internal::NaturalClientImpl<::test_protocols::WithAndWithoutRequestResponse>::WithRequestNoResponse(::fidl::Request<::test_protocols::WithAndWithoutRequestResponse::WithRequestNoResponse> request) const { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithAndWithoutRequestResponse_WithRequestNoResponse_Ordinal, ::test_protocols::kWithAndWithoutRequestResponse_WithRequestNoResponse_DynamicFlags}; |
| _encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::WithAndWithoutRequestResponse::WithRequestNoResponse>>::IntoDomainObject(std::move(request))); |
| |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| ::fidl::Status status = client_base().SendOneWay(_encoded_message); |
| return ::fidl::internal::ToFitxResult(status); |
| } |
| namespace test_protocols { |
| #endif // __Fuchsia__ |
| |
| } // namespace test_protocols |
| #ifdef __Fuchsia__ |
| |
| ::fidl::Result<::test_protocols::WithAndWithoutRequestResponse::NoRequestEmptyResponse> |
| fidl::internal::NaturalSyncClientImpl<::test_protocols::WithAndWithoutRequestResponse>::NoRequestEmptyResponse() { |
| ::fidl::internal::NaturalMessageEncoder encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithAndWithoutRequestResponse_NoRequestEmptyResponse_Ordinal, ::test_protocols::kWithAndWithoutRequestResponse_NoRequestEmptyResponse_DynamicFlags}; |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| ::fidl::internal::IncomingMessageStorage<::fidl::internal::TransactionalResponse<::test_protocols::WithAndWithoutRequestResponse::NoRequestEmptyResponse>> response_storage; |
| return ::fidl::internal::DecodeResponseAndFoldError<::test_protocols::WithAndWithoutRequestResponse::NoRequestEmptyResponse>( |
| msg.Call(_client_end().handle(), response_storage.view()), nullptr); |
| } |
| |
| ::fidl::Result<::test_protocols::WithAndWithoutRequestResponse::NoRequestWithResponse> |
| fidl::internal::NaturalSyncClientImpl<::test_protocols::WithAndWithoutRequestResponse>::NoRequestWithResponse() { |
| ::fidl::internal::NaturalMessageEncoder encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithAndWithoutRequestResponse_NoRequestWithResponse_Ordinal, ::test_protocols::kWithAndWithoutRequestResponse_NoRequestWithResponse_DynamicFlags}; |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| ::fidl::internal::IncomingMessageStorage<::fidl::internal::TransactionalResponse<::test_protocols::WithAndWithoutRequestResponse::NoRequestWithResponse>> response_storage; |
| return ::fidl::internal::DecodeResponseAndFoldError<::test_protocols::WithAndWithoutRequestResponse::NoRequestWithResponse>( |
| msg.Call(_client_end().handle(), response_storage.view()), nullptr); |
| } |
| |
| ::fidl::Result<::test_protocols::WithAndWithoutRequestResponse::WithRequestEmptyResponse> |
| fidl::internal::NaturalSyncClientImpl<::test_protocols::WithAndWithoutRequestResponse>::WithRequestEmptyResponse(::fidl::Request<::test_protocols::WithAndWithoutRequestResponse::WithRequestEmptyResponse> request) { |
| ::fidl::internal::NaturalMessageEncoder encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithAndWithoutRequestResponse_WithRequestEmptyResponse_Ordinal, ::test_protocols::kWithAndWithoutRequestResponse_WithRequestEmptyResponse_DynamicFlags}; |
| encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::WithAndWithoutRequestResponse::WithRequestEmptyResponse>>::IntoDomainObject(std::move(request))); |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| ::fidl::internal::IncomingMessageStorage<::fidl::internal::TransactionalResponse<::test_protocols::WithAndWithoutRequestResponse::WithRequestEmptyResponse>> response_storage; |
| return ::fidl::internal::DecodeResponseAndFoldError<::test_protocols::WithAndWithoutRequestResponse::WithRequestEmptyResponse>( |
| msg.Call(_client_end().handle(), response_storage.view()), nullptr); |
| } |
| |
| ::fidl::Result<::test_protocols::WithAndWithoutRequestResponse::WithRequestWithResponse> |
| fidl::internal::NaturalSyncClientImpl<::test_protocols::WithAndWithoutRequestResponse>::WithRequestWithResponse(::fidl::Request<::test_protocols::WithAndWithoutRequestResponse::WithRequestWithResponse> request) { |
| ::fidl::internal::NaturalMessageEncoder encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithAndWithoutRequestResponse_WithRequestWithResponse_Ordinal, ::test_protocols::kWithAndWithoutRequestResponse_WithRequestWithResponse_DynamicFlags}; |
| encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::WithAndWithoutRequestResponse::WithRequestWithResponse>>::IntoDomainObject(std::move(request))); |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| ::fidl::internal::IncomingMessageStorage<::fidl::internal::TransactionalResponse<::test_protocols::WithAndWithoutRequestResponse::WithRequestWithResponse>> response_storage; |
| return ::fidl::internal::DecodeResponseAndFoldError<::test_protocols::WithAndWithoutRequestResponse::WithRequestWithResponse>( |
| msg.Call(_client_end().handle(), response_storage.view()), nullptr); |
| } |
| |
| ::fitx::result<::fidl::Error> |
| fidl::internal::NaturalSyncClientImpl<::test_protocols::WithAndWithoutRequestResponse>::NoRequestNoResponse() { |
| ::fidl::internal::NaturalMessageEncoder encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithAndWithoutRequestResponse_NoRequestNoResponse_Ordinal, ::test_protocols::kWithAndWithoutRequestResponse_NoRequestNoResponse_DynamicFlags}; |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| msg.Write(_client_end().handle()); |
| return ::fidl::internal::ToFitxResult(::fidl::Status{msg}); |
| } |
| |
| ::fitx::result<::fidl::Error> |
| fidl::internal::NaturalSyncClientImpl<::test_protocols::WithAndWithoutRequestResponse>::WithRequestNoResponse(::fidl::Request<::test_protocols::WithAndWithoutRequestResponse::WithRequestNoResponse> request) { |
| ::fidl::internal::NaturalMessageEncoder encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithAndWithoutRequestResponse_WithRequestNoResponse_Ordinal, ::test_protocols::kWithAndWithoutRequestResponse_WithRequestNoResponse_DynamicFlags}; |
| encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::WithAndWithoutRequestResponse::WithRequestNoResponse>>::IntoDomainObject(std::move(request))); |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| msg.Write(_client_end().handle()); |
| return ::fidl::internal::ToFitxResult(::fidl::Status{msg}); |
| } |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| ::fidl::Status fidl::SyncEventHandler<::test_protocols::WithAndWithoutRequestResponse>::HandleOneEvent( |
| ::fidl::UnownedClientEnd<::test_protocols::WithAndWithoutRequestResponse> client_end) { |
| ::fidl::internal::IncomingEventsStorage<::test_protocols::WithAndWithoutRequestResponse> event_storage; |
| fidl::internal::NaturalEventDispatcher<::test_protocols::WithAndWithoutRequestResponse> dispatcher{this}; |
| return HandleOneEventImpl_(client_end.channel(), event_storage.view(), dispatcher); |
| } |
| ::fidl::Status |
| fidl::internal::NaturalEventDispatcher<::test_protocols::WithAndWithoutRequestResponse>::DispatchEvent( |
| ::fidl::IncomingMessage& msg, |
| ::fidl::internal::MessageStorageViewBase* storage_view) { |
| switch (msg.header()->ordinal) { |
| case ::test_protocols::kWithAndWithoutRequestResponse_OnEmptyResponse_Ordinal: { |
| ::fitx::result decoded = ::fidl::internal::DecodeTransactionalMessage(std::move(msg)); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| if (event_handler()) { |
| ::fidl::Event<::test_protocols::WithAndWithoutRequestResponse::OnEmptyResponse> event; |
| event_handler()->OnEmptyResponse(event); |
| } |
| return ::fidl::Status::Ok(); |
| } |
| case ::test_protocols::kWithAndWithoutRequestResponse_OnWithResponse_Ordinal: { |
| ::fitx::result decoded = ::fidl::internal::DecodeTransactionalMessage<::test_protocols::WithAndWithoutRequestResponseOnWithResponseRequest>(std::move(msg)); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| if (event_handler()) { |
| ::fidl::Event<::test_protocols::WithAndWithoutRequestResponse::OnWithResponse> event = ::fidl::internal::NaturalMessageConverter<::fidl::Event<::test_protocols::WithAndWithoutRequestResponse::OnWithResponse>>::FromDomainObject(std::move(decoded.value())); |
| event_handler()->OnWithResponse(event); |
| } |
| return ::fidl::Status::Ok(); |
| } |
| default: |
| return ::fidl::Status::UnknownOrdinal(); |
| } |
| } |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| ::fitx::result<::fidl::Error> fidl::internal::NaturalWeakEventSender<::test_protocols::WithAndWithoutRequestResponse>::OnEmptyResponse() { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithAndWithoutRequestResponse_OnEmptyResponse_Ordinal, ::test_protocols::kWithAndWithoutRequestResponse_OnEmptyResponse_DynamicFlags}; |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| ::fidl::Status result = _inner().SendEvent(_encoded_message); |
| return ::fidl::internal::ToFitxResult(result); |
| } |
| |
| ::fitx::result<::fidl::Error> fidl::internal::NaturalEventSender<::test_protocols::WithAndWithoutRequestResponse>::OnEmptyResponse() { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithAndWithoutRequestResponse_OnEmptyResponse_Ordinal, ::test_protocols::kWithAndWithoutRequestResponse_OnEmptyResponse_DynamicFlags}; |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| _encoded_message.Write(_transport()); |
| return ::fidl::internal::ToFitxResult(::fidl::Status{_encoded_message}); |
| } |
| |
| ::fitx::result<::fidl::Error> fidl::internal::NaturalWeakEventSender<::test_protocols::WithAndWithoutRequestResponse>::OnWithResponse(::test_protocols::WithAndWithoutRequestResponseOnWithResponseRequest payload) { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithAndWithoutRequestResponse_OnWithResponse_Ordinal, ::test_protocols::kWithAndWithoutRequestResponse_OnWithResponse_DynamicFlags}; |
| _encoder.EncodeBody(std::move(payload)); |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| ::fidl::Status result = _inner().SendEvent(_encoded_message); |
| return ::fidl::internal::ToFitxResult(result); |
| } |
| |
| ::fitx::result<::fidl::Error> fidl::internal::NaturalEventSender<::test_protocols::WithAndWithoutRequestResponse>::OnWithResponse(::test_protocols::WithAndWithoutRequestResponseOnWithResponseRequest payload) { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithAndWithoutRequestResponse_OnWithResponse_Ordinal, ::test_protocols::kWithAndWithoutRequestResponse_OnWithResponse_DynamicFlags}; |
| _encoder.EncodeBody(std::move(payload)); |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| _encoded_message.Write(_transport()); |
| return ::fidl::internal::ToFitxResult(::fidl::Status{_encoded_message}); |
| } |
| |
| #endif // __Fuchsia__ |
| |
| void fidl::internal::NaturalCompleterBase<::test_protocols::WithAndWithoutRequestResponse::NoRequestEmptyResponse>::Reply() { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithAndWithoutRequestResponse_NoRequestEmptyResponse_Ordinal, ::test_protocols::kWithAndWithoutRequestResponse_NoRequestEmptyResponse_DynamicFlags}; |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| SendReply(&_encoded_message, ::fidl::internal::OutgoingTransportContext{}); |
| } |
| |
| void fidl::internal::NaturalCompleterBase<::test_protocols::WithAndWithoutRequestResponse::NoRequestWithResponse>::Reply(::fidl::Response<::test_protocols::WithAndWithoutRequestResponse::NoRequestWithResponse>&& response) { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithAndWithoutRequestResponse_NoRequestWithResponse_Ordinal, ::test_protocols::kWithAndWithoutRequestResponse_NoRequestWithResponse_DynamicFlags}; |
| _encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Response<::test_protocols::WithAndWithoutRequestResponse::NoRequestWithResponse>>::IntoDomainObject(std::move(response))); |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| SendReply(&_encoded_message, ::fidl::internal::OutgoingTransportContext{}); |
| } |
| |
| void fidl::internal::NaturalCompleterBase<::test_protocols::WithAndWithoutRequestResponse::WithRequestEmptyResponse>::Reply() { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithAndWithoutRequestResponse_WithRequestEmptyResponse_Ordinal, ::test_protocols::kWithAndWithoutRequestResponse_WithRequestEmptyResponse_DynamicFlags}; |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| SendReply(&_encoded_message, ::fidl::internal::OutgoingTransportContext{}); |
| } |
| |
| void fidl::internal::NaturalCompleterBase<::test_protocols::WithAndWithoutRequestResponse::WithRequestWithResponse>::Reply(::fidl::Response<::test_protocols::WithAndWithoutRequestResponse::WithRequestWithResponse>&& response) { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithAndWithoutRequestResponse_WithRequestWithResponse_Ordinal, ::test_protocols::kWithAndWithoutRequestResponse_WithRequestWithResponse_DynamicFlags}; |
| _encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Response<::test_protocols::WithAndWithoutRequestResponse::WithRequestWithResponse>>::IntoDomainObject(std::move(response))); |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| SendReply(&_encoded_message, ::fidl::internal::OutgoingTransportContext{}); |
| } |
| |
| #ifdef __Fuchsia__ |
| |
| constexpr ::fidl::internal::MethodEntry fidl::internal::NaturalServerDispatcher<::test_protocols::WithAndWithoutRequestResponse>::entries_[] = { |
| { |
| ::test_protocols::kWithAndWithoutRequestResponse_NoRequestNoResponse_Ordinal, |
| [](void* interface, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fitx::result decoded = ::fidl::internal::DecodeTransactionalMessage(std::move(msg)); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::Request<::test_protocols::WithAndWithoutRequestResponse::NoRequestNoResponse> request; |
| ::fidl::internal::NaturalCompleter<::test_protocols::WithAndWithoutRequestResponse::NoRequestNoResponse>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::WithAndWithoutRequestResponse>*>(interface)->NoRequestNoResponse( |
| request, completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| { |
| ::test_protocols::kWithAndWithoutRequestResponse_NoRequestEmptyResponse_Ordinal, |
| [](void* interface, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fitx::result decoded = ::fidl::internal::DecodeTransactionalMessage(std::move(msg)); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::Request<::test_protocols::WithAndWithoutRequestResponse::NoRequestEmptyResponse> request; |
| ::fidl::internal::NaturalCompleter<::test_protocols::WithAndWithoutRequestResponse::NoRequestEmptyResponse>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::WithAndWithoutRequestResponse>*>(interface)->NoRequestEmptyResponse( |
| request, completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| { |
| ::test_protocols::kWithAndWithoutRequestResponse_NoRequestWithResponse_Ordinal, |
| [](void* interface, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fitx::result decoded = ::fidl::internal::DecodeTransactionalMessage(std::move(msg)); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::Request<::test_protocols::WithAndWithoutRequestResponse::NoRequestWithResponse> request; |
| ::fidl::internal::NaturalCompleter<::test_protocols::WithAndWithoutRequestResponse::NoRequestWithResponse>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::WithAndWithoutRequestResponse>*>(interface)->NoRequestWithResponse( |
| request, completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| { |
| ::test_protocols::kWithAndWithoutRequestResponse_WithRequestNoResponse_Ordinal, |
| [](void* interface, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fitx::result decoded = ::fidl::internal::DecodeTransactionalMessage<::test_protocols::WithAndWithoutRequestResponseWithRequestNoResponseRequest>(std::move(msg)); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::Request<::test_protocols::WithAndWithoutRequestResponse::WithRequestNoResponse> request = ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::WithAndWithoutRequestResponse::WithRequestNoResponse>>::FromDomainObject(std::move(decoded.value())); |
| ::fidl::internal::NaturalCompleter<::test_protocols::WithAndWithoutRequestResponse::WithRequestNoResponse>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::WithAndWithoutRequestResponse>*>(interface)->WithRequestNoResponse( |
| request, completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| { |
| ::test_protocols::kWithAndWithoutRequestResponse_WithRequestEmptyResponse_Ordinal, |
| [](void* interface, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fitx::result decoded = ::fidl::internal::DecodeTransactionalMessage<::test_protocols::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest>(std::move(msg)); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::Request<::test_protocols::WithAndWithoutRequestResponse::WithRequestEmptyResponse> request = ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::WithAndWithoutRequestResponse::WithRequestEmptyResponse>>::FromDomainObject(std::move(decoded.value())); |
| ::fidl::internal::NaturalCompleter<::test_protocols::WithAndWithoutRequestResponse::WithRequestEmptyResponse>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::WithAndWithoutRequestResponse>*>(interface)->WithRequestEmptyResponse( |
| request, completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| { |
| ::test_protocols::kWithAndWithoutRequestResponse_WithRequestWithResponse_Ordinal, |
| [](void* interface, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fitx::result decoded = ::fidl::internal::DecodeTransactionalMessage<::test_protocols::WithAndWithoutRequestResponseWithRequestWithResponseRequest>(std::move(msg)); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::Request<::test_protocols::WithAndWithoutRequestResponse::WithRequestWithResponse> request = ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::WithAndWithoutRequestResponse::WithRequestWithResponse>>::FromDomainObject(std::move(decoded.value())); |
| ::fidl::internal::NaturalCompleter<::test_protocols::WithAndWithoutRequestResponse::WithRequestWithResponse>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::WithAndWithoutRequestResponse>*>(interface)->WithRequestWithResponse( |
| request, completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| }; |
| |
| const ::fidl::internal::MethodEntry* fidl::internal::NaturalServerDispatcher<::test_protocols::WithAndWithoutRequestResponse>::entries_end_ = |
| &entries_[6]; |
| |
| void fidl::internal::NaturalServerDispatcher<::test_protocols::WithAndWithoutRequestResponse>::Dispatch(::fidl::Server<::test_protocols::WithAndWithoutRequestResponse>* impl, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fidl::internal::Dispatch(impl, msg, storage_view, txn, entries_, entries_end_); |
| } |
| void fidl::Server<::test_protocols::WithAndWithoutRequestResponse>::dispatch_message( |
| ::fidl::IncomingMessage&& msg, ::fidl::Transaction* txn, |
| ::fidl::internal::MessageStorageViewBase* storage_view) { |
| ::fidl::internal::NaturalServerDispatcher<::test_protocols::WithAndWithoutRequestResponse>::Dispatch(this, std::move(msg), storage_view, txn); |
| } |
| #endif // __Fuchsia__ |
| |
| namespace test_protocols { |
| [[maybe_unused]] constexpr inline uint64_t kTransitional_Request_Ordinal = 5849263021838298888lu; |
| |
| [[maybe_unused]] constexpr inline ::fidl::MessageDynamicFlags kTransitional_Request_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod; |
| |
| [[maybe_unused]] constexpr inline uint64_t kTransitional_OneWay_Ordinal = 4336658926562441191lu; |
| |
| [[maybe_unused]] constexpr inline ::fidl::MessageDynamicFlags kTransitional_OneWay_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod; |
| |
| [[maybe_unused]] constexpr inline uint64_t kTransitional_Event_Ordinal = 8507647465196374081lu; |
| |
| [[maybe_unused]] constexpr inline ::fidl::MessageDynamicFlags kTransitional_Event_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod; |
| |
| #ifdef __Fuchsia__ |
| } // namespace test_protocols |
| ::fidl::internal::NaturalThenable<::test_protocols::Transitional::Request> |
| fidl::internal::NaturalClientImpl<::test_protocols::Transitional>::Request(::fidl::Request<::test_protocols::Transitional::Request> request) const { |
| return ::fidl::internal::NaturalThenable<::test_protocols::Transitional::Request>( |
| &client_base(), {}, &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kTransitional_Request_Ordinal, ::test_protocols::kTransitional_Request_DynamicFlags, |
| [request = std::move(request)](NaturalMessageEncoder& encoder) mutable { |
| encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::Transitional::Request>>::IntoDomainObject(std::move(request))); |
| return ZX_OK; |
| }, |
| []( |
| ::fidl::internal::ThenableBase* base, |
| ::fidl::internal::NaturalMessageEncoder& encoder, |
| ::fidl::internal::ResponseContext* response_context) { |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| return base->SendTwoWay(msg, response_context); |
| }); |
| } |
| |
| ::fitx::result<::fidl::Error> |
| fidl::internal::NaturalClientImpl<::test_protocols::Transitional>::OneWay(::fidl::Request<::test_protocols::Transitional::OneWay> request) const { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kTransitional_OneWay_Ordinal, ::test_protocols::kTransitional_OneWay_DynamicFlags}; |
| _encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::Transitional::OneWay>>::IntoDomainObject(std::move(request))); |
| |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| ::fidl::Status status = client_base().SendOneWay(_encoded_message); |
| return ::fidl::internal::ToFitxResult(status); |
| } |
| namespace test_protocols { |
| #endif // __Fuchsia__ |
| |
| } // namespace test_protocols |
| #ifdef __Fuchsia__ |
| |
| ::fidl::Result<::test_protocols::Transitional::Request> |
| fidl::internal::NaturalSyncClientImpl<::test_protocols::Transitional>::Request(::fidl::Request<::test_protocols::Transitional::Request> request) { |
| ::fidl::internal::NaturalMessageEncoder encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kTransitional_Request_Ordinal, ::test_protocols::kTransitional_Request_DynamicFlags}; |
| encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::Transitional::Request>>::IntoDomainObject(std::move(request))); |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| ::fidl::internal::IncomingMessageStorage<::fidl::internal::TransactionalResponse<::test_protocols::Transitional::Request>> response_storage; |
| return ::fidl::internal::DecodeResponseAndFoldError<::test_protocols::Transitional::Request>( |
| msg.Call(_client_end().handle(), response_storage.view()), nullptr); |
| } |
| |
| ::fitx::result<::fidl::Error> |
| fidl::internal::NaturalSyncClientImpl<::test_protocols::Transitional>::OneWay(::fidl::Request<::test_protocols::Transitional::OneWay> request) { |
| ::fidl::internal::NaturalMessageEncoder encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kTransitional_OneWay_Ordinal, ::test_protocols::kTransitional_OneWay_DynamicFlags}; |
| encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::Transitional::OneWay>>::IntoDomainObject(std::move(request))); |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| msg.Write(_client_end().handle()); |
| return ::fidl::internal::ToFitxResult(::fidl::Status{msg}); |
| } |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| ::fidl::Status fidl::SyncEventHandler<::test_protocols::Transitional>::HandleOneEvent( |
| ::fidl::UnownedClientEnd<::test_protocols::Transitional> client_end) { |
| ::fidl::internal::IncomingEventsStorage<::test_protocols::Transitional> event_storage; |
| fidl::internal::NaturalEventDispatcher<::test_protocols::Transitional> dispatcher{this}; |
| return HandleOneEventImpl_(client_end.channel(), event_storage.view(), dispatcher); |
| } |
| ::fidl::Status |
| fidl::internal::NaturalEventDispatcher<::test_protocols::Transitional>::DispatchEvent( |
| ::fidl::IncomingMessage& msg, |
| ::fidl::internal::MessageStorageViewBase* storage_view) { |
| switch (msg.header()->ordinal) { |
| case ::test_protocols::kTransitional_Event_Ordinal: { |
| ::fitx::result decoded = ::fidl::internal::DecodeTransactionalMessage<::test_protocols::TransitionalEventRequest>(std::move(msg)); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| if (event_handler()) { |
| ::fidl::Event<::test_protocols::Transitional::Event> event = ::fidl::internal::NaturalMessageConverter<::fidl::Event<::test_protocols::Transitional::Event>>::FromDomainObject(std::move(decoded.value())); |
| event_handler()->Event(event); |
| } |
| return ::fidl::Status::Ok(); |
| } |
| default: |
| return ::fidl::Status::UnknownOrdinal(); |
| } |
| } |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| ::fitx::result<::fidl::Error> fidl::internal::NaturalWeakEventSender<::test_protocols::Transitional>::Event(::test_protocols::TransitionalEventRequest payload) { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kTransitional_Event_Ordinal, ::test_protocols::kTransitional_Event_DynamicFlags}; |
| _encoder.EncodeBody(std::move(payload)); |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| ::fidl::Status result = _inner().SendEvent(_encoded_message); |
| return ::fidl::internal::ToFitxResult(result); |
| } |
| |
| ::fitx::result<::fidl::Error> fidl::internal::NaturalEventSender<::test_protocols::Transitional>::Event(::test_protocols::TransitionalEventRequest payload) { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kTransitional_Event_Ordinal, ::test_protocols::kTransitional_Event_DynamicFlags}; |
| _encoder.EncodeBody(std::move(payload)); |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| _encoded_message.Write(_transport()); |
| return ::fidl::internal::ToFitxResult(::fidl::Status{_encoded_message}); |
| } |
| |
| #endif // __Fuchsia__ |
| |
| void fidl::internal::NaturalCompleterBase<::test_protocols::Transitional::Request>::Reply(::fidl::Response<::test_protocols::Transitional::Request>&& response) { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kTransitional_Request_Ordinal, ::test_protocols::kTransitional_Request_DynamicFlags}; |
| _encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Response<::test_protocols::Transitional::Request>>::IntoDomainObject(std::move(response))); |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| SendReply(&_encoded_message, ::fidl::internal::OutgoingTransportContext{}); |
| } |
| |
| #ifdef __Fuchsia__ |
| |
| constexpr ::fidl::internal::MethodEntry fidl::internal::NaturalServerDispatcher<::test_protocols::Transitional>::entries_[] = { |
| { |
| ::test_protocols::kTransitional_Request_Ordinal, |
| [](void* interface, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fitx::result decoded = ::fidl::internal::DecodeTransactionalMessage<::test_protocols::TransitionalRequestRequest>(std::move(msg)); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::Request<::test_protocols::Transitional::Request> request = ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::Transitional::Request>>::FromDomainObject(std::move(decoded.value())); |
| ::fidl::internal::NaturalCompleter<::test_protocols::Transitional::Request>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::Transitional>*>(interface)->Request( |
| request, completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| { |
| ::test_protocols::kTransitional_OneWay_Ordinal, |
| [](void* interface, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fitx::result decoded = ::fidl::internal::DecodeTransactionalMessage<::test_protocols::TransitionalOneWayRequest>(std::move(msg)); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::Request<::test_protocols::Transitional::OneWay> request = ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::Transitional::OneWay>>::FromDomainObject(std::move(decoded.value())); |
| ::fidl::internal::NaturalCompleter<::test_protocols::Transitional::OneWay>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::Transitional>*>(interface)->OneWay( |
| request, completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| }; |
| |
| const ::fidl::internal::MethodEntry* fidl::internal::NaturalServerDispatcher<::test_protocols::Transitional>::entries_end_ = |
| &entries_[2]; |
| |
| void fidl::internal::NaturalServerDispatcher<::test_protocols::Transitional>::Dispatch(::fidl::Server<::test_protocols::Transitional>* impl, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fidl::internal::Dispatch(impl, msg, storage_view, txn, entries_, entries_end_); |
| } |
| void fidl::Server<::test_protocols::Transitional>::dispatch_message( |
| ::fidl::IncomingMessage&& msg, ::fidl::Transaction* txn, |
| ::fidl::internal::MessageStorageViewBase* storage_view) { |
| ::fidl::internal::NaturalServerDispatcher<::test_protocols::Transitional>::Dispatch(this, std::move(msg), storage_view, txn); |
| } |
| #endif // __Fuchsia__ |
| |
| namespace test_protocols { |
| [[maybe_unused]] constexpr inline uint64_t kWithProtocolEnds_ClientEnds_Ordinal = 5870448041025163330lu; |
| |
| [[maybe_unused]] constexpr inline ::fidl::MessageDynamicFlags kWithProtocolEnds_ClientEnds_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod; |
| |
| [[maybe_unused]] constexpr inline uint64_t kWithProtocolEnds_ServerEnds_Ordinal = 8115535094437022259lu; |
| |
| [[maybe_unused]] constexpr inline ::fidl::MessageDynamicFlags kWithProtocolEnds_ServerEnds_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod; |
| |
| [[maybe_unused]] constexpr inline uint64_t kWithProtocolEnds_StructContainingEnds_Ordinal = 4076866772260025813lu; |
| |
| [[maybe_unused]] constexpr inline ::fidl::MessageDynamicFlags kWithProtocolEnds_StructContainingEnds_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod; |
| |
| #ifdef __Fuchsia__ |
| } // namespace test_protocols |
| ::fidl::internal::NaturalThenable<::test_protocols::WithProtocolEnds::ClientEnds> |
| fidl::internal::NaturalClientImpl<::test_protocols::WithProtocolEnds>::ClientEnds(::fidl::Request<::test_protocols::WithProtocolEnds::ClientEnds> request) const { |
| return ::fidl::internal::NaturalThenable<::test_protocols::WithProtocolEnds::ClientEnds>( |
| &client_base(), {}, &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithProtocolEnds_ClientEnds_Ordinal, ::test_protocols::kWithProtocolEnds_ClientEnds_DynamicFlags, |
| [request = std::move(request)](NaturalMessageEncoder& encoder) mutable { |
| encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::WithProtocolEnds::ClientEnds>>::IntoDomainObject(std::move(request))); |
| return ZX_OK; |
| }, |
| []( |
| ::fidl::internal::ThenableBase* base, |
| ::fidl::internal::NaturalMessageEncoder& encoder, |
| ::fidl::internal::ResponseContext* response_context) { |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| return base->SendTwoWay(msg, response_context); |
| }); |
| } |
| |
| ::fidl::internal::NaturalThenable<::test_protocols::WithProtocolEnds::ServerEnds> |
| fidl::internal::NaturalClientImpl<::test_protocols::WithProtocolEnds>::ServerEnds(::fidl::Request<::test_protocols::WithProtocolEnds::ServerEnds> request) const { |
| return ::fidl::internal::NaturalThenable<::test_protocols::WithProtocolEnds::ServerEnds>( |
| &client_base(), {}, &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithProtocolEnds_ServerEnds_Ordinal, ::test_protocols::kWithProtocolEnds_ServerEnds_DynamicFlags, |
| [request = std::move(request)](NaturalMessageEncoder& encoder) mutable { |
| encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::WithProtocolEnds::ServerEnds>>::IntoDomainObject(std::move(request))); |
| return ZX_OK; |
| }, |
| []( |
| ::fidl::internal::ThenableBase* base, |
| ::fidl::internal::NaturalMessageEncoder& encoder, |
| ::fidl::internal::ResponseContext* response_context) { |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| return base->SendTwoWay(msg, response_context); |
| }); |
| } |
| |
| ::fidl::internal::NaturalThenable<::test_protocols::WithProtocolEnds::StructContainingEnds> |
| fidl::internal::NaturalClientImpl<::test_protocols::WithProtocolEnds>::StructContainingEnds(::fidl::Request<::test_protocols::WithProtocolEnds::StructContainingEnds> request) const { |
| return ::fidl::internal::NaturalThenable<::test_protocols::WithProtocolEnds::StructContainingEnds>( |
| &client_base(), {}, &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithProtocolEnds_StructContainingEnds_Ordinal, ::test_protocols::kWithProtocolEnds_StructContainingEnds_DynamicFlags, |
| [request = std::move(request)](NaturalMessageEncoder& encoder) mutable { |
| encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::WithProtocolEnds::StructContainingEnds>>::IntoDomainObject(std::move(request))); |
| return ZX_OK; |
| }, |
| []( |
| ::fidl::internal::ThenableBase* base, |
| ::fidl::internal::NaturalMessageEncoder& encoder, |
| ::fidl::internal::ResponseContext* response_context) { |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| return base->SendTwoWay(msg, response_context); |
| }); |
| } |
| |
| namespace test_protocols { |
| #endif // __Fuchsia__ |
| |
| } // namespace test_protocols |
| #ifdef __Fuchsia__ |
| |
| ::fidl::Result<::test_protocols::WithProtocolEnds::ClientEnds> |
| fidl::internal::NaturalSyncClientImpl<::test_protocols::WithProtocolEnds>::ClientEnds(::fidl::Request<::test_protocols::WithProtocolEnds::ClientEnds> request) { |
| ::fidl::internal::NaturalMessageEncoder encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithProtocolEnds_ClientEnds_Ordinal, ::test_protocols::kWithProtocolEnds_ClientEnds_DynamicFlags}; |
| encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::WithProtocolEnds::ClientEnds>>::IntoDomainObject(std::move(request))); |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| ::fidl::internal::IncomingMessageStorage<::fidl::internal::TransactionalResponse<::test_protocols::WithProtocolEnds::ClientEnds>> response_storage; |
| return ::fidl::internal::DecodeResponseAndFoldError<::test_protocols::WithProtocolEnds::ClientEnds>( |
| msg.Call(_client_end().handle(), response_storage.view()), nullptr); |
| } |
| |
| ::fidl::Result<::test_protocols::WithProtocolEnds::ServerEnds> |
| fidl::internal::NaturalSyncClientImpl<::test_protocols::WithProtocolEnds>::ServerEnds(::fidl::Request<::test_protocols::WithProtocolEnds::ServerEnds> request) { |
| ::fidl::internal::NaturalMessageEncoder encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithProtocolEnds_ServerEnds_Ordinal, ::test_protocols::kWithProtocolEnds_ServerEnds_DynamicFlags}; |
| encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::WithProtocolEnds::ServerEnds>>::IntoDomainObject(std::move(request))); |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| ::fidl::internal::IncomingMessageStorage<::fidl::internal::TransactionalResponse<::test_protocols::WithProtocolEnds::ServerEnds>> response_storage; |
| return ::fidl::internal::DecodeResponseAndFoldError<::test_protocols::WithProtocolEnds::ServerEnds>( |
| msg.Call(_client_end().handle(), response_storage.view()), nullptr); |
| } |
| |
| ::fidl::Result<::test_protocols::WithProtocolEnds::StructContainingEnds> |
| fidl::internal::NaturalSyncClientImpl<::test_protocols::WithProtocolEnds>::StructContainingEnds(::fidl::Request<::test_protocols::WithProtocolEnds::StructContainingEnds> request) { |
| ::fidl::internal::NaturalMessageEncoder encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithProtocolEnds_StructContainingEnds_Ordinal, ::test_protocols::kWithProtocolEnds_StructContainingEnds_DynamicFlags}; |
| encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::WithProtocolEnds::StructContainingEnds>>::IntoDomainObject(std::move(request))); |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| ::fidl::internal::IncomingMessageStorage<::fidl::internal::TransactionalResponse<::test_protocols::WithProtocolEnds::StructContainingEnds>> response_storage; |
| return ::fidl::internal::DecodeResponseAndFoldError<::test_protocols::WithProtocolEnds::StructContainingEnds>( |
| msg.Call(_client_end().handle(), response_storage.view()), nullptr); |
| } |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| ::fidl::Status fidl::SyncEventHandler<::test_protocols::WithProtocolEnds>::HandleOneEvent( |
| ::fidl::UnownedClientEnd<::test_protocols::WithProtocolEnds> client_end) { |
| ::fidl::internal::IncomingEventsStorage<::test_protocols::WithProtocolEnds> event_storage; |
| fidl::internal::NaturalEventDispatcher<::test_protocols::WithProtocolEnds> dispatcher{this}; |
| return HandleOneEventImpl_(client_end.channel(), event_storage.view(), dispatcher); |
| } |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| void fidl::internal::NaturalCompleterBase<::test_protocols::WithProtocolEnds::ClientEnds>::Reply(::fidl::Response<::test_protocols::WithProtocolEnds::ClientEnds>&& response) { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithProtocolEnds_ClientEnds_Ordinal, ::test_protocols::kWithProtocolEnds_ClientEnds_DynamicFlags}; |
| _encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Response<::test_protocols::WithProtocolEnds::ClientEnds>>::IntoDomainObject(std::move(response))); |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| SendReply(&_encoded_message, ::fidl::internal::OutgoingTransportContext{}); |
| } |
| |
| void fidl::internal::NaturalCompleterBase<::test_protocols::WithProtocolEnds::ServerEnds>::Reply(::fidl::Response<::test_protocols::WithProtocolEnds::ServerEnds>&& response) { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithProtocolEnds_ServerEnds_Ordinal, ::test_protocols::kWithProtocolEnds_ServerEnds_DynamicFlags}; |
| _encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Response<::test_protocols::WithProtocolEnds::ServerEnds>>::IntoDomainObject(std::move(response))); |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| SendReply(&_encoded_message, ::fidl::internal::OutgoingTransportContext{}); |
| } |
| |
| void fidl::internal::NaturalCompleterBase<::test_protocols::WithProtocolEnds::StructContainingEnds>::Reply(::fidl::Response<::test_protocols::WithProtocolEnds::StructContainingEnds>&& response) { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithProtocolEnds_StructContainingEnds_Ordinal, ::test_protocols::kWithProtocolEnds_StructContainingEnds_DynamicFlags}; |
| _encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Response<::test_protocols::WithProtocolEnds::StructContainingEnds>>::IntoDomainObject(std::move(response))); |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| SendReply(&_encoded_message, ::fidl::internal::OutgoingTransportContext{}); |
| } |
| |
| #ifdef __Fuchsia__ |
| |
| constexpr ::fidl::internal::MethodEntry fidl::internal::NaturalServerDispatcher<::test_protocols::WithProtocolEnds>::entries_[] = { |
| { |
| ::test_protocols::kWithProtocolEnds_ClientEnds_Ordinal, |
| [](void* interface, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fitx::result decoded = ::fidl::internal::DecodeTransactionalMessage<::test_protocols::WithProtocolEndsClientEndsRequest>(std::move(msg)); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::Request<::test_protocols::WithProtocolEnds::ClientEnds> request = ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::WithProtocolEnds::ClientEnds>>::FromDomainObject(std::move(decoded.value())); |
| ::fidl::internal::NaturalCompleter<::test_protocols::WithProtocolEnds::ClientEnds>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::WithProtocolEnds>*>(interface)->ClientEnds( |
| request, completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| { |
| ::test_protocols::kWithProtocolEnds_ServerEnds_Ordinal, |
| [](void* interface, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fitx::result decoded = ::fidl::internal::DecodeTransactionalMessage<::test_protocols::WithProtocolEndsServerEndsRequest>(std::move(msg)); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::Request<::test_protocols::WithProtocolEnds::ServerEnds> request = ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::WithProtocolEnds::ServerEnds>>::FromDomainObject(std::move(decoded.value())); |
| ::fidl::internal::NaturalCompleter<::test_protocols::WithProtocolEnds::ServerEnds>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::WithProtocolEnds>*>(interface)->ServerEnds( |
| request, completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| { |
| ::test_protocols::kWithProtocolEnds_StructContainingEnds_Ordinal, |
| [](void* interface, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fitx::result decoded = ::fidl::internal::DecodeTransactionalMessage<::test_protocols::WithProtocolEndsStructContainingEndsRequest>(std::move(msg)); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::Request<::test_protocols::WithProtocolEnds::StructContainingEnds> request = ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::WithProtocolEnds::StructContainingEnds>>::FromDomainObject(std::move(decoded.value())); |
| ::fidl::internal::NaturalCompleter<::test_protocols::WithProtocolEnds::StructContainingEnds>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::WithProtocolEnds>*>(interface)->StructContainingEnds( |
| request, completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| }; |
| |
| const ::fidl::internal::MethodEntry* fidl::internal::NaturalServerDispatcher<::test_protocols::WithProtocolEnds>::entries_end_ = |
| &entries_[3]; |
| |
| void fidl::internal::NaturalServerDispatcher<::test_protocols::WithProtocolEnds>::Dispatch(::fidl::Server<::test_protocols::WithProtocolEnds>* impl, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fidl::internal::Dispatch(impl, msg, storage_view, txn, entries_, entries_end_); |
| } |
| void fidl::Server<::test_protocols::WithProtocolEnds>::dispatch_message( |
| ::fidl::IncomingMessage&& msg, ::fidl::Transaction* txn, |
| ::fidl::internal::MessageStorageViewBase* storage_view) { |
| ::fidl::internal::NaturalServerDispatcher<::test_protocols::WithProtocolEnds>::Dispatch(this, std::move(msg), storage_view, txn); |
| } |
| #endif // __Fuchsia__ |
| |
| namespace test_protocols { |
| [[maybe_unused]] constexpr inline uint64_t kMethodWithUnion_UnionMethod_Ordinal = 4124874338266649112lu; |
| |
| [[maybe_unused]] constexpr inline ::fidl::MessageDynamicFlags kMethodWithUnion_UnionMethod_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod; |
| |
| #ifdef __Fuchsia__ |
| } // namespace test_protocols |
| ::fidl::internal::NaturalThenable<::test_protocols::MethodWithUnion::UnionMethod> |
| fidl::internal::NaturalClientImpl<::test_protocols::MethodWithUnion>::UnionMethod(::fidl::Request<::test_protocols::MethodWithUnion::UnionMethod> request) const { |
| return ::fidl::internal::NaturalThenable<::test_protocols::MethodWithUnion::UnionMethod>( |
| &client_base(), {}, &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kMethodWithUnion_UnionMethod_Ordinal, ::test_protocols::kMethodWithUnion_UnionMethod_DynamicFlags, |
| [request = std::move(request)](NaturalMessageEncoder& encoder) mutable { |
| encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::MethodWithUnion::UnionMethod>>::IntoDomainObject(std::move(request))); |
| return ZX_OK; |
| }, |
| []( |
| ::fidl::internal::ThenableBase* base, |
| ::fidl::internal::NaturalMessageEncoder& encoder, |
| ::fidl::internal::ResponseContext* response_context) { |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| return base->SendTwoWay(msg, response_context); |
| }); |
| } |
| |
| namespace test_protocols { |
| #endif // __Fuchsia__ |
| |
| } // namespace test_protocols |
| #ifdef __Fuchsia__ |
| |
| ::fidl::Result<::test_protocols::MethodWithUnion::UnionMethod> |
| fidl::internal::NaturalSyncClientImpl<::test_protocols::MethodWithUnion>::UnionMethod(::fidl::Request<::test_protocols::MethodWithUnion::UnionMethod> request) { |
| ::fidl::internal::NaturalMessageEncoder encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kMethodWithUnion_UnionMethod_Ordinal, ::test_protocols::kMethodWithUnion_UnionMethod_DynamicFlags}; |
| encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::MethodWithUnion::UnionMethod>>::IntoDomainObject(std::move(request))); |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| ::fidl::internal::IncomingMessageStorage<::fidl::internal::TransactionalResponse<::test_protocols::MethodWithUnion::UnionMethod>> response_storage; |
| return ::fidl::internal::DecodeResponseAndFoldError<::test_protocols::MethodWithUnion::UnionMethod>( |
| msg.Call(_client_end().handle(), response_storage.view()), nullptr); |
| } |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| ::fidl::Status fidl::SyncEventHandler<::test_protocols::MethodWithUnion>::HandleOneEvent( |
| ::fidl::UnownedClientEnd<::test_protocols::MethodWithUnion> client_end) { |
| ::fidl::internal::IncomingEventsStorage<::test_protocols::MethodWithUnion> event_storage; |
| fidl::internal::NaturalEventDispatcher<::test_protocols::MethodWithUnion> dispatcher{this}; |
| return HandleOneEventImpl_(client_end.channel(), event_storage.view(), dispatcher); |
| } |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| void fidl::internal::NaturalCompleterBase<::test_protocols::MethodWithUnion::UnionMethod>::Reply(::fidl::Response<::test_protocols::MethodWithUnion::UnionMethod>&& response) { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kMethodWithUnion_UnionMethod_Ordinal, ::test_protocols::kMethodWithUnion_UnionMethod_DynamicFlags}; |
| _encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Response<::test_protocols::MethodWithUnion::UnionMethod>>::IntoDomainObject(std::move(response))); |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| SendReply(&_encoded_message, ::fidl::internal::OutgoingTransportContext{}); |
| } |
| |
| #ifdef __Fuchsia__ |
| |
| constexpr ::fidl::internal::MethodEntry fidl::internal::NaturalServerDispatcher<::test_protocols::MethodWithUnion>::entries_[] = { |
| { |
| ::test_protocols::kMethodWithUnion_UnionMethod_Ordinal, |
| [](void* interface, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fitx::result decoded = ::fidl::internal::DecodeTransactionalMessage<::test_protocols::MethodWithUnionUnionMethodRequest>(std::move(msg)); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::Request<::test_protocols::MethodWithUnion::UnionMethod> request = ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::MethodWithUnion::UnionMethod>>::FromDomainObject(std::move(decoded.value())); |
| ::fidl::internal::NaturalCompleter<::test_protocols::MethodWithUnion::UnionMethod>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::MethodWithUnion>*>(interface)->UnionMethod( |
| request, completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| }; |
| |
| const ::fidl::internal::MethodEntry* fidl::internal::NaturalServerDispatcher<::test_protocols::MethodWithUnion>::entries_end_ = |
| &entries_[1]; |
| |
| void fidl::internal::NaturalServerDispatcher<::test_protocols::MethodWithUnion>::Dispatch(::fidl::Server<::test_protocols::MethodWithUnion>* impl, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fidl::internal::Dispatch(impl, msg, storage_view, txn, entries_, entries_end_); |
| } |
| void fidl::Server<::test_protocols::MethodWithUnion>::dispatch_message( |
| ::fidl::IncomingMessage&& msg, ::fidl::Transaction* txn, |
| ::fidl::internal::MessageStorageViewBase* storage_view) { |
| ::fidl::internal::NaturalServerDispatcher<::test_protocols::MethodWithUnion>::Dispatch(this, std::move(msg), storage_view, txn); |
| } |
| #endif // __Fuchsia__ |
| |
| namespace test_protocols { |
| [[maybe_unused]] constexpr inline uint64_t kManyParameters_Fifteen_Ordinal = 6423043252952467815lu; |
| |
| [[maybe_unused]] constexpr inline ::fidl::MessageDynamicFlags kManyParameters_Fifteen_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod; |
| |
| #ifdef __Fuchsia__ |
| } // namespace test_protocols |
| ::fitx::result<::fidl::Error> |
| fidl::internal::NaturalClientImpl<::test_protocols::ManyParameters>::Fifteen(::fidl::Request<::test_protocols::ManyParameters::Fifteen> request) const { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kManyParameters_Fifteen_Ordinal, ::test_protocols::kManyParameters_Fifteen_DynamicFlags}; |
| _encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::ManyParameters::Fifteen>>::IntoDomainObject(std::move(request))); |
| |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| ::fidl::Status status = client_base().SendOneWay(_encoded_message); |
| return ::fidl::internal::ToFitxResult(status); |
| } |
| namespace test_protocols { |
| #endif // __Fuchsia__ |
| |
| } // namespace test_protocols |
| #ifdef __Fuchsia__ |
| |
| ::fitx::result<::fidl::Error> |
| fidl::internal::NaturalSyncClientImpl<::test_protocols::ManyParameters>::Fifteen(::fidl::Request<::test_protocols::ManyParameters::Fifteen> request) { |
| ::fidl::internal::NaturalMessageEncoder encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kManyParameters_Fifteen_Ordinal, ::test_protocols::kManyParameters_Fifteen_DynamicFlags}; |
| encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::ManyParameters::Fifteen>>::IntoDomainObject(std::move(request))); |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| msg.Write(_client_end().handle()); |
| return ::fidl::internal::ToFitxResult(::fidl::Status{msg}); |
| } |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| ::fidl::Status fidl::SyncEventHandler<::test_protocols::ManyParameters>::HandleOneEvent( |
| ::fidl::UnownedClientEnd<::test_protocols::ManyParameters> client_end) { |
| ::fidl::internal::IncomingEventsStorage<::test_protocols::ManyParameters> event_storage; |
| fidl::internal::NaturalEventDispatcher<::test_protocols::ManyParameters> dispatcher{this}; |
| return HandleOneEventImpl_(client_end.channel(), event_storage.view(), dispatcher); |
| } |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| constexpr ::fidl::internal::MethodEntry fidl::internal::NaturalServerDispatcher<::test_protocols::ManyParameters>::entries_[] = { |
| { |
| ::test_protocols::kManyParameters_Fifteen_Ordinal, |
| [](void* interface, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fitx::result decoded = ::fidl::internal::DecodeTransactionalMessage<::test_protocols::ManyParametersFifteenRequest>(std::move(msg)); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::Request<::test_protocols::ManyParameters::Fifteen> request = ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::ManyParameters::Fifteen>>::FromDomainObject(std::move(decoded.value())); |
| ::fidl::internal::NaturalCompleter<::test_protocols::ManyParameters::Fifteen>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::ManyParameters>*>(interface)->Fifteen( |
| request, completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| }; |
| |
| const ::fidl::internal::MethodEntry* fidl::internal::NaturalServerDispatcher<::test_protocols::ManyParameters>::entries_end_ = |
| &entries_[1]; |
| |
| void fidl::internal::NaturalServerDispatcher<::test_protocols::ManyParameters>::Dispatch(::fidl::Server<::test_protocols::ManyParameters>* impl, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fidl::internal::Dispatch(impl, msg, storage_view, txn, entries_, entries_end_); |
| } |
| void fidl::Server<::test_protocols::ManyParameters>::dispatch_message( |
| ::fidl::IncomingMessage&& msg, ::fidl::Transaction* txn, |
| ::fidl::internal::MessageStorageViewBase* storage_view) { |
| ::fidl::internal::NaturalServerDispatcher<::test_protocols::ManyParameters>::Dispatch(this, std::move(msg), storage_view, txn); |
| } |
| #endif // __Fuchsia__ |
| |
| namespace test_protocols { |
| [[maybe_unused]] constexpr inline uint64_t kHandleRightsProtocol_NoResponseMethod_Ordinal = 1155044649514904573lu; |
| |
| [[maybe_unused]] constexpr inline ::fidl::MessageDynamicFlags kHandleRightsProtocol_NoResponseMethod_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod; |
| |
| [[maybe_unused]] constexpr inline uint64_t kHandleRightsProtocol_ResponseMethod_Ordinal = 5956276128041940295lu; |
| |
| [[maybe_unused]] constexpr inline ::fidl::MessageDynamicFlags kHandleRightsProtocol_ResponseMethod_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod; |
| |
| [[maybe_unused]] constexpr inline uint64_t kHandleRightsProtocol_AnEvent_Ordinal = 476727631355490611lu; |
| |
| [[maybe_unused]] constexpr inline ::fidl::MessageDynamicFlags kHandleRightsProtocol_AnEvent_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod; |
| |
| #ifdef __Fuchsia__ |
| } // namespace test_protocols |
| ::fidl::internal::NaturalThenable<::test_protocols::HandleRightsProtocol::ResponseMethod> |
| fidl::internal::NaturalClientImpl<::test_protocols::HandleRightsProtocol>::ResponseMethod(::fidl::Request<::test_protocols::HandleRightsProtocol::ResponseMethod> request) const { |
| return ::fidl::internal::NaturalThenable<::test_protocols::HandleRightsProtocol::ResponseMethod>( |
| &client_base(), {}, &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kHandleRightsProtocol_ResponseMethod_Ordinal, ::test_protocols::kHandleRightsProtocol_ResponseMethod_DynamicFlags, |
| [request = std::move(request)](NaturalMessageEncoder& encoder) mutable { |
| encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::HandleRightsProtocol::ResponseMethod>>::IntoDomainObject(std::move(request))); |
| return ZX_OK; |
| }, |
| []( |
| ::fidl::internal::ThenableBase* base, |
| ::fidl::internal::NaturalMessageEncoder& encoder, |
| ::fidl::internal::ResponseContext* response_context) { |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| return base->SendTwoWay(msg, response_context); |
| }); |
| } |
| |
| ::fitx::result<::fidl::Error> |
| fidl::internal::NaturalClientImpl<::test_protocols::HandleRightsProtocol>::NoResponseMethod(::fidl::Request<::test_protocols::HandleRightsProtocol::NoResponseMethod> request) const { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kHandleRightsProtocol_NoResponseMethod_Ordinal, ::test_protocols::kHandleRightsProtocol_NoResponseMethod_DynamicFlags}; |
| _encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::HandleRightsProtocol::NoResponseMethod>>::IntoDomainObject(std::move(request))); |
| |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| ::fidl::Status status = client_base().SendOneWay(_encoded_message); |
| return ::fidl::internal::ToFitxResult(status); |
| } |
| namespace test_protocols { |
| #endif // __Fuchsia__ |
| |
| } // namespace test_protocols |
| #ifdef __Fuchsia__ |
| |
| ::fidl::Result<::test_protocols::HandleRightsProtocol::ResponseMethod> |
| fidl::internal::NaturalSyncClientImpl<::test_protocols::HandleRightsProtocol>::ResponseMethod(::fidl::Request<::test_protocols::HandleRightsProtocol::ResponseMethod> request) { |
| ::fidl::internal::NaturalMessageEncoder encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kHandleRightsProtocol_ResponseMethod_Ordinal, ::test_protocols::kHandleRightsProtocol_ResponseMethod_DynamicFlags}; |
| encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::HandleRightsProtocol::ResponseMethod>>::IntoDomainObject(std::move(request))); |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| ::fidl::internal::IncomingMessageStorage<::fidl::internal::TransactionalResponse<::test_protocols::HandleRightsProtocol::ResponseMethod>> response_storage; |
| return ::fidl::internal::DecodeResponseAndFoldError<::test_protocols::HandleRightsProtocol::ResponseMethod>( |
| msg.Call(_client_end().handle(), response_storage.view()), nullptr); |
| } |
| |
| ::fitx::result<::fidl::Error> |
| fidl::internal::NaturalSyncClientImpl<::test_protocols::HandleRightsProtocol>::NoResponseMethod(::fidl::Request<::test_protocols::HandleRightsProtocol::NoResponseMethod> request) { |
| ::fidl::internal::NaturalMessageEncoder encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kHandleRightsProtocol_NoResponseMethod_Ordinal, ::test_protocols::kHandleRightsProtocol_NoResponseMethod_DynamicFlags}; |
| encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::HandleRightsProtocol::NoResponseMethod>>::IntoDomainObject(std::move(request))); |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| msg.Write(_client_end().handle()); |
| return ::fidl::internal::ToFitxResult(::fidl::Status{msg}); |
| } |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| ::fidl::Status fidl::SyncEventHandler<::test_protocols::HandleRightsProtocol>::HandleOneEvent( |
| ::fidl::UnownedClientEnd<::test_protocols::HandleRightsProtocol> client_end) { |
| ::fidl::internal::IncomingEventsStorage<::test_protocols::HandleRightsProtocol> event_storage; |
| fidl::internal::NaturalEventDispatcher<::test_protocols::HandleRightsProtocol> dispatcher{this}; |
| return HandleOneEventImpl_(client_end.channel(), event_storage.view(), dispatcher); |
| } |
| ::fidl::Status |
| fidl::internal::NaturalEventDispatcher<::test_protocols::HandleRightsProtocol>::DispatchEvent( |
| ::fidl::IncomingMessage& msg, |
| ::fidl::internal::MessageStorageViewBase* storage_view) { |
| switch (msg.header()->ordinal) { |
| case ::test_protocols::kHandleRightsProtocol_AnEvent_Ordinal: { |
| ::fitx::result decoded = ::fidl::internal::DecodeTransactionalMessage<::test_protocols::HandleRightsProtocolAnEventRequest>(std::move(msg)); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| if (event_handler()) { |
| ::fidl::Event<::test_protocols::HandleRightsProtocol::AnEvent> event = ::fidl::internal::NaturalMessageConverter<::fidl::Event<::test_protocols::HandleRightsProtocol::AnEvent>>::FromDomainObject(std::move(decoded.value())); |
| event_handler()->AnEvent(event); |
| } |
| return ::fidl::Status::Ok(); |
| } |
| default: |
| return ::fidl::Status::UnknownOrdinal(); |
| } |
| } |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| ::fitx::result<::fidl::Error> fidl::internal::NaturalWeakEventSender<::test_protocols::HandleRightsProtocol>::AnEvent(::test_protocols::HandleRightsProtocolAnEventRequest payload) { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kHandleRightsProtocol_AnEvent_Ordinal, ::test_protocols::kHandleRightsProtocol_AnEvent_DynamicFlags}; |
| _encoder.EncodeBody(std::move(payload)); |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| ::fidl::Status result = _inner().SendEvent(_encoded_message); |
| return ::fidl::internal::ToFitxResult(result); |
| } |
| |
| ::fitx::result<::fidl::Error> fidl::internal::NaturalEventSender<::test_protocols::HandleRightsProtocol>::AnEvent(::test_protocols::HandleRightsProtocolAnEventRequest payload) { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kHandleRightsProtocol_AnEvent_Ordinal, ::test_protocols::kHandleRightsProtocol_AnEvent_DynamicFlags}; |
| _encoder.EncodeBody(std::move(payload)); |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| _encoded_message.Write(_transport()); |
| return ::fidl::internal::ToFitxResult(::fidl::Status{_encoded_message}); |
| } |
| |
| #endif // __Fuchsia__ |
| |
| void fidl::internal::NaturalCompleterBase<::test_protocols::HandleRightsProtocol::ResponseMethod>::Reply(::fidl::Response<::test_protocols::HandleRightsProtocol::ResponseMethod>&& response) { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kHandleRightsProtocol_ResponseMethod_Ordinal, ::test_protocols::kHandleRightsProtocol_ResponseMethod_DynamicFlags}; |
| _encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Response<::test_protocols::HandleRightsProtocol::ResponseMethod>>::IntoDomainObject(std::move(response))); |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| SendReply(&_encoded_message, ::fidl::internal::OutgoingTransportContext{}); |
| } |
| |
| #ifdef __Fuchsia__ |
| |
| constexpr ::fidl::internal::MethodEntry fidl::internal::NaturalServerDispatcher<::test_protocols::HandleRightsProtocol>::entries_[] = { |
| { |
| ::test_protocols::kHandleRightsProtocol_NoResponseMethod_Ordinal, |
| [](void* interface, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fitx::result decoded = ::fidl::internal::DecodeTransactionalMessage<::test_protocols::HandleRightsProtocolNoResponseMethodRequest>(std::move(msg)); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::Request<::test_protocols::HandleRightsProtocol::NoResponseMethod> request = ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::HandleRightsProtocol::NoResponseMethod>>::FromDomainObject(std::move(decoded.value())); |
| ::fidl::internal::NaturalCompleter<::test_protocols::HandleRightsProtocol::NoResponseMethod>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::HandleRightsProtocol>*>(interface)->NoResponseMethod( |
| request, completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| { |
| ::test_protocols::kHandleRightsProtocol_ResponseMethod_Ordinal, |
| [](void* interface, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fitx::result decoded = ::fidl::internal::DecodeTransactionalMessage<::test_protocols::HandleRightsProtocolResponseMethodRequest>(std::move(msg)); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::Request<::test_protocols::HandleRightsProtocol::ResponseMethod> request = ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::HandleRightsProtocol::ResponseMethod>>::FromDomainObject(std::move(decoded.value())); |
| ::fidl::internal::NaturalCompleter<::test_protocols::HandleRightsProtocol::ResponseMethod>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::HandleRightsProtocol>*>(interface)->ResponseMethod( |
| request, completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| }; |
| |
| const ::fidl::internal::MethodEntry* fidl::internal::NaturalServerDispatcher<::test_protocols::HandleRightsProtocol>::entries_end_ = |
| &entries_[2]; |
| |
| void fidl::internal::NaturalServerDispatcher<::test_protocols::HandleRightsProtocol>::Dispatch(::fidl::Server<::test_protocols::HandleRightsProtocol>* impl, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fidl::internal::Dispatch(impl, msg, storage_view, txn, entries_, entries_end_); |
| } |
| void fidl::Server<::test_protocols::HandleRightsProtocol>::dispatch_message( |
| ::fidl::IncomingMessage&& msg, ::fidl::Transaction* txn, |
| ::fidl::internal::MessageStorageViewBase* storage_view) { |
| ::fidl::internal::NaturalServerDispatcher<::test_protocols::HandleRightsProtocol>::Dispatch(this, std::move(msg), storage_view, txn); |
| } |
| #endif // __Fuchsia__ |
| |
| namespace test_protocols { |
| [[maybe_unused]] constexpr inline uint64_t kWithErrorSyntax_ResponseAsStruct_Ordinal = 268248568430741139lu; |
| |
| [[maybe_unused]] constexpr inline ::fidl::MessageDynamicFlags kWithErrorSyntax_ResponseAsStruct_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod; |
| |
| [[maybe_unused]] constexpr inline uint64_t kWithErrorSyntax_ErrorAsPrimitive_Ordinal = 6930994461233198567lu; |
| |
| [[maybe_unused]] constexpr inline ::fidl::MessageDynamicFlags kWithErrorSyntax_ErrorAsPrimitive_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod; |
| |
| [[maybe_unused]] constexpr inline uint64_t kWithErrorSyntax_ErrorAsEnum_Ordinal = 5491891352371277635lu; |
| |
| [[maybe_unused]] constexpr inline ::fidl::MessageDynamicFlags kWithErrorSyntax_ErrorAsEnum_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod; |
| |
| [[maybe_unused]] constexpr inline uint64_t kWithErrorSyntax_HandleInResult_Ordinal = 1371676333068455103lu; |
| |
| [[maybe_unused]] constexpr inline ::fidl::MessageDynamicFlags kWithErrorSyntax_HandleInResult_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod; |
| |
| #ifdef __Fuchsia__ |
| } // namespace test_protocols |
| ::fidl::internal::NaturalThenable<::test_protocols::WithErrorSyntax::ResponseAsStruct> |
| fidl::internal::NaturalClientImpl<::test_protocols::WithErrorSyntax>::ResponseAsStruct() const { |
| return ::fidl::internal::NaturalThenable<::test_protocols::WithErrorSyntax::ResponseAsStruct>( |
| &client_base(), {}, &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithErrorSyntax_ResponseAsStruct_Ordinal, ::test_protocols::kWithErrorSyntax_ResponseAsStruct_DynamicFlags, |
| [](NaturalMessageEncoder& encoder) mutable { |
| return ZX_OK; |
| }, |
| []( |
| ::fidl::internal::ThenableBase* base, |
| ::fidl::internal::NaturalMessageEncoder& encoder, |
| ::fidl::internal::ResponseContext* response_context) { |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| return base->SendTwoWay(msg, response_context); |
| }); |
| } |
| |
| ::fidl::internal::NaturalThenable<::test_protocols::WithErrorSyntax::ErrorAsPrimitive> |
| fidl::internal::NaturalClientImpl<::test_protocols::WithErrorSyntax>::ErrorAsPrimitive() const { |
| return ::fidl::internal::NaturalThenable<::test_protocols::WithErrorSyntax::ErrorAsPrimitive>( |
| &client_base(), {}, &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithErrorSyntax_ErrorAsPrimitive_Ordinal, ::test_protocols::kWithErrorSyntax_ErrorAsPrimitive_DynamicFlags, |
| [](NaturalMessageEncoder& encoder) mutable { |
| return ZX_OK; |
| }, |
| []( |
| ::fidl::internal::ThenableBase* base, |
| ::fidl::internal::NaturalMessageEncoder& encoder, |
| ::fidl::internal::ResponseContext* response_context) { |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| return base->SendTwoWay(msg, response_context); |
| }); |
| } |
| |
| ::fidl::internal::NaturalThenable<::test_protocols::WithErrorSyntax::ErrorAsEnum> |
| fidl::internal::NaturalClientImpl<::test_protocols::WithErrorSyntax>::ErrorAsEnum() const { |
| return ::fidl::internal::NaturalThenable<::test_protocols::WithErrorSyntax::ErrorAsEnum>( |
| &client_base(), {}, &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithErrorSyntax_ErrorAsEnum_Ordinal, ::test_protocols::kWithErrorSyntax_ErrorAsEnum_DynamicFlags, |
| [](NaturalMessageEncoder& encoder) mutable { |
| return ZX_OK; |
| }, |
| []( |
| ::fidl::internal::ThenableBase* base, |
| ::fidl::internal::NaturalMessageEncoder& encoder, |
| ::fidl::internal::ResponseContext* response_context) { |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| return base->SendTwoWay(msg, response_context); |
| }); |
| } |
| |
| ::fidl::internal::NaturalThenable<::test_protocols::WithErrorSyntax::HandleInResult> |
| fidl::internal::NaturalClientImpl<::test_protocols::WithErrorSyntax>::HandleInResult() const { |
| return ::fidl::internal::NaturalThenable<::test_protocols::WithErrorSyntax::HandleInResult>( |
| &client_base(), {}, &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithErrorSyntax_HandleInResult_Ordinal, ::test_protocols::kWithErrorSyntax_HandleInResult_DynamicFlags, |
| [](NaturalMessageEncoder& encoder) mutable { |
| return ZX_OK; |
| }, |
| []( |
| ::fidl::internal::ThenableBase* base, |
| ::fidl::internal::NaturalMessageEncoder& encoder, |
| ::fidl::internal::ResponseContext* response_context) { |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| return base->SendTwoWay(msg, response_context); |
| }); |
| } |
| |
| namespace test_protocols { |
| #endif // __Fuchsia__ |
| |
| } // namespace test_protocols |
| #ifdef __Fuchsia__ |
| |
| ::fidl::Result<::test_protocols::WithErrorSyntax::ResponseAsStruct> |
| fidl::internal::NaturalSyncClientImpl<::test_protocols::WithErrorSyntax>::ResponseAsStruct() { |
| ::fidl::internal::NaturalMessageEncoder encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithErrorSyntax_ResponseAsStruct_Ordinal, ::test_protocols::kWithErrorSyntax_ResponseAsStruct_DynamicFlags}; |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| ::fidl::internal::IncomingMessageStorage<::fidl::internal::TransactionalResponse<::test_protocols::WithErrorSyntax::ResponseAsStruct>> response_storage; |
| return ::fidl::internal::DecodeResponseAndFoldError<::test_protocols::WithErrorSyntax::ResponseAsStruct>( |
| msg.Call(_client_end().handle(), response_storage.view()), nullptr); |
| } |
| |
| ::fidl::Result<::test_protocols::WithErrorSyntax::ErrorAsPrimitive> |
| fidl::internal::NaturalSyncClientImpl<::test_protocols::WithErrorSyntax>::ErrorAsPrimitive() { |
| ::fidl::internal::NaturalMessageEncoder encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithErrorSyntax_ErrorAsPrimitive_Ordinal, ::test_protocols::kWithErrorSyntax_ErrorAsPrimitive_DynamicFlags}; |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| ::fidl::internal::IncomingMessageStorage<::fidl::internal::TransactionalResponse<::test_protocols::WithErrorSyntax::ErrorAsPrimitive>> response_storage; |
| return ::fidl::internal::DecodeResponseAndFoldError<::test_protocols::WithErrorSyntax::ErrorAsPrimitive>( |
| msg.Call(_client_end().handle(), response_storage.view()), nullptr); |
| } |
| |
| ::fidl::Result<::test_protocols::WithErrorSyntax::ErrorAsEnum> |
| fidl::internal::NaturalSyncClientImpl<::test_protocols::WithErrorSyntax>::ErrorAsEnum() { |
| ::fidl::internal::NaturalMessageEncoder encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithErrorSyntax_ErrorAsEnum_Ordinal, ::test_protocols::kWithErrorSyntax_ErrorAsEnum_DynamicFlags}; |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| ::fidl::internal::IncomingMessageStorage<::fidl::internal::TransactionalResponse<::test_protocols::WithErrorSyntax::ErrorAsEnum>> response_storage; |
| return ::fidl::internal::DecodeResponseAndFoldError<::test_protocols::WithErrorSyntax::ErrorAsEnum>( |
| msg.Call(_client_end().handle(), response_storage.view()), nullptr); |
| } |
| |
| ::fidl::Result<::test_protocols::WithErrorSyntax::HandleInResult> |
| fidl::internal::NaturalSyncClientImpl<::test_protocols::WithErrorSyntax>::HandleInResult() { |
| ::fidl::internal::NaturalMessageEncoder encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithErrorSyntax_HandleInResult_Ordinal, ::test_protocols::kWithErrorSyntax_HandleInResult_DynamicFlags}; |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| ::fidl::internal::IncomingMessageStorage<::fidl::internal::TransactionalResponse<::test_protocols::WithErrorSyntax::HandleInResult>> response_storage; |
| return ::fidl::internal::DecodeResponseAndFoldError<::test_protocols::WithErrorSyntax::HandleInResult>( |
| msg.Call(_client_end().handle(), response_storage.view()), nullptr); |
| } |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| ::fidl::Status fidl::SyncEventHandler<::test_protocols::WithErrorSyntax>::HandleOneEvent( |
| ::fidl::UnownedClientEnd<::test_protocols::WithErrorSyntax> client_end) { |
| ::fidl::internal::IncomingEventsStorage<::test_protocols::WithErrorSyntax> event_storage; |
| fidl::internal::NaturalEventDispatcher<::test_protocols::WithErrorSyntax> dispatcher{this}; |
| return HandleOneEventImpl_(client_end.channel(), event_storage.view(), dispatcher); |
| } |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| void fidl::internal::NaturalCompleterBase<::test_protocols::WithErrorSyntax::ResponseAsStruct>::Reply(::fidl::Response<::test_protocols::WithErrorSyntax::ResponseAsStruct>&& response) { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithErrorSyntax_ResponseAsStruct_Ordinal, ::test_protocols::kWithErrorSyntax_ResponseAsStruct_DynamicFlags}; |
| _encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Response<::test_protocols::WithErrorSyntax::ResponseAsStruct>>::IntoDomainObject(std::move(response))); |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| SendReply(&_encoded_message, ::fidl::internal::OutgoingTransportContext{}); |
| } |
| |
| void fidl::internal::NaturalCompleterBase<::test_protocols::WithErrorSyntax::ErrorAsPrimitive>::Reply(::fidl::Response<::test_protocols::WithErrorSyntax::ErrorAsPrimitive>&& response) { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithErrorSyntax_ErrorAsPrimitive_Ordinal, ::test_protocols::kWithErrorSyntax_ErrorAsPrimitive_DynamicFlags}; |
| _encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Response<::test_protocols::WithErrorSyntax::ErrorAsPrimitive>>::IntoDomainObject(std::move(response))); |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| SendReply(&_encoded_message, ::fidl::internal::OutgoingTransportContext{}); |
| } |
| |
| void fidl::internal::NaturalCompleterBase<::test_protocols::WithErrorSyntax::ErrorAsEnum>::Reply(::fidl::Response<::test_protocols::WithErrorSyntax::ErrorAsEnum>&& response) { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithErrorSyntax_ErrorAsEnum_Ordinal, ::test_protocols::kWithErrorSyntax_ErrorAsEnum_DynamicFlags}; |
| _encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Response<::test_protocols::WithErrorSyntax::ErrorAsEnum>>::IntoDomainObject(std::move(response))); |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| SendReply(&_encoded_message, ::fidl::internal::OutgoingTransportContext{}); |
| } |
| |
| void fidl::internal::NaturalCompleterBase<::test_protocols::WithErrorSyntax::HandleInResult>::Reply(::fidl::Response<::test_protocols::WithErrorSyntax::HandleInResult>&& response) { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithErrorSyntax_HandleInResult_Ordinal, ::test_protocols::kWithErrorSyntax_HandleInResult_DynamicFlags}; |
| _encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Response<::test_protocols::WithErrorSyntax::HandleInResult>>::IntoDomainObject(std::move(response))); |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| SendReply(&_encoded_message, ::fidl::internal::OutgoingTransportContext{}); |
| } |
| |
| #ifdef __Fuchsia__ |
| |
| constexpr ::fidl::internal::MethodEntry fidl::internal::NaturalServerDispatcher<::test_protocols::WithErrorSyntax>::entries_[] = { |
| { |
| ::test_protocols::kWithErrorSyntax_ResponseAsStruct_Ordinal, |
| [](void* interface, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fitx::result decoded = ::fidl::internal::DecodeTransactionalMessage(std::move(msg)); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::Request<::test_protocols::WithErrorSyntax::ResponseAsStruct> request; |
| ::fidl::internal::NaturalCompleter<::test_protocols::WithErrorSyntax::ResponseAsStruct>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::WithErrorSyntax>*>(interface)->ResponseAsStruct( |
| request, completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| { |
| ::test_protocols::kWithErrorSyntax_ErrorAsPrimitive_Ordinal, |
| [](void* interface, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fitx::result decoded = ::fidl::internal::DecodeTransactionalMessage(std::move(msg)); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::Request<::test_protocols::WithErrorSyntax::ErrorAsPrimitive> request; |
| ::fidl::internal::NaturalCompleter<::test_protocols::WithErrorSyntax::ErrorAsPrimitive>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::WithErrorSyntax>*>(interface)->ErrorAsPrimitive( |
| request, completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| { |
| ::test_protocols::kWithErrorSyntax_ErrorAsEnum_Ordinal, |
| [](void* interface, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fitx::result decoded = ::fidl::internal::DecodeTransactionalMessage(std::move(msg)); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::Request<::test_protocols::WithErrorSyntax::ErrorAsEnum> request; |
| ::fidl::internal::NaturalCompleter<::test_protocols::WithErrorSyntax::ErrorAsEnum>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::WithErrorSyntax>*>(interface)->ErrorAsEnum( |
| request, completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| { |
| ::test_protocols::kWithErrorSyntax_HandleInResult_Ordinal, |
| [](void* interface, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fitx::result decoded = ::fidl::internal::DecodeTransactionalMessage(std::move(msg)); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::Request<::test_protocols::WithErrorSyntax::HandleInResult> request; |
| ::fidl::internal::NaturalCompleter<::test_protocols::WithErrorSyntax::HandleInResult>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::WithErrorSyntax>*>(interface)->HandleInResult( |
| request, completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| }; |
| |
| const ::fidl::internal::MethodEntry* fidl::internal::NaturalServerDispatcher<::test_protocols::WithErrorSyntax>::entries_end_ = |
| &entries_[4]; |
| |
| void fidl::internal::NaturalServerDispatcher<::test_protocols::WithErrorSyntax>::Dispatch(::fidl::Server<::test_protocols::WithErrorSyntax>* impl, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fidl::internal::Dispatch(impl, msg, storage_view, txn, entries_, entries_end_); |
| } |
| void fidl::Server<::test_protocols::WithErrorSyntax>::dispatch_message( |
| ::fidl::IncomingMessage&& msg, ::fidl::Transaction* txn, |
| ::fidl::internal::MessageStorageViewBase* storage_view) { |
| ::fidl::internal::NaturalServerDispatcher<::test_protocols::WithErrorSyntax>::Dispatch(this, std::move(msg), storage_view, txn); |
| } |
| #endif // __Fuchsia__ |
| |
| namespace test_protocols { |
| [[maybe_unused]] constexpr inline uint64_t kDiscoverableProtocol_Method_Ordinal = 3455873048082739435lu; |
| |
| [[maybe_unused]] constexpr inline ::fidl::MessageDynamicFlags kDiscoverableProtocol_Method_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod; |
| |
| #ifdef __Fuchsia__ |
| } // namespace test_protocols |
| ::fitx::result<::fidl::Error> |
| fidl::internal::NaturalClientImpl<::test_protocols::DiscoverableProtocol>::Method() const { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kDiscoverableProtocol_Method_Ordinal, ::test_protocols::kDiscoverableProtocol_Method_DynamicFlags}; |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| ::fidl::Status status = client_base().SendOneWay(_encoded_message); |
| return ::fidl::internal::ToFitxResult(status); |
| } |
| namespace test_protocols { |
| #endif // __Fuchsia__ |
| |
| } // namespace test_protocols |
| #ifdef __Fuchsia__ |
| |
| ::fitx::result<::fidl::Error> |
| fidl::internal::NaturalSyncClientImpl<::test_protocols::DiscoverableProtocol>::Method() { |
| ::fidl::internal::NaturalMessageEncoder encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kDiscoverableProtocol_Method_Ordinal, ::test_protocols::kDiscoverableProtocol_Method_DynamicFlags}; |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| msg.Write(_client_end().handle()); |
| return ::fidl::internal::ToFitxResult(::fidl::Status{msg}); |
| } |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| ::fidl::Status fidl::SyncEventHandler<::test_protocols::DiscoverableProtocol>::HandleOneEvent( |
| ::fidl::UnownedClientEnd<::test_protocols::DiscoverableProtocol> client_end) { |
| ::fidl::internal::IncomingEventsStorage<::test_protocols::DiscoverableProtocol> event_storage; |
| fidl::internal::NaturalEventDispatcher<::test_protocols::DiscoverableProtocol> dispatcher{this}; |
| return HandleOneEventImpl_(client_end.channel(), event_storage.view(), dispatcher); |
| } |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| constexpr ::fidl::internal::MethodEntry fidl::internal::NaturalServerDispatcher<::test_protocols::DiscoverableProtocol>::entries_[] = { |
| { |
| ::test_protocols::kDiscoverableProtocol_Method_Ordinal, |
| [](void* interface, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fitx::result decoded = ::fidl::internal::DecodeTransactionalMessage(std::move(msg)); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::Request<::test_protocols::DiscoverableProtocol::Method> request; |
| ::fidl::internal::NaturalCompleter<::test_protocols::DiscoverableProtocol::Method>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::DiscoverableProtocol>*>(interface)->Method( |
| request, completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| }; |
| |
| const ::fidl::internal::MethodEntry* fidl::internal::NaturalServerDispatcher<::test_protocols::DiscoverableProtocol>::entries_end_ = |
| &entries_[1]; |
| |
| void fidl::internal::NaturalServerDispatcher<::test_protocols::DiscoverableProtocol>::Dispatch(::fidl::Server<::test_protocols::DiscoverableProtocol>* impl, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fidl::internal::Dispatch(impl, msg, storage_view, txn, entries_, entries_end_); |
| } |
| void fidl::Server<::test_protocols::DiscoverableProtocol>::dispatch_message( |
| ::fidl::IncomingMessage&& msg, ::fidl::Transaction* txn, |
| ::fidl::internal::MessageStorageViewBase* storage_view) { |
| ::fidl::internal::NaturalServerDispatcher<::test_protocols::DiscoverableProtocol>::Dispatch(this, std::move(msg), storage_view, txn); |
| } |
| #endif // __Fuchsia__ |
| |
| namespace test_protocols { |
| [[maybe_unused]] constexpr inline uint64_t kChannelProtocol_MethodA_Ordinal = 3155008840945527714lu; |
| |
| [[maybe_unused]] constexpr inline ::fidl::MessageDynamicFlags kChannelProtocol_MethodA_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod; |
| |
| [[maybe_unused]] constexpr inline uint64_t kChannelProtocol_EventA_Ordinal = 2220452875311597006lu; |
| |
| [[maybe_unused]] constexpr inline ::fidl::MessageDynamicFlags kChannelProtocol_EventA_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod; |
| |
| [[maybe_unused]] constexpr inline uint64_t kChannelProtocol_MethodB_Ordinal = 8903004957800778182lu; |
| |
| [[maybe_unused]] constexpr inline ::fidl::MessageDynamicFlags kChannelProtocol_MethodB_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod; |
| |
| [[maybe_unused]] constexpr inline uint64_t kChannelProtocol_TakeHandle_Ordinal = 591935489944717925lu; |
| |
| [[maybe_unused]] constexpr inline ::fidl::MessageDynamicFlags kChannelProtocol_TakeHandle_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod; |
| |
| [[maybe_unused]] constexpr inline uint64_t kChannelProtocol_MutateSocket_Ordinal = 7411742788430590287lu; |
| |
| [[maybe_unused]] constexpr inline ::fidl::MessageDynamicFlags kChannelProtocol_MutateSocket_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod; |
| |
| #ifdef __Fuchsia__ |
| } // namespace test_protocols |
| ::fidl::internal::NaturalThenable<::test_protocols::ChannelProtocol::MethodB> |
| fidl::internal::NaturalClientImpl<::test_protocols::ChannelProtocol>::MethodB(::fidl::Request<::test_protocols::ChannelProtocol::MethodB> request) const { |
| return ::fidl::internal::NaturalThenable<::test_protocols::ChannelProtocol::MethodB>( |
| &client_base(), {}, &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kChannelProtocol_MethodB_Ordinal, ::test_protocols::kChannelProtocol_MethodB_DynamicFlags, |
| [request = std::move(request)](NaturalMessageEncoder& encoder) mutable { |
| encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::ChannelProtocol::MethodB>>::IntoDomainObject(std::move(request))); |
| return ZX_OK; |
| }, |
| []( |
| ::fidl::internal::ThenableBase* base, |
| ::fidl::internal::NaturalMessageEncoder& encoder, |
| ::fidl::internal::ResponseContext* response_context) { |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| return base->SendTwoWay(msg, response_context); |
| }); |
| } |
| |
| ::fidl::internal::NaturalThenable<::test_protocols::ChannelProtocol::TakeHandle> |
| fidl::internal::NaturalClientImpl<::test_protocols::ChannelProtocol>::TakeHandle(::fidl::Request<::test_protocols::ChannelProtocol::TakeHandle> request) const { |
| return ::fidl::internal::NaturalThenable<::test_protocols::ChannelProtocol::TakeHandle>( |
| &client_base(), {}, &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kChannelProtocol_TakeHandle_Ordinal, ::test_protocols::kChannelProtocol_TakeHandle_DynamicFlags, |
| [request = std::move(request)](NaturalMessageEncoder& encoder) mutable { |
| encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::ChannelProtocol::TakeHandle>>::IntoDomainObject(std::move(request))); |
| return ZX_OK; |
| }, |
| []( |
| ::fidl::internal::ThenableBase* base, |
| ::fidl::internal::NaturalMessageEncoder& encoder, |
| ::fidl::internal::ResponseContext* response_context) { |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| return base->SendTwoWay(msg, response_context); |
| }); |
| } |
| |
| ::fidl::internal::NaturalThenable<::test_protocols::ChannelProtocol::MutateSocket> |
| fidl::internal::NaturalClientImpl<::test_protocols::ChannelProtocol>::MutateSocket(::fidl::Request<::test_protocols::ChannelProtocol::MutateSocket> request) const { |
| return ::fidl::internal::NaturalThenable<::test_protocols::ChannelProtocol::MutateSocket>( |
| &client_base(), {}, &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kChannelProtocol_MutateSocket_Ordinal, ::test_protocols::kChannelProtocol_MutateSocket_DynamicFlags, |
| [request = std::move(request)](NaturalMessageEncoder& encoder) mutable { |
| encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::ChannelProtocol::MutateSocket>>::IntoDomainObject(std::move(request))); |
| return ZX_OK; |
| }, |
| []( |
| ::fidl::internal::ThenableBase* base, |
| ::fidl::internal::NaturalMessageEncoder& encoder, |
| ::fidl::internal::ResponseContext* response_context) { |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| return base->SendTwoWay(msg, response_context); |
| }); |
| } |
| |
| ::fitx::result<::fidl::Error> |
| fidl::internal::NaturalClientImpl<::test_protocols::ChannelProtocol>::MethodA(::fidl::Request<::test_protocols::ChannelProtocol::MethodA> request) const { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kChannelProtocol_MethodA_Ordinal, ::test_protocols::kChannelProtocol_MethodA_DynamicFlags}; |
| _encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::ChannelProtocol::MethodA>>::IntoDomainObject(std::move(request))); |
| |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| ::fidl::Status status = client_base().SendOneWay(_encoded_message); |
| return ::fidl::internal::ToFitxResult(status); |
| } |
| namespace test_protocols { |
| #endif // __Fuchsia__ |
| |
| } // namespace test_protocols |
| #ifdef __Fuchsia__ |
| |
| ::fidl::Result<::test_protocols::ChannelProtocol::MethodB> |
| fidl::internal::NaturalSyncClientImpl<::test_protocols::ChannelProtocol>::MethodB(::fidl::Request<::test_protocols::ChannelProtocol::MethodB> request) { |
| ::fidl::internal::NaturalMessageEncoder encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kChannelProtocol_MethodB_Ordinal, ::test_protocols::kChannelProtocol_MethodB_DynamicFlags}; |
| encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::ChannelProtocol::MethodB>>::IntoDomainObject(std::move(request))); |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| ::fidl::internal::IncomingMessageStorage<::fidl::internal::TransactionalResponse<::test_protocols::ChannelProtocol::MethodB>> response_storage; |
| return ::fidl::internal::DecodeResponseAndFoldError<::test_protocols::ChannelProtocol::MethodB>( |
| msg.Call(_client_end().handle(), response_storage.view()), nullptr); |
| } |
| |
| ::fidl::Result<::test_protocols::ChannelProtocol::TakeHandle> |
| fidl::internal::NaturalSyncClientImpl<::test_protocols::ChannelProtocol>::TakeHandle(::fidl::Request<::test_protocols::ChannelProtocol::TakeHandle> request) { |
| ::fidl::internal::NaturalMessageEncoder encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kChannelProtocol_TakeHandle_Ordinal, ::test_protocols::kChannelProtocol_TakeHandle_DynamicFlags}; |
| encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::ChannelProtocol::TakeHandle>>::IntoDomainObject(std::move(request))); |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| ::fidl::internal::IncomingMessageStorage<::fidl::internal::TransactionalResponse<::test_protocols::ChannelProtocol::TakeHandle>> response_storage; |
| return ::fidl::internal::DecodeResponseAndFoldError<::test_protocols::ChannelProtocol::TakeHandle>( |
| msg.Call(_client_end().handle(), response_storage.view()), nullptr); |
| } |
| |
| ::fidl::Result<::test_protocols::ChannelProtocol::MutateSocket> |
| fidl::internal::NaturalSyncClientImpl<::test_protocols::ChannelProtocol>::MutateSocket(::fidl::Request<::test_protocols::ChannelProtocol::MutateSocket> request) { |
| ::fidl::internal::NaturalMessageEncoder encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kChannelProtocol_MutateSocket_Ordinal, ::test_protocols::kChannelProtocol_MutateSocket_DynamicFlags}; |
| encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::ChannelProtocol::MutateSocket>>::IntoDomainObject(std::move(request))); |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| ::fidl::internal::IncomingMessageStorage<::fidl::internal::TransactionalResponse<::test_protocols::ChannelProtocol::MutateSocket>> response_storage; |
| return ::fidl::internal::DecodeResponseAndFoldError<::test_protocols::ChannelProtocol::MutateSocket>( |
| msg.Call(_client_end().handle(), response_storage.view()), nullptr); |
| } |
| |
| ::fitx::result<::fidl::Error> |
| fidl::internal::NaturalSyncClientImpl<::test_protocols::ChannelProtocol>::MethodA(::fidl::Request<::test_protocols::ChannelProtocol::MethodA> request) { |
| ::fidl::internal::NaturalMessageEncoder encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kChannelProtocol_MethodA_Ordinal, ::test_protocols::kChannelProtocol_MethodA_DynamicFlags}; |
| encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::ChannelProtocol::MethodA>>::IntoDomainObject(std::move(request))); |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| msg.Write(_client_end().handle()); |
| return ::fidl::internal::ToFitxResult(::fidl::Status{msg}); |
| } |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| ::fidl::Status fidl::SyncEventHandler<::test_protocols::ChannelProtocol>::HandleOneEvent( |
| ::fidl::UnownedClientEnd<::test_protocols::ChannelProtocol> client_end) { |
| ::fidl::internal::IncomingEventsStorage<::test_protocols::ChannelProtocol> event_storage; |
| fidl::internal::NaturalEventDispatcher<::test_protocols::ChannelProtocol> dispatcher{this}; |
| return HandleOneEventImpl_(client_end.channel(), event_storage.view(), dispatcher); |
| } |
| ::fidl::Status |
| fidl::internal::NaturalEventDispatcher<::test_protocols::ChannelProtocol>::DispatchEvent( |
| ::fidl::IncomingMessage& msg, |
| ::fidl::internal::MessageStorageViewBase* storage_view) { |
| switch (msg.header()->ordinal) { |
| case ::test_protocols::kChannelProtocol_EventA_Ordinal: { |
| ::fitx::result decoded = ::fidl::internal::DecodeTransactionalMessage<::test_protocols::ChannelProtocolEventARequest>(std::move(msg)); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| if (event_handler()) { |
| ::fidl::Event<::test_protocols::ChannelProtocol::EventA> event = ::fidl::internal::NaturalMessageConverter<::fidl::Event<::test_protocols::ChannelProtocol::EventA>>::FromDomainObject(std::move(decoded.value())); |
| event_handler()->EventA(event); |
| } |
| return ::fidl::Status::Ok(); |
| } |
| default: |
| return ::fidl::Status::UnknownOrdinal(); |
| } |
| } |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| ::fitx::result<::fidl::Error> fidl::internal::NaturalWeakEventSender<::test_protocols::ChannelProtocol>::EventA(::test_protocols::ChannelProtocolEventARequest payload) { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kChannelProtocol_EventA_Ordinal, ::test_protocols::kChannelProtocol_EventA_DynamicFlags}; |
| _encoder.EncodeBody(std::move(payload)); |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| ::fidl::Status result = _inner().SendEvent(_encoded_message); |
| return ::fidl::internal::ToFitxResult(result); |
| } |
| |
| ::fitx::result<::fidl::Error> fidl::internal::NaturalEventSender<::test_protocols::ChannelProtocol>::EventA(::test_protocols::ChannelProtocolEventARequest payload) { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kChannelProtocol_EventA_Ordinal, ::test_protocols::kChannelProtocol_EventA_DynamicFlags}; |
| _encoder.EncodeBody(std::move(payload)); |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| _encoded_message.Write(_transport()); |
| return ::fidl::internal::ToFitxResult(::fidl::Status{_encoded_message}); |
| } |
| |
| #endif // __Fuchsia__ |
| |
| void fidl::internal::NaturalCompleterBase<::test_protocols::ChannelProtocol::MethodB>::Reply(::fidl::Response<::test_protocols::ChannelProtocol::MethodB>&& response) { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kChannelProtocol_MethodB_Ordinal, ::test_protocols::kChannelProtocol_MethodB_DynamicFlags}; |
| _encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Response<::test_protocols::ChannelProtocol::MethodB>>::IntoDomainObject(std::move(response))); |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| SendReply(&_encoded_message, ::fidl::internal::OutgoingTransportContext{}); |
| } |
| |
| void fidl::internal::NaturalCompleterBase<::test_protocols::ChannelProtocol::TakeHandle>::Reply() { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kChannelProtocol_TakeHandle_Ordinal, ::test_protocols::kChannelProtocol_TakeHandle_DynamicFlags}; |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| SendReply(&_encoded_message, ::fidl::internal::OutgoingTransportContext{}); |
| } |
| |
| void fidl::internal::NaturalCompleterBase<::test_protocols::ChannelProtocol::MutateSocket>::Reply(::fidl::Response<::test_protocols::ChannelProtocol::MutateSocket>&& response) { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kChannelProtocol_MutateSocket_Ordinal, ::test_protocols::kChannelProtocol_MutateSocket_DynamicFlags}; |
| _encoder.EncodeBody( |
| ::fidl::internal::NaturalMessageConverter<::fidl::Response<::test_protocols::ChannelProtocol::MutateSocket>>::IntoDomainObject(std::move(response))); |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| SendReply(&_encoded_message, ::fidl::internal::OutgoingTransportContext{}); |
| } |
| |
| #ifdef __Fuchsia__ |
| |
| constexpr ::fidl::internal::MethodEntry fidl::internal::NaturalServerDispatcher<::test_protocols::ChannelProtocol>::entries_[] = { |
| { |
| ::test_protocols::kChannelProtocol_MethodA_Ordinal, |
| [](void* interface, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fitx::result decoded = ::fidl::internal::DecodeTransactionalMessage<::test_protocols::ChannelProtocolMethodARequest>(std::move(msg)); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::Request<::test_protocols::ChannelProtocol::MethodA> request = ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::ChannelProtocol::MethodA>>::FromDomainObject(std::move(decoded.value())); |
| ::fidl::internal::NaturalCompleter<::test_protocols::ChannelProtocol::MethodA>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::ChannelProtocol>*>(interface)->MethodA( |
| request, completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| { |
| ::test_protocols::kChannelProtocol_MethodB_Ordinal, |
| [](void* interface, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fitx::result decoded = ::fidl::internal::DecodeTransactionalMessage<::test_protocols::ChannelProtocolMethodBRequest>(std::move(msg)); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::Request<::test_protocols::ChannelProtocol::MethodB> request = ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::ChannelProtocol::MethodB>>::FromDomainObject(std::move(decoded.value())); |
| ::fidl::internal::NaturalCompleter<::test_protocols::ChannelProtocol::MethodB>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::ChannelProtocol>*>(interface)->MethodB( |
| request, completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| { |
| ::test_protocols::kChannelProtocol_TakeHandle_Ordinal, |
| [](void* interface, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fitx::result decoded = ::fidl::internal::DecodeTransactionalMessage<::test_protocols::ChannelProtocolTakeHandleRequest>(std::move(msg)); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::Request<::test_protocols::ChannelProtocol::TakeHandle> request = ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::ChannelProtocol::TakeHandle>>::FromDomainObject(std::move(decoded.value())); |
| ::fidl::internal::NaturalCompleter<::test_protocols::ChannelProtocol::TakeHandle>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::ChannelProtocol>*>(interface)->TakeHandle( |
| request, completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| { |
| ::test_protocols::kChannelProtocol_MutateSocket_Ordinal, |
| [](void* interface, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fitx::result decoded = ::fidl::internal::DecodeTransactionalMessage<::test_protocols::ChannelProtocolMutateSocketRequest>(std::move(msg)); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::Request<::test_protocols::ChannelProtocol::MutateSocket> request = ::fidl::internal::NaturalMessageConverter<::fidl::Request<::test_protocols::ChannelProtocol::MutateSocket>>::FromDomainObject(std::move(decoded.value())); |
| ::fidl::internal::NaturalCompleter<::test_protocols::ChannelProtocol::MutateSocket>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::ChannelProtocol>*>(interface)->MutateSocket( |
| request, completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| }; |
| |
| const ::fidl::internal::MethodEntry* fidl::internal::NaturalServerDispatcher<::test_protocols::ChannelProtocol>::entries_end_ = |
| &entries_[4]; |
| |
| void fidl::internal::NaturalServerDispatcher<::test_protocols::ChannelProtocol>::Dispatch(::fidl::Server<::test_protocols::ChannelProtocol>* impl, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fidl::internal::Dispatch(impl, msg, storage_view, txn, entries_, entries_end_); |
| } |
| void fidl::Server<::test_protocols::ChannelProtocol>::dispatch_message( |
| ::fidl::IncomingMessage&& msg, ::fidl::Transaction* txn, |
| ::fidl::internal::MessageStorageViewBase* storage_view) { |
| ::fidl::internal::NaturalServerDispatcher<::test_protocols::ChannelProtocol>::Dispatch(this, std::move(msg), storage_view, txn); |
| } |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| ::fidl::Status fidl::SyncEventHandler<::test_protocols::AnotherDiscoverableProtocol>::HandleOneEvent( |
| ::fidl::UnownedClientEnd<::test_protocols::AnotherDiscoverableProtocol> client_end) { |
| ::fidl::internal::IncomingEventsStorage<::test_protocols::AnotherDiscoverableProtocol> event_storage; |
| fidl::internal::NaturalEventDispatcher<::test_protocols::AnotherDiscoverableProtocol> dispatcher{this}; |
| return HandleOneEventImpl_(client_end.channel(), event_storage.view(), dispatcher); |
| } |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| constexpr ::fidl::internal::MethodEntry fidl::internal::NaturalServerDispatcher<::test_protocols::AnotherDiscoverableProtocol>::entries_[] = {}; |
| |
| const ::fidl::internal::MethodEntry* fidl::internal::NaturalServerDispatcher<::test_protocols::AnotherDiscoverableProtocol>::entries_end_ = |
| &entries_[0]; |
| |
| void fidl::internal::NaturalServerDispatcher<::test_protocols::AnotherDiscoverableProtocol>::Dispatch(::fidl::Server<::test_protocols::AnotherDiscoverableProtocol>* impl, ::fidl::IncomingMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fidl::internal::Dispatch(impl, msg, storage_view, txn, entries_, entries_end_); |
| } |
| void fidl::Server<::test_protocols::AnotherDiscoverableProtocol>::dispatch_message( |
| ::fidl::IncomingMessage&& msg, ::fidl::Transaction* txn, |
| ::fidl::internal::MessageStorageViewBase* storage_view) { |
| ::fidl::internal::NaturalServerDispatcher<::test_protocols::AnotherDiscoverableProtocol>::Dispatch(this, std::move(msg), storage_view, txn); |
| } |
| #endif // __Fuchsia__ |