2 * Copyright (C) 2013 David Goulet <dgoulet@efficios.com>
4 * SPDX-License-Identifier: GPL-2.0-only
11 #include "consumer.hpp"
13 #include <common/common.hpp>
14 #include <common/hashtable/hashtable.hpp>
15 #include <common/uri.hpp>
20 struct consumer_output;
22 struct snapshot_output {
25 /* Number of snapshot taken with that output. */
28 struct consumer_output *consumer;
29 int kernel_sockets_copied;
30 int ust_sockets_copied;
32 * Contains the string with "<date>-<time>" for when the snapshot command
33 * is triggered. This is to make sure every streams will use the same time
34 * for the directory output.
39 struct lttng_ht_node_ulong node;
43 unsigned long next_output_id;
46 * Number of snapshot taken for that object. This value is used with a
47 * temporary output of a snapshot record.
50 struct lttng_ht *output_ht;
53 /* Snapshot object. */
54 struct snapshot *snapshot_alloc();
55 void snapshot_destroy(struct snapshot *obj);
56 int snapshot_init(struct snapshot *obj);
57 void snapshot_delete_output(struct snapshot *snapshot, struct snapshot_output *output);
58 void snapshot_add_output(struct snapshot *snapshot, struct snapshot_output *output);
60 /* Snapshot output object. */
61 struct snapshot_output *snapshot_output_alloc();
62 void snapshot_output_destroy(struct snapshot_output *obj);
64 struct snapshot_output *snapshot_find_output_by_id(uint32_t id, struct snapshot *snapshot);
65 struct snapshot_output *snapshot_find_output_by_name(const char *name, struct snapshot *snapshot);
67 #endif /* SNAPSHOT_H */