tests: Use `--no-wait` when destroying sessions in relayd-grouping
[lttng-tools.git] / include / lttng / error-query-internal.hpp
CommitLineData
b99a0cb3
JG
1/*
2 * error-query-internal.h
3 *
4 * Copyright (C) 2021 Jérémie Galarneau <jeremie.galarneau@efficios.com>
5 *
75f62e53 6 * SPDX-License-Identifier: LGPL-2.1-only
b99a0cb3
JG
7 *
8 */
9
10#ifndef LTTNG_ERROR_QUERY_INTERNAL_H
11#define LTTNG_ERROR_QUERY_INTERNAL_H
12
c9e313bc 13#include <common/macros.hpp>
c9e313bc 14#include <common/payload-view.hpp>
28f23191
JG
15#include <common/payload.hpp>
16
17#include <lttng/lttng.h>
b99a0cb3 18
6a751b95
JR
19struct mi_writer;
20
b99a0cb3
JG
21enum lttng_error_query_target_type {
22 LTTNG_ERROR_QUERY_TARGET_TYPE_TRIGGER,
63dd3d7b 23 LTTNG_ERROR_QUERY_TARGET_TYPE_CONDITION,
b99a0cb3
JG
24 LTTNG_ERROR_QUERY_TARGET_TYPE_ACTION,
25};
26
28f23191
JG
27enum lttng_error_query_target_type
28lttng_error_query_get_target_type(const struct lttng_error_query *query);
b99a0cb3 29
28f23191
JG
30const struct lttng_trigger *
31lttng_error_query_trigger_borrow_target(const struct lttng_error_query *query);
b99a0cb3 32
28f23191
JG
33const struct lttng_trigger *
34lttng_error_query_condition_borrow_target(const struct lttng_error_query *query);
63dd3d7b 35
28f23191
JG
36const struct lttng_trigger *
37lttng_error_query_action_borrow_trigger_target(const struct lttng_error_query *query);
b99a0cb3 38
28f23191
JG
39struct lttng_action *
40lttng_error_query_action_borrow_action_target(const struct lttng_error_query *query,
41 struct lttng_trigger *trigger);
b99a0cb3 42
b99a0cb3 43int lttng_error_query_serialize(const struct lttng_error_query *query,
28f23191 44 struct lttng_payload *payload);
b99a0cb3 45
b99a0cb3 46ssize_t lttng_error_query_create_from_payload(struct lttng_payload_view *view,
28f23191 47 struct lttng_error_query **query);
b99a0cb3 48
28f23191
JG
49int lttng_error_query_result_serialize(const struct lttng_error_query_result *result,
50 struct lttng_payload *payload);
b99a0cb3 51
28f23191
JG
52ssize_t lttng_error_query_result_create_from_payload(struct lttng_payload_view *view,
53 struct lttng_error_query_result **result);
b99a0cb3 54
28f23191
JG
55int lttng_error_query_results_serialize(const struct lttng_error_query_results *results,
56 struct lttng_payload *payload);
b99a0cb3 57
28f23191
JG
58ssize_t lttng_error_query_results_create_from_payload(struct lttng_payload_view *view,
59 struct lttng_error_query_results **results);
b99a0cb3 60
b99a0cb3 61struct lttng_error_query_result *
28f23191 62lttng_error_query_result_counter_create(const char *name, const char *description, uint64_t value);
b99a0cb3 63
b99a0cb3
JG
64void lttng_error_query_result_destroy(struct lttng_error_query_result *result);
65
cd9adb8b 66struct lttng_error_query_results *lttng_error_query_results_create();
b99a0cb3
JG
67
68/* Ownership of `result` is transferred on success. */
28f23191
JG
69int lttng_error_query_results_add_result(struct lttng_error_query_results *results,
70 struct lttng_error_query_result *result);
b99a0cb3 71
28f23191
JG
72enum lttng_error_code
73lttng_error_query_results_mi_serialize(const struct lttng_error_query_results *results,
74 struct mi_writer *writer);
6a751b95 75
b99a0cb3 76#endif /* LTTNG_ERROR_QUERY_INTERNAL_H */
This page took 0.044354 seconds and 4 git commands to generate.