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 Associated{{interface.name}}Ptr(associatedInterfacePtrInfo) { | 10 function Associated{{interface.name}}Ptr(associatedInterfacePtrInfo) { |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 {%- endif %} | 197 {%- endif %} |
198 {%- endfor %} | 198 {%- endfor %} |
199 } | 199 } |
200 if (paramsClass === null) | 200 if (paramsClass === null) |
201 return validator.validationError.NONE; | 201 return validator.validationError.NONE; |
202 return paramsClass.validate(messageValidator, messageValidator.message.getHe
aderNumBytes()); | 202 return paramsClass.validate(messageValidator, messageValidator.message.getHe
aderNumBytes()); |
203 {%- endif %} | 203 {%- endif %} |
204 } | 204 } |
205 | 205 |
206 var {{interface.name}} = { | 206 var {{interface.name}} = { |
207 name: '{{namespace|replace(".","::")}}::{{interface.name}}', | 207 name: '{{module.namespace|replace(".","::")}}::{{interface.name}}', |
208 kVersion: {{interface.version}}, | 208 kVersion: {{interface.version}}, |
209 ptrClass: {{interface.name}}Ptr, | 209 ptrClass: {{interface.name}}Ptr, |
210 proxyClass: {{interface.name}}Proxy, | 210 proxyClass: {{interface.name}}Proxy, |
211 stubClass: {{interface.name}}Stub, | 211 stubClass: {{interface.name}}Stub, |
212 validateRequest: validate{{interface.name}}Request, | 212 validateRequest: validate{{interface.name}}Request, |
213 {%- if interface|has_callbacks %} | 213 {%- if interface|has_callbacks %} |
214 validateResponse: validate{{interface.name}}Response, | 214 validateResponse: validate{{interface.name}}Response, |
215 {%- else %} | 215 {%- else %} |
216 validateResponse: null, | 216 validateResponse: null, |
217 {%- endif %} | 217 {%- endif %} |
218 }; | 218 }; |
219 {#--- Interface Constants #} | 219 {#--- Interface Constants #} |
220 {%- for constant in interface.constants %} | 220 {%- for constant in interface.constants %} |
221 {{interface.name}}.{{constant.name}} = {{constant.value|expression_to_text}}, | 221 {{interface.name}}.{{constant.name}} = {{constant.value|expression_to_text}}, |
222 {%- endfor %} | 222 {%- endfor %} |
223 {#--- Interface Enums #} | 223 {#--- Interface Enums #} |
224 {%- from "enum_definition.tmpl" import enum_def -%} | 224 {%- from "enum_definition.tmpl" import enum_def -%} |
225 {%- for enum in interface.enums %} | 225 {%- for enum in interface.enums %} |
226 {{ enum_def("%s.%s"|format(interface.name, enum.name), enum) }} | 226 {{ enum_def("%s.%s"|format(interface.name, enum.name), enum) }} |
227 {%- endfor %} | 227 {%- endfor %} |
228 {{interface.name}}Stub.prototype.validator = validate{{interface.name}}Request
; | 228 {{interface.name}}Stub.prototype.validator = validate{{interface.name}}Request
; |
229 {%- if interface|has_callbacks %} | 229 {%- if interface|has_callbacks %} |
230 {{interface.name}}Proxy.prototype.validator = validate{{interface.name}}Respon
se; | 230 {{interface.name}}Proxy.prototype.validator = validate{{interface.name}}Respon
se; |
231 {%- else %} | 231 {%- else %} |
232 {{interface.name}}Proxy.prototype.validator = null; | 232 {{interface.name}}Proxy.prototype.validator = null; |
233 {%- endif %} | 233 {%- endif %} |
OLD | NEW |