common: compile libconsumer, libust-consumer, libkernel-consumer as C++
[lttng-tools.git] / src / common / consumer / metadata-bucket.h
... / ...
CommitLineData
1/*
2 * Copyright (C) 2020 Jérémie Galarneau <jeremie.galarneau@efficios.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 */
7
8#ifndef METADATA_BUCKET_H
9#define METADATA_BUCKET_H
10
11#include <common/consumer/consumer.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17struct metadata_bucket;
18
19typedef ssize_t (*metadata_bucket_flush_cb)(
20 const struct stream_subbuffer *buffer, void *data);
21
22enum metadata_bucket_status {
23 METADATA_BUCKET_STATUS_OK,
24 METADATA_BUCKET_STATUS_ERROR,
25};
26
27struct metadata_bucket *metadata_bucket_create(
28 metadata_bucket_flush_cb flush, void *data);
29
30void metadata_bucket_destroy(struct metadata_bucket *bucket);
31
32enum metadata_bucket_status metadata_bucket_fill(struct metadata_bucket *bucket,
33 const struct stream_subbuffer *buffer);
34
35void metadata_bucket_reset(struct metadata_bucket *bucket);
36
37#ifdef __cplusplus
38}
39#endif
40
41#endif /* METADATA_BUCKET_H */
This page took 0.022917 seconds and 4 git commands to generate.