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 <lttng/condition/session-rotation.h>
12 #include <lttng/condition/condition-internal.h>
13 #include <lttng/condition/evaluation-internal.h>
14 #include "common/buffer-view.h"
15 #include <lttng/location.h>
16 #include <common/macros.h>
22 struct lttng_condition_session_rotation
{
23 struct lttng_condition parent
;
27 struct lttng_condition_session_rotation_comm
{
28 /* Length includes the trailing \0. */
29 uint32_t session_name_len
;
33 struct lttng_evaluation_session_rotation
{
34 struct lttng_evaluation parent
;
36 struct lttng_trace_archive_location
*location
;
39 struct lttng_evaluation_session_rotation_comm
{
44 ssize_t
lttng_condition_session_rotation_ongoing_create_from_payload(
45 struct lttng_payload_view
*view
,
46 struct lttng_condition
**condition
);
48 ssize_t
lttng_condition_session_rotation_completed_create_from_payload(
49 struct lttng_payload_view
*view
,
50 struct lttng_condition
**condition
);
52 struct lttng_evaluation
*lttng_evaluation_session_rotation_ongoing_create(
55 /* Ownership of location is transferred to the evaluation. */
56 struct lttng_evaluation
*lttng_evaluation_session_rotation_completed_create(
58 struct lttng_trace_archive_location
*location
);
60 ssize_t
lttng_evaluation_session_rotation_ongoing_create_from_payload(
61 struct lttng_payload_view
*view
,
62 struct lttng_evaluation
**evaluation
);
64 ssize_t
lttng_evaluation_session_rotation_completed_create_from_payload(
65 struct lttng_payload_view
*view
,
66 struct lttng_evaluation
**evaluation
);
72 #endif /* LTTNG_CONDITION_SESSION_ROTATION_INTERNAL_H */