2 * Copyright (C) 2020 Philippe Proulx <pproulx@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-only
8 #ifndef LTTNG_EVENT_EXPR_INTERNAL_H
9 #define LTTNG_EVENT_EXPR_INTERNAL_H
12 #include <lttng/event-expr.h>
14 struct lttng_event_expr
{
15 enum lttng_event_expr_type type
;
19 * `LTTNG_EVENT_EXPR_TYPE_EVENT_PAYLOAD_FIELD` and
20 * `LTTNG_EVENT_EXPR_TYPE_CHANNEL_CONTEXT_FIELD`.
22 struct lttng_event_expr_field
{
23 struct lttng_event_expr parent
;
27 /* `LTTNG_EVENT_EXPR_TYPE_APP_SPECIFIC_CONTEXT_FIELD` */
28 struct lttng_event_expr_app_specific_context_field
{
29 struct lttng_event_expr parent
;
34 /* `LTTNG_EVENT_EXPR_TYPE_ARRAY_FIELD_ELEMENT` */
35 struct lttng_event_expr_array_field_element
{
36 struct lttng_event_expr parent
;
39 struct lttng_event_expr
*array_field_expr
;
45 * Returns whether or not `expr` is an l-value (locator value).
48 bool lttng_event_expr_is_lvalue(const struct lttng_event_expr
*expr
)
51 return expr
->type
== LTTNG_EVENT_EXPR_TYPE_EVENT_PAYLOAD_FIELD
||
52 expr
->type
== LTTNG_EVENT_EXPR_TYPE_CHANNEL_CONTEXT_FIELD
||
53 expr
->type
== LTTNG_EVENT_EXPR_TYPE_APP_SPECIFIC_CONTEXT_FIELD
||
54 expr
->type
== LTTNG_EVENT_EXPR_TYPE_ARRAY_FIELD_ELEMENT
;
57 #endif /* LTTNG_EVENT_EXPR_INTERNAL_H */