MI: implement all objects related to trigger machine interface
[lttng-tools.git] / include / lttng / action / rate-policy-internal.h
CommitLineData
7f4d5b07
JR
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 <stdbool.h>
15
6a751b95
JR
16struct mi_writer;
17
7f4d5b07
JR
18LTTNG_HIDDEN
19int lttng_rate_policy_serialize(struct lttng_rate_policy *rate_policy,
20 struct lttng_payload *buf);
21
22LTTNG_HIDDEN
23ssize_t lttng_rate_policy_create_from_payload(struct lttng_payload_view *view,
24 struct lttng_rate_policy **rate_policy);
25
26LTTNG_HIDDEN
27bool lttng_rate_policy_is_equal(const struct lttng_rate_policy *a,
28 const struct lttng_rate_policy *b);
29
30LTTNG_HIDDEN
31const char *lttng_rate_policy_type_string(
32 enum lttng_rate_policy_type rate_policy_type);
33
34LTTNG_HIDDEN
35struct lttng_rate_policy *lttng_rate_policy_copy(
36 const struct lttng_rate_policy *source);
37
38LTTNG_HIDDEN
39bool lttng_rate_policy_should_execute(
40 const struct lttng_rate_policy *policy, uint64_t counter);
41
6a751b95
JR
42LTTNG_HIDDEN
43enum lttng_error_code lttng_rate_policy_mi_serialize(
44 const struct lttng_rate_policy *policy,
45 struct mi_writer *writer);
46
7f4d5b07 47#endif /* LTTNG_RATE_POLICY */
This page took 0.02439 seconds and 4 git commands to generate.