X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=include%2Flttng%2Fcondition%2Fevaluation-internal.h;h=a2cb432fc1046679ec9e57296cbe40e9244f7e5d;hb=ab5be9fa2eb5ba9600a82cd18fd3cfcbac69169a;hp=414760e052a0df8d904e717fe7271460af7050d7;hpb=a58c490f0bff52a73717d31d04d1472629180de2;p=lttng-tools.git diff --git a/include/lttng/condition/evaluation-internal.h b/include/lttng/condition/evaluation-internal.h index 414760e05..a2cb432fc 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 @@ -21,11 +11,14 @@ #include #include #include +#include #include +#include typedef void (*evaluation_destroy_cb)(struct lttng_evaluation *evaluation); -typedef ssize_t (*evaluation_serialize_cb)(struct lttng_evaluation *evaluation, - char *buf); +typedef int (*evaluation_serialize_cb)( + const struct lttng_evaluation *evaluation, + struct lttng_dynamic_buffer *buf); struct lttng_evaluation_comm { /* enum lttng_condition_type type */ @@ -39,12 +32,16 @@ struct lttng_evaluation { evaluation_destroy_cb destroy; }; +LTTNG_HIDDEN +void lttng_evaluation_init(struct lttng_evaluation *evaluation, + enum lttng_condition_type type); + LTTNG_HIDDEN ssize_t lttng_evaluation_create_from_buffer(const struct lttng_buffer_view *view, struct lttng_evaluation **evaluation); LTTNG_HIDDEN -ssize_t lttng_evaluation_serialize(struct lttng_evaluation *evaluation, - char *buf); +int lttng_evaluation_serialize(const struct lttng_evaluation *evaluation, + struct lttng_dynamic_buffer *buf); #endif /* LTTNG_EVALUATION_INTERNAL_H */