blob: bf8901395d2250a55c019ea0c81a5064c9acf77b [file] [log] [blame]
{#- TODO(vardhan): This template produces crazy amounts of whitespace. Clean
this stuff up (it involves digging through all the templates included here. -#}
{%- import "struct_macros.tmpl" as struct_macros %}
{%- import "interface_macros.tmpl" as interface_macros -%}
{%- set header_guard = "%s_H_"|
format(module.path|upper|replace("/","_")|replace(".","_")) -%}
// NOTE: This file was generated by the Mojo bindings generator.
#ifndef {{header_guard}}
#define {{header_guard}}
#include <iosfwd>
#include <stdint.h>
#include "mojo/public/cpp/bindings/array.h"
#include "mojo/public/cpp/bindings/callback.h"
#include "mojo/public/cpp/bindings/interface_ptr.h"
#include "mojo/public/cpp/bindings/interface_handle.h"
#include "mojo/public/cpp/bindings/interface_request.h"
#include "mojo/public/cpp/bindings/lib/control_message_handler.h"
#include "mojo/public/cpp/bindings/lib/control_message_proxy.h"
#include "mojo/public/cpp/bindings/map.h"
#include "mojo/public/cpp/bindings/message_validator.h"
#include "mojo/public/cpp/bindings/no_interface.h"
#include "mojo/public/cpp/bindings/string.h"
#include "mojo/public/cpp/bindings/struct_ptr.h"
#include "mojo/public/cpp/system/buffer.h"
#include "mojo/public/cpp/system/data_pipe.h"
#include "mojo/public/cpp/system/handle.h"
#include "mojo/public/cpp/system/message_pipe.h"
#include "{{module.path}}-common.h"
{%- for import in imports %}
#include "{{import.module.path}}.h"
{%- endfor %}
{%- for namespace in namespaces_as_array %}
namespace {{namespace}} {
{%- endfor %}
// --- Interface Forward Declarations ---
{% for interface in interfaces %}
using {{interface.name}}Ptr = mojo::InterfacePtr<{{interface.name}}>;
{% endfor %}
// --- Interface Proxies ---
{% for interface in interfaces %}
{% include "interface_proxy_declaration.tmpl" %}
{%- endfor %}
// --- Interface Stubs ---
{% for interface in interfaces %}
{% include "interface_stub_declaration.tmpl" %}
{%- endfor %}
{%- for namespace in namespaces_as_array|reverse %}
} // namespace {{namespace}}
{%- endfor %}
#endif // {{header_guard}}