3cd2460f80e6c698be3f2fe02734611e2301f007
[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 struct lttng_action;
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16
17 enum lttng_action_type {
18 LTTNG_ACTION_TYPE_UNKNOWN = -1,
19 LTTNG_ACTION_TYPE_NOTIFY = 0,
20 LTTNG_ACTION_TYPE_START_SESSION = 1,
21 LTTNG_ACTION_TYPE_STOP_SESSION = 2,
22 LTTNG_ACTION_TYPE_ROTATE_SESSION = 3,
23 LTTNG_ACTION_TYPE_SNAPSHOT_SESSION = 4,
24 };
25
26 enum lttng_action_status {
27 LTTNG_ACTION_STATUS_OK = 0,
28 LTTNG_ACTION_STATUS_ERROR = -1,
29 LTTNG_ACTION_STATUS_UNKNOWN = -2,
30 LTTNG_ACTION_STATUS_INVALID = -3,
31 LTTNG_ACTION_STATUS_UNSET = -4,
32 };
33
34 /*
35 * Get the type of an action.
36 *
37 * Returns the type of an action on success, LTTNG_ACTION_TYPE_UNKNOWN on error.
38 */
39 extern enum lttng_action_type lttng_action_get_type(
40 struct lttng_action *action);
41
42 /*
43 * Destroy (frees) an action object.
44 */
45 extern void lttng_action_destroy(struct lttng_action *action);
46
47 #ifdef __cplusplus
48 }
49 #endif
50
51 #endif /* LTTNG_ACTION_H */
This page took 0.039597 seconds and 3 git commands to generate.