lttng-ctl: add capture descriptor feature to event rule condition API
[lttng-tools.git] / include / lttng / condition / event-rule-internal.h
CommitLineData
683d081a
JR
1/*
2 * Copyright (C) 2019 Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only
5 *
6 */
7
8#ifndef LTTNG_CONDITION_EVENT_RULE_INTERNAL_H
9#define LTTNG_CONDITION_EVENT_RULE_INTERNAL_H
10
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>
38114013 15#include <common/dynamic-array.h>
683d081a
JR
16
17struct lttng_condition_event_rule {
18 struct lttng_condition parent;
19 struct lttng_event_rule *rule;
683d081a 20
38114013
PP
21 /* Array of `struct lttng_event_expr *`. */
22 struct lttng_dynamic_pointer_array capture_descriptors;
23};
683d081a
JR
24
25struct lttng_evaluation_event_rule {
26 struct lttng_evaluation parent;
27 char *name;
28};
29
30struct lttng_evaluation_event_rule_comm {
31 /* Includes the null terminator. */
32 uint32_t trigger_name_length;
33 /* Trigger name. */
34 char payload[];
35} LTTNG_PACKED;
36
37
38LTTNG_HIDDEN
39ssize_t lttng_condition_event_rule_create_from_payload(
40 struct lttng_payload_view *view,
41 struct lttng_condition **condition);
42
43LTTNG_HIDDEN
44enum lttng_condition_status
45lttng_condition_event_rule_borrow_rule_mutable(
46 const struct lttng_condition *condition,
47 struct lttng_event_rule **rule);
48
49LTTNG_HIDDEN
50struct lttng_evaluation *lttng_evaluation_event_rule_create(
51 const char* trigger_name);
52
53LTTNG_HIDDEN
54ssize_t lttng_evaluation_event_rule_create_from_payload(
55 struct lttng_payload_view *view,
56 struct lttng_evaluation **_evaluation);
57
58#endif /* LTTNG_CONDITION_EVENT_RULE_INTERNAL_H */
This page took 0.024754 seconds and 4 git commands to generate.