// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
{%- from 'cpp_macros.tmpl' import
include_guard, namespace_begin, namespace_end %}
{%- set header_guard = include_guard('PARAMS_DATA', module.path, variant) %}
#ifndef {{header_guard}}
#define {{header_guard}}
#include "mojo/public/cpp/bindings/lib/bindings_internal.h"
#include "mojo/public/cpp/bindings/lib/buffer.h"
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
namespace mojo::internal {
class ValidationContext;
}
{{namespace_begin(namespaces_as_array)}}
namespace internal {
{#--- Interface parameter definitions #}
{%- for interface in interfaces %}
{%- for method in interface.methods %}
{%- set struct = method.param_struct %}
{% include "struct_declaration.tmpl" %}
{%- if method.response_parameters != None %}
{%- set struct = method.response_param_struct %}
{% include "struct_declaration.tmpl" %}
{%- endif %}
{%- endfor %}
{%- endfor %}
} // namespace internal
{#--- Interface parameter definitions #}
{%- for interface in interfaces %}
{%- for method in interface.methods %}
{%- set struct = method.param_struct %}
{% include "struct_data_view_declaration.tmpl" %}
{%- if method.response_parameters != None %}
{%- set struct = method.response_param_struct %}
{% include "struct_data_view_declaration.tmpl" %}
{%- endif %}
{%- endfor %}
{%- endfor %}
{%- for interface in interfaces %}
{%- for method in interface.methods %}
{%- set struct = method.param_struct %}
{% include "struct_data_view_definition.tmpl" %}
{%- if method.response_parameters != None %}
{%- set struct = method.response_param_struct %}
{% include "struct_data_view_definition.tmpl" %}
{%- endif %}
{%- endfor %}
{%- endfor %}
{{namespace_end(namespaces_as_array)}}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
#endif // {{header_guard}}