5b223ef23fbfa846a893b5a266801388a8f87941
2 * Copyright (C) 2019 Simon Marchi <simon.marchi@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-only
8 #ifndef LTTNG_ACTION_STOP_SESSION_H
9 #define LTTNG_ACTION_STOP_SESSION_H
11 #include <lttng/lttng-export.h>
14 struct lttng_rate_policy
;
21 * Create a newly allocated stop-session action object.
23 * A stop session action object must have a session name set to be considered
24 * valid when used with a trigger object (lttng_trigger). A name can be set
25 * using `lttng_action_stop_session_set_session_name`.
27 * Returns a new action on success, NULL on failure. This action must be
28 * destroyed using lttng_action_destroy().
30 LTTNG_EXPORT
extern struct lttng_action
*lttng_action_stop_session_create(void);
33 * Set the session name of an lttng_action object of type
34 * LTTNG_ACTION_TYPE_STOP_SESSION.
36 LTTNG_EXPORT
extern enum lttng_action_status
lttng_action_stop_session_set_session_name(
37 struct lttng_action
*action
, const char *session_name
);
40 * Get the session name of an lttng_action object of type
41 * LTTNG_ACTION_TYPE_STOP_SESSION.
43 LTTNG_EXPORT
extern enum lttng_action_status
lttng_action_stop_session_get_session_name(
44 const struct lttng_action
*action
, const char **session_name
);
47 * Set the rate policy of a stop session action.
49 * Returns LTTNG_ACTION_STATUS_OK on success,
50 * LTTNG_ACTION_STATUS_ERROR on internal error,
51 * LTTNG_ACTION_STATUS_INVALID if invalid parameters are passed.
53 LTTNG_EXPORT
extern enum lttng_action_status
lttng_action_stop_session_set_rate_policy(
54 struct lttng_action
*action
,
55 const struct lttng_rate_policy
*policy
);
58 * Get the rate policy of a stop session action.
60 * Returns LTTNG_ACTION_STATUS_OK on success,
61 * LTTNG_ACTION_STATUS_INVALID if invalid parameters are passed.
63 LTTNG_EXPORT
extern enum lttng_action_status
lttng_action_stop_session_get_rate_policy(
64 const struct lttng_action
*action
,
65 const struct lttng_rate_policy
**policy
);
71 #endif /* LTTNG_ACTION_STOP_SESSION_H */
This page took 0.030047 seconds and 3 git commands to generate.