liblttng-ctl: use export list to define exported symbols
[lttng-tools.git] / include / lttng / log-level-rule-internal.h
CommitLineData
85b05318
JR
1/*
2 * Copyright (C) 2020 Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only
5 *
6 */
7
8#ifndef LTTNG_LOG_LEVEL_RULE_INTERNAL_H
9#define LTTNG_LOG_LEVEL_RULE_INTERNAL_H
10
11#include <stdint.h>
12
13#include <common/buffer-view.h>
14#include <common/dynamic-array.h>
15#include <common/macros.h>
16#include <common/payload-view.h>
17#include <common/payload.h>
18#include <lttng/event.h>
19#include <lttng/log-level-rule.h>
20
6a751b95
JR
21struct mi_writer;
22
85b05318
JR
23/*
24 * For now only a single backing struct is used for both type of log level
25 * rule (exactly, as_severe) since both only have require "level" as property.
26 */
27struct lttng_log_level_rule {
28 enum lttng_log_level_rule_type type;
29 int level;
30};
31
32struct lttng_log_level_rule_comm {
33 /* enum lttng_log_level_rule_type */
34 int8_t type;
35 int32_t level;
36};
37
85b05318
JR
38ssize_t lttng_log_level_rule_create_from_payload(
39 struct lttng_payload_view *view,
40 struct lttng_log_level_rule **rule);
41
85b05318
JR
42int lttng_log_level_rule_serialize(const struct lttng_log_level_rule *rule,
43 struct lttng_payload *payload);
44
85b05318
JR
45bool lttng_log_level_rule_is_equal(const struct lttng_log_level_rule *a,
46 const struct lttng_log_level_rule *b);
47
85b05318
JR
48struct lttng_log_level_rule *lttng_log_level_rule_copy(
49 const struct lttng_log_level_rule *source);
50
85b05318
JR
51void lttng_log_level_rule_to_loglevel(
52 const struct lttng_log_level_rule *log_level_rule,
53 enum lttng_loglevel_type *loglevel_type,
54 int *loglevel_value);
55
85b05318
JR
56unsigned long lttng_log_level_rule_hash(
57 const struct lttng_log_level_rule *log_level_rule);
58
6a751b95
JR
59enum lttng_error_code lttng_log_level_rule_mi_serialize(
60 const struct lttng_log_level_rule *rule,
61 struct mi_writer *writer);
62
85b05318 63#endif /* LTTNG_LOG_LEVEL_RULE_INTERNAL_H */
This page took 0.025747 seconds and 4 git commands to generate.