LTTng control library C API
Loading...
Searching...
No Matches
channel.h
1/*
2 * Copyright (C) 2023 Philippe Proulx <eepp@efficios.com>
3 * Copyright (C) 2023 Jérémie Galarneau <jeremie.galarneau@efficios.com>
4 *
5 * SPDX-License-Identifier: LGPL-2.1-only
6 *
7 */
8
9#ifndef LTTNG_MAP_CHANNEL_H
10#define LTTNG_MAP_CHANNEL_H
11
12#include <lttng/lttng-export.h>
13#include <lttng/map/channel-type.h>
14#include <lttng/map/channel-update-policy.h>
15#include <lttng/map/group-set.h>
16#include <lttng/map/group.h>
17#include <lttng/map/key-set.h>
18#include <lttng/map/key-type.h>
19#include <lttng/map/value-type.h>
20
21#include <stdint.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
39
57
82LTTNG_EXPORT extern enum lttng_map_channel_status
83lttng_map_channel_get_name(const struct lttng_map_channel *channel, const char **name);
84
110LTTNG_EXPORT extern enum lttng_map_channel_status
112 enum lttng_map_channel_type *type);
113
134LTTNG_EXPORT extern enum lttng_map_channel_status
136 enum lttng_map_value_type *value_type);
137
163LTTNG_EXPORT extern enum lttng_map_channel_status
165 uint64_t *max_key_count);
166
188LTTNG_EXPORT extern enum lttng_map_channel_status
191
192/* clang-format off */
193
278LTTNG_EXPORT extern enum lttng_map_channel_status
280 struct lttng_map_group_set **groups);
281
282/* clang-format on */
283
334LTTNG_EXPORT extern enum lttng_map_channel_status
336 struct lttng_map_group **group);
337
374LTTNG_EXPORT extern enum lttng_map_channel_status
376 struct lttng_map_key_set **keys);
377
398LTTNG_EXPORT extern void lttng_map_channel_destroy(struct lttng_map_channel *channel);
399
401
402#ifdef __cplusplus
403}
404#endif
405
406#endif /* LTTNG_MAP_CHANNEL_H */
enum lttng_map_channel_status lttng_map_channel_get_keys(const struct lttng_map_channel *channel, struct lttng_map_key_set **keys)
Sets *keys to the current set of keys of channel.
enum lttng_map_channel_status lttng_map_channel_get_groups(const struct lttng_map_channel *channel, struct lttng_map_group_set **groups)
Sets *groups to the map groups of channel.
enum lttng_map_channel_status lttng_map_channel_get_update_policy(const struct lttng_map_channel *channel, enum lttng_map_channel_update_policy *policy)
Sets *policy to the update policy property of channel.
enum lttng_map_channel_status lttng_map_channel_get_value_type(const struct lttng_map_channel *channel, enum lttng_map_value_type *value_type)
Sets *value_type to the value type of channel.
lttng_map_channel_update_policy
Update policy of a map channel.
Definition channel-update-policy.h:25
enum lttng_map_channel_status lttng_map_channel_get_shared_group(const struct lttng_map_channel *channel, struct lttng_map_group **group)
Sets *group to the shared map group of channel.
void lttng_map_channel_destroy(struct lttng_map_channel *channel)
Destroys the map channel channel.
enum lttng_map_channel_status lttng_map_channel_get_max_key_count(const struct lttng_map_channel *channel, uint64_t *max_key_count)
Sets *max_key_count to the maximum key count property of channel.
lttng_map_channel_status
Status code for map channel functions.
Definition channel.h:44
enum lttng_map_channel_status lttng_map_channel_get_name(const struct lttng_map_channel *channel, const char **name)
Sets *name to the name of channel.
lttng_map_channel_type
Type of a map channel.
Definition channel-type.h:25
enum lttng_map_channel_status lttng_map_channel_get_type(const struct lttng_map_channel *channel, enum lttng_map_channel_type *type)
Sets *type to the type of channel.
@ LTTNG_MAP_CHANNEL_STATUS_OK
Success.
Definition channel.h:46
@ LTTNG_MAP_CHANNEL_STATUS_NOT_FOUND
No matching map group found.
Definition channel.h:52
@ LTTNG_MAP_CHANNEL_STATUS_ERROR
Other error.
Definition channel.h:55
@ LTTNG_MAP_CHANNEL_STATUS_INVALID_PARAMETER
Unsatisfied precondition.
Definition channel.h:49
lttng_map_value_type
Type of the values of a map.
Definition value-type.h:25
Map channel (opaque type).
Set of map groups (opaque type).
Map group (opaque type).
Immutable set of map keys (opaque type).