| 1 | /* |
| 2 | * Copyright (C) 2020 Simon Marchi <simon.marchi@efficios.com> |
| 3 | * |
| 4 | * SPDX-License-Identifier: LGPL-2.1-only |
| 5 | * |
| 6 | */ |
| 7 | |
| 8 | #ifndef COMMON_SNAPSHOT_H |
| 9 | #define COMMON_SNAPSHOT_H |
| 10 | |
| 11 | #include <common/error.hpp> |
| 12 | #include <common/macros.hpp> |
| 13 | |
| 14 | #include <stdbool.h> |
| 15 | #include <sys/types.h> |
| 16 | |
| 17 | struct lttng_payload_view; |
| 18 | struct lttng_payload; |
| 19 | struct lttng_snapshot_output; |
| 20 | struct mi_writer; |
| 21 | |
| 22 | bool lttng_snapshot_output_validate(const struct lttng_snapshot_output *output); |
| 23 | |
| 24 | bool lttng_snapshot_output_is_equal(const struct lttng_snapshot_output *a, |
| 25 | const struct lttng_snapshot_output *b); |
| 26 | |
| 27 | int lttng_snapshot_output_serialize(const struct lttng_snapshot_output *output, |
| 28 | struct lttng_payload *payload); |
| 29 | |
| 30 | ssize_t lttng_snapshot_output_create_from_payload(struct lttng_payload_view *view, |
| 31 | struct lttng_snapshot_output **output_p); |
| 32 | |
| 33 | enum lttng_error_code lttng_snapshot_output_mi_serialize(const struct lttng_snapshot_output *output, |
| 34 | struct mi_writer *writer); |
| 35 | |
| 36 | #endif /* COMMON_SNAPSHOT_H */ |