X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Flttng%2Faction%2Fgroup.h;fp=include%2Flttng%2Faction%2Fgroup.h;h=b09913d9d56708d38996301018e65ac8d964ef51;hb=5024c2ac433f5c5feec034cb7d8d485d25cf14e7;hp=0000000000000000000000000000000000000000;hpb=e2d1190b9ea09c54e5d7373643d62e2034bc1531;p=deliverable%2Flttng-tools.git diff --git a/include/lttng/action/group.h b/include/lttng/action/group.h new file mode 100644 index 000000000..b09913d9d --- /dev/null +++ b/include/lttng/action/group.h @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2019 Simon Marchi + * + * SPDX-License-Identifier: LGPL-2.1-only + * + */ + +#ifndef LTTNG_ACTION_GROUP_H +#define LTTNG_ACTION_GROUP_H + +struct lttng_action; +struct lttng_action_group; + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Create a newly allocated action group object. + * + * Returns a new action group on success, NULL on failure. This action group + * must be destroyed using lttng_action_group_destroy(). + */ +extern struct lttng_action *lttng_action_group_create(void); + +/* + * Add an action to an lttng_action object of type LTTNG_ACTION_GROUP. + * + * The group takes ownership of the action. + */ +extern enum lttng_action_status lttng_action_group_add_action( + struct lttng_action *group, struct lttng_action *action); + +extern enum lttng_action_status lttng_action_group_get_count( + const struct lttng_action *group, unsigned int *count); + +extern const struct lttng_action *lttng_action_group_get_at_index_const( + const struct lttng_action *group, + unsigned int index); + +#ifdef __cplusplus +} +#endif + +#endif /* LTTNG_ACTION_GROUP_H */