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_CONDITION_H | |
9 | #define LTTNG_CONDITION_H | |
10 | ||
a58c490f JG |
11 | #ifdef __cplusplus |
12 | extern "C" { | |
13 | #endif | |
14 | ||
15 | struct lttng_condition; | |
16 | ||
17 | enum lttng_condition_type { | |
18 | LTTNG_CONDITION_TYPE_UNKNOWN = -1, | |
e8360425 | 19 | LTTNG_CONDITION_TYPE_SESSION_CONSUMED_SIZE = 100, |
c19092cd JG |
20 | LTTNG_CONDITION_TYPE_BUFFER_USAGE_HIGH = 101, |
21 | LTTNG_CONDITION_TYPE_BUFFER_USAGE_LOW = 102, | |
22 | LTTNG_CONDITION_TYPE_SESSION_ROTATION_ONGOING = 103, | |
23 | LTTNG_CONDITION_TYPE_SESSION_ROTATION_COMPLETED = 104, | |
a58c490f JG |
24 | }; |
25 | ||
26 | enum lttng_condition_status { | |
27 | LTTNG_CONDITION_STATUS_OK = 0, | |
28 | LTTNG_CONDITION_STATUS_ERROR = -1, | |
29 | LTTNG_CONDITION_STATUS_UNKNOWN = -2, | |
30 | LTTNG_CONDITION_STATUS_INVALID = -3, | |
31 | LTTNG_CONDITION_STATUS_UNSET = -4, | |
32 | }; | |
33 | ||
a6d9b795 JG |
34 | /* |
35 | * Get the type of a condition. | |
36 | * | |
37 | * Returns the type of a condition on success, LTTNG_CONDITION_TYPE_UNKNOWN on | |
38 | * error. | |
39 | */ | |
a58c490f JG |
40 | extern enum lttng_condition_type lttng_condition_get_type( |
41 | const struct lttng_condition *condition); | |
42 | ||
a6d9b795 | 43 | /* |
706ef699 | 44 | * Destroy (release) a condition object. |
a6d9b795 | 45 | */ |
a58c490f JG |
46 | extern void lttng_condition_destroy(struct lttng_condition *condition); |
47 | ||
48 | #ifdef __cplusplus | |
49 | } | |
50 | #endif | |
51 | ||
52 | #endif /* LTTNG_CONDITION_H */ |