OLD | NEW |
1 {%- import "interface_macros.tmpl" as interface_macros %} | 1 {%- import "interface_macros.tmpl" as interface_macros %} |
2 class {{interface.name}}Proxy; | 2 class {{interface.name}}Proxy; |
3 class {{interface.name}}Stub; | 3 class {{interface.name}}Stub; |
4 | 4 |
5 class {{interface.name}}RequestValidator; | 5 class {{interface.name}}RequestValidator; |
6 {%- if interface|has_callbacks %} | 6 {%- if interface|has_callbacks %} |
7 class {{interface.name}}ResponseValidator; | 7 class {{interface.name}}ResponseValidator; |
8 {%- endif %} | 8 {%- endif %} |
9 | 9 |
10 class {{interface.name}} { | 10 class {{interface.name}} { |
11 public: | 11 public: |
12 static const char Name_[]; | 12 static const char Name_[]; |
13 static const uint32_t Version_ = {{interface.version}}; | 13 static const uint32_t Version_ = {{interface.version}}; |
| 14 static const bool PassesAssociatedKinds_ = {% if interface|passes_associated_k
inds %}true{% else %}false{% endif %}; |
14 | 15 |
15 using Proxy_ = {{interface.name}}Proxy; | 16 using Proxy_ = {{interface.name}}Proxy; |
16 using Stub_ = {{interface.name}}Stub; | 17 using Stub_ = {{interface.name}}Stub; |
17 | 18 |
18 using RequestValidator_ = {{interface.name}}RequestValidator; | 19 using RequestValidator_ = {{interface.name}}RequestValidator; |
19 {%- if interface|has_callbacks %} | 20 {%- if interface|has_callbacks %} |
20 using ResponseValidator_ = {{interface.name}}ResponseValidator; | 21 using ResponseValidator_ = {{interface.name}}ResponseValidator; |
21 {%- else %} | 22 {%- else %} |
22 using ResponseValidator_ = mojo::PassThroughFilter; | 23 using ResponseValidator_ = mojo::PassThroughFilter; |
23 {%- endif %} | 24 {%- endif %} |
(...skipping 16 matching lines...) Expand all Loading... |
40 {#--- Methods #} | 41 {#--- Methods #} |
41 virtual ~{{interface.name}}() {} | 42 virtual ~{{interface.name}}() {} |
42 | 43 |
43 {%- for method in interface.methods %} | 44 {%- for method in interface.methods %} |
44 {% if method.response_parameters != None %} | 45 {% if method.response_parameters != None %} |
45 using {{method.name}}Callback = {{interface_macros.declare_callback(method)}}; | 46 using {{method.name}}Callback = {{interface_macros.declare_callback(method)}}; |
46 {%- endif %} | 47 {%- endif %} |
47 virtual void {{method.name}}({{interface_macros.declare_request_params("", met
hod)}}) = 0; | 48 virtual void {{method.name}}({{interface_macros.declare_request_params("", met
hod)}}) = 0; |
48 {%- endfor %} | 49 {%- endfor %} |
49 }; | 50 }; |
OLD | NEW |