2 * Copyright (C) 2019 Simon Marchi <simon.marchi@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-only
8 #ifndef LTTNG_ACTION_ROTATE_SESSION_H
9 #define LTTNG_ACTION_ROTATE_SESSION_H
12 struct lttng_rate_policy
;
19 * Create a newly allocated rotate-session action object.
21 * A rotate 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_rotate_session_set_session_name`.
25 * Returns a new action on success, NULL on failure. This action must be
26 * destroyed using lttng_action_destroy().
28 extern struct lttng_action
*lttng_action_rotate_session_create(void);
31 * Set the session name of an lttng_action object of type
32 * LTTNG_ACTION_TYPE_ROTATE_SESSION.
34 extern enum lttng_action_status
lttng_action_rotate_session_set_session_name(
35 struct lttng_action
*action
, const char *session_name
);
38 * Get the session name of an lttng_action object of type
39 * LTTNG_ACTION_TYPE_ROTATE_SESSION.
41 extern enum lttng_action_status
lttng_action_rotate_session_get_session_name(
42 const struct lttng_action
*action
, const char **session_name
);
45 * Set the rate policy of a rotate session action.
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.
51 extern enum lttng_action_status
lttng_action_rotate_session_set_rate_policy(
52 struct lttng_action
*action
,
53 const struct lttng_rate_policy
*policy
);
56 * Get the rate policy of a rotate session action.
58 * Returns LTTNG_ACTION_STATUS_OK on success,
59 * LTTNG_ACTION_STATUS_INVALID if invalid parameters are passed.
61 extern enum lttng_action_status
lttng_action_rotate_session_get_rate_policy(
62 const struct lttng_action
*action
,
63 const struct lttng_rate_policy
**policy
);
69 #endif /* LTTNG_ACTION_ROTATE_SESSION_H */
This page took 0.035373 seconds and 5 git commands to generate.