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