OLD | NEW |
| (Empty) |
1 {%- import "interface_macros.tmpl" as interface_macros %} | |
2 class {{interface.name}}Proxy; | |
3 class {{interface.name}}Stub; | |
4 {% if interface.peer %} | |
5 class {{interface.peer}}; | |
6 {% endif %} | |
7 | |
8 class {{interface.name}} { | |
9 public: | |
10 typedef {{interface.name}}Proxy _Proxy; | |
11 typedef {{interface.name}}Stub _Stub; | |
12 {% if interface.peer %} | |
13 typedef {{interface.peer}} _Peer; | |
14 {% else %} | |
15 typedef mojo::NoInterface _Peer; | |
16 {% endif %} | |
17 | |
18 {#--- Enums #} | |
19 {%- for enum in interface.enums %} | |
20 {% macro enum_def() %}{% include "enum_declaration.tmpl" %}{% endmacro %} | |
21 {{enum_def()|indent(2)}} | |
22 {%- endfor %} | |
23 | |
24 {#--- Methods #} | |
25 {%- for method in interface.methods %} | |
26 virtual void {{method.name}}({{interface_macros.declare_request_params(method)
}}) = 0; | |
27 {%- endfor %} | |
28 }; | |
29 | |
30 // A typesafe variant of MessagePipeHandle. | |
31 typedef mojo::Interface<{{interface.name}}>::Handle {{interface.name}}Handle; | |
32 | |
33 // A typesafe variant of ScopedMessagePipeHandle. | |
34 typedef mojo::Interface<{{interface.name}}>::ScopedHandle Scoped{{interface.name
}}Handle; | |
OLD | NEW |