SoW-2019-0002: Dynamic Snapshot
[lttng-tools.git] / include / lttng / action / snapshot-session.h
1 /*
2 * Copyright (C) 2019 EfficiOS, inc.
3 *
4 * This library is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License, version 2.1 only,
6 * as published by the Free Software Foundation.
7 *
8 * This library 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 Lesser General Public License
11 * for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this library; if not, write to the Free Software Foundation,
15 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17
18 #ifndef LTTNG_ACTION_SNAPSHOT_SESSION_H
19 #define LTTNG_ACTION_SNAPSHOT_SESSION_H
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25 struct lttng_action;
26 struct lttng_snapshot_output;
27
28 /*
29 * Create a newly allocated snapshot-session action object.
30 *
31 * Returns a new action on success, NULL on failure. This action must be
32 * destroyed using lttng_action_destroy().
33 */
34 extern struct lttng_action *lttng_action_snapshot_session_create(void);
35
36 /*
37 * Set the session name of an lttng_action object of type
38 * LTTNG_ACTION_TYPE_SNAPSHOT_SESSION.
39 */
40 extern enum lttng_action_status lttng_action_snapshot_session_set_session_name(
41 struct lttng_action *action, const char *session_name);
42
43 /*
44 * Get the session name of an lttng_action object of type
45 * LTTNG_ACTION_TYPE_SNAPSHOT_SESSION.
46 */
47 extern enum lttng_action_status lttng_action_snapshot_session_get_session_name(
48 const struct lttng_action *action, const char **session_name);
49
50 /*
51 * Set an explicit snapshot output for this snapshot session action.
52 *
53 * The given snapshot output will be used instead of the session's
54 * default snapshot output.
55 *
56 * This function takes ownership of the given snapshot output.
57 */
58 extern enum lttng_action_status lttng_action_snapshot_session_set_output(
59 struct lttng_action *action,
60 struct lttng_snapshot_output *output);
61
62 /*
63 * Get the explicit snapshot output for this snapshot session action.
64 */
65 extern enum lttng_action_status lttng_action_snapshot_session_get_output_const(
66 const struct lttng_action *action,
67 const struct lttng_snapshot_output **output);
68
69 #ifdef __cplusplus
70 }
71 #endif
72
73 #endif /* LTTNG_ACTION_SNAPSHOT_SESSION_H */
This page took 0.031322 seconds and 5 git commands to generate.