faa9b9fab8d8f56082e59946145647f0d047b530
2 * Copyright (C) 2019 Simon Marchi <simon.marchi@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-only
8 #ifndef LTTNG_ACTION_SNAPSHOT_SESSION_H
9 #define LTTNG_ACTION_SNAPSHOT_SESSION_H
16 struct lttng_snapshot_output
;
17 struct lttng_rate_policy
;
20 * Create a newly allocated snapshot-session action object.
22 * A snapshot session action object must have a session name set to be
23 * considered valid when used with a trigger object (lttng_trigger). A name can
24 * be set using `lttng_action_snapshot_session_set_session_name`.
26 * Returns a new action on success, NULL on failure. This action must be
27 * destroyed using lttng_action_destroy().
29 extern struct lttng_action
*lttng_action_snapshot_session_create(void);
32 * Set the session name of an lttng_action object of type
33 * LTTNG_ACTION_TYPE_SNAPSHOT_SESSION.
35 extern enum lttng_action_status
lttng_action_snapshot_session_set_session_name(
36 struct lttng_action
*action
, const char *session_name
);
39 * Get the session name of an lttng_action object of type
40 * LTTNG_ACTION_TYPE_SNAPSHOT_SESSION.
42 extern enum lttng_action_status
lttng_action_snapshot_session_get_session_name(
43 const struct lttng_action
*action
, const char **session_name
);
46 * Set an explicit snapshot output for this snapshot session action.
48 * The given snapshot output will be used instead of the session's
49 * default snapshot output.
51 * This function takes ownership of the given snapshot output.
53 extern enum lttng_action_status
lttng_action_snapshot_session_set_output(
54 struct lttng_action
*action
,
55 struct lttng_snapshot_output
*output
);
58 * Get the explicit snapshot output for this snapshot session action.
60 extern enum lttng_action_status
lttng_action_snapshot_session_get_output(
61 const struct lttng_action
*action
,
62 const struct lttng_snapshot_output
**output
);
65 * Set the rate policy of a snapshot session action.
67 * Returns LTTNG_ACTION_STATUS_OK on success,
68 * LTTNG_ACTION_STATUS_ERROR on internal error,
69 * LTTNG_ACTION_STATUS_INVALID if invalid parameters are passed.
71 extern enum lttng_action_status
lttng_action_snapshot_session_set_rate_policy(
72 struct lttng_action
*action
,
73 const struct lttng_rate_policy
*policy
);
76 * Get the rate policy of a snapshot session action.
78 * Returns LTTNG_ACTION_STATUS_OK on success,
79 * LTTNG_ACTION_STATUS_INVALID if invalid parameters are passed.
81 extern enum lttng_action_status
lttng_action_snapshot_session_get_rate_policy(
82 const struct lttng_action
*action
,
83 const struct lttng_rate_policy
**policy
);
89 #endif /* LTTNG_ACTION_SNAPSHOT_SESSION_H */
This page took 0.046395 seconds and 4 git commands to generate.