2 * Copyright (C) 2019 Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-only
8 #ifndef LTTNG_CONDITION_EVENT_RULE_INTERNAL_H
9 #define LTTNG_CONDITION_EVENT_RULE_INTERNAL_H
11 #include <lttng/condition/condition-internal.h>
12 #include <common/buffer-view.h>
13 #include <common/macros.h>
14 #include <lttng/condition/evaluation-internal.h>
15 #include <common/dynamic-array.h>
17 struct lttng_capture_descriptor
{
18 struct lttng_event_expr
*event_expression
;
19 struct lttng_bytecode
*bytecode
;
22 struct lttng_condition_event_rule
{
23 struct lttng_condition parent
;
24 struct lttng_event_rule
*rule
;
26 /* Array of `struct lttng_capture_descriptor *`. */
27 struct lttng_dynamic_pointer_array capture_descriptors
;
30 struct lttng_evaluation_event_rule
{
31 struct lttng_evaluation parent
;
35 struct lttng_evaluation_event_rule_comm
{
36 /* Includes the null terminator. */
37 uint32_t trigger_name_length
;
44 ssize_t
lttng_condition_event_rule_create_from_payload(
45 struct lttng_payload_view
*view
,
46 struct lttng_condition
**condition
);
49 enum lttng_condition_status
50 lttng_condition_event_rule_borrow_rule_mutable(
51 const struct lttng_condition
*condition
,
52 struct lttng_event_rule
**rule
);
55 struct lttng_evaluation
*lttng_evaluation_event_rule_create(
56 const char* trigger_name
);
59 ssize_t
lttng_evaluation_event_rule_create_from_payload(
60 struct lttng_payload_view
*view
,
61 struct lttng_evaluation
**_evaluation
);
63 #endif /* LTTNG_CONDITION_EVENT_RULE_INTERNAL_H */