2 * Copyright (C) 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-only
8 #include <lttng/action/action-internal.h>
9 #include <lttng/action/notify-internal.h>
10 #include <common/macros.h>
14 void lttng_action_notify_destroy(struct lttng_action
*action
)
20 int lttng_action_notify_serialize(struct lttng_action
*action
,
21 struct lttng_dynamic_buffer
*buf
)
27 bool lttng_action_notify_is_equal(const struct lttng_action
*a
,
28 const struct lttng_action
*b
)
30 /* There is no discriminant between notify actions. */
34 struct lttng_action
*lttng_action_notify_create(void)
36 struct lttng_action_notify
*notify
;
38 notify
= zmalloc(sizeof(struct lttng_action_notify
));
43 lttng_action_init(¬ify
->parent
, LTTNG_ACTION_TYPE_NOTIFY
, NULL
,
44 lttng_action_notify_serialize
,
45 lttng_action_notify_is_equal
,
46 lttng_action_notify_destroy
);
48 return ¬ify
->parent
;
51 ssize_t
lttng_action_notify_create_from_buffer(
52 const struct lttng_buffer_view
*view
,
53 struct lttng_action
**action
)
55 ssize_t consumed_length
;
57 *action
= lttng_action_notify_create();
65 return consumed_length
;