OLD | NEW |
| (Empty) |
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. | |
4 | |
5 #if defined(__clang__) | |
6 #pragma clang diagnostic push | |
7 #pragma clang diagnostic ignored "-Wunused-private-field" | |
8 #endif | |
9 | |
10 #include "{{module.path}}.h" | |
11 | |
12 #include "mojo/public/cpp/bindings/lib/bindings_serialization.h" | |
13 #include "mojo/public/cpp/bindings/lib/message_builder.h" | |
14 | |
15 {%- if namespace %} | |
16 namespace {{namespace}} { | |
17 {%- endif %} | |
18 namespace internal { | |
19 namespace { | |
20 | |
21 #pragma pack(push, 1) | |
22 | |
23 {#--- Interface parameter definitions #} | |
24 {%- for interface in interfaces %} | |
25 {%- for method in interface.methods %} | |
26 {%- set method_name = "k%s_%s_Name"|format(interface.name, method.name) %} | |
27 const uint32_t {{method_name}} = {{method.ordinal}}; | |
28 {% set struct = interface|struct_from_method(method) %} | |
29 {%- include "params_definition.tmpl" %} | |
30 {%- if method.response_parameters != None %} | |
31 {%- set struct = interface|response_struct_from_method(method) %} | |
32 {%- include "params_definition.tmpl" %} | |
33 {%- endif %} | |
34 {%- endfor %} | |
35 {%- endfor %} | |
36 | |
37 #pragma pack(pop) | |
38 | |
39 } // namespace | |
40 | |
41 {#--- Struct destructors #} | |
42 {%- for struct in structs %} | |
43 {%- include "struct_destructor.tmpl" %} | |
44 {%- endfor %} | |
45 | |
46 {#--- Struct definitions #} | |
47 {% for struct in structs %} | |
48 {%- include "struct_definition.tmpl" %} | |
49 {%- endfor %} | |
50 | |
51 } // namespace internal | |
52 | |
53 {#--- Struct builder definitions #} | |
54 {%- for struct in structs %} | |
55 {%- include "struct_builder_definition.tmpl" %} | |
56 {%- endfor %} | |
57 | |
58 {#--- Interface definitions #} | |
59 {%- for interface in interfaces %} | |
60 {%- include "interface_definition.tmpl" %} | |
61 {%- endfor %} | |
62 {%- if namespace %} | |
63 } // namespace {{namespace}} | |
64 {%- endif %} | |
65 | |
66 #if defined(__clang__) | |
67 #pragma clang diagnostic pop | |
68 #endif | |
OLD | NEW |