| 1 | /* |
| 2 | * Copyright (C) 2019 Simon Marchi <simon.marchi@efficios.com> |
| 3 | * |
| 4 | * SPDX-License-Identifier: LGPL-2.1-only |
| 5 | * |
| 6 | */ |
| 7 | |
| 8 | #ifndef LTTNG_ACTION_LIST_INTERNAL_H |
| 9 | #define LTTNG_ACTION_LIST_INTERNAL_H |
| 10 | |
| 11 | #include <common/macros.hpp> |
| 12 | |
| 13 | #include <sys/types.h> |
| 14 | |
| 15 | struct lttng_action; |
| 16 | struct lttng_payload_view; |
| 17 | struct mi_writer; |
| 18 | struct mi_lttng_error_query_callbacks; |
| 19 | struct lttng_dynamic_array; |
| 20 | struct lttng_trigger; |
| 21 | |
| 22 | /* |
| 23 | * Create an action list from a payload view. |
| 24 | * |
| 25 | * On success, return the number of bytes consumed from `view`, and the created |
| 26 | * list in `*list`. On failure, return -1. |
| 27 | */ |
| 28 | extern ssize_t lttng_action_list_create_from_payload(struct lttng_payload_view *view, |
| 29 | struct lttng_action **list); |
| 30 | |
| 31 | extern struct lttng_action * |
| 32 | lttng_action_list_borrow_mutable_at_index(const struct lttng_action *list, unsigned int index); |
| 33 | |
| 34 | enum lttng_error_code |
| 35 | lttng_action_list_mi_serialize(const struct lttng_trigger *trigger, |
| 36 | const struct lttng_action *action, |
| 37 | struct mi_writer *writer, |
| 38 | const struct mi_lttng_error_query_callbacks *error_query_callbacks, |
| 39 | struct lttng_dynamic_array *action_path_indexes); |
| 40 | |
| 41 | #endif /* LTTNG_ACTION_LIST_INTERNAL_H */ |