Commit | Line | Data |
---|---|---|
58397d0d SM |
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_START_SESSION_H | |
9 | #define LTTNG_ACTION_START_SESSION_H | |
10 | ||
11 | struct lttng_action; | |
12 | ||
13 | #ifdef __cplusplus | |
14 | extern "C" { | |
15 | #endif | |
16 | ||
17 | /* | |
18 | * Create a newly allocated start-session action object. | |
19 | * | |
20 | * A start 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_start_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_start_session_create(void); | |
28 | ||
29 | /* | |
30 | * Set the session name of an lttng_action object of type | |
31 | * LTTNG_ACTION_TYPE_START_SESSION. | |
32 | */ | |
33 | extern enum lttng_action_status lttng_action_start_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_START_SESSION. | |
39 | */ | |
40 | extern enum lttng_action_status lttng_action_start_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_START_SESSION_H */ |