| {{/* | |
| // Copyright 2020 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:WireWeakSyncClientImpl:WireMessagingHeader" }} | |
| {{ .Docs }} | |
| {{- if .DocComments }} | |
| // | |
| {{- end }} | |
| // {{- template "Method:ClientAllocationComment:Helper" . }} | |
| {{- if ExperimentEnabled "api_coverage" }} | |
| {{ .ApiCoverageMethodAnnotation }} | |
| {{ end }} | |
| {{ .WireResult }} {{ .Name }}({{ RenderParams .RequestArgs }}); | |
| {{- if ExperimentEnabled "api_coverage" }} | |
| {{ .ApiCoverageMethodAnnotation }}:end | |
| {{ end }} | |
| {{- end }} | |
| {{- define "Method:WireWeakSyncClientImpl:WireMessagingSource" }} | |
| {{ EnsureNamespace "" }} | |
| {{ if ExperimentEnabled "api_coverage" }} | |
| {{ .ApiCoverageMethodAnnotation }} | |
| {{ end }} | |
| {{ .WireResult }} | |
| {{ .Protocol.WireWeakSyncClientImpl.NoLeading }}::{{ .Name }}({{ RenderParams .RequestArgs }}) { | |
| return _client_base()->MakeSyncCallWith( | |
| [&] (std::shared_ptr<::fidl::internal::AnyTransport> _transport) { | |
| {{ .WireTransactionalRequest }} _request{ {{ RenderForwardParams .RequestArgs }} }; | |
| {{- $transport := (printf "%s(_transport->get<%s>())" | |
| .Protocol.UnownedClientEnd .Transport.Type) }} | |
| return {{ .WireResult }}({{- RenderForwardParams (List $transport "&_request") }}); | |
| }); | |
| } | |
| {{ if ExperimentEnabled "api_coverage" }} | |
| {{ .ApiCoverageMethodAnnotation }}:end | |
| {{ end }} | |
| {{- end }} |