lib: compile liblttng-ctl as C++
[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
4bd69c5f
SM
11#include <lttng/lttng-export.h>
12
a58c490f
JG
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17struct lttng_condition;
18struct lttng_evaluation;
19struct lttng_notification;
20
21/*
e83f3215
JG
22 * Get a notification's condition.
23 *
24 * The notification retains the ownership of both the condition and evaluation
25 * objects. Hence, it is not valid to access those objects after the destruction
26 * of their associated notification.
27 *
28 * The caller should check the condition's type in order to use the appropriate
29 * specialized functions to access the condition's properties.
30 *
31 * Returns an lttng_condition object on success, NULL on error.
a58c490f 32 */
4bd69c5f 33LTTNG_EXPORT extern const struct lttng_condition *lttng_notification_get_condition(
a58c490f
JG
34 struct lttng_notification *notification);
35
e83f3215
JG
36/*
37 * Get a notification's condition's evaluation.
38 *
39 * The notification retains the ownership of the evaluation object. Hence, it is
40 * not valid to access that object after the destruction of its associated
41 * notification.
42 *
43 * The caller should check the evaluation's type in order to use the appropriate
44 * specialized functions to access the evaluation's properties.
45 *
46 * Returns an lttng_evaluation object on success, NULL on error.
47 */
4bd69c5f 48LTTNG_EXPORT extern const struct lttng_evaluation *lttng_notification_get_evaluation(
a58c490f
JG
49 struct lttng_notification *notification);
50
6bec8cb2
JG
51/*
52 * Get a notification's origin trigger.
53 *
54 * The notification retains the ownership of the trigger object. Hence, it is
55 * not valid to access that object after the destruction of its associated
56 * notification.
57 *
58 * Returns an lttng_trigger object on success, NULL on error.
59 */
4bd69c5f 60LTTNG_EXPORT extern const struct lttng_trigger *lttng_notification_get_trigger(
6bec8cb2
JG
61 struct lttng_notification *notification);
62
e83f3215
JG
63/*
64 * Destroys (frees) a notification. The notification's condition and evaluation
65 * are destroyed as a side-effect.
66 */
4bd69c5f 67LTTNG_EXPORT extern void lttng_notification_destroy(struct lttng_notification *notification);
a58c490f
JG
68
69#ifdef __cplusplus
70}
71#endif
72
73#endif /* LTTNG_NOTIFICATION_H */
This page took 0.034491 seconds and 4 git commands to generate.