Commit | Line | Data |
---|---|---|
a58c490f | 1 | /* |
ab5be9fa | 2 | * Copyright (C) 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com> |
a58c490f | 3 | * |
ab5be9fa | 4 | * SPDX-License-Identifier: LGPL-2.1-only |
a58c490f | 5 | * |
a58c490f JG |
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, | |
58397d0d | 20 | LTTNG_ACTION_TYPE_START_SESSION = 1, |
931bdbaa | 21 | LTTNG_ACTION_TYPE_STOP_SESSION = 2, |
bfb2ec6a | 22 | LTTNG_ACTION_TYPE_ROTATE_SESSION = 3, |
58397d0d SM |
23 | }; |
24 | ||
25 | enum lttng_action_status { | |
26 | LTTNG_ACTION_STATUS_OK = 0, | |
27 | LTTNG_ACTION_STATUS_ERROR = -1, | |
28 | LTTNG_ACTION_STATUS_UNKNOWN = -2, | |
29 | LTTNG_ACTION_STATUS_INVALID = -3, | |
30 | LTTNG_ACTION_STATUS_UNSET = -4, | |
a58c490f JG |
31 | }; |
32 | ||
e6de708a JG |
33 | /* |
34 | * Get the type of an action. | |
35 | * | |
36 | * Returns the type of an action on success, LTTNG_ACTION_TYPE_UNKNOWN on error. | |
37 | */ | |
a58c490f JG |
38 | extern enum lttng_action_type lttng_action_get_type( |
39 | struct lttng_action *action); | |
40 | ||
e6de708a JG |
41 | /* |
42 | * Destroy (frees) an action object. | |
43 | */ | |
a58c490f JG |
44 | extern void lttng_action_destroy(struct lttng_action *action); |
45 | ||
46 | #ifdef __cplusplus | |
47 | } | |
48 | #endif | |
49 | ||
50 | #endif /* LTTNG_ACTION_H */ |