| Index: mojo/public/bindings/generators/cpp_templates/interface_macros.tmpl
|
| diff --git a/mojo/public/bindings/generators/cpp_templates/interface_macros.tmpl b/mojo/public/bindings/generators/cpp_templates/interface_macros.tmpl
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..70b6091821503b248b9fc232ce196eeab0725e10
|
| --- /dev/null
|
| +++ b/mojo/public/bindings/generators/cpp_templates/interface_macros.tmpl
|
| @@ -0,0 +1,23 @@
|
| +{%- macro declare_params(parameters) %}
|
| +{%- for param in parameters -%}
|
| +{{param.kind|cpp_const_wrapper_type}} in_{{param.name}}
|
| +{%- if not loop.last %}, {% endif %}
|
| +{%- endfor %}
|
| +{%- endmacro %}
|
| +
|
| +{%- macro declare_callback(method) -%}
|
| +mojo::Callback<void(
|
| +{%- for param in method.response_parameters -%}
|
| +{{param.kind|cpp_result_type}}
|
| +{%- if not loop.last %}, {% endif %}
|
| +{%- endfor -%}
|
| +)>
|
| +{%- endmacro -%}
|
| +
|
| +{%- macro declare_request_params(method) -%}
|
| +{{declare_params(method.parameters)}}
|
| +{%- if method.response_parameters != None -%}
|
| +{%- if method.parameters %}, {% endif %}
|
| +const {{declare_callback(method)}}& callback
|
| +{%- endif -%}
|
| +{%- endmacro -%}
|
|
|