2 * Copyright (C) 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-only
8 #ifndef LTTNG_CONDITION_SESSION_ROTATION_INTERNAL_H
9 #define LTTNG_CONDITION_SESSION_ROTATION_INTERNAL_H
11 #include "common/buffer-view.hpp"
13 #include <common/macros.hpp>
15 #include <lttng/condition/condition-internal.hpp>
16 #include <lttng/condition/evaluation-internal.hpp>
17 #include <lttng/condition/session-rotation.h>
18 #include <lttng/location.h>
20 struct lttng_condition_session_rotation {
21 struct lttng_condition parent;
25 struct lttng_condition_session_rotation_comm {
26 /* Length includes the trailing \0. */
27 uint32_t session_name_len;
31 struct lttng_evaluation_session_rotation {
32 struct lttng_evaluation parent;
34 struct lttng_trace_archive_location *location;
37 struct lttng_evaluation_session_rotation_comm {
43 lttng_condition_session_rotation_ongoing_create_from_payload(struct lttng_payload_view *view,
44 struct lttng_condition **condition);
47 lttng_condition_session_rotation_completed_create_from_payload(struct lttng_payload_view *view,
48 struct lttng_condition **condition);
50 struct lttng_evaluation *lttng_evaluation_session_rotation_ongoing_create(uint64_t id);
52 /* Ownership of location is transferred to the evaluation. */
53 struct lttng_evaluation *
54 lttng_evaluation_session_rotation_completed_create(uint64_t id,
55 struct lttng_trace_archive_location *location);
58 lttng_evaluation_session_rotation_ongoing_create_from_payload(struct lttng_payload_view *view,
59 struct lttng_evaluation **evaluation);
61 ssize_t lttng_evaluation_session_rotation_completed_create_from_payload(
62 struct lttng_payload_view *view, struct lttng_evaluation **evaluation);
64 #endif /* LTTNG_CONDITION_SESSION_ROTATION_INTERNAL_H */