Tests: Add test to check shared-memory FD leaks after relayd dies
[lttng-tools.git] / include / lttng / action / action.h
1 /*
2 * Copyright (C) 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only
5 *
6 */
7
8 #ifndef LTTNG_ACTION_H
9 #define LTTNG_ACTION_H
10
11 #include <lttng/lttng-export.h>
12
13 struct lttng_action;
14
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18
19 enum lttng_action_type {
20 LTTNG_ACTION_TYPE_UNKNOWN = -1,
21 LTTNG_ACTION_TYPE_NOTIFY = 0,
22 LTTNG_ACTION_TYPE_START_SESSION = 1,
23 LTTNG_ACTION_TYPE_STOP_SESSION = 2,
24 LTTNG_ACTION_TYPE_ROTATE_SESSION = 3,
25 LTTNG_ACTION_TYPE_SNAPSHOT_SESSION = 4,
26 LTTNG_ACTION_TYPE_LIST = 5,
27 };
28
29 enum lttng_action_status {
30 LTTNG_ACTION_STATUS_OK = 0,
31 LTTNG_ACTION_STATUS_ERROR = -1,
32 LTTNG_ACTION_STATUS_UNKNOWN = -2,
33 LTTNG_ACTION_STATUS_INVALID = -3,
34 LTTNG_ACTION_STATUS_UNSET = -4,
35 };
36
37 /*
38 * Get the type of an action.
39 *
40 * Returns the type of an action on success, LTTNG_ACTION_TYPE_UNKNOWN on error.
41 */
42 LTTNG_EXPORT extern enum lttng_action_type lttng_action_get_type(const struct lttng_action *action);
43
44 /*
45 * Destroy (frees) an action object.
46 */
47 LTTNG_EXPORT extern void lttng_action_destroy(struct lttng_action *action);
48
49 #ifdef __cplusplus
50 }
51 #endif
52
53 #endif /* LTTNG_ACTION_H */
This page took 0.030969 seconds and 5 git commands to generate.