| // Copyright 2021 The ChromiumOS Authors |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| {%- macro namespace_begin() %} |
| {%- for namespace in namespaces_as_array %} |
| namespace {{namespace}} { |
| {%- endfor %} |
| {%- endmacro %} |
| |
| {%- macro namespace_end() %} |
| {%- for namespace in namespaces_as_array|reverse %} |
| } // namespace {{namespace}} |
| {%- endfor %} |
| {%- endmacro %} |
| |
| #include "{{module.path}}-connectivity.h" |
| |
| #include <base/check.h> |
| #include <base/functional/callback_helpers.h> |
| #include <base/logging.h> |
| |
| #include "diagnostics/bindings/connectivity/local_state.h" |
| #include "diagnostics/bindings/connectivity/remote_state.h" |
| #include "diagnostics/bindings/connectivity/utils.h" |
| |
| {%- for imp in module.imports %} |
| #include "{{imp.path}}-connectivity.h" |
| {% endfor %} |
| |
| {{namespace_begin()}} |
| |
| {%- for interface in module.interfaces %} |
| {% include "test-provider.cc.j2" %} |
| {% include "test-consumer.cc.j2" %} |
| {% for enum in interface.enums %} |
| {% include "enum-generator.cc.j2" %} |
| {% endfor %} |
| {%- endfor %} |
| |
| {%- for struct in module.structs %} |
| {% include "struct-generator.cc.j2" %} |
| {% for enum in struct.enums %} |
| {% include "enum-generator.cc.j2" %} |
| {% endfor %} |
| {% endfor %} |
| |
| {% for union in module.unions %} |
| {% include "union-generator.cc.j2" %} |
| {% endfor %} |
| |
| {% for enum in module.enums %} |
| {% include "enum-generator.cc.j2" %} |
| {% endfor %} |
| |
| {{namespace_end()}} |