OLD | NEW |
1 {%- for method in interface.methods %} | 1 {%- for method in interface.methods %} |
2 var k{{interface.name}}_{{method.name}}_Name = {{method.ordinal}}; | 2 var k{{interface.name}}_{{method.name}}_Name = {{method.ordinal}}; |
3 {%- endfor %} | 3 {%- endfor %} |
4 | 4 |
5 function {{interface.name}}Proxy(receiver) { | 5 function {{interface.name}}Proxy(receiver) { |
6 this.receiver_ = receiver; | 6 this.receiver_ = receiver; |
7 } | 7 } |
8 | 8 |
9 {%- for method in interface.methods %} | 9 {%- for method in interface.methods %} |
10 {{interface.name}}Proxy.prototype.{{method.name|stylize_method}} = function( | 10 {{interface.name}}Proxy.prototype.{{method.name|stylize_method}} = function( |
(...skipping 26 matching lines...) Expand all Loading... |
37 this.{{method.name|stylize_method}}( | 37 this.{{method.name|stylize_method}}( |
38 {%- for parameter in method.parameters -%} | 38 {%- for parameter in method.parameters -%} |
39 params.{{parameter.name}}{% if not loop.last %}, {% endif %} | 39 params.{{parameter.name}}{% if not loop.last %}, {% endif %} |
40 {%- endfor %}); | 40 {%- endfor %}); |
41 return true; | 41 return true; |
42 {%- endfor %} | 42 {%- endfor %} |
43 default: | 43 default: |
44 return false; | 44 return false; |
45 } | 45 } |
46 }; | 46 }; |
| 47 |
| 48 {#--- Enums #} |
| 49 {%- from "enum_definition.tmpl" import enum_def -%} |
| 50 {% for enum in interface.enums %} |
| 51 {{ enum_def("%sProxy.%s"|format(interface.name, enum.name), enum)}} |
| 52 {{interface.name}}Stub.{{enum.name}} = {{interface.name}}Proxy.{{enum.name}}; |
| 53 {%- endfor %} |
OLD | NEW |