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
11 #include <lttng/lttng-export.h>
14 struct lttng_rate_policy
;
21 * Create a newly allocated notification action object.
23 * A "notify" action will emit a notification to all clients which have an
24 * open notification channel. In order to receive this notification, clients
25 * must have subscribed to a condition equivalent to the one paired to this
26 * notify action in a trigger.
28 * The default rate policy for a notify action is a "every 1" rate policy.
30 * Returns a new action on success, NULL on failure. This action must be
31 * destroyed using lttng_action_destroy().
33 LTTNG_EXPORT
extern struct lttng_action
*lttng_action_notify_create(void);
36 * Set the rate policy of a notify action.
38 * Returns LTTNG_ACTION_STATUS_OK on success,
39 * LTTNG_ACTION_STATUS_ERROR on internal error,
40 * LTTNG_ACTION_STATUS_INVALID if invalid parameters are passed.
42 LTTNG_EXPORT
extern enum lttng_action_status
lttng_action_notify_set_rate_policy(
43 struct lttng_action
*action
,
44 const struct lttng_rate_policy
*policy
);
47 * Get the rate policy of a notify action.
49 * Returns LTTNG_ACTION_STATUS_OK on success,
50 * LTTNG_ACTION_STATUS_INVALID if invalid parameters are passed.
52 LTTNG_EXPORT
extern enum lttng_action_status
lttng_action_notify_get_rate_policy(
53 const struct lttng_action
*action
,
54 const struct lttng_rate_policy
**policy
);
60 #endif /* LTTNG_ACTION_NOTIFY_H */
This page took 0.034342 seconds and 4 git commands to generate.