X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=include%2Flttng%2Fevent-expr.h;h=cab22c97e96d40b7cd67700503f1ff7fab3ca77b;hp=911648779c5872bb5a525032e6601362b689e578;hb=HEAD;hpb=48c475643635d97d56fc251ca0b54e67ff25a51f diff --git a/include/lttng/event-expr.h b/include/lttng/event-expr.h index 911648779..7b42785ca 100644 --- a/include/lttng/event-expr.h +++ b/include/lttng/event-expr.h @@ -8,6 +8,8 @@ #ifndef LTTNG_EVENT_EXPR_H #define LTTNG_EVENT_EXPR_H +#include + #include struct lttng_event_expr; @@ -83,8 +85,8 @@ enum lttng_event_expr_status { * Returns the type of the event expression `expr`, or * `LTTNG_EVENT_EXPR_TYPE_INVALID` if `expr` is `NULL`. */ -extern enum lttng_event_expr_type lttng_event_expr_get_type( - const struct lttng_event_expr *expr); +LTTNG_EXPORT extern enum lttng_event_expr_type +lttng_event_expr_get_type(const struct lttng_event_expr *expr); /* * Creates an event payload field expression for the payload field named @@ -95,8 +97,8 @@ extern enum lttng_event_expr_type lttng_event_expr_get_type( * * There's a memory error. * * `field_name` is `NULL`. */ -extern struct lttng_event_expr *lttng_event_expr_event_payload_field_create( - const char *field_name); +LTTNG_EXPORT extern struct lttng_event_expr * +lttng_event_expr_event_payload_field_create(const char *field_name); /* * Returns the field name of the event payload field expression `expr`, @@ -106,8 +108,8 @@ extern struct lttng_event_expr *lttng_event_expr_event_payload_field_create( * * The type of `expr` is not * `LTTNG_EVENT_EXPR_TYPE_EVENT_PAYLOAD_FIELD`. */ -extern const char *lttng_event_expr_event_payload_field_get_name( - const struct lttng_event_expr *expr); +LTTNG_EXPORT extern const char * +lttng_event_expr_event_payload_field_get_name(const struct lttng_event_expr *expr); /* * Creates a per-channel context field expression for the per-channel @@ -118,7 +120,7 @@ extern const char *lttng_event_expr_event_payload_field_get_name( * * There's a memory error. * * `field_name` is `NULL`. */ -extern struct lttng_event_expr * +LTTNG_EXPORT extern struct lttng_event_expr * lttng_event_expr_channel_context_field_create(const char *field_name); /* @@ -129,8 +131,8 @@ lttng_event_expr_channel_context_field_create(const char *field_name); * * The type of `expr` is not * `LTTNG_EVENT_EXPR_TYPE_CHANNEL_CONTEXT_FIELD`. */ -extern const char *lttng_event_expr_channel_context_field_get_name( - const struct lttng_event_expr *expr); +LTTNG_EXPORT extern const char * +lttng_event_expr_channel_context_field_get_name(const struct lttng_event_expr *expr); /* * Creates an application-specific context field expression for the @@ -143,9 +145,9 @@ extern const char *lttng_event_expr_channel_context_field_get_name( * * `provider_name` is `NULL`. * * `type_name` is `NULL`. */ -extern struct lttng_event_expr * -lttng_event_expr_app_specific_context_field_create( - const char *provider_name, const char *type_name); +LTTNG_EXPORT extern struct lttng_event_expr * +lttng_event_expr_app_specific_context_field_create(const char *provider_name, + const char *type_name); /* * Returns the provider name of the application-specific context field @@ -155,9 +157,8 @@ lttng_event_expr_app_specific_context_field_create( * * The type of `expr` is not * `LTTNG_EVENT_EXPR_TYPE_APP_SPECIFIC_CONTEXT_FIELD`. */ -extern const char * -lttng_event_expr_app_specific_context_field_get_provider_name( - const struct lttng_event_expr *expr); +LTTNG_EXPORT extern const char * +lttng_event_expr_app_specific_context_field_get_provider_name(const struct lttng_event_expr *expr); /* * Returns the type name of the application-specific context field @@ -167,9 +168,8 @@ lttng_event_expr_app_specific_context_field_get_provider_name( * * The type of `expr` is not * `LTTNG_EVENT_EXPR_TYPE_APP_SPECIFIC_CONTEXT_FIELD`. */ -extern const char * -lttng_event_expr_app_specific_context_field_get_type_name( - const struct lttng_event_expr *expr); +LTTNG_EXPORT extern const char * +lttng_event_expr_app_specific_context_field_get_type_name(const struct lttng_event_expr *expr); /* * Creates an array field element expression for the parent array field @@ -187,9 +187,9 @@ lttng_event_expr_app_specific_context_field_get_type_name( * * `LTTNG_EVENT_EXPR_TYPE_APP_SPECIFIC_CONTEXT_FIELD` * * `LTTNG_EVENT_EXPR_TYPE_ARRAY_FIELD_ELEMENT` */ -extern struct lttng_event_expr *lttng_event_expr_array_field_element_create( - struct lttng_event_expr *array_field_expr, - unsigned int index); +LTTNG_EXPORT extern struct lttng_event_expr * +lttng_event_expr_array_field_element_create(struct lttng_event_expr *array_field_expr, + unsigned int index); /* * Returns the parent array field expression of the array field element @@ -199,9 +199,8 @@ extern struct lttng_event_expr *lttng_event_expr_array_field_element_create( * * The type of `expr` is not * `LTTNG_EVENT_EXPR_TYPE_ARRAY_FIELD_ELEMENT`. */ -extern const struct lttng_event_expr * -lttng_event_expr_array_field_element_get_parent_expr( - const struct lttng_event_expr *expr); +LTTNG_EXPORT extern const struct lttng_event_expr * +lttng_event_expr_array_field_element_get_parent_expr(const struct lttng_event_expr *expr); /* * Sets `*index` to the index of the array field element expression @@ -218,9 +217,9 @@ lttng_event_expr_array_field_element_get_parent_expr( * `LTTNG_EVENT_EXPR_TYPE_ARRAY_FIELD_ELEMENT`. * * `index` is `NULL`. */ -extern enum lttng_event_expr_status -lttng_event_expr_array_field_element_get_index( - const struct lttng_event_expr *expr, unsigned int *index); +LTTNG_EXPORT extern enum lttng_event_expr_status +lttng_event_expr_array_field_element_get_index(const struct lttng_event_expr *expr, + unsigned int *index); /* * Returns whether or not the event expressions `expr_a` and `expr_b` @@ -228,13 +227,13 @@ lttng_event_expr_array_field_element_get_index( * * `expr_a` and `expr_b` can be `NULL`. */ -extern bool lttng_event_expr_is_equal(const struct lttng_event_expr *expr_a, - const struct lttng_event_expr *expr_b); +LTTNG_EXPORT extern bool lttng_event_expr_is_equal(const struct lttng_event_expr *expr_a, + const struct lttng_event_expr *expr_b); /* * Destroys the event expression `expr` if not `NULL`. */ -extern void lttng_event_expr_destroy(struct lttng_event_expr *expr); +LTTNG_EXPORT extern void lttng_event_expr_destroy(struct lttng_event_expr *expr); #ifdef __cplusplus }