bin: compile lttng-sessiond as C++
[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 <stdint.h>
14 #include <stdbool.h>
15 #include <sys/types.h>
16
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20
21 struct lttng_payload;
22 struct lttng_payload_view;
23
24 struct lttng_notification {
25 struct lttng_trigger *trigger;
26 struct lttng_evaluation *evaluation;
27 };
28
29 struct lttng_notification_comm {
30 /* Size of the payload following this field. */
31 uint32_t length;
32 /* Trigger and evaluation objects follow. */
33 char payload[];
34 } LTTNG_PACKED;
35
36 struct lttng_notification *lttng_notification_create(
37 struct lttng_trigger *trigger,
38 struct lttng_evaluation *evaluation);
39
40 int lttng_notification_serialize(const struct lttng_notification *notification,
41 struct lttng_payload *payload);
42
43 ssize_t lttng_notification_create_from_payload(
44 struct lttng_payload_view *view,
45 struct lttng_notification **notification);
46
47 #ifdef __cplusplus
48 }
49 #endif
50
51 #endif /* LTTNG_NOTIFICATION_INTERNAL_H */
This page took 0.03214 seconds and 5 git commands to generate.