| {{/* |
| // 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 "Filename:NaturalMessagingHeader" -}} |
| fidl/{{ .LibraryDots }}/cpp/natural_messaging.h |
| {{- end }} |
| |
| {{- define "File:NaturalMessagingHeader" -}} |
| {{- UseUnified -}} |
| {{- SetTransport "Channel" -}} |
| |
| // WARNING: This file is machine generated by fidlgen_llcpp. |
| |
| #pragma once |
| |
| {{ "" }} |
| {{- /* Include library headers from dependencies. */}} |
| {{ range .Dependencies -}} |
| #include <{{ . | Filename "NaturalMessagingHeader" }}> |
| {{ end -}} |
| |
| {{- /* When the library name only has one component, it is always special. |
| Those libraries should not define business logic types or protocols, and we |
| do not support them in the bindings. */}} |
| {{- if not .SingleComponentLibraryName }} |
| |
| #include <lib/fidl/cpp/client.h> |
| #include <lib/fidl/cpp/internal/thenable.h> |
| #include <lib/fidl/cpp/natural_types.h> |
| #include <lib/fidl/cpp/unified_messaging.h> |
| #include <lib/fidl/cpp/channel.h> |
| |
| #include <{{ .Library | Filename "Markers" }}> |
| #include <{{ .Library | Filename "NaturalTypesHeader" }}> |
| #include <{{ .Library | Filename "WireMessagingHeader" }}> |
| |
| {{ "" }} |
| |
| {{ EnsureNamespace "fidl" }} |
| {{ "" }} |
| |
| {{- /* Declare natural extensions to the wire messaging layer. */}} |
| {{- range .Decls }} |
| {{- if Eq .Kind Kinds.Protocol }}{{ $protocol := . }} |
| {{- range $transport, $_ := .Transports }} |
| {{- if eq $transport "Channel" -}} |
| {{- template "Protocol:NaturalMessagingHeader" $protocol }} |
| {{ "" }} |
| {{- template "Protocol:Client:NaturalMessagingHeader" $protocol }} |
| {{ "" }} |
| {{- template "Protocol:Caller:NaturalMessagingHeader" $protocol }} |
| {{ "" }} |
| {{- template "Protocol:EventHandler:NaturalMessagingHeader" $protocol }} |
| {{ "" }} |
| {{- template "Protocol:EventSender:NaturalMessagingHeader" $protocol }} |
| {{ "" }} |
| {{- template "Protocol:Interface:NaturalMessagingHeader" $protocol }} |
| {{ "" }} |
| {{- template "Protocol:Dispatcher:NaturalMessagingHeader" $protocol }} |
| {{ "" }} |
| {{- /* TODO(fxbug.dev/60240): Add more */}} |
| {{- end }} |
| {{- end }} |
| {{- end }} |
| {{- end }} |
| |
| {{- end }}{{/* if not SingleComponentLibraryName */}} |
| |
| {{ UnsetTransport -}} |
| {{ EndOfFile }} |
| {{ end }} |