2 * Copyright (C) 2019 Simon Marchi <simon.marchi@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-only
8 #ifndef LTTNG_ACTION_GROUP_H
9 #define LTTNG_ACTION_GROUP_H
12 struct lttng_action_group
;
19 * Create a newly allocated action group object.
21 * Returns a new action group on success, NULL on failure. This action group
22 * must be destroyed using lttng_action_group_destroy().
24 extern struct lttng_action
*lttng_action_group_create(void);
27 * Add an action to an lttng_action object of type LTTNG_ACTION_GROUP.
29 * The action group acquires a reference to the action. The action can be
30 * safely destroyed after calling this function. An action must not be
31 * modified after adding it to a group.
33 * Adding an action group to an action group is not supported.
35 extern enum lttng_action_status
lttng_action_group_add_action(
36 struct lttng_action
*group
, struct lttng_action
*action
);
39 * Get the number of actions in an action group.
41 extern enum lttng_action_status
lttng_action_group_get_count(
42 const struct lttng_action
*group
, unsigned int *count
);
45 * Get an action from the action group at a given index.
47 * Note that the group maintains the ownership of the returned action.
48 * It must not be destroyed by the user, nor should it be held beyond
49 * the lifetime of the action group.
51 * Returns an action, or NULL on error.
53 extern const struct lttng_action
*lttng_action_group_get_at_index(
54 const struct lttng_action
*group
,
61 #endif /* LTTNG_ACTION_GROUP_H */
This page took 0.030251 seconds and 4 git commands to generate.