Fix: missing header inclusions in buffer-usage.h
[lttng-tools.git] / include / lttng / condition / buffer-usage.h
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
21 #include <lttng/condition/evaluation.h>
22 #include <lttng/condition/condition.h>
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 struct lttng_condition;
29 struct lttng_evaluation;
30
31 extern struct lttng_condition *
32 lttng_condition_buffer_usage_low_create(void);
33
34 extern struct lttng_condition *
35 lttng_condition_buffer_usage_high_create(void);
36
37 /* threshold_ratio expressed as [0.0, 1.0]. */
38 extern enum lttng_condition_status
39 lttng_condition_buffer_usage_get_threshold_ratio(
40 const struct lttng_condition *condition,
41 double *threshold_ratio);
42
43 /* threshold_ratio expressed as [0.0, 1.0]. */
44 extern enum lttng_condition_status
45 lttng_condition_buffer_usage_set_threshold_ratio(
46 struct lttng_condition *condition,
47 double threshold_ratio);
48
49 extern enum lttng_condition_status
50 lttng_condition_buffer_usage_get_threshold(
51 const struct lttng_condition *condition,
52 uint64_t *threshold_bytes);
53
54 extern enum lttng_condition_status
55 lttng_condition_buffer_usage_set_threshold(
56 struct lttng_condition *condition,
57 uint64_t threshold_bytes);
58
59 extern enum lttng_condition_status
60 lttng_condition_buffer_usage_get_session_name(
61 const struct lttng_condition *condition,
62 const char **session_name);
63
64 extern enum lttng_condition_status
65 lttng_condition_buffer_usage_set_session_name(
66 struct lttng_condition *condition,
67 const char *session_name);
68
69 extern enum lttng_condition_status
70 lttng_condition_buffer_usage_get_channel_name(
71 const struct lttng_condition *condition,
72 const char **channel_name);
73
74 extern enum lttng_condition_status
75 lttng_condition_buffer_usage_set_channel_name(
76 struct lttng_condition *condition,
77 const char *channel_name);
78
79 extern enum lttng_condition_status
80 lttng_condition_buffer_usage_get_domain_type(
81 const struct lttng_condition *condition,
82 enum lttng_domain_type *type);
83
84 extern enum lttng_condition_status
85 lttng_condition_buffer_usage_set_domain_type(
86 struct lttng_condition *condition,
87 enum lttng_domain_type type);
88
89
90 /* LTTng Condition Evaluation */
91 extern enum lttng_evaluation_status
92 lttng_evaluation_buffer_usage_get_usage_ratio(
93 const struct lttng_evaluation *evaluation,
94 double *usage_ratio);
95
96 extern enum lttng_evaluation_status
97 lttng_evaluation_buffer_usage_get_usage(
98 const struct lttng_evaluation *evaluation,
99 uint64_t *usage_bytes);
100
101 #ifdef __cplusplus
102 }
103 #endif
104
105 #endif /* LTTNG_CONDITION_BUFFER_USAGE_H */
This page took 0.033616 seconds and 6 git commands to generate.