summaryrefslogtreecommitdiff
path: root/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl
diff options
context:
space:
mode:
authorPaul Elder <paul.elder@ideasonboard.com>2022-08-03 19:51:06 +0900
committerPaul Elder <paul.elder@ideasonboard.com>2022-10-18 18:51:33 +0900
commit207c9e1c1d73dc062d68bf0dbb27a0b58c7581a2 (patch)
treed6c56ad0476363441d95bfba80dd5f4e848b68ab /utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl
parentfc6b5f49e176b7b8750175e2eb37825f5919b6d9 (diff)
utils: ipc: Add support for Flags
Add Flags<E> as a supported type in the IPA interface. It is used in mojom with the [flags] attribute. Any field or parameter type E that is prefixed with the [flags] attribute will direct the code generator to generate the type name "Flags<E>" and appropriate serialization/deserialization code for Flags<E> instead of for E. It is usable and has been tested in struct members, function input and output parameters, and Signal parameters. This does not add support for returning Flags as direct return values. Additionally, the [scopedEnum] attribute can be used on enum definitions, which will instruct the code generator to convert it to an enum class instead of a raw enum. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl')
-rw-r--r--utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl
index c308dd10..ed270f5c 100644
--- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl
+++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl
@@ -46,7 +46,7 @@ public:
{%- 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}}
+ {{"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}};