| // WARNING: This file is machine generated by fidlgen. |
| |
| // fidl_experiment = output_index_json |
| |
| #include <fidl/test.errorsyntax/cpp/wire_messaging.h> |
| |
| #include <memory> |
| |
| #pragma clang diagnostic push |
| #pragma clang diagnostic ignored "-Wshadow" |
| |
| namespace test_errorsyntax { |
| |
| [[maybe_unused]] |
| constexpr uint64_t kExampleUseOfErrorSyntax_ComposedCallWhichMayFail_Ordinal = 3565108794310607393lu; |
| |
| [[maybe_unused]] |
| constexpr ::fidl::MessageDynamicFlags kExampleUseOfErrorSyntax_ComposedCallWhichMayFail_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod; |
| |
| [[maybe_unused]] |
| constexpr uint64_t kExampleUseOfErrorSyntax_CallWhichMayFail_Ordinal = 3757408930698888354lu; |
| |
| [[maybe_unused]] |
| constexpr ::fidl::MessageDynamicFlags kExampleUseOfErrorSyntax_CallWhichMayFail_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod; |
| #ifdef __Fuchsia__ |
| } // namespace test_errorsyntax |
| |
| ::fidl::WireResult<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail>::WireResult( |
| ::fidl::UnownedClientEnd<::test_errorsyntax::ExampleUseOfErrorSyntax> client, |
| ::fidl::internal::TransactionalRequest<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail>* request) { |
| FIDL_INTERNAL_DISABLE_AUTO_VAR_INIT |
| ::fidl::internal::OwnedEncodedMessage<::fidl::internal::TransactionalRequest<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail>, ::fidl::internal::ChannelTransport> request_message( |
| ::fidl::internal::AllowUnownedInputRef{}, request); |
| auto& outgoing = request_message.GetOutgoingMessage(); |
| ::fidl::internal::IncomingMessageHandleStorage<::fidl::internal::TransactionalResponse<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail>> handle_storage; |
| ::fit::result decoded = ::fidl::internal::InplaceDecodeTransactionalResponse<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail>( |
| outgoing.Call(client.handle(), handle_storage.view(bytes_.view()), fidl::CallOptions{})); |
| SetStatus(::fidl::internal::StatusFromResult(decoded)); |
| if (ok()) { |
| decoded_ = std::move(decoded.value()); |
| ExtractValueFromDecoded(decoded_.pointer()); |
| } |
| } |
| namespace test_errorsyntax { |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| } // namespace test_errorsyntax |
| |
| ::fidl::WireUnownedResult<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail>::WireUnownedResult(::fidl::UnownedClientEnd<::test_errorsyntax::ExampleUseOfErrorSyntax> client_end, ::fidl::internal::AnyBufferAllocator& allocator, ::fidl::internal::TransactionalRequest<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail>* request) { |
| constexpr uint32_t buffer_size = ::fidl::SyncClientMethodBufferSizeInChannel<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail>(); |
| ::fit::result<::fidl::Error, ::fidl::BufferSpan> allocation = allocator.TryAllocate(buffer_size); |
| if (!allocation.is_ok()) { |
| SetStatus(allocation.error_value()); |
| return; |
| } |
| uint8_t* buffer = allocation->data; |
| constexpr uint32_t request_byte_capacity = ::fidl::MaxSizeInChannel< |
| ::fidl::internal::TransactionalRequest<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail>, ::fidl::MessageDirection::kSending>(); |
| uint8_t* request_bytes = buffer; |
| static_assert(buffer_size > request_byte_capacity); |
| uint32_t response_byte_capacity = buffer_size - request_byte_capacity; |
| uint8_t* response_bytes = &buffer[request_byte_capacity]; |
| |
| ::fidl::internal::UnownedEncodedMessage<::fidl::internal::TransactionalRequest<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail>> request_message( |
| request_bytes, request_byte_capacity, request); |
| auto& outgoing = request_message.GetOutgoingMessage(); |
| ::fidl::internal::IncomingMessageHandleStorage<::fidl::internal::TransactionalResponse<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail>> handle_storage; |
| ::fit::result decoded = ::fidl::internal::InplaceDecodeTransactionalResponse<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail>( |
| outgoing.Call( |
| client_end.handle(), |
| handle_storage.view(fidl::BufferSpan(response_bytes, response_byte_capacity)))); |
| SetStatus(::fidl::internal::StatusFromResult(decoded)); |
| if (ok()) { |
| decoded_ = std::move(decoded.value()); |
| ExtractValueFromDecoded(decoded_.pointer()); |
| } |
| } |
| namespace test_errorsyntax { |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| } // namespace test_errorsyntax |
| |
| ::fidl::WireResult<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail>::WireResult( |
| ::fidl::UnownedClientEnd<::test_errorsyntax::ExampleUseOfErrorSyntax> client, |
| ::fidl::internal::TransactionalRequest<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail>* request) { |
| FIDL_INTERNAL_DISABLE_AUTO_VAR_INIT |
| ::fidl::internal::OwnedEncodedMessage<::fidl::internal::TransactionalRequest<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail>, ::fidl::internal::ChannelTransport> request_message( |
| ::fidl::internal::AllowUnownedInputRef{}, request); |
| auto& outgoing = request_message.GetOutgoingMessage(); |
| ::fidl::internal::IncomingMessageHandleStorage<::fidl::internal::TransactionalResponse<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail>> handle_storage; |
| ::fit::result decoded = ::fidl::internal::InplaceDecodeTransactionalResponse<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail>( |
| outgoing.Call(client.handle(), handle_storage.view(bytes_.view()), fidl::CallOptions{})); |
| SetStatus(::fidl::internal::StatusFromResult(decoded)); |
| if (ok()) { |
| decoded_ = std::move(decoded.value()); |
| ExtractValueFromDecoded(decoded_.pointer()); |
| } |
| } |
| namespace test_errorsyntax { |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| } // namespace test_errorsyntax |
| |
| ::fidl::WireUnownedResult<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail>::WireUnownedResult(::fidl::UnownedClientEnd<::test_errorsyntax::ExampleUseOfErrorSyntax> client_end, ::fidl::internal::AnyBufferAllocator& allocator, ::fidl::internal::TransactionalRequest<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail>* request) { |
| constexpr uint32_t buffer_size = ::fidl::SyncClientMethodBufferSizeInChannel<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail>(); |
| ::fit::result<::fidl::Error, ::fidl::BufferSpan> allocation = allocator.TryAllocate(buffer_size); |
| if (!allocation.is_ok()) { |
| SetStatus(allocation.error_value()); |
| return; |
| } |
| uint8_t* buffer = allocation->data; |
| constexpr uint32_t request_byte_capacity = ::fidl::MaxSizeInChannel< |
| ::fidl::internal::TransactionalRequest<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail>, ::fidl::MessageDirection::kSending>(); |
| uint8_t* request_bytes = buffer; |
| static_assert(buffer_size > request_byte_capacity); |
| uint32_t response_byte_capacity = buffer_size - request_byte_capacity; |
| uint8_t* response_bytes = &buffer[request_byte_capacity]; |
| |
| ::fidl::internal::UnownedEncodedMessage<::fidl::internal::TransactionalRequest<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail>> request_message( |
| request_bytes, request_byte_capacity, request); |
| auto& outgoing = request_message.GetOutgoingMessage(); |
| ::fidl::internal::IncomingMessageHandleStorage<::fidl::internal::TransactionalResponse<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail>> handle_storage; |
| ::fit::result decoded = ::fidl::internal::InplaceDecodeTransactionalResponse<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail>( |
| outgoing.Call( |
| client_end.handle(), |
| handle_storage.view(fidl::BufferSpan(response_bytes, response_byte_capacity)))); |
| SetStatus(::fidl::internal::StatusFromResult(decoded)); |
| if (ok()) { |
| decoded_ = std::move(decoded.value()); |
| ExtractValueFromDecoded(decoded_.pointer()); |
| } |
| } |
| namespace test_errorsyntax { |
| |
| #endif // __Fuchsia__ |
| |
| } // namespace test_errorsyntax |
| |
| #ifdef __Fuchsia__ |
| |
| ::fidl::internal::WireThenable<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail> fidl::internal::WireWeakAsyncClientImpl<::test_errorsyntax::ExampleUseOfErrorSyntax>::ComposedCallWhichMayFail(::fidl::StringView s) { |
| ::fidl::internal::TransactionalRequest<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail> _request{s}; |
| return ::fidl::internal::WireThenable<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail>{ |
| _client_base(), ::fidl::WriteOptions{}, ::fidl::internal::AllowUnownedInputRef{}, &_request}; |
| } |
| |
| ::fidl::internal::WireThenable<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail> fidl::internal::WireWeakAsyncClientImpl<::test_errorsyntax::ExampleUseOfErrorSyntax>::CallWhichMayFail(::fidl::StringView s) { |
| ::fidl::internal::TransactionalRequest<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail> _request{s}; |
| return ::fidl::internal::WireThenable<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail>{ |
| _client_base(), ::fidl::WriteOptions{}, ::fidl::internal::AllowUnownedInputRef{}, &_request}; |
| } |
| ::fidl::internal::WireBufferThenable<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail> fidl::internal::WireWeakAsyncBufferClientImpl<::test_errorsyntax::ExampleUseOfErrorSyntax>::ComposedCallWhichMayFail(::fidl::StringView s) { |
| constexpr uint32_t _buffer_size = ::fidl::AsyncClientMethodBufferSizeInChannel<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail>(); |
| ::fidl::internal::TransactionalRequest<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail> _request{s}; |
| return ::fidl::internal::WireBufferThenable<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail>{ |
| _client_base(), ::fidl::WriteOptions{}, _allocator(), _buffer_size, &_request}; |
| } |
| ::fidl::internal::WireBufferThenable<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail> fidl::internal::WireWeakAsyncBufferClientImpl<::test_errorsyntax::ExampleUseOfErrorSyntax>::CallWhichMayFail(::fidl::StringView s) { |
| constexpr uint32_t _buffer_size = ::fidl::AsyncClientMethodBufferSizeInChannel<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail>(); |
| ::fidl::internal::TransactionalRequest<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail> _request{s}; |
| return ::fidl::internal::WireBufferThenable<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail>{ |
| _client_base(), ::fidl::WriteOptions{}, _allocator(), _buffer_size, &_request}; |
| } |
| |
| ::fidl::WireResult<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail> |
| fidl::internal::WireWeakSyncClientImpl<::test_errorsyntax::ExampleUseOfErrorSyntax>::ComposedCallWhichMayFail(::fidl::StringView s) { |
| return _client_base()->MakeSyncCallWith( |
| [&](std::shared_ptr<::fidl::internal::AnyTransport> _transport) { |
| ::fidl::internal::TransactionalRequest<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail> _request{s}; |
| return ::fidl::WireResult<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail>(::fidl::UnownedClientEnd<::test_errorsyntax::ExampleUseOfErrorSyntax>(_transport->get<::fidl::internal::ChannelTransport>()), &_request); |
| }); |
| } |
| |
| ::fidl::WireResult<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail> |
| fidl::internal::WireWeakSyncClientImpl<::test_errorsyntax::ExampleUseOfErrorSyntax>::CallWhichMayFail(::fidl::StringView s) { |
| return _client_base()->MakeSyncCallWith( |
| [&](std::shared_ptr<::fidl::internal::AnyTransport> _transport) { |
| ::fidl::internal::TransactionalRequest<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail> _request{s}; |
| return ::fidl::WireResult<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail>(::fidl::UnownedClientEnd<::test_errorsyntax::ExampleUseOfErrorSyntax>(_transport->get<::fidl::internal::ChannelTransport>()), &_request); |
| }); |
| } |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| ::fidl::Status fidl::WireSyncEventHandler<::test_errorsyntax::ExampleUseOfErrorSyntax>::HandleOneEvent( |
| ::fidl::UnownedClientEnd<::test_errorsyntax::ExampleUseOfErrorSyntax> client_end) { |
| ::fidl::internal::IncomingEventsStorage<::test_errorsyntax::ExampleUseOfErrorSyntax> event_storage; |
| fidl::internal::WireEventDispatcher<::test_errorsyntax::ExampleUseOfErrorSyntax> dispatcher{this}; |
| return HandleOneEventImpl_(client_end.channel(), event_storage.view(), dispatcher); |
| } |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| constexpr ::fidl::internal::MethodEntry fidl::internal::WireServerDispatcher<::test_errorsyntax::ExampleUseOfErrorSyntax>::entries_[] = { |
| { |
| ::test_errorsyntax::kExampleUseOfErrorSyntax_ComposedCallWhichMayFail_Ordinal, |
| [](void* interface, ::fidl::EncodedMessage& msg, ::fidl::WireFormatMetadata metadata, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fit::result decoded = ::fidl::StandaloneInplaceDecode<::test_errorsyntax_parent::wire::ParentUsesErrorSyntaxComposedCallWhichMayFailRequest>( |
| std::move(msg), metadata); |
| if (unlikely(!decoded.is_ok())) { |
| return decoded.error_value(); |
| } |
| ::fidl::internal::WireCompleter<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail>::Sync completer(txn); |
| reinterpret_cast<::fidl::WireServer<::test_errorsyntax::ExampleUseOfErrorSyntax>*>(interface)->ComposedCallWhichMayFail( |
| decoded.value().pointer(), |
| completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| { |
| ::test_errorsyntax::kExampleUseOfErrorSyntax_CallWhichMayFail_Ordinal, |
| [](void* interface, ::fidl::EncodedMessage& msg, ::fidl::WireFormatMetadata metadata, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| ::fit::result decoded = ::fidl::StandaloneInplaceDecode<::test_errorsyntax::wire::ExampleUseOfErrorSyntaxCallWhichMayFailRequest>( |
| std::move(msg), metadata); |
| if (unlikely(!decoded.is_ok())) { |
| return decoded.error_value(); |
| } |
| ::fidl::internal::WireCompleter<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail>::Sync completer(txn); |
| reinterpret_cast<::fidl::WireServer<::test_errorsyntax::ExampleUseOfErrorSyntax>*>(interface)->CallWhichMayFail( |
| decoded.value().pointer(), |
| completer); |
| return ::fidl::Status::Ok(); |
| }, |
| }, |
| }; |
| |
| const ::fidl::internal::MethodEntry* fidl::internal::WireServerDispatcher<::test_errorsyntax::ExampleUseOfErrorSyntax>::entries_end_ = |
| &entries_[2]; |
| |
| ::fidl::DispatchResult fidl::internal::WireServerDispatcher<::test_errorsyntax::ExampleUseOfErrorSyntax>::TryDispatch( |
| ::fidl::WireServer<::test_errorsyntax::ExampleUseOfErrorSyntax>* impl, ::fidl::IncomingHeaderAndMessage& msg, |
| internal::MessageStorageViewBase* storage_view, ::fidl::Transaction* txn) { |
| return ::fidl::internal::TryDispatch( |
| impl, msg, storage_view, txn, entries_, entries_end_); |
| } |
| |
| void fidl::internal::WireServerDispatcher<::test_errorsyntax::ExampleUseOfErrorSyntax>::Dispatch(::fidl::WireServer<::test_errorsyntax::ExampleUseOfErrorSyntax>* 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::WireServer<::test_errorsyntax::ExampleUseOfErrorSyntax>::dispatch_message( |
| ::fidl::IncomingHeaderAndMessage&& msg, ::fidl::Transaction* txn, |
| ::fidl::internal::MessageStorageViewBase* storage_view) { |
| ::fidl::internal::WireServerDispatcher<::test_errorsyntax::ExampleUseOfErrorSyntax>::Dispatch(this, std::move(msg), storage_view, txn); |
| } |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| void fidl::internal::WireCompleterImpl<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail>::Reply(::fit::result<uint32_t, ::test_errorsyntax_parent::wire::ParentUsesErrorSyntaxComposedCallWhichMayFailResponse*> result) { |
| if (result.is_ok()) { |
| return MakeReply(::test_errorsyntax_parent::wire::ParentUsesErrorSyntaxComposedCallWhichMayFailResult::WithResponse(::fidl::ObjectView<::test_errorsyntax_parent::wire::ParentUsesErrorSyntaxComposedCallWhichMayFailResponse>::FromExternal(result.value()))); |
| } |
| return ReplyError(std::move(result.error_value())); |
| } |
| |
| void fidl::internal::WireCompleterImpl<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail>::MakeReply(::test_errorsyntax_parent::wire::ParentUsesErrorSyntaxComposedCallWhichMayFailResult ParentUsesErrorSyntaxComposedCallWhichMayFailResult) { |
| ::fidl::internal::TransactionalResponse<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail> _response{ParentUsesErrorSyntaxComposedCallWhichMayFailResult}; |
| FIDL_INTERNAL_DISABLE_AUTO_VAR_INIT |
| ::fidl::internal::OwnedEncodedMessage< |
| ::fidl::internal::TransactionalResponse<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail>, ::fidl::internal::ChannelTransport> |
| _response_message{ |
| ::fidl::internal::AllowUnownedInputRef{}, &_response}; |
| return _core()->SendReply(&_response_message.GetOutgoingMessage(), |
| ::fidl::internal::OutgoingTransportContext()); |
| } |
| void fidl::internal::WireCompleterImpl<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail>::ReplySuccess(int64_t value) { |
| ::test_errorsyntax_parent::wire::ParentUsesErrorSyntaxComposedCallWhichMayFailResponse _response = ::test_errorsyntax_parent::wire::ParentUsesErrorSyntaxComposedCallWhichMayFailResponse{ |
| .value = std::move(value), |
| }; |
| return MakeReply(::test_errorsyntax_parent::wire::ParentUsesErrorSyntaxComposedCallWhichMayFailResult::WithResponse(::fidl::ObjectView<::test_errorsyntax_parent::wire::ParentUsesErrorSyntaxComposedCallWhichMayFailResponse>::FromExternal(&_response))); |
| } |
| |
| void fidl::internal::WireCompleterImpl<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail>::ReplyError(uint32_t error) { |
| return MakeReply(::test_errorsyntax_parent::wire::ParentUsesErrorSyntaxComposedCallWhichMayFailResult::WithErr(std::move(error))); |
| } |
| |
| void fidl::internal::WireBufferCompleterImpl<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail>::Reply(::fit::result<uint32_t, ::test_errorsyntax_parent::wire::ParentUsesErrorSyntaxComposedCallWhichMayFailResponse*> result) { |
| if (result.is_ok()) { |
| return MakeReply(::test_errorsyntax_parent::wire::ParentUsesErrorSyntaxComposedCallWhichMayFailResult::WithResponse(::fidl::ObjectView<::test_errorsyntax_parent::wire::ParentUsesErrorSyntaxComposedCallWhichMayFailResponse>::FromExternal(result.value()))); |
| } |
| return ReplyError(std::move(result.error_value())); |
| } |
| |
| void fidl::internal::WireBufferCompleterImpl<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail>::MakeReply(::test_errorsyntax_parent::wire::ParentUsesErrorSyntaxComposedCallWhichMayFailResult ParentUsesErrorSyntaxComposedCallWhichMayFailResult) { |
| ::fidl::internal::TransactionalResponse<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail> _response{ParentUsesErrorSyntaxComposedCallWhichMayFailResult}; |
| constexpr uint32_t _buffer_size = ::fidl::ServerReplyBufferSizeInChannel<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail>(); |
| ::fit::result<::fidl::Error, ::fidl::BufferSpan> _allocation = |
| _allocator().TryAllocate(_buffer_size); |
| if (!_allocation.is_ok()) { |
| ::fidl::OutgoingMessage _failure{_allocation.error_value()}; |
| return _core()->SendReply(&_failure, ::fidl::internal::OutgoingTransportContext()); |
| } |
| ::fidl::internal::UnownedEncodedMessage< |
| ::fidl::internal::TransactionalResponse<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail>, ::fidl::internal::ChannelTransport> |
| _response_message( |
| _allocation->data, _buffer_size, &_response); |
| return _core()->SendReply(&_response_message.GetOutgoingMessage(), |
| ::fidl::internal::OutgoingTransportContext()); |
| } |
| void fidl::internal::WireBufferCompleterImpl<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail>::ReplySuccess(int64_t value) { |
| ::test_errorsyntax_parent::wire::ParentUsesErrorSyntaxComposedCallWhichMayFailResponse _response = ::test_errorsyntax_parent::wire::ParentUsesErrorSyntaxComposedCallWhichMayFailResponse{ |
| .value = std::move(value), |
| }; |
| return MakeReply(::test_errorsyntax_parent::wire::ParentUsesErrorSyntaxComposedCallWhichMayFailResult::WithResponse(::fidl::ObjectView<::test_errorsyntax_parent::wire::ParentUsesErrorSyntaxComposedCallWhichMayFailResponse>::FromExternal(&_response))); |
| } |
| |
| void fidl::internal::WireBufferCompleterImpl<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail>::ReplyError(uint32_t error) { |
| return MakeReply(::test_errorsyntax_parent::wire::ParentUsesErrorSyntaxComposedCallWhichMayFailResult::WithErr(std::move(error))); |
| } |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| void fidl::internal::WireCompleterImpl<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail>::Reply(::fit::result<uint32_t, ::test_errorsyntax::wire::ExampleUseOfErrorSyntaxCallWhichMayFailResponse*> result) { |
| if (result.is_ok()) { |
| return MakeReply(::test_errorsyntax::wire::ExampleUseOfErrorSyntaxCallWhichMayFailResult::WithResponse(::fidl::ObjectView<::test_errorsyntax::wire::ExampleUseOfErrorSyntaxCallWhichMayFailResponse>::FromExternal(result.value()))); |
| } |
| return ReplyError(std::move(result.error_value())); |
| } |
| |
| void fidl::internal::WireCompleterImpl<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail>::MakeReply(::test_errorsyntax::wire::ExampleUseOfErrorSyntaxCallWhichMayFailResult ExampleUseOfErrorSyntaxCallWhichMayFailResult) { |
| ::fidl::internal::TransactionalResponse<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail> _response{ExampleUseOfErrorSyntaxCallWhichMayFailResult}; |
| FIDL_INTERNAL_DISABLE_AUTO_VAR_INIT |
| ::fidl::internal::OwnedEncodedMessage< |
| ::fidl::internal::TransactionalResponse<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail>, ::fidl::internal::ChannelTransport> |
| _response_message{ |
| ::fidl::internal::AllowUnownedInputRef{}, &_response}; |
| return _core()->SendReply(&_response_message.GetOutgoingMessage(), |
| ::fidl::internal::OutgoingTransportContext()); |
| } |
| void fidl::internal::WireCompleterImpl<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail>::ReplySuccess(int64_t value) { |
| ::test_errorsyntax::wire::ExampleUseOfErrorSyntaxCallWhichMayFailResponse _response = ::test_errorsyntax::wire::ExampleUseOfErrorSyntaxCallWhichMayFailResponse{ |
| .value = std::move(value), |
| }; |
| return MakeReply(::test_errorsyntax::wire::ExampleUseOfErrorSyntaxCallWhichMayFailResult::WithResponse(::fidl::ObjectView<::test_errorsyntax::wire::ExampleUseOfErrorSyntaxCallWhichMayFailResponse>::FromExternal(&_response))); |
| } |
| |
| void fidl::internal::WireCompleterImpl<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail>::ReplyError(uint32_t error) { |
| return MakeReply(::test_errorsyntax::wire::ExampleUseOfErrorSyntaxCallWhichMayFailResult::WithErr(std::move(error))); |
| } |
| |
| void fidl::internal::WireBufferCompleterImpl<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail>::Reply(::fit::result<uint32_t, ::test_errorsyntax::wire::ExampleUseOfErrorSyntaxCallWhichMayFailResponse*> result) { |
| if (result.is_ok()) { |
| return MakeReply(::test_errorsyntax::wire::ExampleUseOfErrorSyntaxCallWhichMayFailResult::WithResponse(::fidl::ObjectView<::test_errorsyntax::wire::ExampleUseOfErrorSyntaxCallWhichMayFailResponse>::FromExternal(result.value()))); |
| } |
| return ReplyError(std::move(result.error_value())); |
| } |
| |
| void fidl::internal::WireBufferCompleterImpl<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail>::MakeReply(::test_errorsyntax::wire::ExampleUseOfErrorSyntaxCallWhichMayFailResult ExampleUseOfErrorSyntaxCallWhichMayFailResult) { |
| ::fidl::internal::TransactionalResponse<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail> _response{ExampleUseOfErrorSyntaxCallWhichMayFailResult}; |
| constexpr uint32_t _buffer_size = ::fidl::ServerReplyBufferSizeInChannel<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail>(); |
| ::fit::result<::fidl::Error, ::fidl::BufferSpan> _allocation = |
| _allocator().TryAllocate(_buffer_size); |
| if (!_allocation.is_ok()) { |
| ::fidl::OutgoingMessage _failure{_allocation.error_value()}; |
| return _core()->SendReply(&_failure, ::fidl::internal::OutgoingTransportContext()); |
| } |
| ::fidl::internal::UnownedEncodedMessage< |
| ::fidl::internal::TransactionalResponse<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail>, ::fidl::internal::ChannelTransport> |
| _response_message( |
| _allocation->data, _buffer_size, &_response); |
| return _core()->SendReply(&_response_message.GetOutgoingMessage(), |
| ::fidl::internal::OutgoingTransportContext()); |
| } |
| void fidl::internal::WireBufferCompleterImpl<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail>::ReplySuccess(int64_t value) { |
| ::test_errorsyntax::wire::ExampleUseOfErrorSyntaxCallWhichMayFailResponse _response = ::test_errorsyntax::wire::ExampleUseOfErrorSyntaxCallWhichMayFailResponse{ |
| .value = std::move(value), |
| }; |
| return MakeReply(::test_errorsyntax::wire::ExampleUseOfErrorSyntaxCallWhichMayFailResult::WithResponse(::fidl::ObjectView<::test_errorsyntax::wire::ExampleUseOfErrorSyntaxCallWhichMayFailResponse>::FromExternal(&_response))); |
| } |
| |
| void fidl::internal::WireBufferCompleterImpl<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail>::ReplyError(uint32_t error) { |
| return MakeReply(::test_errorsyntax::wire::ExampleUseOfErrorSyntaxCallWhichMayFailResult::WithErr(std::move(error))); |
| } |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| void ::fidl::internal::TransactionalRequest<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail>::_InitHeader() { |
| ::fidl::InitTxnHeader(&header, 0, ::test_errorsyntax::kExampleUseOfErrorSyntax_ComposedCallWhichMayFail_Ordinal, ::test_errorsyntax::kExampleUseOfErrorSyntax_ComposedCallWhichMayFail_DynamicFlags); |
| } |
| |
| #endif // __Fuchsia__ |
| |
| void ::fidl::internal::TransactionalResponse<::test_errorsyntax::ExampleUseOfErrorSyntax::ComposedCallWhichMayFail>::_InitHeader() { |
| ::fidl::InitTxnHeader(&header, 0, ::test_errorsyntax::kExampleUseOfErrorSyntax_ComposedCallWhichMayFail_Ordinal, ::test_errorsyntax::kExampleUseOfErrorSyntax_ComposedCallWhichMayFail_DynamicFlags); |
| } |
| |
| #ifdef __Fuchsia__ |
| void ::fidl::internal::TransactionalRequest<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail>::_InitHeader() { |
| ::fidl::InitTxnHeader(&header, 0, ::test_errorsyntax::kExampleUseOfErrorSyntax_CallWhichMayFail_Ordinal, ::test_errorsyntax::kExampleUseOfErrorSyntax_CallWhichMayFail_DynamicFlags); |
| } |
| |
| #endif // __Fuchsia__ |
| |
| void ::fidl::internal::TransactionalResponse<::test_errorsyntax::ExampleUseOfErrorSyntax::CallWhichMayFail>::_InitHeader() { |
| ::fidl::InitTxnHeader(&header, 0, ::test_errorsyntax::kExampleUseOfErrorSyntax_CallWhichMayFail_Ordinal, ::test_errorsyntax::kExampleUseOfErrorSyntax_CallWhichMayFail_DynamicFlags); |
| } |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| #pragma clang diagnostic pop |