• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2018 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{%- set header_guard = "%s_SHARED_MESSAGE_IDS_H_"|format(
6        module.path|upper|replace("/","_")|replace(".","_")|
7            replace("-", "_")) %}
8
9#ifndef {{header_guard}}
10#define {{header_guard}}
11
12#include <stdint.h>
13
14{%- for namespace in namespaces_as_array %}
15namespace {{namespace}} {
16{%- endfor %}
17
18namespace internal {
19
20{% for interface in interfaces -%}
21{%-   for method in interface.methods -%}
22{%-     set method_name = "k%s_%s_Name"|format(interface.name, method.name) -%}
23{%-     if method.ordinal_comment %}
24// {{method.ordinal_comment}}
25{%-     endif %}
26constexpr uint32_t {{method_name}} = {{method.ordinal}};
27{%-  endfor %}
28{%- endfor %}
29
30}  // namespace internal
31{%- for namespace in namespaces_as_array|reverse %}
32}  // namespace {{namespace}}
33{%- endfor %}
34
35#endif  // {{header_guard}}
36