summaryrefslogtreecommitdiff
path: root/utils/ipc/generators/libcamera_templates/module_ipa_interface.h.tmpl
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2024-08-08 18:13:00 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2024-08-15 23:59:08 +0300
commit50c92cc7e2924009ecab3e4004448b01d687707c (patch)
treec22b49816a3c79dae4727780962aa0928df42b52 /utils/ipc/generators/libcamera_templates/module_ipa_interface.h.tmpl
parentd3bf27180ef1d91b86b7b87a2378e559eaff5455 (diff)
meson: Move all code generation scripts to utils/codegen/
We have multiple code generation scripts in utils/, mixed with other miscellaneous utilities, as well as a larger code base based on mojom in utils/ipc/. To make code sharing easier between the generator scripts, without creating a mess in the utils/ directory, move all the code generation code to utils/codegen/. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Diffstat (limited to 'utils/ipc/generators/libcamera_templates/module_ipa_interface.h.tmpl')
-rw-r--r--utils/ipc/generators/libcamera_templates/module_ipa_interface.h.tmpl84
1 files changed, 0 insertions, 84 deletions
diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_interface.h.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_interface.h.tmpl
deleted file mode 100644
index 4d88a3d7..00000000
--- a/utils/ipc/generators/libcamera_templates/module_ipa_interface.h.tmpl
+++ /dev/null
@@ -1,84 +0,0 @@
-{#-
- # SPDX-License-Identifier: LGPL-2.1-or-later
- # Copyright (C) 2020, Google Inc.
--#}
-{%- import "definition_functions.tmpl" as funcs -%}
-/* SPDX-License-Identifier: LGPL-2.1-or-later */
-/*
- * Copyright (C) 2020, Google Inc.
- *
- * Image Processing Algorithm interface for {{module_name}}
- *
- * This file is auto-generated. Do not edit.
- */
-
-#pragma once
-
-#include <libcamera/ipa/core_ipa_interface.h>
-#include <libcamera/ipa/ipa_interface.h>
-
-{% if has_map %}#include <map>{% endif %}
-{% if has_array %}#include <vector>{% endif %}
-
-namespace libcamera {
-{%- if has_namespace %}
-{% for ns in namespace %}
-namespace {{ns}} {
-{% endfor %}
-{%- endif %}
-
-{% for const in consts %}
-const {{const.kind|name}} {{const.mojom_name}} = {{const.value}};
-{% endfor %}
-
-enum class {{cmd_enum_name}} {
- Exit = 0,
-{%- for method in interface_main.methods %}
- {{method.mojom_name|cap}} = {{loop.index}},
-{%- endfor %}
-};
-
-enum class {{cmd_event_enum_name}} {
-{%- for method in interface_event.methods %}
- {{method.mojom_name|cap}} = {{loop.index}},
-{%- endfor %}
-};
-
-{% for enum in enums %}
-{{funcs.define_enum(enum)}}
-{% endfor %}
-
-{%- for struct in structs_nonempty %}
-{{funcs.define_struct(struct)}}
-{% endfor %}
-
-{#-
-Any consts or #defines should be moved to the mojom file.
-#}
-class {{interface_name}} : public IPAInterface
-{
-public:
-{% for method in interface_main.methods %}
- virtual {{method|method_return_value}} {{method.mojom_name}}(
-{%- for param in method|method_parameters %}
- {{param}}{{- "," if not loop.last}}
-{%- endfor -%}
-) = 0;
-{% endfor %}
-
-{%- for method in interface_event.methods %}
- Signal<
-{%- for param in method.parameters -%}
- {{"const " if not param|is_pod}}{{param|name}}{{" &" if not param|is_pod and not param|is_enum}}
- {{- ", " if not loop.last}}
-{%- endfor -%}
-> {{method.mojom_name}};
-{% endfor -%}
-};
-
-{%- if has_namespace %}
-{% for ns in namespace|reverse %}
-} /* namespace {{ns}} */
-{% endfor %}
-{%- endif %}
-} /* namespace libcamera */