OLD | NEW |
| (Empty) |
1 {%- import "interface_macros.tmpl" as interface_macros %} | |
2 class {{interface.name}}Proxy; | |
3 class {{interface.name}}Stub; | |
4 | |
5 class {{interface.name}}RequestValidator; | |
6 {%- if interface|has_callbacks %} | |
7 class {{interface.name}}ResponseValidator; | |
8 {%- endif %} | |
9 {% if interface.client %} | |
10 class {{interface.client}}; | |
11 {% endif %} | |
12 | |
13 class {{interface.name}} { | |
14 public: | |
15 static const char* Name_; | |
16 | |
17 typedef {{interface.name}}Proxy Proxy_; | |
18 typedef {{interface.name}}Stub Stub_; | |
19 | |
20 typedef {{interface.name}}RequestValidator RequestValidator_; | |
21 {%- if interface|has_callbacks %} | |
22 typedef {{interface.name}}ResponseValidator ResponseValidator_; | |
23 {%- else %} | |
24 typedef mojo::PassThroughFilter ResponseValidator_; | |
25 {%- endif %} | |
26 {% if interface.client %} | |
27 typedef {{interface.client}} Client; | |
28 {% else %} | |
29 typedef mojo::NoInterface Client; | |
30 {% endif %} | |
31 | |
32 {#--- Constants #} | |
33 {%- for constant in interface.constants %} | |
34 static const {{constant.kind|cpp_pod_type}} {{constant.name}}; | |
35 {%- endfor %} | |
36 | |
37 {#--- Enums #} | |
38 {%- for enum in interface.enums %} | |
39 {% macro enum_def() %}{% include "enum_declaration.tmpl" %}{% endmacro %} | |
40 {{enum_def()|indent(2)}} | |
41 {%- endfor %} | |
42 | |
43 {#--- Methods #} | |
44 virtual ~{{interface.name}}() {} | |
45 | |
46 {%- for method in interface.methods %} | |
47 virtual void {{method.name}}({{interface_macros.declare_request_params("", met
hod)}}) = 0; | |
48 {%- endfor %} | |
49 }; | |
OLD | NEW |