Rename firing policy to rate policy
[lttng-tools.git] / include / lttng / action / stop-session.h
CommitLineData
931bdbaa
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_STOP_SESSION_H
9#define LTTNG_ACTION_STOP_SESSION_H
10
11struct lttng_action;
7f4d5b07 12struct lttng_rate_policy;
931bdbaa
SM
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18/*
19 * Create a newly allocated stop-session action object.
20 *
21 * A stop session action object must have a session name set to be considered
22 * valid when used with a trigger object (lttng_trigger). A name can be set
23 * using `lttng_action_stop_session_set_session_name`.
24 *
25 * Returns a new action on success, NULL on failure. This action must be
26 * destroyed using lttng_action_destroy().
27 */
28extern struct lttng_action *lttng_action_stop_session_create(void);
29
30/*
31 * Set the session name of an lttng_action object of type
32 * LTTNG_ACTION_TYPE_STOP_SESSION.
33 */
34extern enum lttng_action_status lttng_action_stop_session_set_session_name(
35 struct lttng_action *action, const char *session_name);
36
37/*
38 * Get the session name of an lttng_action object of type
39 * LTTNG_ACTION_TYPE_STOP_SESSION.
40 */
41extern enum lttng_action_status lttng_action_stop_session_get_session_name(
42 const struct lttng_action *action, const char **session_name);
43
a5ec75db 44/*
7f4d5b07 45 * Set the rate policy of a stop session action.
a5ec75db
JR
46 *
47 * Returns LTTNG_ACTION_STATUS_OK on success,
48 * LTTNG_ACTION_STATUS_ERROR on internal error,
49 * LTTNG_ACTION_STATUS_INVALID if invalid parameters are passed.
50 */
7f4d5b07 51extern enum lttng_action_status lttng_action_stop_session_set_rate_policy(
a5ec75db 52 struct lttng_action *action,
7f4d5b07 53 const struct lttng_rate_policy *policy);
a5ec75db
JR
54
55/*
7f4d5b07 56 * Get the rate policy of a stop session action.
a5ec75db
JR
57 *
58 * Returns LTTNG_ACTION_STATUS_OK on success,
59 * LTTNG_ACTION_STATUS_INVALID if invalid parameters are passed.
60 */
7f4d5b07 61extern enum lttng_action_status lttng_action_stop_session_get_rate_policy(
a5ec75db 62 const struct lttng_action *action,
7f4d5b07 63 const struct lttng_rate_policy **policy);
a5ec75db 64
931bdbaa
SM
65#ifdef __cplusplus
66}
67#endif
68
69#endif /* LTTNG_ACTION_STOP_SESSION_H */
This page took 0.025998 seconds and 4 git commands to generate.