common: compile libcompat as C++
[lttng-tools.git] / include / lttng / action / rate-policy-internal.h
1 /*
2 * Copyright (C) 2021 Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only
5 *
6 */
7
8 #ifndef LTTNG_RATE_POLICY_INTERNAL_H
9 #define LTTNG_RATE_POLICY_INTERNAL_H
10
11 #include <common/macros.h>
12 #include <common/payload-view.h>
13 #include <lttng/action/rate-policy.h>
14 #include <lttng/lttng-error.h>
15 #include <stdbool.h>
16
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20
21 struct mi_writer;
22
23 int lttng_rate_policy_serialize(struct lttng_rate_policy *rate_policy,
24 struct lttng_payload *buf);
25
26 ssize_t lttng_rate_policy_create_from_payload(struct lttng_payload_view *view,
27 struct lttng_rate_policy **rate_policy);
28
29 bool lttng_rate_policy_is_equal(const struct lttng_rate_policy *a,
30 const struct lttng_rate_policy *b);
31
32 const char *lttng_rate_policy_type_string(
33 enum lttng_rate_policy_type rate_policy_type);
34
35 struct lttng_rate_policy *lttng_rate_policy_copy(
36 const struct lttng_rate_policy *source);
37
38 bool lttng_rate_policy_should_execute(
39 const struct lttng_rate_policy *policy, uint64_t counter);
40
41 enum lttng_error_code lttng_rate_policy_mi_serialize(
42 const struct lttng_rate_policy *policy,
43 struct mi_writer *writer);
44
45 #ifdef __cplusplus
46 }
47 #endif
48
49 #endif /* LTTNG_RATE_POLICY */
This page took 0.029244 seconds and 4 git commands to generate.