Commit | Line | Data |
---|---|---|
0c1b0f77 JG |
1 | /* |
2 | * Copyright (C) 2019 - Jérémie Galarneau <jeremie.galarneau@efficios.com> | |
3 | * | |
4 | * This program is free software; you can redistribute it and/or modify it | |
5 | * under the terms of the GNU General Public License, version 2 only, as | |
6 | * published by the Free Software Foundation. | |
7 | * | |
8 | * This program is distributed in the hope that it will be useful, but WITHOUT | |
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |
11 | * more details. | |
12 | * | |
13 | * You should have received a copy of the GNU General Public License along with | |
14 | * this program; if not, write to the Free Software Foundation, Inc., 51 | |
15 | * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
16 | */ | |
17 | ||
18 | #ifndef SESSIOND_TRACE_CHUNK_REGISTRY_H | |
19 | #define SESSIOND_TRACE_CHUNK_REGISTRY_H | |
20 | ||
21 | #include <common/compat/uuid.h> | |
22 | #include <common/trace-chunk.h> | |
23 | #include <stdint.h> | |
24 | ||
25 | struct sessiond_trace_chunk_registry; | |
26 | ||
27 | struct sessiond_trace_chunk_registry * | |
28 | sessiond_trace_chunk_registry_create(void); | |
29 | ||
30 | void sessiond_trace_chunk_registry_destroy( | |
31 | struct sessiond_trace_chunk_registry *sessiond_registry); | |
32 | ||
33 | int sessiond_trace_chunk_registry_session_created( | |
34 | struct sessiond_trace_chunk_registry *sessiond_registry, | |
35 | const lttng_uuid sessiond_uuid); | |
36 | ||
37 | int sessiond_trace_chunk_registry_session_destroyed( | |
38 | struct sessiond_trace_chunk_registry *sessiond_registry, | |
39 | const lttng_uuid sessiond_uuid); | |
40 | ||
41 | struct lttng_trace_chunk *sessiond_trace_chunk_registry_publish_chunk( | |
42 | struct sessiond_trace_chunk_registry *sessiond_registry, | |
43 | const lttng_uuid sessiond_uuid, uint64_t session_id, | |
44 | struct lttng_trace_chunk *chunk); | |
45 | ||
46 | struct lttng_trace_chunk * | |
47 | sessiond_trace_chunk_registry_get_anonymous_chunk( | |
48 | struct sessiond_trace_chunk_registry *sessiond_registry, | |
49 | const lttng_uuid sessiond_uuid, | |
50 | uint64_t session_id); | |
51 | ||
52 | struct lttng_trace_chunk * | |
53 | sessiond_trace_chunk_registry_get_chunk( | |
54 | struct sessiond_trace_chunk_registry *sessiond_registry, | |
55 | const lttng_uuid sessiond_uuid, | |
56 | uint64_t session_id, uint64_t chunk_id); | |
57 | ||
6b584c2e JG |
58 | int sessiond_trace_chunk_registry_chunk_exists( |
59 | struct sessiond_trace_chunk_registry *sessiond_registry, | |
60 | const lttng_uuid sessiond_uuid, | |
61 | uint64_t session_id, uint64_t chunk_id, bool *chunk_exists); | |
62 | ||
0c1b0f77 | 63 | #endif /* SESSIOND_TRACE_CHUNK_REGISTRY_H */ |