| {{/* |
| // Copyright 2021 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| */}} |
| |
| |
| {{- define "Method:ClientImplOnewayBuffer:WireMessagingHeader" }} |
| {{ .Docs }} |
| {{- if .DocComments }} |
| // |
| {{- end }} |
| // Caller provides the backing storage for FIDL message. |
| ::fidl::Status {{ .Name }}({{ RenderParams .RequestArgs }}); |
| {{ end }} |
| |
| |
| {{- define "Method:ClientImplOnewayBuffer:WireMessagingSource" }} |
| ::fidl::Status {{ .Protocol.WireWeakOnewayBufferClientImpl.NoLeading }}::{{ .Name }}( |
| {{- RenderParams .RequestArgs }}) { |
| constexpr uint32_t _buffer_size = ::fidl::AsyncClientMethodBufferSizeInChannel<{{ .Marker }}>(); |
| ::fitx::result<::fidl::Error, ::fidl::BufferSpan> _allocation = |
| _allocator().TryAllocate(_buffer_size); |
| if (!_allocation.is_ok()) { |
| return _allocation.error_value(); |
| } |
| |
| {{ .WireTransactionalRequest }} _request{ {{ RenderForwardParams .RequestArgs }} }; |
| ::fidl::unstable::UnownedEncodedMessage<{{ .WireTransactionalRequest }}> _request_message( |
| _allocation->data, _buffer_size, &_request); |
| return _client_base()->SendOneWay(_request_message.GetOutgoingMessage()); |
| } |
| {{- end }} |