X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=include%2Flttng%2Faction%2Frate-policy-internal.hpp;fp=include%2Flttng%2Faction%2Frate-policy-internal.hpp;h=5f6eb1f456b3eaed003d4e1b199e46d6131c925e;hp=0000000000000000000000000000000000000000;hb=c9e313bc594f40a86eed237dce222c0fc99c957f;hpb=4878de5c7deb512bbdac4fdfc498907efa06fb7c diff --git a/include/lttng/action/rate-policy-internal.hpp b/include/lttng/action/rate-policy-internal.hpp new file mode 100644 index 000000000..5f6eb1f45 --- /dev/null +++ b/include/lttng/action/rate-policy-internal.hpp @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2021 Jonathan Rajotte + * + * SPDX-License-Identifier: LGPL-2.1-only + * + */ + +#ifndef LTTNG_RATE_POLICY_INTERNAL_H +#define LTTNG_RATE_POLICY_INTERNAL_H + +#include +#include +#include +#include +#include + + +struct mi_writer; + +int lttng_rate_policy_serialize(struct lttng_rate_policy *rate_policy, + struct lttng_payload *buf); + +ssize_t lttng_rate_policy_create_from_payload(struct lttng_payload_view *view, + struct lttng_rate_policy **rate_policy); + +bool lttng_rate_policy_is_equal(const struct lttng_rate_policy *a, + const struct lttng_rate_policy *b); + +const char *lttng_rate_policy_type_string( + enum lttng_rate_policy_type rate_policy_type); + +struct lttng_rate_policy *lttng_rate_policy_copy( + const struct lttng_rate_policy *source); + +bool lttng_rate_policy_should_execute( + const struct lttng_rate_policy *policy, uint64_t counter); + +enum lttng_error_code lttng_rate_policy_mi_serialize( + const struct lttng_rate_policy *policy, + struct mi_writer *writer); + +#endif /* LTTNG_RATE_POLICY */