| 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 {% if interface.peer %} | 4 {% if interface.client %} |
| 5 class {{interface.peer}}; | 5 class {{interface.client}}; |
| 6 {% endif %} | 6 {% endif %} |
| 7 | 7 |
| 8 class {{interface.name}} { | 8 class {{interface.name}} { |
| 9 public: | 9 public: |
| 10 typedef {{interface.name}}Proxy _Proxy; | 10 typedef {{interface.name}}Proxy Proxy_; |
| 11 typedef {{interface.name}}Stub _Stub; | 11 typedef {{interface.name}}Stub Stub_; |
| 12 {% if interface.peer %} | 12 {% if interface.client %} |
| 13 typedef {{interface.peer}} _Peer; | 13 typedef {{interface.client}} Client_; |
| 14 {% else %} | 14 {% else %} |
| 15 typedef mojo::NoInterface _Peer; | 15 typedef mojo::NoInterface Client_; |
| 16 {% endif %} | 16 {% endif %} |
| 17 | 17 |
| 18 {#--- Enums #} | 18 {#--- Enums #} |
| 19 {%- for enum in interface.enums %} | 19 {%- for enum in interface.enums %} |
| 20 {% macro enum_def() %}{% include "enum_declaration.tmpl" %}{% endmacro %} | 20 {% macro enum_def() %}{% include "enum_declaration.tmpl" %}{% endmacro %} |
| 21 {{enum_def()|indent(2)}} | 21 {{enum_def()|indent(2)}} |
| 22 {%- endfor %} | 22 {%- endfor %} |
| 23 | 23 |
| 24 {#--- Methods #} | 24 {#--- Methods #} |
| 25 virtual ~{{interface.name}}() {} |
| 26 {%- if interface.client %} |
| 27 // Called once before any other method. |
| 28 virtual void SetClient({{interface.client}}* client) = 0; |
| 29 {%- else %} |
| 30 virtual void SetClient(mojo::NoInterface* client) {} |
| 31 {%- endif %} |
| 25 {%- for method in interface.methods %} | 32 {%- for method in interface.methods %} |
| 26 virtual void {{method.name}}({{interface_macros.declare_request_params("", met
hod)}}) = 0; | 33 virtual void {{method.name}}({{interface_macros.declare_request_params("", met
hod)}}) = 0; |
| 27 {%- endfor %} | 34 {%- endfor %} |
| 28 }; | 35 }; |
| OLD | NEW |