2 * Copyright (C) 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-only
8 #ifndef LTTNG_ACTION_NOTIFY_H
9 #define LTTNG_ACTION_NOTIFY_H
12 struct lttng_rate_policy
;
19 * Create a newly allocated notification action object.
21 * A "notify" action will emit a notification to all clients which have an
22 * open notification channel. In order to receive this notification, clients
23 * must have subscribed to a condition equivalent to the one paired to this
24 * notify action in a trigger.
26 * The default rate policy for a notify action is a "every 1" rate policy.
28 * Returns a new action on success, NULL on failure. This action must be
29 * destroyed using lttng_action_destroy().
31 extern struct lttng_action
*lttng_action_notify_create(void);
34 * Set the rate policy of a notify action.
36 * Returns LTTNG_ACTION_STATUS_OK on success,
37 * LTTNG_ACTION_STATUS_ERROR on internal error,
38 * LTTNG_ACTION_STATUS_INVALID if invalid parameters are passed.
40 extern enum lttng_action_status
lttng_action_notify_set_rate_policy(
41 struct lttng_action
*action
,
42 const struct lttng_rate_policy
*policy
);
45 * Get the rate policy of a notify action.
47 * Returns LTTNG_ACTION_STATUS_OK on success,
48 * LTTNG_ACTION_STATUS_INVALID if invalid parameters are passed.
50 extern enum lttng_action_status
lttng_action_notify_get_rate_policy(
51 const struct lttng_action
*action
,
52 const struct lttng_rate_policy
**policy
);
58 #endif /* LTTNG_ACTION_NOTIFY_H */
This page took 0.029573 seconds and 4 git commands to generate.