Add a basic .clang-tidy file and fix typedef warnings
[lttng-tools.git] / include / lttng / condition / evaluation-internal.hpp
... / ...
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.hpp>
14#include <stdbool.h>
15#include <sys/types.h>
16
17struct lttng_payload;
18struct lttng_payload_view;
19
20using evaluation_destroy_cb = void (*)(struct lttng_evaluation *);
21using evaluation_serialize_cb = int (*)(const struct lttng_evaluation *, struct lttng_payload *);
22
23struct lttng_evaluation_comm {
24 /* enum lttng_condition_type type */
25 int8_t type;
26 char payload[];
27} LTTNG_PACKED;
28
29struct lttng_evaluation {
30 enum lttng_condition_type type;
31 evaluation_serialize_cb serialize;
32 evaluation_destroy_cb destroy;
33};
34
35void lttng_evaluation_init(struct lttng_evaluation *evaluation,
36 enum lttng_condition_type type);
37
38ssize_t lttng_evaluation_create_from_payload(
39 const struct lttng_condition *condition,
40 struct lttng_payload_view *view,
41 struct lttng_evaluation **evaluation);
42
43int lttng_evaluation_serialize(const struct lttng_evaluation *evaluation,
44 struct lttng_payload *payload);
45
46#endif /* LTTNG_EVALUATION_INTERNAL_H */
This page took 0.0227 seconds and 4 git commands to generate.