Move to kernel style SPDX license identifiers
[lttng-tools.git] / include / lttng / notification / notification-internal.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_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>
3647288f 14#include <common/dynamic-buffer.h>
a58c490f
JG
15#include <stdint.h>
16#include <stdbool.h>
72756a3f 17#include <sys/types.h>
a58c490f
JG
18
19struct lttng_notification {
20 struct lttng_condition *condition;
21 struct lttng_evaluation *evaluation;
a58c490f
JG
22};
23
24struct 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
31LTTNG_HIDDEN
32struct lttng_notification *lttng_notification_create(
33 struct lttng_condition *condition,
34 struct lttng_evaluation *evaluation);
35
36LTTNG_HIDDEN
9b63a4aa 37int lttng_notification_serialize(const struct lttng_notification *notification,
3647288f 38 struct lttng_dynamic_buffer *buf);
a58c490f
JG
39
40LTTNG_HIDDEN
41ssize_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.036362 seconds and 5 git commands to generate.