X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fsnapshot.h;fp=src%2Fcommon%2Fsnapshot.h;h=95a63e13b42e0d1995ef9b70e6ac99107a41b77b;hp=0000000000000000000000000000000000000000;hb=b30fa1919a1e0274b8d4734acb8cb54753808609;hpb=55e2fc3352373de6ff8ba7cf908d1025b432d9a8 diff --git a/src/common/snapshot.h b/src/common/snapshot.h new file mode 100644 index 000000000..95a63e13b --- /dev/null +++ b/src/common/snapshot.h @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2020 Simon Marchi + * + * SPDX-License-Identifier: GPL-2.0-only + * + */ + +#ifndef COMMON_SNAPSHOT_H +#define COMMON_SNAPSHOT_H + +#include + +#include + +struct lttng_buffer_view; +struct lttng_dynamic_buffer; +struct lttng_snapshot_output; + +LTTNG_HIDDEN +bool lttng_snapshot_output_validate(const struct lttng_snapshot_output *output); + +LTTNG_HIDDEN +bool lttng_snapshot_output_is_equal( + const struct lttng_snapshot_output *a, + const struct lttng_snapshot_output *b); + +LTTNG_HIDDEN +int lttng_snapshot_output_serialize( + const struct lttng_snapshot_output *output, + struct lttng_dynamic_buffer *buf); + +LTTNG_HIDDEN +ssize_t lttng_snapshot_output_create_from_buffer( + const struct lttng_buffer_view *view, + struct lttng_snapshot_output **output_p); + +#endif /* COMMON_SNAPSHOT_H */