SoW-2019-0002: Dynamic Snapshot
[lttng-tools.git] / include / lttng / condition / condition-internal.h
index 969c76820cd94152a5dfa18d2e4759486a1af609..2eaf9292f5165fdbb34d9fef41e759db53e51b95 100644 (file)
@@ -1,18 +1,8 @@
 /*
- * 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_CONDITION_INTERNAL_H
@@ -21,6 +11,7 @@
 #include <lttng/condition/condition.h>
 #include <common/macros.h>
 #include <common/buffer-view.h>
+#include <common/dynamic-buffer.h>
 #include <stdbool.h>
 #include <urcu/list.h>
 #include <stdint.h>
 
 typedef void (*condition_destroy_cb)(struct lttng_condition *condition);
 typedef bool (*condition_validate_cb)(const struct lttng_condition *condition);
-typedef ssize_t (*condition_serialize_cb)(
-               const struct lttng_condition *condition, char *buf);
+typedef int (*condition_serialize_cb)(
+               const struct lttng_condition *condition,
+               struct lttng_dynamic_buffer *buf,
+               int *fd_to_send);
 typedef bool (*condition_equal_cb)(const struct lttng_condition *a,
                const struct lttng_condition *b);
 typedef ssize_t (*condition_create_from_buffer_cb)(
@@ -63,11 +56,15 @@ ssize_t lttng_condition_create_from_buffer(
                struct lttng_condition **condition);
 
 LTTNG_HIDDEN
-ssize_t lttng_condition_serialize(const struct lttng_condition *condition,
-               char *buf);
+int lttng_condition_serialize(const struct lttng_condition *condition,
+               struct lttng_dynamic_buffer *buf,
+               int *fd_to_send);
 
 LTTNG_HIDDEN
 bool lttng_condition_is_equal(const struct lttng_condition *a,
                const struct lttng_condition *b);
 
+LTTNG_HIDDEN
+const char *lttng_condition_type_str(enum lttng_condition_type type);
+
 #endif /* LTTNG_CONDITION_INTERNAL_H */
This page took 0.02461 seconds and 5 git commands to generate.