blob: 4d88a3d77d0f30e2ff9ed23d79c92172a9edc5ac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
{#-
# 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 */
|