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;
23 struct snapshot_output {
26 /* Number of snapshot taken with that output. */
29 struct consumer_output *consumer;
30 int kernel_sockets_copied;
31 int ust_sockets_copied;
33 * Contains the string with "<date>-<time>" for when the snapshot command
34 * is triggered. This is to make sure every streams will use the same time
35 * for the directory output.
40 struct lttng_ht_node_ulong node;
44 unsigned long next_output_id;
47 * Number of snapshot taken for that object. This value is used with a
48 * temporary output of a snapshot record.
51 struct lttng_ht *output_ht;
54 /* Snapshot object. */
55 struct snapshot *snapshot_alloc();
56 void snapshot_destroy(struct snapshot *obj);
57 int snapshot_init(struct snapshot *obj);
58 void snapshot_delete_output(struct snapshot *snapshot, struct snapshot_output *output);
59 void snapshot_add_output(struct snapshot *snapshot, struct snapshot_output *output);
61 /* Snapshot output object. */
62 struct snapshot_output *snapshot_output_alloc();
63 void snapshot_output_destroy(struct snapshot_output *obj);
64 int snapshot_output_init(const struct ltt_session *session,
69 struct consumer_output *consumer,
70 struct snapshot_output *output,
71 struct snapshot *snapshot);
72 int snapshot_output_init_with_uri(const struct ltt_session *session,
75 struct lttng_uri *uris,
77 struct consumer_output *consumer,
78 struct snapshot_output *output,
79 struct snapshot *snapshot);
80 struct snapshot_output *snapshot_find_output_by_id(uint32_t id, struct snapshot *snapshot);
81 struct snapshot_output *snapshot_find_output_by_name(const char *name, struct snapshot *snapshot);
83 #endif /* SNAPSHOT_H */