Move to kernel style SPDX license identifiers
[lttng-tools.git] / include / lttng / condition / session-rotation-internal.h
CommitLineData
c19092cd 1/*
ab5be9fa 2 * Copyright (C) 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
c19092cd 3 *
ab5be9fa 4 * SPDX-License-Identifier: LGPL-2.1-only
c19092cd 5 *
c19092cd
JG
6 */
7
8#ifndef LTTNG_CONDITION_SESSION_ROTATION_INTERNAL_H
9#define LTTNG_CONDITION_SESSION_ROTATION_INTERNAL_H
10
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>
aa52c986 16#include <common/macros.h>
c19092cd
JG
17
18struct lttng_condition_session_rotation {
19 struct lttng_condition parent;
20 char *session_name;
21};
22
23struct lttng_condition_session_rotation_comm {
24 /* Length includes the trailing \0. */
25 uint32_t session_name_len;
26 char session_name[];
27} LTTNG_PACKED;
28
29struct lttng_evaluation_session_rotation {
30 struct lttng_evaluation parent;
31 uint64_t id;
32 struct lttng_trace_archive_location *location;
33};
34
35struct lttng_evaluation_session_rotation_comm {
36 uint64_t id;
37 uint8_t has_location;
38} LTTNG_PACKED;
39
40LTTNG_HIDDEN
41ssize_t lttng_condition_session_rotation_ongoing_create_from_buffer(
42 const struct lttng_buffer_view *view,
43 struct lttng_condition **condition);
44
45LTTNG_HIDDEN
46ssize_t lttng_condition_session_rotation_completed_create_from_buffer(
47 const struct lttng_buffer_view *view,
48 struct lttng_condition **condition);
49
50LTTNG_HIDDEN
51struct lttng_evaluation *lttng_evaluation_session_rotation_ongoing_create(
52 uint64_t id);
53
54/* Ownership of location is transferred to the evaluation. */
55LTTNG_HIDDEN
56struct lttng_evaluation *lttng_evaluation_session_rotation_completed_create(
57 uint64_t id,
58 struct lttng_trace_archive_location *location);
59
60LTTNG_HIDDEN
61ssize_t lttng_evaluation_session_rotation_ongoing_create_from_buffer(
62 const struct lttng_buffer_view *view,
63 struct lttng_evaluation **evaluation);
64
65LTTNG_HIDDEN
66ssize_t lttng_evaluation_session_rotation_completed_create_from_buffer(
67 const struct lttng_buffer_view *view,
68 struct lttng_evaluation **evaluation);
69
70#endif /* LTTNG_CONDITION_SESSION_ROTATION_INTERNAL_H */
This page took 0.032691 seconds and 5 git commands to generate.