2 * Copyright (C) 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-only
8 #ifndef LTTNG_CONDITION_H
9 #define LTTNG_CONDITION_H
15 struct lttng_condition
;
17 enum lttng_condition_type
{
18 LTTNG_CONDITION_TYPE_UNKNOWN
= -1,
19 LTTNG_CONDITION_TYPE_SESSION_CONSUMED_SIZE
= 100,
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,
24 LTTNG_CONDITION_TYPE_ON_EVENT
= 105,
27 enum lttng_condition_status
{
28 LTTNG_CONDITION_STATUS_OK
= 0,
29 LTTNG_CONDITION_STATUS_ERROR
= -1,
30 LTTNG_CONDITION_STATUS_UNKNOWN
= -2,
31 LTTNG_CONDITION_STATUS_INVALID
= -3,
32 LTTNG_CONDITION_STATUS_UNSET
= -4,
33 LTTNG_CONDITION_STATUS_UNSUPPORTED
= -5,
37 * Get the type of a condition.
39 * Returns the type of a condition on success, LTTNG_CONDITION_TYPE_UNKNOWN on
42 extern enum lttng_condition_type
lttng_condition_get_type(
43 const struct lttng_condition
*condition
);
46 * Destroy (release) a condition object.
48 extern void lttng_condition_destroy(struct lttng_condition
*condition
);
54 #endif /* LTTNG_CONDITION_H */