750c0739a48eba337f6787a6c388a3ebfce13d43
[lttng-tools.git] / include / lttng / action / rotate-session.h
1 /*
2 * Copyright (C) 2019 Simon Marchi <simon.marchi@efficios.com>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only
5 *
6 */
7
8 #ifndef LTTNG_ACTION_ROTATE_SESSION_H
9 #define LTTNG_ACTION_ROTATE_SESSION_H
10
11 struct lttng_action;
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16
17 /*
18 * Create a newly allocated rotate-session action object.
19 *
20 * A rotate session action object must have a session name set to be considered
21 * valid when used with a trigger object (lttng_trigger). A name can be set
22 * using `lttng_action_rotate_session_set_session_name`.
23 *
24 * Returns a new action on success, NULL on failure. This action must be
25 * destroyed using lttng_action_destroy().
26 */
27 extern struct lttng_action *lttng_action_rotate_session_create(void);
28
29 /*
30 * Set the session name of an lttng_action object of type
31 * LTTNG_ACTION_TYPE_ROTATE_SESSION.
32 */
33 extern enum lttng_action_status lttng_action_rotate_session_set_session_name(
34 struct lttng_action *action, const char *session_name);
35
36 /*
37 * Get the session name of an lttng_action object of type
38 * LTTNG_ACTION_TYPE_ROTATE_SESSION.
39 */
40 extern enum lttng_action_status lttng_action_rotate_session_get_session_name(
41 const struct lttng_action *action, const char **session_name);
42
43 #ifdef __cplusplus
44 }
45 #endif
46
47 #endif /* LTTNG_ACTION_ROTATE_SESSION_H */
This page took 0.029876 seconds and 3 git commands to generate.