Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / mojo / public / bindings / generators / cpp_templates / interface_declaration.tmpl
1 class {{interface.name}}Proxy;
2 class {{interface.name}}Stub;
3 {% if interface.peer %}
4 class {{interface.peer}};
5 {% endif %}
6
7 class {{interface.name}} {
8  public:
9   typedef {{interface.name}}Proxy _Proxy;
10   typedef {{interface.name}}Stub _Stub;
11 {% if interface.peer %}
12   typedef {{interface.peer}} _Peer;
13 {% else %}
14   typedef mojo::NoInterface _Peer;
15 {% endif %}
16
17 {#--- Enums #}
18 {%- for enum in interface.enums %}
19 {%    macro enum_def() %}{% include "enum_declaration.tmpl" %}{% endmacro %}
20   {{enum_def()|indent(2)}}
21 {%- endfor %}
22
23 {#--- Methods #}
24 {%  for method in interface.methods %}
25   virtual void {{method.name}}(
26 {%-   for param in method.parameters -%}
27     {{param.kind|cpp_const_wrapper_type}} {{param.name}}
28 {%-     if not loop.last %}, {% endif -%}
29 {%-   endfor -%}
30   ) = 0;
31 {%- endfor %}
32 };
33
34 typedef mojo::Interface<{{interface.name}}>::Handle {{interface.name}}Handle;
35 typedef mojo::Interface<{{interface.name}}>::ScopedHandle Scoped{{interface.name}}Handle;