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>
16 struct lttng_condition_event_rule
{
17 struct lttng_condition parent
;
18 struct lttng_event_rule
*rule
;
21 struct lttng_condition_event_rule_comm
{
22 /* length excludes the header's length. */
23 uint32_t event_rule_length
;
24 /* Event rule follows. */
28 struct lttng_evaluation_event_rule
{
29 struct lttng_evaluation parent
;
33 struct lttng_evaluation_event_rule_comm
{
34 /* Includes the null terminator. */
35 uint32_t trigger_name_length
;
42 ssize_t
lttng_condition_event_rule_create_from_payload(
43 struct lttng_payload_view
*view
,
44 struct lttng_condition
**condition
);
47 enum lttng_condition_status
48 lttng_condition_event_rule_borrow_rule_mutable(
49 const struct lttng_condition
*condition
,
50 struct lttng_event_rule
**rule
);
53 struct lttng_evaluation
*lttng_evaluation_event_rule_create(
54 const char* trigger_name
);
57 ssize_t
lttng_evaluation_event_rule_create_from_payload(
58 struct lttng_payload_view
*view
,
59 struct lttng_evaluation
**_evaluation
);
61 #endif /* LTTNG_CONDITION_EVENT_RULE_INTERNAL_H */