Cleanup: rotation-thread: enforce conding standard following fix
[lttng-tools.git] / include / lttng / notification / notification-internal.hpp
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 <common/macros.hpp>
12 #include <common/make-unique-wrapper.hpp>
13
14 #include <lttng/notification/notification.h>
15
16 #include <memory>
17 #include <stdbool.h>
18 #include <stdint.h>
19 #include <sys/types.h>
20
21 struct lttng_payload;
22 struct lttng_payload_view;
23
24 struct lttng_notification {
25 using uptr = std::unique_ptr<
26 lttng_notification,
27 lttng::details::create_unique_class<lttng_notification,
28 lttng_notification_destroy>::deleter>;
29
30 struct lttng_trigger *trigger;
31 struct lttng_evaluation *evaluation;
32 };
33
34 struct lttng_notification_comm {
35 /* Size of the payload following this field. */
36 uint32_t length;
37 /* Trigger and evaluation objects follow. */
38 char payload[];
39 } LTTNG_PACKED;
40
41 struct lttng_notification *lttng_notification_create(
42 struct lttng_trigger *trigger,
43 struct lttng_evaluation *evaluation);
44
45 int lttng_notification_serialize(const struct lttng_notification *notification,
46 struct lttng_payload *payload);
47
48 ssize_t lttng_notification_create_from_payload(
49 struct lttng_payload_view *view,
50 struct lttng_notification **notification);
51
52 const struct lttng_condition *lttng_notification_get_const_condition(
53 const struct lttng_notification *notification);
54 const struct lttng_evaluation *lttng_notification_get_const_evaluation(
55 const struct lttng_notification *notification);
56
57 const struct lttng_trigger *lttng_notification_get_const_trigger(
58 const struct lttng_notification *notification);
59
60 #endif /* LTTNG_NOTIFICATION_INTERNAL_H */
This page took 0.031462 seconds and 4 git commands to generate.