Fix: missing includes in buffer-usage.h
[lttng-tools.git] / include / lttng / condition / buffer-usage.h
CommitLineData
a58c490f
JG
1/*
2 * Copyright (C) 2017 - Jérémie Galarneau <jeremie.galarneau@efficios.com>
3 *
4 * This library is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License, version 2.1 only,
6 * as published by the Free Software Foundation.
7 *
8 * This library is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11 * for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this library; if not, write to the Free Software Foundation,
15 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17
18#ifndef LTTNG_CONDITION_BUFFER_USAGE_H
19#define LTTNG_CONDITION_BUFFER_USAGE_H
20
9d744342
JG
21#include <lttng/condition/evaluation.h>
22#include <lttng/condition/condition.h>
b3a57d53
JG
23#include <stdint.h>
24#include <lttng/domain.h>
9d744342 25
a58c490f
JG
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30struct lttng_condition;
31struct lttng_evaluation;
32
33extern struct lttng_condition *
34lttng_condition_buffer_usage_low_create(void);
35
36extern struct lttng_condition *
37lttng_condition_buffer_usage_high_create(void);
38
39/* threshold_ratio expressed as [0.0, 1.0]. */
40extern enum lttng_condition_status
41lttng_condition_buffer_usage_get_threshold_ratio(
42 const struct lttng_condition *condition,
43 double *threshold_ratio);
44
45/* threshold_ratio expressed as [0.0, 1.0]. */
46extern enum lttng_condition_status
47lttng_condition_buffer_usage_set_threshold_ratio(
48 struct lttng_condition *condition,
49 double threshold_ratio);
50
51extern enum lttng_condition_status
52lttng_condition_buffer_usage_get_threshold(
53 const struct lttng_condition *condition,
54 uint64_t *threshold_bytes);
55
56extern enum lttng_condition_status
57lttng_condition_buffer_usage_set_threshold(
58 struct lttng_condition *condition,
59 uint64_t threshold_bytes);
60
61extern enum lttng_condition_status
62lttng_condition_buffer_usage_get_session_name(
63 const struct lttng_condition *condition,
64 const char **session_name);
65
66extern enum lttng_condition_status
67lttng_condition_buffer_usage_set_session_name(
68 struct lttng_condition *condition,
69 const char *session_name);
70
71extern enum lttng_condition_status
72lttng_condition_buffer_usage_get_channel_name(
73 const struct lttng_condition *condition,
74 const char **channel_name);
75
76extern enum lttng_condition_status
77lttng_condition_buffer_usage_set_channel_name(
78 struct lttng_condition *condition,
79 const char *channel_name);
80
81extern enum lttng_condition_status
82lttng_condition_buffer_usage_get_domain_type(
83 const struct lttng_condition *condition,
84 enum lttng_domain_type *type);
85
86extern enum lttng_condition_status
87lttng_condition_buffer_usage_set_domain_type(
88 struct lttng_condition *condition,
89 enum lttng_domain_type type);
90
91
92/* LTTng Condition Evaluation */
93extern enum lttng_evaluation_status
94lttng_evaluation_buffer_usage_get_usage_ratio(
95 const struct lttng_evaluation *evaluation,
96 double *usage_ratio);
97
98extern enum lttng_evaluation_status
99lttng_evaluation_buffer_usage_get_usage(
100 const struct lttng_evaluation *evaluation,
101 uint64_t *usage_bytes);
102
103#ifdef __cplusplus
104}
105#endif
106
107#endif /* LTTNG_CONDITION_BUFFER_USAGE_H */
This page took 0.037726 seconds and 4 git commands to generate.