action list: missing renames from previous name "group"
[lttng-tools.git] / include / lttng / error-query-internal.h
CommitLineData
b99a0cb3
JG
1/*
2 * error-query-internal.h
3 *
4 * Copyright (C) 2021 Jérémie Galarneau <jeremie.galarneau@efficios.com>
5 *
6 * SPDX-License-Identifier: GPL-2.1-only
7 *
8 */
9
10#ifndef LTTNG_ERROR_QUERY_INTERNAL_H
11#define LTTNG_ERROR_QUERY_INTERNAL_H
12
13#include <lttng/lttng.h>
14#include <common/macros.h>
15#include <common/payload.h>
16#include <common/payload-view.h>
17
18enum lttng_error_query_target_type {
19 LTTNG_ERROR_QUERY_TARGET_TYPE_TRIGGER,
20 LTTNG_ERROR_QUERY_TARGET_TYPE_ACTION,
21};
22
23LTTNG_HIDDEN
24enum lttng_error_query_target_type lttng_error_query_get_target_type(
25 const struct lttng_error_query *query);
26
27LTTNG_HIDDEN
28const struct lttng_trigger *lttng_error_query_trigger_borrow_target(
29 const struct lttng_error_query *query);
30
31LTTNG_HIDDEN
32const struct lttng_trigger *lttng_error_query_action_borrow_trigger_target(
33 const struct lttng_error_query *query);
34
35LTTNG_HIDDEN
588c4b0d 36struct lttng_action *lttng_error_query_action_borrow_action_target(
b99a0cb3 37 const struct lttng_error_query *query,
588c4b0d 38 struct lttng_trigger *trigger);
b99a0cb3
JG
39
40LTTNG_HIDDEN
41int lttng_error_query_serialize(const struct lttng_error_query *query,
42 struct lttng_payload *payload);
43
44LTTNG_HIDDEN
45ssize_t lttng_error_query_create_from_payload(struct lttng_payload_view *view,
46 struct lttng_error_query **query);
47
48LTTNG_HIDDEN
49int lttng_error_query_result_serialize(
50 const struct lttng_error_query_result *result,
51 struct lttng_payload *payload);
52
53LTTNG_HIDDEN
54ssize_t lttng_error_query_result_create_from_payload(
55 struct lttng_payload_view *view,
56 struct lttng_error_query_result **result);
57
58LTTNG_HIDDEN
59int lttng_error_query_results_serialize(
60 const struct lttng_error_query_results *results,
61 struct lttng_payload *payload);
62
63LTTNG_HIDDEN
64ssize_t lttng_error_query_results_create_from_payload(
65 struct lttng_payload_view *view,
66 struct lttng_error_query_results **results);
67
68LTTNG_HIDDEN
69struct lttng_error_query_result *
70lttng_error_query_result_counter_create(
71 const char *name, const char *description, uint64_t value);
72
73LTTNG_HIDDEN
74void lttng_error_query_result_destroy(struct lttng_error_query_result *result);
75
76LTTNG_HIDDEN
77struct lttng_error_query_results *lttng_error_query_results_create(void);
78
79/* Ownership of `result` is transferred on success. */
80LTTNG_HIDDEN
81int lttng_error_query_results_add_result(
82 struct lttng_error_query_results *results,
83 struct lttng_error_query_result *result);
84
85#endif /* LTTNG_ERROR_QUERY_INTERNAL_H */
This page took 0.025933 seconds and 4 git commands to generate.