Move to kernel style SPDX license identifiers
[lttng-tools.git] / include / lttng / notification / notification.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_NOTIFICATION_H
9#define LTTNG_NOTIFICATION_H
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15struct lttng_condition;
16struct lttng_evaluation;
17struct lttng_notification;
18
19/*
e83f3215
JG
20 * Get a notification's condition.
21 *
22 * The notification retains the ownership of both the condition and evaluation
23 * objects. Hence, it is not valid to access those objects after the destruction
24 * of their associated notification.
25 *
26 * The caller should check the condition's type in order to use the appropriate
27 * specialized functions to access the condition's properties.
28 *
29 * Returns an lttng_condition object on success, NULL on error.
a58c490f
JG
30 */
31extern const struct lttng_condition *lttng_notification_get_condition(
32 struct lttng_notification *notification);
33
e83f3215
JG
34/*
35 * Get a notification's condition's evaluation.
36 *
37 * The notification retains the ownership of the evaluation object. Hence, it is
38 * not valid to access that object after the destruction of its associated
39 * notification.
40 *
41 * The caller should check the evaluation's type in order to use the appropriate
42 * specialized functions to access the evaluation's properties.
43 *
44 * Returns an lttng_evaluation object on success, NULL on error.
45 */
a58c490f
JG
46extern const struct lttng_evaluation *lttng_notification_get_evaluation(
47 struct lttng_notification *notification);
48
e83f3215
JG
49/*
50 * Destroys (frees) a notification. The notification's condition and evaluation
51 * are destroyed as a side-effect.
52 */
a58c490f
JG
53extern void lttng_notification_destroy(struct lttng_notification *notification);
54
55#ifdef __cplusplus
56}
57#endif
58
59#endif /* LTTNG_NOTIFICATION_H */
This page took 0.029145 seconds and 4 git commands to generate.