SoW-2019-0002: Dynamic Snapshot
[lttng-tools.git] / include / lttng / action / group.h
CommitLineData
1831ae68
FD
1/*
2 * Copyright (C) 2019 EfficiOS, inc.
3 *
4 * This library is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License, version 2.1 only,
6 * as published by the Free Software Foundation.
7 *
8 * This library is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11 * for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this library; if not, write to the Free Software Foundation,
15 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17
18#ifndef LTTNG_ACTION_GROUP_H
19#define LTTNG_ACTION_GROUP_H
20
21struct lttng_action;
22struct lttng_action_group;
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28/*
29 * Create a newly allocated action group object.
30 *
31 * Returns a new action group on success, NULL on failure. This action group
32 * must be destroyed using lttng_action_group_destroy().
33 */
34extern struct lttng_action *lttng_action_group_create(void);
35
36/*
37 * Add an action to an lttng_action object of type LTTNG_ACTION_GROUP.
38 *
39 * The group takes ownership of the action.
40 */
41extern enum lttng_action_status lttng_action_group_add_action(
42 struct lttng_action *group, struct lttng_action *action);
43
44extern enum lttng_action_status lttng_action_group_get_count(
45 const struct lttng_action *group, unsigned int *count);
46
47extern const struct lttng_action *lttng_action_group_get_at_index_const(
48 const struct lttng_action *group,
49 unsigned int index);
50
51#ifdef __cplusplus
52}
53#endif
54
55#endif /* LTTNG_ACTION_GROUP_H */
This page took 0.025351 seconds and 5 git commands to generate.