lib: compile liblttng-ctl as C++
[lttng-tools.git] / include / lttng / event-rule / event-rule.h
1 /*
2 * Copyright (C) 2019 Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only
5 *
6 */
7
8 #ifndef LTTNG_EVENT_RULE_H
9 #define LTTNG_EVENT_RULE_H
10
11 #include <lttng/lttng-export.h>
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16
17 struct lttng_event_rule;
18
19 enum lttng_event_rule_type {
20 LTTNG_EVENT_RULE_TYPE_UNKNOWN = -1,
21 LTTNG_EVENT_RULE_TYPE_KERNEL_SYSCALL = 0,
22 LTTNG_EVENT_RULE_TYPE_KERNEL_KPROBE = 1,
23 LTTNG_EVENT_RULE_TYPE_KERNEL_TRACEPOINT = 2,
24 LTTNG_EVENT_RULE_TYPE_KERNEL_UPROBE = 3,
25 LTTNG_EVENT_RULE_TYPE_USER_TRACEPOINT = 4,
26 LTTNG_EVENT_RULE_TYPE_JUL_LOGGING = 5,
27 LTTNG_EVENT_RULE_TYPE_LOG4J_LOGGING = 6,
28 LTTNG_EVENT_RULE_TYPE_PYTHON_LOGGING = 7,
29 };
30
31 enum lttng_event_rule_status {
32 LTTNG_EVENT_RULE_STATUS_OK = 0,
33 LTTNG_EVENT_RULE_STATUS_ERROR = -1,
34 LTTNG_EVENT_RULE_STATUS_UNKNOWN = -2,
35 LTTNG_EVENT_RULE_STATUS_INVALID = -3,
36 LTTNG_EVENT_RULE_STATUS_UNSET = -4,
37 LTTNG_EVENT_RULE_STATUS_UNSUPPORTED = -5,
38 };
39
40 /**
41 * An event rule describes a set of criteria to be used as a discriminant in
42 * regards to a set of events.
43 */
44
45 /*
46 * Get the event rule type.
47 *
48 * Returns the type of an event rule on success, LTTNG_EVENT_RULE_UNKNOWN on
49 * error.
50 */
51 LTTNG_EXPORT extern enum lttng_event_rule_type lttng_event_rule_get_type(
52 const struct lttng_event_rule *event_rule);
53
54 /*
55 * Destroy an event rule object.
56 */
57 LTTNG_EXPORT extern void lttng_event_rule_destroy(struct lttng_event_rule *rule);
58
59 #ifdef __cplusplus
60 }
61 #endif
62
63 #endif /* LTTNG_EVENT_RULE_H */
This page took 0.03197 seconds and 5 git commands to generate.