| 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}}Ptr(handleOrPtrInfo) { | 5 function {{interface.name}}Ptr(handleOrPtrInfo) { |
| 6 this.ptr = new bindings.InterfacePtrController({{interface.name}}, | 6 this.ptr = new bindings.InterfacePtrController({{interface.name}}, |
| 7 handleOrPtrInfo); | 7 handleOrPtrInfo); |
| 8 } | 8 } |
| 9 | 9 |
| 10 function {{interface.name}}Proxy(receiver) { | 10 function {{interface.name}}Proxy(receiver) { |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 {%- endfor %} | 162 {%- endfor %} |
| 163 } | 163 } |
| 164 if (paramsClass === null) | 164 if (paramsClass === null) |
| 165 return validator.validationError.NONE; | 165 return validator.validationError.NONE; |
| 166 return paramsClass.validate(messageValidator, messageValidator.message.getHe
aderNumBytes()); | 166 return paramsClass.validate(messageValidator, messageValidator.message.getHe
aderNumBytes()); |
| 167 {%- endif %} | 167 {%- endif %} |
| 168 } | 168 } |
| 169 | 169 |
| 170 var {{interface.name}} = { | 170 var {{interface.name}} = { |
| 171 name: '{{namespace|replace(".","::")}}::{{interface.name}}', | 171 name: '{{namespace|replace(".","::")}}::{{interface.name}}', |
| 172 kVersion: {{interface.version}}, |
| 172 ptrClass: {{interface.name}}Ptr, | 173 ptrClass: {{interface.name}}Ptr, |
| 173 proxyClass: {{interface.name}}Proxy, | 174 proxyClass: {{interface.name}}Proxy, |
| 174 stubClass: {{interface.name}}Stub, | 175 stubClass: {{interface.name}}Stub, |
| 175 validateRequest: validate{{interface.name}}Request, | 176 validateRequest: validate{{interface.name}}Request, |
| 176 {%- if interface|has_callbacks %} | 177 {%- if interface|has_callbacks %} |
| 177 validateResponse: validate{{interface.name}}Response, | 178 validateResponse: validate{{interface.name}}Response, |
| 178 {%- else %} | 179 {%- else %} |
| 179 validateResponse: null, | 180 validateResponse: null, |
| 180 {%- endif %} | 181 {%- endif %} |
| 181 }; | 182 }; |
| 182 {#--- Interface Constants #} | 183 {#--- Interface Constants #} |
| 183 {%- for constant in interface.constants %} | 184 {%- for constant in interface.constants %} |
| 184 {{interface.name}}.{{constant.name}} = {{constant.value|expression_to_text}}, | 185 {{interface.name}}.{{constant.name}} = {{constant.value|expression_to_text}}, |
| 185 {%- endfor %} | 186 {%- endfor %} |
| 186 {#--- Interface Enums #} | 187 {#--- Interface Enums #} |
| 187 {%- from "enum_definition.tmpl" import enum_def -%} | 188 {%- from "enum_definition.tmpl" import enum_def -%} |
| 188 {%- for enum in interface.enums %} | 189 {%- for enum in interface.enums %} |
| 189 {{ enum_def("%s.%s"|format(interface.name, enum.name), enum) }} | 190 {{ enum_def("%s.%s"|format(interface.name, enum.name), enum) }} |
| 190 {%- endfor %} | 191 {%- endfor %} |
| 191 {{interface.name}}Stub.prototype.validator = validate{{interface.name}}Request
; | 192 {{interface.name}}Stub.prototype.validator = validate{{interface.name}}Request
; |
| 192 {%- if interface|has_callbacks %} | 193 {%- if interface|has_callbacks %} |
| 193 {{interface.name}}Proxy.prototype.validator = validate{{interface.name}}Respon
se; | 194 {{interface.name}}Proxy.prototype.validator = validate{{interface.name}}Respon
se; |
| 194 {%- else %} | 195 {%- else %} |
| 195 {{interface.name}}Proxy.prototype.validator = null; | 196 {{interface.name}}Proxy.prototype.validator = null; |
| 196 {%- endif %} | 197 {%- endif %} |
| OLD | NEW |