Move to kernel style SPDX license identifiers
[babeltrace.git] / src / ctf-writer / event.h
index 0bfbb007a24c7f2b7938810751f8d74772312b14..dc1187cd564706d35b4815374c5e36f335ba7169 100644 (file)
@@ -1,39 +1,23 @@
-#ifndef BABELTRACE_CTF_WRITER_EVENT_INTERNAL_H
-#define BABELTRACE_CTF_WRITER_EVENT_INTERNAL_H
-
 /*
- * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
+ * SPDX-License-Identifier: MIT
  *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
+ * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  *
  * The Common Trace Format (CTF) Specification is available at
  * http://www.efficios.com/ctf
  */
 
+#ifndef BABELTRACE_CTF_WRITER_EVENT_INTERNAL_H
+#define BABELTRACE_CTF_WRITER_EVENT_INTERNAL_H
+
+#include <stdbool.h>
+
 #include "common/assert.h"
 #include "common/macros.h"
-#include <babeltrace2/ctf-writer/field-types.h>
-#include <babeltrace2/ctf-writer/fields.h>
-#include <babeltrace2/ctf-writer/stream-class.h>
-#include <babeltrace2/ctf-writer/stream.h>
+#include <babeltrace2-ctf-writer/field-types.h>
+#include <babeltrace2-ctf-writer/fields.h>
+#include <babeltrace2-ctf-writer/stream-class.h>
+#include <babeltrace2-ctf-writer/stream.h>
 #include "ctfser/ctfser.h"
 
 #include "assert-pre.h"
@@ -82,14 +66,14 @@ static inline
 struct bt_ctf_event_class_common *bt_ctf_event_common_borrow_class(
                struct bt_ctf_event_common *event)
 {
-       BT_ASSERT(event);
+       BT_ASSERT_DBG(event);
        return event->class;
 }
 
-typedef void *(*create_field_func)(void *);
-typedef void (*release_field_func)(void *);
-typedef void *(*create_header_field_func)(void *, void *);
-typedef void (*release_header_field_func)(void *, void *);
+typedef void *(*create_field_func_type)(void *);
+typedef void (*release_field_func_type)(void *);
+typedef void *(*create_header_field_func_type)(void *, void *);
+typedef void (*release_header_field_func_type)(void *, void *);
 
 BT_HIDDEN
 int bt_ctf_event_common_initialize(struct bt_ctf_event_common *event,
@@ -101,10 +85,14 @@ int bt_ctf_event_common_initialize(struct bt_ctf_event_common *event,
                int (*map_clock_classes_func)(struct bt_ctf_stream_class_common *stream_class,
                        struct bt_ctf_field_type_common *packet_context_field_type,
                        struct bt_ctf_field_type_common *event_header_field_type),
-               create_field_func create_field_func,
-               release_field_func release_field_func,
-               create_header_field_func create_header_field_func,
-               release_header_field_func release_header_field_func);
+               create_field_func_type create_field_func,
+               release_field_func_type release_field_func,
+               create_header_field_func_type create_header_field_func,
+               release_header_field_func_type release_header_field_func);
+
+BT_HIDDEN
+int bt_ctf_event_common_set_payload(struct bt_ctf_event *event,
+               struct bt_ctf_field *payload);
 
 static inline
 struct bt_ctf_field_common *bt_ctf_event_common_borrow_payload(
This page took 0.026369 seconds and 4 git commands to generate.