SoW-2019-0007-2: Dynamic Snapshot: Triggers send partial event payload with notifications
[deliverable/lttng-tools.git] / include / lttng / condition / evaluation-internal.h
... / ...
CommitLineData
1/*
2 * Copyright (C) 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only
5 *
6 */
7
8#ifndef LTTNG_EVALUATION_INTERNAL_H
9#define LTTNG_EVALUATION_INTERNAL_H
10
11#include <lttng/condition/evaluation.h>
12#include <lttng/condition/condition.h>
13#include <common/macros.h>
14#include <common/buffer-view.h>
15#include <common/dynamic-buffer.h>
16#include <stdbool.h>
17#include <sys/types.h>
18
19typedef void (*evaluation_destroy_cb)(struct lttng_evaluation *evaluation);
20typedef int (*evaluation_serialize_cb)(
21 const struct lttng_evaluation *evaluation,
22 struct lttng_dynamic_buffer *buf);
23
24struct lttng_evaluation_comm {
25 /* enum lttng_condition_type type */
26 int8_t type;
27 char payload[];
28} LTTNG_PACKED;
29
30struct lttng_evaluation {
31 enum lttng_condition_type type;
32 evaluation_serialize_cb serialize;
33 evaluation_destroy_cb destroy;
34};
35
36LTTNG_HIDDEN
37void lttng_evaluation_init(struct lttng_evaluation *evaluation,
38 enum lttng_condition_type type);
39
40LTTNG_HIDDEN
41ssize_t lttng_evaluation_create_from_buffer(
42 const struct lttng_condition *condition,
43 const struct lttng_buffer_view *view,
44 struct lttng_evaluation **evaluation);
45
46LTTNG_HIDDEN
47int lttng_evaluation_serialize(const struct lttng_evaluation *evaluation,
48 struct lttng_dynamic_buffer *buf);
49
50#endif /* LTTNG_EVALUATION_INTERNAL_H */
This page took 0.025252 seconds and 5 git commands to generate.