blob: 7f81537d528c0f706e62c763797f8ac7d1e8ade5 [file] [log] [blame]
// Copyright 2019 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.
package codegen
const fragmentSendEventManagedTmpl = `
{{- define "SendEventManagedMethodSignature" -}}
Send{{ .Name }}Event(::zx::unowned_channel _channel {{- if .Response }}, {{ end }}{{ template "Params" .Response }})
{{- end }}
{{- define "SendEventManagedMethodDefinition" }}
zx_status_t {{ .LLProps.ProtocolName }}::{{ template "SendEventManagedMethodSignature" . }} {
{{ .Name }}Response::OwnedEncodedMessage _response{
{{- template "PassthroughMessageParams" .Response -}}
};
_response.Write(_channel->get());
return _response.status();
}
{{- end }}
`