SoW-2019-0002: Dynamic Snapshot
[lttng-tools.git] / include / lttng / condition / condition.h
CommitLineData
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
12extern "C" {
13#endif
14
15struct lttng_condition;
16
17enum 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,
1831ae68 24 LTTNG_CONDITION_TYPE_EVENT_RULE_HIT = 105,
a58c490f
JG
25};
26
27enum 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};
34
a6d9b795
JG
35/*
36 * Get the type of a condition.
37 *
38 * Returns the type of a condition on success, LTTNG_CONDITION_TYPE_UNKNOWN on
39 * error.
40 */
a58c490f
JG
41extern enum lttng_condition_type lttng_condition_get_type(
42 const struct lttng_condition *condition);
43
a6d9b795 44/*
706ef699 45 * Destroy (release) a condition object.
a6d9b795 46 */
a58c490f
JG
47extern void lttng_condition_destroy(struct lttng_condition *condition);
48
49#ifdef __cplusplus
50}
51#endif
52
53#endif /* LTTNG_CONDITION_H */
This page took 0.038137 seconds and 5 git commands to generate.