SoW-2020-0002: Trace Hit Counters: trigger error reporting integration
[lttng-tools.git] / include / lttng / condition / evaluation-internal.h
index e2b6c38489386ee00ceba2c66c111f3b306814e9..eaef721fb40b7030930f3fa18dd4cc50b2750d30 100644 (file)
@@ -1,32 +1,26 @@
 /*
 /*
- * Copyright (C) 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ * Copyright (C) 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  *
  *
- * 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
 #define LTTNG_EVALUATION_INTERNAL_H
 
 #include <lttng/condition/evaluation.h>
  */
 
 #ifndef LTTNG_EVALUATION_INTERNAL_H
 #define LTTNG_EVALUATION_INTERNAL_H
 
 #include <lttng/condition/evaluation.h>
+#include <lttng/condition/condition.h>
 #include <common/macros.h>
 #include <common/macros.h>
-#include <common/buffer-view.h>
 #include <stdbool.h>
 #include <sys/types.h>
 
 #include <stdbool.h>
 #include <sys/types.h>
 
+struct lttng_payload;
+struct lttng_payload_view;
+
 typedef void (*evaluation_destroy_cb)(struct lttng_evaluation *evaluation);
 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_payload *payload);
 
 struct lttng_evaluation_comm {
        /* enum lttng_condition_type type */
 
 struct lttng_evaluation_comm {
        /* enum lttng_condition_type type */
@@ -41,11 +35,17 @@ struct lttng_evaluation {
 };
 
 LTTNG_HIDDEN
 };
 
 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(
+               const struct lttng_condition *condition,
+               struct lttng_payload_view *view,
                struct lttng_evaluation **evaluation);
 
 LTTNG_HIDDEN
                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_payload *payload);
 
 #endif /* LTTNG_EVALUATION_INTERNAL_H */
 
 #endif /* LTTNG_EVALUATION_INTERNAL_H */
This page took 0.024421 seconds and 5 git commands to generate.