1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
6 #pragma clang diagnostic push
7 #pragma clang diagnostic ignored "-Wunused-private-field"
10 #include "{{module.path}}.h"
12 #include "mojo/public/bindings/lib/bindings_serialization.h"
13 #include "mojo/public/bindings/lib/message_builder.h"
15 namespace {{namespace}} {
21 {#--- Interface parameter definitions #}
22 {%- for interface in interfaces %}
23 {%- for method in interface.methods %}
24 {%- set method_name = "k%s_%s_Name"|format(interface.name, method.name) %}
25 const uint32_t {{method_name}} = {{method.ordinal}};
26 {% set struct = interface|struct_from_method(method) %}
27 {%- include "params_definition.tmpl" %}
28 {%- if method.response_parameters != None %}
29 {%- set struct = interface|response_struct_from_method(method) %}
30 {%- include "params_definition.tmpl" %}
39 {#--- Struct destructors #}
40 {%- for struct in structs %}
41 {%- include "struct_destructor.tmpl" %}
44 {#--- Struct definitions #}
45 {% for struct in structs %}
46 {%- include "struct_definition.tmpl" %}
49 } // namespace internal
51 {#--- Struct builder definitions #}
52 {%- for struct in structs %}
53 {%- include "struct_builder_definition.tmpl" %}
56 {#--- Interface definitions #}
57 {%- for interface in interfaces %}
58 {%- include "interface_definition.tmpl" %}
60 } // namespace {{namespace}}
62 #if defined(__clang__)
63 #pragma clang diagnostic pop