Move to kernel style SPDX license identifiers
[lttng-tools.git] / include / lttng / notification / notification-internal.h
1 /*
2 * Copyright (C) 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only
5 *
6 */
7
8 #ifndef LTTNG_NOTIFICATION_INTERNAL_H
9 #define LTTNG_NOTIFICATION_INTERNAL_H
10
11 #include <lttng/notification/notification.h>
12 #include <common/macros.h>
13 #include <common/buffer-view.h>
14 #include <common/dynamic-buffer.h>
15 #include <stdint.h>
16 #include <stdbool.h>
17 #include <sys/types.h>
18
19 struct lttng_notification {
20 struct lttng_condition *condition;
21 struct lttng_evaluation *evaluation;
22 };
23
24 struct lttng_notification_comm {
25 /* Size of the payload following this field. */
26 uint32_t length;
27 /* Condition and evaluation objects follow. */
28 char payload[];
29 } LTTNG_PACKED;
30
31 LTTNG_HIDDEN
32 struct lttng_notification *lttng_notification_create(
33 struct lttng_condition *condition,
34 struct lttng_evaluation *evaluation);
35
36 LTTNG_HIDDEN
37 int lttng_notification_serialize(const struct lttng_notification *notification,
38 struct lttng_dynamic_buffer *buf);
39
40 LTTNG_HIDDEN
41 ssize_t lttng_notification_create_from_buffer(
42 const struct lttng_buffer_view *view,
43 struct lttng_notification **notification);
44
45 #endif /* LTTNG_NOTIFICATION_INTERNAL_H */
This page took 0.03087 seconds and 5 git commands to generate.