X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=include%2Flttng%2Fcondition%2Fevaluation-internal.h;h=15ae4af4d05d7205c434e8772f88c3acd4b06406;hp=95119b37e97ea6bdab84d2814d6a42baa9653a5d;hb=683d081a7f3734fcb5c8dd4424b0aa102117d1a0;hpb=3647288fe42b25340f905046f3bd9aef21e12aaa diff --git a/include/lttng/condition/evaluation-internal.h b/include/lttng/condition/evaluation-internal.h index 95119b37e..15ae4af4d 100644 --- a/include/lttng/condition/evaluation-internal.h +++ b/include/lttng/condition/evaluation-internal.h @@ -1,18 +1,8 @@ /* - * Copyright (C) 2017 - Jérémie Galarneau + * Copyright (C) 2017 Jérémie Galarneau * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License, version 2.1 only, - * as published by the Free Software Foundation. + * SPDX-License-Identifier: LGPL-2.1-only * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef LTTNG_EVALUATION_INTERNAL_H @@ -20,14 +10,16 @@ #include #include -#include -#include #include #include +struct lttng_payload; +struct lttng_payload_view; + typedef void (*evaluation_destroy_cb)(struct lttng_evaluation *evaluation); -typedef int (*evaluation_serialize_cb)(struct lttng_evaluation *evaluation, - struct lttng_dynamic_buffer *buf); +typedef int (*evaluation_serialize_cb)( + const struct lttng_evaluation *evaluation, + struct lttng_payload *payload); struct lttng_evaluation_comm { /* enum lttng_condition_type type */ @@ -42,11 +34,15 @@ struct lttng_evaluation { }; LTTNG_HIDDEN -ssize_t lttng_evaluation_create_from_buffer(const struct lttng_buffer_view *view, +void lttng_evaluation_init(struct lttng_evaluation *evaluation, + enum lttng_condition_type type); + +LTTNG_HIDDEN +ssize_t lttng_evaluation_create_from_payload(struct lttng_payload_view *view, struct lttng_evaluation **evaluation); LTTNG_HIDDEN -int lttng_evaluation_serialize(struct lttng_evaluation *evaluation, - struct lttng_dynamic_buffer *buf); +int lttng_evaluation_serialize(const struct lttng_evaluation *evaluation, + struct lttng_payload *payload); #endif /* LTTNG_EVALUATION_INTERNAL_H */