Commit | Line | Data |
---|---|---|
5024c2ac JR |
1 | /* |
2 | * Copyright (C) 2019 Simon Marchi <simon.marchi@efficios.com> | |
3 | * | |
4 | * SPDX-License-Identifier: LGPL-2.1-only | |
5 | * | |
6 | */ | |
7 | ||
8 | #ifndef LTTNG_ACTION_GROUP_H | |
9 | #define LTTNG_ACTION_GROUP_H | |
10 | ||
11 | struct lttng_action; | |
12 | struct lttng_action_group; | |
13 | ||
14 | #ifdef __cplusplus | |
15 | extern "C" { | |
16 | #endif | |
17 | ||
18 | /* | |
19 | * Create a newly allocated action group object. | |
20 | * | |
21 | * Returns a new action group on success, NULL on failure. This action group | |
22 | * must be destroyed using lttng_action_group_destroy(). | |
23 | */ | |
24 | extern struct lttng_action *lttng_action_group_create(void); | |
25 | ||
26 | /* | |
27 | * Add an action to an lttng_action object of type LTTNG_ACTION_GROUP. | |
28 | * | |
29 | * The group takes ownership of the action. | |
30 | */ | |
31 | extern enum lttng_action_status lttng_action_group_add_action( | |
32 | struct lttng_action *group, struct lttng_action *action); | |
33 | ||
34 | extern enum lttng_action_status lttng_action_group_get_count( | |
35 | const struct lttng_action *group, unsigned int *count); | |
36 | ||
37 | extern const struct lttng_action *lttng_action_group_get_at_index_const( | |
38 | const struct lttng_action *group, | |
39 | unsigned int index); | |
40 | ||
41 | #ifdef __cplusplus | |
42 | } | |
43 | #endif | |
44 | ||
45 | #endif /* LTTNG_ACTION_GROUP_H */ |