| // WARNING: This file is machine generated by fidlgen. |
| |
| // fidl_experiment = output_index_json |
| |
| #include <fidl/test.protocols/cpp/natural_messaging.h> |
| #include <lib/fidl/cpp/wire/unknown_interactions.h> |
| |
| #pragma clang diagnostic push |
| #pragma clang diagnostic ignored "-Wshadow" |
| |
| 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(const ::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 = request](NaturalMessageEncoder& encoder) mutable { |
| encoder.EncodeBody(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(const ::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 = request](NaturalMessageEncoder& encoder) mutable { |
| encoder.EncodeBody(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); |
| }); |
| } |
| |
| ::fit::result<::fidl::OneWayError> |
| 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::OneWayStatus status = client_base().SendOneWay(_encoded_message); |
| return ::fidl::internal::ToFitxResult(status); |
| } |
| |
| ::fit::result<::fidl::OneWayError> |
| fidl::internal::NaturalClientImpl<::test_protocols::WithAndWithoutRequestResponse>::WithRequestNoResponse(const ::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(request); |
| |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| ::fidl::OneWayStatus 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(const ::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(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(const ::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(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); |
| } |
| |
| ::fit::result<::fidl::OneWayError> |
| 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::OneWayStatus{msg}); |
| } |
| |
| ::fit::result<::fidl::OneWayError> |
| fidl::internal::NaturalSyncClientImpl<::test_protocols::WithAndWithoutRequestResponse>::WithRequestNoResponse(const ::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(request); |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| msg.Write(_client_end().handle()); |
| return ::fidl::internal::ToFitxResult(::fidl::OneWayStatus{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::IncomingHeaderAndMessage& msg, |
| ::fidl::internal::MessageStorageViewBase* storage_view) { |
| switch (msg.header()->ordinal) { |
| case ::test_protocols::kWithAndWithoutRequestResponse_OnEmptyResponse_Ordinal: { |
| ::fit::result decoded = ::fidl::internal::DecodeTransactionalMessage(std::move(msg)); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| if (event_handler()) { |
| ; |
| event_handler()->OnEmptyResponse(); |
| } |
| return ::fidl::Status::Ok(); |
| } |
| case ::test_protocols::kWithAndWithoutRequestResponse_OnWithResponse_Ordinal: { |
| ::fit::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 = std::move(decoded.value()); |
| event_handler()->OnWithResponse(event); |
| } |
| return ::fidl::Status::Ok(); |
| } |
| default: |
| std::move(msg).CloseHandles(); |
| return ::fidl::Status::UnknownOrdinal(); |
| } |
| } |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| ::fit::result<::fidl::OneWayError> 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(); |
| return ::fidl::internal::ToFitxResult(_inner().SendEvent(_encoded_message)); |
| } |
| |
| ::fit::result<::fidl::OneWayError> 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::OneWayStatus{::fidl::Status{_encoded_message}}); |
| } |
| |
| ::fit::result<::fidl::OneWayError> fidl::internal::NaturalWeakEventSender<::test_protocols::WithAndWithoutRequestResponse>::OnWithResponse(const ::test_protocols::WithAndWithoutRequestResponseOnWithResponseRequest& payload) { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithAndWithoutRequestResponse_OnWithResponse_Ordinal, ::test_protocols::kWithAndWithoutRequestResponse_OnWithResponse_DynamicFlags}; |
| _encoder.EncodeBody(payload); |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| return ::fidl::internal::ToFitxResult(_inner().SendEvent(_encoded_message)); |
| } |
| |
| ::fit::result<::fidl::OneWayError> fidl::internal::NaturalEventSender<::test_protocols::WithAndWithoutRequestResponse>::OnWithResponse(const ::test_protocols::WithAndWithoutRequestResponseOnWithResponseRequest& payload) { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kWithAndWithoutRequestResponse_OnWithResponse_Ordinal, ::test_protocols::kWithAndWithoutRequestResponse_OnWithResponse_DynamicFlags}; |
| _encoder.EncodeBody(payload); |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| _encoded_message.Write(_transport()); |
| return ::fidl::internal::ToFitxResult(::fidl::OneWayStatus{::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(const ::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::ResponseMessageConverter<::test_protocols::WithAndWithoutRequestResponse::NoRequestWithResponse>::IntoDomainObject(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(const ::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::ResponseMessageConverter<::test_protocols::WithAndWithoutRequestResponse::WithRequestWithResponse>::IntoDomainObject(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::EncodedMessage& msg, ::fidl::WireFormatMetadata metadata, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fit::result decoded = ::fidl::internal::DecodeTransactionalMessageWithoutBody( |
| msg, metadata); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::internal::NaturalCompleter<::test_protocols::WithAndWithoutRequestResponse::NoRequestNoResponse>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::WithAndWithoutRequestResponse>*>(interface)->NoRequestNoResponse( |
| |
| completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| { |
| ::test_protocols::kWithAndWithoutRequestResponse_NoRequestEmptyResponse_Ordinal, |
| [](void* interface, ::fidl::EncodedMessage& msg, ::fidl::WireFormatMetadata metadata, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fit::result decoded = ::fidl::internal::DecodeTransactionalMessageWithoutBody( |
| msg, metadata); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::internal::NaturalCompleter<::test_protocols::WithAndWithoutRequestResponse::NoRequestEmptyResponse>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::WithAndWithoutRequestResponse>*>(interface)->NoRequestEmptyResponse( |
| |
| completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| { |
| ::test_protocols::kWithAndWithoutRequestResponse_NoRequestWithResponse_Ordinal, |
| [](void* interface, ::fidl::EncodedMessage& msg, ::fidl::WireFormatMetadata metadata, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fit::result decoded = ::fidl::internal::DecodeTransactionalMessageWithoutBody( |
| msg, metadata); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::internal::NaturalCompleter<::test_protocols::WithAndWithoutRequestResponse::NoRequestWithResponse>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::WithAndWithoutRequestResponse>*>(interface)->NoRequestWithResponse( |
| |
| completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| { |
| ::test_protocols::kWithAndWithoutRequestResponse_WithRequestNoResponse_Ordinal, |
| [](void* interface, ::fidl::EncodedMessage& msg, ::fidl::WireFormatMetadata metadata, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fit::result decoded = ::fidl::StandaloneDecode<::test_protocols::WithAndWithoutRequestResponseWithRequestNoResponseRequest>( |
| std::move(msg), metadata); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::internal::NaturalCompleter<::test_protocols::WithAndWithoutRequestResponse::WithRequestNoResponse>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::WithAndWithoutRequestResponse>*>(interface)->WithRequestNoResponse( |
| decoded.value(), |
| completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| { |
| ::test_protocols::kWithAndWithoutRequestResponse_WithRequestEmptyResponse_Ordinal, |
| [](void* interface, ::fidl::EncodedMessage& msg, ::fidl::WireFormatMetadata metadata, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fit::result decoded = ::fidl::StandaloneDecode<::test_protocols::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest>( |
| std::move(msg), metadata); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::internal::NaturalCompleter<::test_protocols::WithAndWithoutRequestResponse::WithRequestEmptyResponse>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::WithAndWithoutRequestResponse>*>(interface)->WithRequestEmptyResponse( |
| decoded.value(), |
| completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| { |
| ::test_protocols::kWithAndWithoutRequestResponse_WithRequestWithResponse_Ordinal, |
| [](void* interface, ::fidl::EncodedMessage& msg, ::fidl::WireFormatMetadata metadata, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fit::result decoded = ::fidl::StandaloneDecode<::test_protocols::WithAndWithoutRequestResponseWithRequestWithResponseRequest>( |
| std::move(msg), metadata); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::internal::NaturalCompleter<::test_protocols::WithAndWithoutRequestResponse::WithRequestWithResponse>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::WithAndWithoutRequestResponse>*>(interface)->WithRequestWithResponse( |
| decoded.value(), |
| 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::IncomingHeaderAndMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fidl::internal::Dispatch(impl, msg, storage_view, txn, entries_, entries_end_, &unknown_method_handler_entry_); |
| } |
| |
| void fidl::Server<::test_protocols::WithAndWithoutRequestResponse>::dispatch_message( |
| ::fidl::IncomingHeaderAndMessage&& 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 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(const ::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::ResponseMessageConverter<::test_protocols::WithErrorSyntax::ResponseAsStruct>::IntoDomainObject(response)); |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| SendReply(&_encoded_message, ::fidl::internal::OutgoingTransportContext{}); |
| } |
| |
| void fidl::internal::NaturalCompleterBase<::test_protocols::WithErrorSyntax::ErrorAsPrimitive>::Reply(const ::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::ResponseMessageConverter<::test_protocols::WithErrorSyntax::ErrorAsPrimitive>::IntoDomainObject(response)); |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| SendReply(&_encoded_message, ::fidl::internal::OutgoingTransportContext{}); |
| } |
| |
| void fidl::internal::NaturalCompleterBase<::test_protocols::WithErrorSyntax::ErrorAsEnum>::Reply(const ::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::ResponseMessageConverter<::test_protocols::WithErrorSyntax::ErrorAsEnum>::IntoDomainObject(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::ResponseMessageConverter<::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::EncodedMessage& msg, ::fidl::WireFormatMetadata metadata, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fit::result decoded = ::fidl::internal::DecodeTransactionalMessageWithoutBody( |
| msg, metadata); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::internal::NaturalCompleter<::test_protocols::WithErrorSyntax::ResponseAsStruct>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::WithErrorSyntax>*>(interface)->ResponseAsStruct( |
| |
| completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| { |
| ::test_protocols::kWithErrorSyntax_ErrorAsPrimitive_Ordinal, |
| [](void* interface, ::fidl::EncodedMessage& msg, ::fidl::WireFormatMetadata metadata, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fit::result decoded = ::fidl::internal::DecodeTransactionalMessageWithoutBody( |
| msg, metadata); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::internal::NaturalCompleter<::test_protocols::WithErrorSyntax::ErrorAsPrimitive>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::WithErrorSyntax>*>(interface)->ErrorAsPrimitive( |
| |
| completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| { |
| ::test_protocols::kWithErrorSyntax_ErrorAsEnum_Ordinal, |
| [](void* interface, ::fidl::EncodedMessage& msg, ::fidl::WireFormatMetadata metadata, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fit::result decoded = ::fidl::internal::DecodeTransactionalMessageWithoutBody( |
| msg, metadata); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::internal::NaturalCompleter<::test_protocols::WithErrorSyntax::ErrorAsEnum>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::WithErrorSyntax>*>(interface)->ErrorAsEnum( |
| |
| completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| { |
| ::test_protocols::kWithErrorSyntax_HandleInResult_Ordinal, |
| [](void* interface, ::fidl::EncodedMessage& msg, ::fidl::WireFormatMetadata metadata, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fit::result decoded = ::fidl::internal::DecodeTransactionalMessageWithoutBody( |
| msg, metadata); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::internal::NaturalCompleter<::test_protocols::WithErrorSyntax::HandleInResult>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::WithErrorSyntax>*>(interface)->HandleInResult( |
| |
| 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::IncomingHeaderAndMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fidl::internal::Dispatch(impl, msg, storage_view, txn, entries_, entries_end_, &unknown_method_handler_entry_); |
| } |
| |
| void fidl::Server<::test_protocols::WithErrorSyntax>::dispatch_message( |
| ::fidl::IncomingHeaderAndMessage&& 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 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(const ::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 = request](NaturalMessageEncoder& encoder) mutable { |
| encoder.EncodeBody(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(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(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); |
| }); |
| } |
| |
| ::fit::result<::fidl::OneWayError> |
| fidl::internal::NaturalClientImpl<::test_protocols::ChannelProtocol>::MethodA(const ::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(request); |
| |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| ::fidl::OneWayStatus 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(const ::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(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(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(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); |
| } |
| |
| ::fit::result<::fidl::OneWayError> |
| fidl::internal::NaturalSyncClientImpl<::test_protocols::ChannelProtocol>::MethodA(const ::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(request); |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| msg.Write(_client_end().handle()); |
| return ::fidl::internal::ToFitxResult(::fidl::OneWayStatus{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::IncomingHeaderAndMessage& msg, |
| ::fidl::internal::MessageStorageViewBase* storage_view) { |
| switch (msg.header()->ordinal) { |
| case ::test_protocols::kChannelProtocol_EventA_Ordinal: { |
| ::fit::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 = std::move(decoded.value()); |
| event_handler()->EventA(event); |
| } |
| return ::fidl::Status::Ok(); |
| } |
| default: |
| std::move(msg).CloseHandles(); |
| return ::fidl::Status::UnknownOrdinal(); |
| } |
| } |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| ::fit::result<::fidl::OneWayError> fidl::internal::NaturalWeakEventSender<::test_protocols::ChannelProtocol>::EventA(const ::test_protocols::ChannelProtocolEventARequest& payload) { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kChannelProtocol_EventA_Ordinal, ::test_protocols::kChannelProtocol_EventA_DynamicFlags}; |
| _encoder.EncodeBody(payload); |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| return ::fidl::internal::ToFitxResult(_inner().SendEvent(_encoded_message)); |
| } |
| |
| ::fit::result<::fidl::OneWayError> fidl::internal::NaturalEventSender<::test_protocols::ChannelProtocol>::EventA(const ::test_protocols::ChannelProtocolEventARequest& payload) { |
| ::fidl::internal::NaturalMessageEncoder _encoder{ |
| &::fidl::internal::ChannelTransport::VTable, ::test_protocols::kChannelProtocol_EventA_Ordinal, ::test_protocols::kChannelProtocol_EventA_DynamicFlags}; |
| _encoder.EncodeBody(payload); |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| _encoded_message.Write(_transport()); |
| return ::fidl::internal::ToFitxResult(::fidl::OneWayStatus{::fidl::Status{_encoded_message}}); |
| } |
| |
| #endif // __Fuchsia__ |
| |
| void fidl::internal::NaturalCompleterBase<::test_protocols::ChannelProtocol::MethodB>::Reply(const ::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::ResponseMessageConverter<::test_protocols::ChannelProtocol::MethodB>::IntoDomainObject(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::ResponseMessageConverter<::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::EncodedMessage& msg, ::fidl::WireFormatMetadata metadata, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fit::result decoded = ::fidl::StandaloneDecode<::test_protocols::ChannelProtocolMethodARequest>( |
| std::move(msg), metadata); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::internal::NaturalCompleter<::test_protocols::ChannelProtocol::MethodA>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::ChannelProtocol>*>(interface)->MethodA( |
| decoded.value(), |
| completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| { |
| ::test_protocols::kChannelProtocol_MethodB_Ordinal, |
| [](void* interface, ::fidl::EncodedMessage& msg, ::fidl::WireFormatMetadata metadata, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fit::result decoded = ::fidl::StandaloneDecode<::test_protocols::ChannelProtocolMethodBRequest>( |
| std::move(msg), metadata); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::internal::NaturalCompleter<::test_protocols::ChannelProtocol::MethodB>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::ChannelProtocol>*>(interface)->MethodB( |
| decoded.value(), |
| completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| { |
| ::test_protocols::kChannelProtocol_TakeHandle_Ordinal, |
| [](void* interface, ::fidl::EncodedMessage& msg, ::fidl::WireFormatMetadata metadata, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fit::result decoded = ::fidl::StandaloneDecode<::test_protocols::ChannelProtocolTakeHandleRequest>( |
| std::move(msg), metadata); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::internal::NaturalCompleter<::test_protocols::ChannelProtocol::TakeHandle>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::ChannelProtocol>*>(interface)->TakeHandle( |
| decoded.value(), |
| completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| { |
| ::test_protocols::kChannelProtocol_MutateSocket_Ordinal, |
| [](void* interface, ::fidl::EncodedMessage& msg, ::fidl::WireFormatMetadata metadata, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fit::result decoded = ::fidl::StandaloneDecode<::test_protocols::ChannelProtocolMutateSocketRequest>( |
| std::move(msg), metadata); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::internal::NaturalCompleter<::test_protocols::ChannelProtocol::MutateSocket>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::ChannelProtocol>*>(interface)->MutateSocket( |
| decoded.value(), |
| 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::IncomingHeaderAndMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fidl::internal::Dispatch(impl, msg, storage_view, txn, entries_, entries_end_, &unknown_method_handler_entry_); |
| } |
| |
| void fidl::Server<::test_protocols::ChannelProtocol>::dispatch_message( |
| ::fidl::IncomingHeaderAndMessage&& 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__ |
| |
| 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 |
| |
| ::fit::result<::fidl::OneWayError> |
| 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::OneWayStatus status = client_base().SendOneWay(_encoded_message); |
| return ::fidl::internal::ToFitxResult(status); |
| } |
| namespace test_protocols { |
| |
| #endif // __Fuchsia__ |
| |
| } // namespace test_protocols |
| |
| #ifdef __Fuchsia__ |
| |
| ::fit::result<::fidl::OneWayError> |
| 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::OneWayStatus{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::EncodedMessage& msg, ::fidl::WireFormatMetadata metadata, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fit::result decoded = ::fidl::internal::DecodeTransactionalMessageWithoutBody( |
| msg, metadata); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::internal::NaturalCompleter<::test_protocols::DiscoverableProtocol::Method>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::DiscoverableProtocol>*>(interface)->Method( |
| |
| 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::IncomingHeaderAndMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fidl::internal::Dispatch(impl, msg, storage_view, txn, entries_, entries_end_, &unknown_method_handler_entry_); |
| } |
| |
| void fidl::Server<::test_protocols::DiscoverableProtocol>::dispatch_message( |
| ::fidl::IncomingHeaderAndMessage&& 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__ |
| |
| #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::IncomingHeaderAndMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fidl::internal::Dispatch(impl, msg, storage_view, txn, entries_, entries_end_, &unknown_method_handler_entry_); |
| } |
| |
| void fidl::Server<::test_protocols::AnotherDiscoverableProtocol>::dispatch_message( |
| ::fidl::IncomingHeaderAndMessage&& 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__ |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| ::fidl::Status fidl::SyncEventHandler<::test_protocols::PlatformServer>::HandleOneEvent( |
| ::fidl::UnownedClientEnd<::test_protocols::PlatformServer> client_end) { |
| ::fidl::internal::IncomingEventsStorage<::test_protocols::PlatformServer> event_storage; |
| fidl::internal::NaturalEventDispatcher<::test_protocols::PlatformServer> 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::PlatformServer>::entries_[] = {}; |
| |
| const ::fidl::internal::MethodEntry* fidl::internal::NaturalServerDispatcher<::test_protocols::PlatformServer>::entries_end_ = |
| &entries_[0]; |
| |
| void fidl::internal::NaturalServerDispatcher<::test_protocols::PlatformServer>::Dispatch(::fidl::Server<::test_protocols::PlatformServer>* impl, ::fidl::IncomingHeaderAndMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fidl::internal::Dispatch(impl, msg, storage_view, txn, entries_, entries_end_, &unknown_method_handler_entry_); |
| } |
| |
| void fidl::Server<::test_protocols::PlatformServer>::dispatch_message( |
| ::fidl::IncomingHeaderAndMessage&& msg, ::fidl::Transaction* txn, |
| ::fidl::internal::MessageStorageViewBase* storage_view) { |
| ::fidl::internal::NaturalServerDispatcher<::test_protocols::PlatformServer>::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(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); |
| }); |
| } |
| |
| ::fit::result<::fidl::OneWayError> |
| 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(std::move(request)); |
| |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| ::fidl::OneWayStatus 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(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); |
| } |
| |
| ::fit::result<::fidl::OneWayError> |
| 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(std::move(request)); |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| msg.Write(_client_end().handle()); |
| return ::fidl::internal::ToFitxResult(::fidl::OneWayStatus{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::IncomingHeaderAndMessage& msg, |
| ::fidl::internal::MessageStorageViewBase* storage_view) { |
| switch (msg.header()->ordinal) { |
| case ::test_protocols::kHandleRightsProtocol_AnEvent_Ordinal: { |
| ::fit::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 = std::move(decoded.value()); |
| event_handler()->AnEvent(event); |
| } |
| return ::fidl::Status::Ok(); |
| } |
| default: |
| std::move(msg).CloseHandles(); |
| return ::fidl::Status::UnknownOrdinal(); |
| } |
| } |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| ::fit::result<::fidl::OneWayError> 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(); |
| return ::fidl::internal::ToFitxResult(_inner().SendEvent(_encoded_message)); |
| } |
| |
| ::fit::result<::fidl::OneWayError> 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::OneWayStatus{::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::ResponseMessageConverter<::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::EncodedMessage& msg, ::fidl::WireFormatMetadata metadata, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fit::result decoded = ::fidl::StandaloneDecode<::test_protocols::HandleRightsProtocolNoResponseMethodRequest>( |
| std::move(msg), metadata); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::internal::NaturalCompleter<::test_protocols::HandleRightsProtocol::NoResponseMethod>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::HandleRightsProtocol>*>(interface)->NoResponseMethod( |
| decoded.value(), |
| completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| { |
| ::test_protocols::kHandleRightsProtocol_ResponseMethod_Ordinal, |
| [](void* interface, ::fidl::EncodedMessage& msg, ::fidl::WireFormatMetadata metadata, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fit::result decoded = ::fidl::StandaloneDecode<::test_protocols::HandleRightsProtocolResponseMethodRequest>( |
| std::move(msg), metadata); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::internal::NaturalCompleter<::test_protocols::HandleRightsProtocol::ResponseMethod>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::HandleRightsProtocol>*>(interface)->ResponseMethod( |
| decoded.value(), |
| 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::IncomingHeaderAndMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fidl::internal::Dispatch(impl, msg, storage_view, txn, entries_, entries_end_, &unknown_method_handler_entry_); |
| } |
| |
| void fidl::Server<::test_protocols::HandleRightsProtocol>::dispatch_message( |
| ::fidl::IncomingHeaderAndMessage&& 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 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(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(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(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(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(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(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::ResponseMessageConverter<::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::ResponseMessageConverter<::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::ResponseMessageConverter<::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::EncodedMessage& msg, ::fidl::WireFormatMetadata metadata, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fit::result decoded = ::fidl::StandaloneDecode<::test_protocols::WithProtocolEndsClientEndsRequest>( |
| std::move(msg), metadata); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::internal::NaturalCompleter<::test_protocols::WithProtocolEnds::ClientEnds>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::WithProtocolEnds>*>(interface)->ClientEnds( |
| decoded.value(), |
| completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| { |
| ::test_protocols::kWithProtocolEnds_ServerEnds_Ordinal, |
| [](void* interface, ::fidl::EncodedMessage& msg, ::fidl::WireFormatMetadata metadata, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fit::result decoded = ::fidl::StandaloneDecode<::test_protocols::WithProtocolEndsServerEndsRequest>( |
| std::move(msg), metadata); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::internal::NaturalCompleter<::test_protocols::WithProtocolEnds::ServerEnds>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::WithProtocolEnds>*>(interface)->ServerEnds( |
| decoded.value(), |
| completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| { |
| ::test_protocols::kWithProtocolEnds_StructContainingEnds_Ordinal, |
| [](void* interface, ::fidl::EncodedMessage& msg, ::fidl::WireFormatMetadata metadata, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fit::result decoded = ::fidl::StandaloneDecode<::test_protocols::WithProtocolEndsStructContainingEndsRequest>( |
| std::move(msg), metadata); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::internal::NaturalCompleter<::test_protocols::WithProtocolEnds::StructContainingEnds>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::WithProtocolEnds>*>(interface)->StructContainingEnds( |
| decoded.value(), |
| 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::IncomingHeaderAndMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fidl::internal::Dispatch(impl, msg, storage_view, txn, entries_, entries_end_, &unknown_method_handler_entry_); |
| } |
| |
| void fidl::Server<::test_protocols::WithProtocolEnds>::dispatch_message( |
| ::fidl::IncomingHeaderAndMessage&& 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 kManyParameters_Fifteen_Ordinal = 6423043252952467815lu; |
| |
| [[maybe_unused]] |
| constexpr inline ::fidl::MessageDynamicFlags kManyParameters_Fifteen_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod; |
| |
| #ifdef __Fuchsia__ |
| } // namespace test_protocols |
| |
| ::fit::result<::fidl::OneWayError> |
| fidl::internal::NaturalClientImpl<::test_protocols::ManyParameters>::Fifteen(const ::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(request); |
| |
| ::fidl::OutgoingMessage _encoded_message = _encoder.GetMessage(); |
| ::fidl::OneWayStatus status = client_base().SendOneWay(_encoded_message); |
| return ::fidl::internal::ToFitxResult(status); |
| } |
| namespace test_protocols { |
| |
| #endif // __Fuchsia__ |
| |
| } // namespace test_protocols |
| |
| #ifdef __Fuchsia__ |
| |
| ::fit::result<::fidl::OneWayError> |
| fidl::internal::NaturalSyncClientImpl<::test_protocols::ManyParameters>::Fifteen(const ::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(request); |
| ::fidl::OutgoingMessage msg = encoder.GetMessage(); |
| msg.Write(_client_end().handle()); |
| return ::fidl::internal::ToFitxResult(::fidl::OneWayStatus{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::EncodedMessage& msg, ::fidl::WireFormatMetadata metadata, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fit::result decoded = ::fidl::StandaloneDecode<::test_protocols::ManyParametersFifteenRequest>( |
| std::move(msg), metadata); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::internal::NaturalCompleter<::test_protocols::ManyParameters::Fifteen>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::ManyParameters>*>(interface)->Fifteen( |
| decoded.value(), |
| 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::IncomingHeaderAndMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fidl::internal::Dispatch(impl, msg, storage_view, txn, entries_, entries_end_, &unknown_method_handler_entry_); |
| } |
| |
| void fidl::Server<::test_protocols::ManyParameters>::dispatch_message( |
| ::fidl::IncomingHeaderAndMessage&& 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 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(const ::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 = request](NaturalMessageEncoder& encoder) mutable { |
| encoder.EncodeBody(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(const ::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(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(const ::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::ResponseMessageConverter<::test_protocols::MethodWithUnion::UnionMethod>::IntoDomainObject(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::EncodedMessage& msg, ::fidl::WireFormatMetadata metadata, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fit::result decoded = ::fidl::StandaloneDecode<::test_protocols::MethodWithUnionUnionMethodRequest>( |
| std::move(msg), metadata); |
| if (decoded.is_error()) { |
| return decoded.error_value(); |
| } |
| ::fidl::internal::NaturalCompleter<::test_protocols::MethodWithUnion::UnionMethod>::Sync completer(txn); |
| static_cast<::fidl::Server<::test_protocols::MethodWithUnion>*>(interface)->UnionMethod( |
| decoded.value(), |
| 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::IncomingHeaderAndMessage&& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fidl::internal::Dispatch(impl, msg, storage_view, txn, entries_, entries_end_, &unknown_method_handler_entry_); |
| } |
| |
| void fidl::Server<::test_protocols::MethodWithUnion>::dispatch_message( |
| ::fidl::IncomingHeaderAndMessage&& 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__ |
| |
| #pragma clang diagnostic pop |