event-rule: userspace probe: rename get/set_name to get/set_event_name
[lttng-tools.git] / include / lttng / event-rule / userspace-probe.h
CommitLineData
df08d338
JR
1/*
2 * Copyright (C) 2019 Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only
5 *
6 */
7
1f1567a5
JR
8#ifndef LTTNG_EVENT_RULE_USERSPACE_PROBE_H
9#define LTTNG_EVENT_RULE_USERSPACE_PROBE_H
df08d338
JR
10
11#include <lttng/event-rule/event-rule.h>
12#include <lttng/userspace-probe.h>
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18/*
1f1567a5 19 * Create a newly allocated user space probe event rule.
df08d338
JR
20 *
21 * Returns a new event rule on success, NULL on failure. This event rule must be
22 * destroyed using lttng_event_rule_destroy().
23 */
1f1567a5 24extern struct lttng_event_rule *lttng_event_rule_userspace_probe_create(void);
df08d338
JR
25
26/*
1f1567a5 27 * Set the location of a user space probe event rule.
df08d338
JR
28 *
29 * The location is copied internally.
30 *
31 * Returns LTTNG_EVENT_RULE_STATUS_OK on success, LTTNG_EVENT_RULE_STATUS_INVALID
32 * if invalid parameters are passed.
33 */
1f1567a5 34extern enum lttng_event_rule_status lttng_event_rule_userspace_probe_set_location(
df08d338
JR
35 struct lttng_event_rule *rule,
36 const struct lttng_userspace_probe_location *location);
37
38/*
1f1567a5 39 * Get the location of a user space probe event rule.
df08d338
JR
40 *
41 * The caller does not assume the ownership of the returned location.
42 * The location shall only be used for the duration of the event
43 * rule's lifetime, or before a different location is set.
44 *
45 * Returns LTTNG_EVENT_RULE_STATUS_OK and a pointer to the event rule's location
46 * on success, LTTNG_EVENT_RULE_STATUS_INVALID if an invalid parameter is
47 * passed, or LTTNG_EVENT_RULE_STATUS_UNSET if a location was not set prior to
48 * this call.
49 */
1f1567a5 50extern enum lttng_event_rule_status lttng_event_rule_userspace_probe_get_location(
df08d338
JR
51 const struct lttng_event_rule *rule,
52 const struct lttng_userspace_probe_location **location);
53
54/*
1f1567a5 55 * Set the name of a user space probe event rule.
df08d338
JR
56 *
57 * The name is copied internally.
58 *
59 * Return LTTNG_EVENT_RULE_STATUS_OK on success, LTTNG_EVENT_RULE_STATUS_INVALID
60 * if invalid parameters are passed.
61 */
405f9e7d 62extern enum lttng_event_rule_status lttng_event_rule_userspace_probe_set_event_name(
df08d338
JR
63 struct lttng_event_rule *rule, const char *name);
64
65/*
1f1567a5 66 * Get the name of a user space probe event rule.
df08d338
JR
67 *
68 * The caller does not assume the ownership of the returned name.
69 * The name shall only only be used for the duration of the event
70 * rule's lifetime, or before a different name is set.
71 *
72 * Returns LTTNG_EVENT_RULE_STATUS_OK and a pointer to the event rule's name on
73 * success, LTTNG_EVENT_RULE_STATUS_INVALID if an invalid parameter is passed,
74 * or LTTNG_EVENT_RULE_STATUS_UNSET if a name was not set prior to this call.
75 */
405f9e7d 76extern enum lttng_event_rule_status lttng_event_rule_userspace_probe_get_event_name(
df08d338
JR
77 const struct lttng_event_rule *rule, const char **name);
78
79#ifdef __cplusplus
80}
81#endif
82
1f1567a5 83#endif /* LTTNG_EVENT_RULE_USERSPACE_PROBE_H */
This page took 0.03692 seconds and 4 git commands to generate.