blob: 23b6754fd021672fc3560daab693c90506c92db0 [file]
{{/*
// 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:WireWeakAsyncClientImpl:WireMessagingHeader" }}
{{- .Docs }}
{{- if .DocComments }}
//
{{- end }}
{{- if .Request.ClientAllocationV2.IsStack }}
// Allocates {{ .Request.ClientAllocationV2.StackBytes }} bytes of request buffer on the stack. The callback is stored on the heap.
{{- else }}
// The request and callback are allocated on the heap.
{{- end }}
{{- if ExperimentEnabled "api_coverage" }}
{{ .ApiCoverageMethodAnnotation }}
{{ end }}
{{ .WireThenable }} {{ .Name }}({{ RenderParams .RequestArgs }});
{{- if ExperimentEnabled "api_coverage" }}
{{ .ApiCoverageMethodAnnotation }}:end
{{ end }}
{{- end }}
{{- define "Method:WireWeakAsyncClientImpl:WireMessagingSource" }}
{{ if ExperimentEnabled "api_coverage" }}
{{ .ApiCoverageMethodAnnotation }}
{{ end }}
{{ .WireThenable }} {{ .Protocol.WireWeakAsyncClientImpl.NoLeading }}::{{ .Name }}(
{{- RenderParams .RequestArgs }}) {
{{ .WireTransactionalRequest }} _request{ {{ RenderForwardParams .RequestArgs }} };
return {{ .WireThenable }}{
_client_base(), ::fidl::WriteOptions{}, ::fidl::internal::AllowUnownedInputRef{}, &_request};
}
{{ if ExperimentEnabled "api_coverage" }}
{{ .ApiCoverageMethodAnnotation }}:end
{{ end }}
{{- end }}