liblttng-ctl: use lttng_payload for serialize/create_from_buffer
[lttng-tools.git] / include / lttng / condition / session-consumed-size-internal.h
CommitLineData
e8360425 1/*
ab5be9fa 2 * Copyright (C) 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
e8360425 3 *
ab5be9fa 4 * SPDX-License-Identifier: LGPL-2.1-only
e8360425 5 *
e8360425
JD
6 */
7
8#ifndef LTTNG_CONDITION_SESSION_CONSUMED_SIZE_INTERNAL_H
9#define LTTNG_CONDITION_SESSION_CONSUMED_SIZE_INTERNAL_H
10
11#include <lttng/condition/session-consumed-size.h>
12#include <lttng/condition/condition-internal.h>
13#include <lttng/condition/evaluation-internal.h>
aa52c986
JG
14#include <common/buffer-view.h>
15#include <common/macros.h>
e8360425 16
c0a66c84
JG
17struct lttng_payload;
18struct lttng_payload_view;
19
e8360425
JD
20struct lttng_condition_session_consumed_size {
21 struct lttng_condition parent;
22 struct {
23 bool set;
24 uint64_t value;
25 } consumed_threshold_bytes;
26 char *session_name;
27};
28
29struct lttng_condition_session_consumed_size_comm {
30 uint64_t consumed_threshold_bytes;
31 /* Length includes the trailing \0. */
32 uint32_t session_name_len;
33 char session_name[];
34} LTTNG_PACKED;
35
36struct lttng_evaluation_session_consumed_size {
37 struct lttng_evaluation parent;
38 uint64_t session_consumed;
39};
40
41struct lttng_evaluation_session_consumed_size_comm {
42 uint64_t session_consumed;
43} LTTNG_PACKED;
44
45LTTNG_HIDDEN
46struct lttng_evaluation *lttng_evaluation_session_consumed_size_create(
5f2c1c0f 47 uint64_t consumed);
e8360425
JD
48
49LTTNG_HIDDEN
c0a66c84
JG
50ssize_t lttng_condition_session_consumed_size_create_from_payload(
51 struct lttng_payload_view *view,
e8360425
JD
52 struct lttng_condition **condition);
53
54LTTNG_HIDDEN
c0a66c84
JG
55ssize_t lttng_evaluation_session_consumed_size_create_from_payload(
56 struct lttng_payload_view *view,
e8360425
JD
57 struct lttng_evaluation **evaluation);
58
59#endif /* LTTNG_CONDITION_SESSION_CONSUMED_SIZE_INTERNAL_H */
This page took 0.041159 seconds and 4 git commands to generate.