summaryrefslogtreecommitdiff
path: root/utils/codegen/ipc/generators/mojom_libcamera_generator.py
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2024-09-03 00:36:56 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2024-09-03 15:25:45 +0300
commit0e333755ff3a27cfab4dcd5132b0c6dfe7a209aa (patch)
treec396db8d3454570febec66b86098c912f8d8f886 /utils/codegen/ipc/generators/mojom_libcamera_generator.py
parentac1c57fcf5dff06ae4e7e5fad7baa8f93c413e37 (diff)
utils: ipc: Include <string> in generated headers where needed
Depending on the types used in the IPA interface, generated headers may use the std::string class. Include <string> when needed. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
Diffstat (limited to 'utils/codegen/ipc/generators/mojom_libcamera_generator.py')
-rw-r--r--utils/codegen/ipc/generators/mojom_libcamera_generator.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/utils/codegen/ipc/generators/mojom_libcamera_generator.py b/utils/codegen/ipc/generators/mojom_libcamera_generator.py
index b8209e51..d9c620a0 100644
--- a/utils/codegen/ipc/generators/mojom_libcamera_generator.py
+++ b/utils/codegen/ipc/generators/mojom_libcamera_generator.py
@@ -467,6 +467,7 @@ class Generator(generator.Generator):
'enums': self.module.enums,
'has_array': len([x for x in self.module.kinds.keys() if x[0] == 'a']) > 0,
'has_map': len([x for x in self.module.kinds.keys() if x[0] == 'm']) > 0,
+ 'has_string': len([x for x in self.module.kinds.keys() if x[0] == 's']) > 0,
'has_namespace': self.module.mojom_namespace != '',
'interface_event': GetEventInterface(self.module.interfaces),
'interface_main': GetMainInterface(self.module.interfaces),
@@ -486,6 +487,7 @@ class Generator(generator.Generator):
'enums_gen_header': [x for x in self.module.enums if x.attributes is None or 'skipHeader' not in x.attributes],
'has_array': len([x for x in self.module.kinds.keys() if x[0] == 'a']) > 0,
'has_map': len([x for x in self.module.kinds.keys() if x[0] == 'm']) > 0,
+ 'has_string': len([x for x in self.module.kinds.keys() if x[0] == 's']) > 0,
'structs_gen_header': [x for x in self.module.structs if x.attributes is None or 'skipHeader' not in x.attributes],
'structs_gen_serializer': [x for x in self.module.structs if x.attributes is None or 'skipSerdes' not in x.attributes],
}