Split warning flags list for C and C++
[lttng-tools.git] / include / lttng / session-descriptor-internal.h
CommitLineData
b178f53e 1/*
ab5be9fa 2 * Copyright (C) 2019 Jérémie Galarneau <jeremie.galarneau@efficios.com>
b178f53e 3 *
ab5be9fa 4 * SPDX-License-Identifier: LGPL-2.1-only
b178f53e 5 *
b178f53e
JG
6 */
7
8#ifndef LTTNG_SESSION_DESCRIPTOR_INTERNAL_H
9#define LTTNG_SESSION_DESCRIPTOR_INTERNAL_H
10
11#include <lttng/session-descriptor.h>
12#include <lttng/lttng-error.h>
13#include <common/uri.h>
14#include <common/dynamic-buffer.h>
15#include <common/buffer-view.h>
16#include <stdbool.h>
17
18/* Note that these enums are used as part of the lttnctl protocol. */
19enum lttng_session_descriptor_type {
20 LTTNG_SESSION_DESCRIPTOR_TYPE_UNKNOWN = -1,
21 /*
22 * The output type determines whether this is a no-output, local,
23 * or networked tracing session.
24 */
25 LTTNG_SESSION_DESCRIPTOR_TYPE_REGULAR = 1,
26 LTTNG_SESSION_DESCRIPTOR_TYPE_SNAPSHOT = 2,
27 LTTNG_SESSION_DESCRIPTOR_TYPE_LIVE = 3,
28};
29
30enum lttng_session_descriptor_output_type {
31 LTTNG_SESSION_DESCRIPTOR_OUTPUT_TYPE_NONE = 0,
32 LTTNG_SESSION_DESCRIPTOR_OUTPUT_TYPE_LOCAL = 1,
33 LTTNG_SESSION_DESCRIPTOR_OUTPUT_TYPE_NETWORK = 2,
34};
35
b178f53e
JG
36ssize_t lttng_session_descriptor_create_from_buffer(
37 const struct lttng_buffer_view *view,
38 struct lttng_session_descriptor **descriptor);
39
b178f53e
JG
40int lttng_session_descriptor_serialize(
41 const struct lttng_session_descriptor *descriptor,
42 struct lttng_dynamic_buffer *buffer);
43
b178f53e
JG
44enum lttng_session_descriptor_type
45lttng_session_descriptor_get_type(
46 const struct lttng_session_descriptor *descriptor);
47
b178f53e
JG
48enum lttng_session_descriptor_output_type
49lttng_session_descriptor_get_output_type(
50 const struct lttng_session_descriptor *descriptor);
51
b178f53e
JG
52void lttng_session_descriptor_get_local_output_uri(
53 const struct lttng_session_descriptor *descriptor,
54 struct lttng_uri *local_uri);
55
b178f53e
JG
56void lttng_session_descriptor_get_network_output_uris(
57 const struct lttng_session_descriptor *descriptor,
58 struct lttng_uri *control,
59 struct lttng_uri *data);
60
b178f53e
JG
61unsigned long long
62lttng_session_descriptor_live_get_timer_interval(
63 const struct lttng_session_descriptor *descriptor);
64
b178f53e
JG
65int lttng_session_descriptor_set_session_name(
66 struct lttng_session_descriptor *descriptor,
67 const char *name);
68
b178f53e
JG
69bool lttng_session_descriptor_is_output_destination_initialized(
70 const struct lttng_session_descriptor *descriptor);
71
b178f53e
JG
72bool lttng_session_descriptor_has_output_directory(
73 const struct lttng_session_descriptor *descriptor);
74
b178f53e
JG
75enum lttng_error_code lttng_session_descriptor_set_default_output(
76 struct lttng_session_descriptor *descriptor,
77 time_t *session_creation_time,
78 const char *absolute_home_path);
79
b178f53e
JG
80int lttng_session_descriptor_assign(
81 struct lttng_session_descriptor *dst_descriptor,
82 const struct lttng_session_descriptor *src_descriptor);
83
84#endif /* LTTNG_SESSION_DESCRIPTOR_INTERNAL_H */
This page took 0.048689 seconds and 4 git commands to generate.