Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1648)

Unified Diff: mojo/public/tools/bindings/generators/python_templates/module.py.tmpl

Issue 2250183003: Make the fuchsia mojo/public repo the source of truth. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/public/tools/bindings/generators/python_templates/module.py.tmpl
diff --git a/mojo/public/tools/bindings/generators/python_templates/module.py.tmpl b/mojo/public/tools/bindings/generators/python_templates/module.py.tmpl
deleted file mode 100644
index c60f1fd1462fe570cd67b70ffd0a9db54fd837c6..0000000000000000000000000000000000000000
--- a/mojo/public/tools/bindings/generators/python_templates/module.py.tmpl
+++ /dev/null
@@ -1,65 +0,0 @@
-{% from "module_macros.tmpl" import enum_values %}
-{% from "module_macros.tmpl" import struct_descriptor %}
-{% from "module_macros.tmpl" import union_descriptor %}
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import mojo_bindings.descriptor as _descriptor
-import mojo_bindings.reflection as _reflection
-{% if interfaces %}
-import mojo_bindings.interface_reflection as _interface_reflection
-{% endif %}
-{% if imports %}
-
-{% for import in imports %}
-import {{import.python_module}}
-{% endfor %}
-{% endif %}
-{#--- Constants #}
-{% if module.constants %}
-
-{% for constant in module.constants %}
-{{constant|name}} = {{constant.value|expression_to_text}}
-{% endfor %}
-{% endif %}
-{% for enum in enums %}
-
-class {{enum|name}}(object):
- __metaclass__ = _reflection.MojoEnumType
- VALUES = {{enum_values(enum)|indent(2)}}
-{% endfor %}
-{% for struct in structs %}
-
-class {{struct|name}}(object):
- __metaclass__ = _reflection.MojoStructType
- DESCRIPTOR = {{struct_descriptor(struct)|indent(2)}}
-{% endfor %}
-{% for union in unions %}
-
-class {{union|name}}(object):
- __metaclass__ = _reflection.MojoUnionType
- DESCRIPTOR = {{union_descriptor(union)|indent(2)}}
-{% endfor %}
-
-{% for interface in interfaces %}
-
-class {{interface|name}}(object):
- __metaclass__ = _interface_reflection.MojoInterfaceType
- DESCRIPTOR = {
- 'fully_qualified_name': {% if interface.service_name %}'{{interface.service_name}}'{% else %}None{% endif %},
- 'version': {{interface.version}},
- 'methods': [
-{% for method in interface.methods %}
- {
- 'name': '{{method|name}}',
- 'ordinal': {{method.ordinal}},
- 'parameters': {{struct_descriptor(method.param_struct)|indent(8)}},
-{% if method.response_parameters != None %}
- 'responses': {{struct_descriptor(method.response_param_struct)|indent(8)}},
-{% endif %}
- },
-{% endfor %}
- ],
- }
-{% endfor %}

Powered by Google App Engine
This is Rietveld 408576698