| 1 | /* |
| 2 | * Copyright (C) 2021 Jérémie Galarneau <jeremie.galarneau@efficios.com> |
| 3 | * |
| 4 | * SPDX-License-Identifier: LGPL-2.1-only |
| 5 | * |
| 6 | */ |
| 7 | |
| 8 | #ifndef LTTNG_ACTION_PATH_INTERNAL_H |
| 9 | #define LTTNG_ACTION_PATH_INTERNAL_H |
| 10 | |
| 11 | #include <lttng/action/path.h> |
| 12 | #include <common/macros.h> |
| 13 | #include <common/dynamic-array.h> |
| 14 | #include <common/payload-view.h> |
| 15 | #include <common/payload.h> |
| 16 | #include <sys/types.h> |
| 17 | |
| 18 | #ifdef __cplusplus |
| 19 | extern "C" { |
| 20 | #endif |
| 21 | |
| 22 | struct lttng_action_path { |
| 23 | struct lttng_dynamic_array indexes; |
| 24 | }; |
| 25 | |
| 26 | /* Assumes that 'dst' is uninitialized. */ |
| 27 | LTTNG_HIDDEN |
| 28 | int lttng_action_path_copy(const struct lttng_action_path *src, |
| 29 | struct lttng_action_path *dst); |
| 30 | |
| 31 | LTTNG_HIDDEN |
| 32 | ssize_t lttng_action_path_create_from_payload( |
| 33 | struct lttng_payload_view *view, |
| 34 | struct lttng_action_path **action_path); |
| 35 | |
| 36 | LTTNG_HIDDEN |
| 37 | int lttng_action_path_serialize(const struct lttng_action_path *action_path, |
| 38 | struct lttng_payload *payload); |
| 39 | |
| 40 | #ifdef __cplusplus |
| 41 | } |
| 42 | #endif |
| 43 | |
| 44 | #endif /* LTTNG_ACTION_PATH_INTERNAL_H */ |