| OLD | NEW |
| 1 {% from "module_macros.tmpl" import enum_values %} | 1 {% from "module_macros.tmpl" import enum_values %} |
| 2 {% from "module_macros.tmpl" import struct_descriptor %} | 2 {% from "module_macros.tmpl" import struct_descriptor %} |
| 3 {% from "module_macros.tmpl" import union_descriptor %} | 3 {% from "module_macros.tmpl" import union_descriptor %} |
| 4 # Copyright 2014 The Chromium Authors. All rights reserved. | 4 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 5 # Use of this source code is governed by a BSD-style license that can be | 5 # Use of this source code is governed by a BSD-style license that can be |
| 6 # found in the LICENSE file. | 6 # found in the LICENSE file. |
| 7 | 7 |
| 8 import mojo_bindings.descriptor as _descriptor | 8 import mojo_bindings.descriptor as _descriptor |
| 9 import mojo_bindings.reflection as _reflection | 9 import mojo_bindings.reflection as _reflection |
| 10 {% if interfaces %} | 10 {% if interfaces %} |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 class {{union|name}}(object): | 40 class {{union|name}}(object): |
| 41 __metaclass__ = _reflection.MojoUnionType | 41 __metaclass__ = _reflection.MojoUnionType |
| 42 DESCRIPTOR = {{union_descriptor(union)|indent(2)}} | 42 DESCRIPTOR = {{union_descriptor(union)|indent(2)}} |
| 43 {% endfor %} | 43 {% endfor %} |
| 44 | 44 |
| 45 {% for interface in interfaces %} | 45 {% for interface in interfaces %} |
| 46 | 46 |
| 47 class {{interface|name}}(object): | 47 class {{interface|name}}(object): |
| 48 __metaclass__ = _interface_reflection.MojoInterfaceType | 48 __metaclass__ = _interface_reflection.MojoInterfaceType |
| 49 DESCRIPTOR = { | 49 DESCRIPTOR = { |
| 50 'fully_qualified_name': '{% if namespace %}{{namespace|replace(".","::")}}::
{% endif %}{{interface|fully_qualified_name|replace(".","::")}}', | 50 'fully_qualified_name': {% if interface.service_name %}'{{interface.service_
name}}'{% else %}None{% endif %}, |
| 51 'version': {{interface.version}}, | 51 'version': {{interface.version}}, |
| 52 'methods': [ | 52 'methods': [ |
| 53 {% for method in interface.methods %} | 53 {% for method in interface.methods %} |
| 54 { | 54 { |
| 55 'name': '{{method|name}}', | 55 'name': '{{method|name}}', |
| 56 'ordinal': {{method.ordinal}}, | 56 'ordinal': {{method.ordinal}}, |
| 57 'parameters': {{struct_descriptor(method.param_struct)|indent(8)}}, | 57 'parameters': {{struct_descriptor(method.param_struct)|indent(8)}}, |
| 58 {% if method.response_parameters != None %} | 58 {% if method.response_parameters != None %} |
| 59 'responses': {{struct_descriptor(method.response_param_struct)|indent(8)
}}, | 59 'responses': {{struct_descriptor(method.response_param_struct)|indent(8)
}}, |
| 60 {% endif %} | 60 {% endif %} |
| 61 }, | 61 }, |
| 62 {% endfor %} | 62 {% endfor %} |
| 63 ], | 63 ], |
| 64 } | 64 } |
| 65 {% endfor %} | 65 {% endfor %} |
| OLD | NEW |