2 * Copyright (C) 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-only
8 #ifndef LTTNG_NOTIFICATION_H
9 #define LTTNG_NOTIFICATION_H
11 #include <lttng/lttng-export.h>
17 struct lttng_condition
;
18 struct lttng_evaluation
;
19 struct lttng_notification
;
22 * Get a notification's condition.
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.
28 * The caller should check the condition's type in order to use the appropriate
29 * specialized functions to access the condition's properties.
31 * Returns an lttng_condition object on success, NULL on error.
33 LTTNG_EXPORT
extern const struct lttng_condition
*
34 lttng_notification_get_condition(struct lttng_notification
*notification
);
37 * Get a notification's condition's evaluation.
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
43 * The caller should check the evaluation's type in order to use the appropriate
44 * specialized functions to access the evaluation's properties.
46 * Returns an lttng_evaluation object on success, NULL on error.
48 LTTNG_EXPORT
extern const struct lttng_evaluation
*
49 lttng_notification_get_evaluation(struct lttng_notification
*notification
);
52 * Get a notification's origin trigger.
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
58 * Returns an lttng_trigger object on success, NULL on error.
60 LTTNG_EXPORT
extern const struct lttng_trigger
*
61 lttng_notification_get_trigger(struct lttng_notification
*notification
);
64 * Destroys (frees) a notification. The notification's condition and evaluation
65 * are destroyed as a side-effect.
67 LTTNG_EXPORT
extern void lttng_notification_destroy(struct lttng_notification
*notification
);
73 #endif /* LTTNG_NOTIFICATION_H */
This page took 0.032264 seconds and 5 git commands to generate.